/* 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);

  /* Loader variables */
  --loader-bg: var(--color-light);
  --loader-fg: var(--color-primary);
  --loader-text: #777777;
  --loader-z: 9999;

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

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

/* ========== LOADER ========== */
/* full-viewport initial loader */
#page-loader{
  position:fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  background:var(--loader-bg);
  z-index:var(--loader-z);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  transition:opacity .36s ease, visibility .36s ease;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

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

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

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

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

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

/* ensure site's content is not focusable while loader present (optional visual safety) */
body.loader-active *:not(#page-loader):not(#page-loader *){ user-select:none; }

/* ========== 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;
}

/* ========== 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{display:inline-flex; color:var(--color-primary); text-decoration:none}
/* enforce consistent social icon sizing */
.social img{width:30px; height:30px; display:block}

/* ========== HERO / CARRUSEL ========== */
/* horizontal sliding carousel */
.hero-carousel{
  position:relative;
  width:100%;
  overflow:hidden;
  /* keep height determined by image aspect to avoid stretching */
  height:auto;
}
.carousel{
  width:100%;
  display:flex;              /* horizontal track */
  transition:transform 450ms cubic-bezier(.22,.9,.31,1);
  will-change:transform;
}
.slide{
  flex:0 0 100%;             /* each slide occupies full carousel width */
  max-width:100%;
  position:relative;
  opacity:1;
}
.slide img{
  display:block;
  width:100%;
  height:auto;
  object-fit:cover;
}

/* carousel buttons */
.carousel-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:rgba(255,255,255,0.95);
  width:44px;
  height:44px;
  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);
  z-index:3;
}
.carousel-btn:hover{background:var(--color-primary); color:#fff}
.carousel-btn.prev{left:12px}
.carousel-btn.next{right:12px}

/* subtle overlay (kept) */
.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;
}

/* ========== QUICK ACCESS ========== */
/* container stripe */
.quick-access{
  width:100%;
  background:#ffffff;
  padding:35px 0;
  border-top:1px solid #f2f2f2;
  border-bottom:1px solid #f2f2f2;
}

/* inner layout */
.quick-access-container{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:0 4%;
  box-sizing:border-box;
}

/* each anchor acts as a button */
.quick-item{
  display:flex;
  align-items:center;         /* center icon and text vertically */
  justify-content:center;     /* center the whole group inside the button */
  gap:10px;                   /* horizontal spacing between icon and text */
  text-align:center;          /* fallback */
  text-decoration:none;
  cursor:pointer;
  transition:transform 0.3s ease;
  min-height:70px;            /* uniform height across buttons */
  padding:10px 0;
  flex:1 1 calc(25% - 15px);
  box-sizing:border-box;
}

/* icon */
.quick-item img{
  height:38px;      /* fixed icon height (approx. 36-42px) */
  width:auto;
  margin:0;
  display:block;
  flex-shrink:0;    /* avoid icon shrinking */
  filter:none;
  box-shadow:none;
}

/* text composition */
.quick-text{
  font-family:var(--font-main);
  font-size:13px;
  color:var(--color-primary);
  text-transform:uppercase;
  line-height:1.1;
  display:flex;
  flex-direction:column;  /* two stacked lines */
  gap:2px;
  text-align:left;        /* left-align text within its block */
}
.quick-text .bold{font-weight:700}
.quick-text .light{font-weight:400}

/* hover effect (subtle, no color change) */
.quick-item:hover{ transform:translateY(-4px) }
.quick-item:hover img{ filter:brightness(1.06) }

/* focus visible for accessibility */
.quick-item:focus{
  outline:2px solid var(--color-primary);
  outline-offset:4px;
  transform:translateY(-4px);
}

/* responsive: tablet → 2 columns */
@media (max-width:1024px){
  .quick-access-container{ flex-wrap:nowrap; justify-content:flex-start }
  .quick-item{ flex:1 1 48%; max-width:48% }
}

/* mobile: two columns for small viewports (<=768px) */
@media (max-width:768px){
  .quick-access-container{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:stretch;
    gap:16px;
    padding:0 6%;
  }
  .quick-item{
    flex:1 1 calc(50% - 12px);
    max-width:calc(50% - 12px);
    width:auto;
  }
}

/* narrow / carousel image-change breakpoint → single centered column (<=460px) */
@media (max-width:460px){
  .quick-access-container{
    flex-direction:column;
    align-items:center;
    gap:20px;
    padding:0 6%;
  }
  .quick-item{
    width:100%;
    max-width:420px;
    flex:0 0 auto;
  }
}

/* ========== HOLA CASA BANNER ========== */
/* container spacing kept */
.hola-casa{padding:12px 0}

/* wrapper that holds <picture> → responsive image */
.hola-cover{
  width:100%;
  border-radius:8px;
  position:relative;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  display:block;
  padding:0;
}

/* responsive image: always 100% width, auto height to preserve aspect ratio */
.hola-cover picture,
.hola-cover img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
}

/* keep the CTA anchored over the image (bottom-centered) */
.btn-hola-casa{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:14px;
  display:inline-block;
  background:rgba(0,0,0,0.65);
  color:#fff;
  padding:10px 14px;
  border-radius:8px;
  text-decoration:none;
  font-size:13px;
  transition:background var(--transition-fast);
  z-index:2;
}
.btn-hola-casa:hover{background:var(--color-primary)}



/* ========== 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:nowrap;
}

.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;
  }

  /* allow the legales text to break into its own line on small viewports */
  .footer-right{
    white-space:normal;
    justify-content:center;
  }
  .footer-right span{
    display:block;
    margin-top:4px;
  }
}

/* ========== 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){
  .qa-item{flex:1 1 calc(25% - 8px)}
  .main-nav ul{gap:28px}
  .newsletter-form input[type="email"]{width:320px}
}

@media(min-width:1024px){
  .main-header .container{padding:18px 0}
}