/* style.css — Red VIGFarma (mobile-first) */

/* ========== VARIABLES ========== */
:root{
  --color-primary:#f58220;
  --color-dark:#333333;
  --color-light:#ffffff;
  --color-gray:#777777;
  --color-overlay: rgba(0,0,0,0.6);

  --font-main: 'Montserrat', sans-serif;

  --transition-fast: 0.25s ease;
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.08);
  --radius-soft: 8px;
}

/* ========== RESET & BASE ========== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font-main);
  background:var(--color-light);
  color:var(--color-dark);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  font-size:16px;
}

/* simple container */
.container{
  width:92%;
  max-width:1200px;
  margin:0 auto;
}

/* ========== PAGE LOADER ========== */
/* loader covers full viewport and centers spinner + optional text */
#page-loader{
  position:fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  background:var(--color-light); /* white by default, can use var(--color-primary) if desired */
  transition:opacity .35s ease, visibility .35s ease;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

/* inner layout */
#page-loader .loader-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}

/* spinner */
#page-loader .spinner{
  width:56px; /* within 48-60px spec */
  height:56px;
  border-radius:50%;
  border:4px solid #eaeaea;
  border-top:4px solid var(--color-primary);
  box-sizing:border-box;
  animation:loader-rotate 0.9s linear infinite;
}

/* ensure rotation keyframes exist */
@keyframes loader-rotate{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

/* optional text */
#page-loader .loader-text{
  font-size:14px;
  color:var(--color-gray);
  margin-top:12px;
  font-weight:400;
  letter-spacing:0.5px;
}

/* fade-out state */
#page-loader.fade-out{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

/* while loading, hide main content to avoid flashes (preserve layout hidden) */
body.loading .main-header,
body.loading .main-nav,
body.loading .about-page,
body.loading .main-footer,
body.loading .whatsapp-float{
  visibility:hidden;
  pointer-events:none;
  user-select:none;
}

/* keep the rest of header styles marker */
 /* ========== HEADER ========== */
.main-header{
  background:var(--color-light);
  box-shadow:0 2px 6px rgba(0,0,0,0.04);
  position:sticky;
  top:0;
  z-index:50;
}
.main-header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
}
.logo{height:48px; width:auto; display:block}

/* NAV TOGGLE (mobile) */
.nav-toggle{
  display:none; /* shown on small screens via media query */
  background:transparent;
  border:0;
  width:44px;
  height:44px;
  border-radius:8px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  margin-left:8px;
}
.nav-toggle .hamburger{
  display:block;
  width:22px;
  height:2px;
  background:var(--color-primary);
  position:relative;
  transition:transform .25s ease;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after{
  content:'';
  position:absolute;
  left:0;
  width:22px;
  height:2px;
  background:var(--color-primary);
  transition:transform .25s ease, top .25s ease, bottom .25s ease, opacity .2s ease;
}
.nav-toggle .hamburger::before{ top:-7px }
.nav-toggle .hamburger::after{ bottom:-7px }

/* when nav open, animate hamburger to X */
body.nav-open .nav-toggle .hamburger{
  transform:rotate(45deg);
}
body.nav-open .nav-toggle .hamburger::before{
  top:0;
  transform:rotate(90deg);
}
body.nav-open .nav-toggle .hamburger::after{
  bottom:0;
  opacity:0;
}

/* MOBILE NAV: hide default and show via toggle */
@media(max-width:768px){
  .nav-toggle{ display:flex }
  .main-nav{
    position:fixed;
    top:0;
    left:0;
    right:0;
    background:var(--color-light);
    transform:translateY(-110%);
    transition:transform .28s ease;
    z-index:120;
    box-shadow:0 8px 24px rgba(0,0,0,0.12);
  }
  /* slide-down when open */
  body.nav-open .main-nav{ transform:translateY(0) }

  .main-nav ul{
    display:flex;
    flex-direction:column;
    gap:0;
    padding:12px 6%;
    margin:60px 0 18px 0; /* leave space for header area */
  }
  .main-nav li{ padding:10px 0; border-bottom:1px solid #f2f2f2 }
  .main-nav a{ display:block; padding:8px 0; font-size:16px; color:var(--color-dark) }
  /* hide social links slightly when nav is open to keep header compact */
  .social-links{ display:flex; gap:10px; align-items:center }
}

/* NAV */
.main-nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:18px;
  align-items:center;
}
.main-nav a{
  text-decoration:none;
  color:#F58220;
  text-transform:uppercase;
  font-size:14px;
  letter-spacing:1px;
  transition:color var(--transition-fast);
  font-weight:400;
}

/* bold segment inside nav items */
.main-nav .nav-bold{ font-weight:700; line-height:1; display:inline-block; }
.main-nav .nav-light{ font-weight:400; display:inline-block; }
.main-nav a:hover{color:var(--color-dark)}
.main-nav .bold{font-weight:700}
.main-nav .light{font-weight:400}

/* SOCIAL LINKS (component) */
.social-links{display:flex; gap:10px; align-items:center}
.social-links img{ width:30px; height:30px; display:block; object-fit:contain; }
.social{display:inline-flex; color:var(--color-primary); text-decoration:none}

/* ========== HERO / CARRUSEL ========== */
.hero-carousel{
  position:relative;
  width:100%;
  height:300px; /* mobile-first */
  overflow:hidden;
}
.carousel{height:100%; position:relative}
.slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  opacity:0;
  transition:opacity var(--transition-fast);
}
.slide.active{opacity:1}

/* carousel buttons */
.carousel-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:rgba(255,255,255,0.9);
  width:40px;
  height:40px;
  border-radius:50%;
  box-shadow:var(--shadow-soft);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:var(--color-dark);
}
.carousel-btn:hover{background:var(--color-primary); color:#fff}
.carousel-btn.prev{left:12px}
.carousel-btn.next{right:12px}

/* overlay subtle */
.hero-carousel::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0.06));
  pointer-events:none;
}



/* ========== ABOUT / QUIÉNES SOMOS ========== */
.about-page{
  width:100%;
  background:var(--color-light);
  padding-top:72px;   /* spacious top */
  padding-bottom:84px; /* spacious bottom */
  display:flex;
  justify-content:center;
}
.about-container{
  max-width:760px;
  width:90%;
  margin:0 auto;
  box-sizing:border-box;
}
.about-header{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:8px;
}
.about-header img{
  height:60px; /* 55-65px approx */
  width:auto;
  flex-shrink:0;
}
.about-header h1{
  font-family:var(--font-main);
  font-size:34px;
  text-transform:lowercase;
  color:var(--color-primary);
  margin:0;
  line-height:1;
}
.about-header .light{ font-weight:400; }
.about-header .bold{ font-weight:700; }

/* divider wrapper positions the divider on its own line with calculated left margin */
.about-divider-wrap{
  margin-left: calc(50px + 20px); /* 50px of icon width + 20px gap */
}

/* divider — orange, left-aligned with specified width and thickness */
.about-divider{
  width:131px;
  height:3px;
  background-color:var(--color-primary);
  border:0;
  margin:10px 0 18px 0;
  display:block;
  clear:both;
  border-radius:3px;
}

/* content */
.about-content{
  color:#666666;
  font-size:15px;
  line-height:1.75;
  font-weight:400;
  text-align:left;
}
.about-content p{
  margin:0 0 20px 0;
}
.about-content strong{
  font-weight:700;
  color:#555555;
}

/* responsive adjustments */
@media (max-width:1024px){
  .about-header h1{ font-size:28px; }
  .about-header img{ height:50px; }
}
@media (max-width:768px){
  .about-header{ flex-direction:row; align-items:center; gap:12px; }
  .about-header h1{ font-size:28px; }
  .about-container{ width:92%; }

  /* keep divider aligned beneath the text (starts after the icon + small gap) */
  .about-divider-wrap{ margin-left: calc(50px + 12px); }
  .about-divider{ width:131px; max-width:131px; }
}





/* ========== FOOTER (compact institutional stripe) ========== */
.main-footer{
  width:100%;
  background-color:var(--color-primary); /* solid corporate orange */
  padding:10px 0 80px;
  display:flex;
  align-items:center;
  box-shadow:none;
  border:0;
  position:relative;
  z-index:40;
}

/* internal container */
.footer-container{
  width:90%;
  max-width:1200px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

/* left: small discreet logo */
.footer-small-logo{
  height:24px; /* small, discreet */
  width:auto;
  display:block;
}

/* right: legales — bold label + normal descriptive text */
.footer-right{
  font-family:var(--font-main);
  font-size:13px;
  color:#ffffff;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:normal;
}

.footer-right a{
  font-weight:700;
  text-transform:uppercase;
  margin-right:6px;
  color:#ffffff;
  text-decoration:none;
  letter-spacing:0.5px;
  font-size:13px;
}

.footer-right span{
  font-weight:400;
  color:rgba(255,255,255,0.9);
  font-size:13px;
  text-transform:none;
}

/* responsive: stack on small screens */
@media(max-width:768px){
  .footer-container{
    flex-direction:column;
    gap:8px;
    text-align:center;
  }
}

/* ========== MODALS ========== */
.modal{
  position:fixed;
  inset:0;
  background:var(--color-overlay);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity var(--transition-fast);
  z-index:200;
}
.modal.active{opacity:1; pointer-events:auto}
.modal-content{
  background:#fff;
  border-radius:10px;
  width:92%;
  max-width:520px;
  position:relative;
  box-shadow:0 18px 50px rgba(0,0,0,0.25);
  overflow:hidden;
}
.modal-content img{width:100%; display:block}
.modal-close{
  position:absolute;
  top:10px;
  right:10px;
  border:0;
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--color-primary);
  color:#fff;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float{
  position:fixed;
  right:20px;
  bottom:100px;
  width:60px;
  height:60px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  z-index:300;
  box-shadow:0 8px 26px rgba(0,0,0,0.18);
  animation:pulse 2.6s infinite;
}
.whatsapp-float img{width:100%; height:auto; display:block}

/* pulse animation */
@keyframes pulse{
  0%{transform:scale(1)}
  50%{transform:scale(1.06)}
  100%{transform:scale(1)}
}

/* ========== RESPONSIVE (tablet & desktop) ========== */
@media(min-width:700px){
  .hero-carousel{height:400px}
  .qa-item{flex:1 1 calc(25% - 8px)}
  .main-nav ul{gap:28px}
  .newsletter-form input[type="email"]{width:320px}
}

@media(min-width:1024px){
  .hero-carousel{height:500px}
  .main-header .container{padding:18px 0}
  .hola-cover{height:220px}
}

/* Make the legales text break to a new line on narrower viewports */
@media (max-width:900px){
  .footer-right span{
    display:block;
    margin-top:6px;
  }
}