/* 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:15px;
}

/* 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-links img{ width:30px; height:30px; display:block; }
.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;
}



/* ========== BRANCHES / SUCURSALES ========== */
.branches-page{
  width:100%;
  background:var(--color-light);
  padding-top:72px;
  padding-bottom:100px;
  display:flex;
  justify-content:center;
}
.branches-container{
  max-width:760px;
  width:92%;
  margin:0 auto;
  box-sizing:border-box;
  text-align:left;
}

/* header: icon + title */
.branches-header{
  display:flex;
  align-items:center;
  gap:20px;
}
.branches-header img{
  height:50px;
  width:50px;
  object-fit:contain;
  flex-shrink:0;
}
.branches-header h1{
  font-family:var(--font-main);
  font-size:28px;
  color:var(--color-primary);
  margin:0;
  line-height:1;
  text-transform:lowercase;
}
.branches-header .light{ font-weight:400; }
.branches-header .bold{ font-weight:700; }

/* small orange underline under the title (one third width, left aligned) */
.branches-underline{
  height:3px;
  background:var(--color-primary);
  width:140px;
  margin-top:10px;
  margin-bottom:18px; /* ensure a line break and spacing so subsequent text won't overlap */
  margin-left:70px; /* starts after the 50px icon + 20px gap */
  border-radius:4px;
  display:block;
}

/* intro text */
.branches-intro{
  margin-top:20px;
  max-width:680px;
  color:#777777;
  font-size:15px;
  line-height:1.7;
}
.branches-intro strong{ font-weight:700; color:#555555; }

/* filter block */
.branches-filter{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:25px;
}
/* push the maps icon to the far right of the filter row */
.branches-filter .maps-search-right{
  margin-left:auto;
}
/* Google Maps icon link inside the filter - fixed touch-friendly 32x32 */
.branches-filter .maps-search-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.branches-filter .maps-search-link img{
  width:32px;
  height:32px;
  display:block;
}
.branches-filter label{
  font-weight:600;
  color:var(--color-primary);
  font-size:15px;
  min-width:180px;
}
.branches-filter input[type="text"],
.branches-filter select{
  width:260px;
  height:36px;
  border-radius:16px;
  border:2px solid rgba(245,130,32,0.18);
  padding:0 12px;
  font-size:13px;
  outline:none;
  background:#fff;
  color:var(--color-dark);
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
}

/* stronger orange border and subtle focus for select */
.branches-filter select{
  border-color: rgba(245,130,32,0.32);
  padding-right:34px; /* space for native chevron */
  background-image: linear-gradient(45deg, transparent 50%, var(--color-primary) 50%),
                    linear-gradient(135deg, var(--color-primary) 50%, transparent 50%),
                    linear-gradient(to right, rgba(0,0,0,0.04), rgba(0,0,0,0.04));
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px), 100% 0;
  background-size: 6px 6px, 6px 6px, 1px 36px;
  background-repeat: no-repeat;
}
.branches-filter input[type="text"]{
  width:260px;
  height:32px;
  border-radius:16px;
  border:1px solid rgba(245,130,32,0.25);
  padding:0 12px;
  font-size:13px;
  outline:none;
}
.branches-filter input::placeholder{ color:#bdbdbd; font-size:13px; }
.branches-filter .btn-clear{
  border:0;
  background:transparent;
  color:var(--color-gray);
  font-weight:600;
  cursor:pointer;
}

/* branches list */
.branches-list{
  margin-top:30px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* branch-row — lightweight, left-aligned list item (no background/shadow) */
.branch-row{
  margin-bottom:28px;           /* component spacing */
  padding:0;
  background:transparent;       /* no background */
  border:0;                     /* no border */
  box-shadow:none;              /* no shadow */
  color:var(--color-dark);
  line-height:1.3;
}

/* LOCALITY: icon + text (primary hierarchy) */
.branch-row .branch-locality{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-size:15px;               /* 15px as requested */
  font-weight:700;
  color:var(--color-primary);   /* corporate orange */
  text-transform:uppercase;
  letter-spacing:0.5px;
}

/* locality icon (12–14px, subtle) */
.branch-row .locality-icon{
  width:14px;
  height:14px;
  background-color:var(--color-primary);
  -webkit-mask: url('icono-sucursales.png') no-repeat center;
  mask: url('icono-sucursales.png') no-repeat center;
  -webkit-mask-size:contain;
  mask-size:contain;
  display:inline-block;
  flex:0 0 auto;
  border-radius:2px;
}

/* NAME: secondary, right under locality */
.branch-row .branch-name{
  margin-top:3px;               /* tight spacing */
  font-size:16px;               /* increased from 14px to 16px */
  font-weight:600;
  color:var(--color-primary);   /* same corporate orange as locality */
}

/* CONTACT NOTE: telephone and directions are interactive and prominent */
/* address is contextual, lighter and non-interactive */
.branch-row .branch-address{
  margin-top:2px;
  font-size:15px;               /* increased from 13px to 15px */
  font-weight:400;
  color:#777777;
}

/* contact actions: phone + directions */
/* contact block: two stacked rows with icons aligned left and text column aligned */
.branch-row .branch-contact{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  gap:6px; /* small vertical gap between the two rows */
}

/* each contact row */
.branch-row .contact-row{
  display:flex;
  align-items:center;
  gap:10px;
}

/* icon column: fixed width so texts align vertically */
.branch-row .contact-row .contact-icon{
  width:28px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  flex:0 0 28px;
}

/* text column: starts at same horizontal point for both rows */
.branch-row .contact-row .contact-text{
  font-size:15px;               /* increased from 13px to 15px */
  line-height:1;
  color:var(--color-dark);
}

/* WhatsApp row styling: green text and link color */
.branch-row .contact-row.contact-whatsapp .contact-text{
  color:#0a8f48;
  font-weight:600;
}
.branch-row .contact-row.contact-whatsapp .contact-icon img{
  display:block;
}

/* Map row styling: blue text and link color */
.branch-row .contact-row.contact-map .contact-text{
  color:#0b78d1;
  font-weight:600;
}
.branch-row .contact-row.contact-map .contact-text .directions-link{
  color:inherit;
  text-decoration:none;
}
.branch-row .contact-row.contact-map .contact-text .directions-link:hover{
  text-decoration:underline;
}

/* ensure small screens keep the same stacked layout and comfortable touch targets */
@media(max-width:768px){
  .branch-row .contact-row .contact-icon{ width:28px; }
  .branch-row .contact-row .contact-text{ font-size:13px; }
}

/* schedule (below contact) */
.branch-row .branch-schedule{
  margin-top:6px;
  font-size:14.5px;             /* increased from 12.5px to 14.5px */
  color:#777777;
}
/* label/time above week list */
.branch-row .schedule-label{
  font-weight:700;
  text-transform:uppercase;
  color:#555555;               /* darker gray for label */
}
.branch-row .schedule-time{
  font-weight:400;
  color:#777777;
}

/* week list lines: day + time with 10px gap and left-justified times */
.schedule-week{ padding-top:4px; }
.week-line{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:10px;                 /* 10px space between day and time */
  margin:2px 0;
  white-space:normal;
}
.week-day{
  font-weight:700;
  text-transform:uppercase;
  color:#555555;
  min-width:90px;           /* align times vertically; adjust if needed */
  flex:0 0 auto;
}
.week-time{
  color:#777777;
  text-align:left;          /* ensure left-justified */
  flex:1 1 auto;
}

/* optional subtle separator if desired (kept commented) */
/*
.branch-row:not(:last-child){
  border-bottom:1px solid #eee;
  padding-bottom:20px;
}
*/

/* ensure list respects spacing on small screens */
@media(max-width:768px){
  .branch-row{ margin-bottom:22px; }
  .branch-row .branch-contact{ gap:10px; }
}

/* empty results */
.branches-empty{
  margin-top:18px;
  color:#777777;
  font-size:14px;
}

/* responsive */
@media(max-width:768px){
  .branches-filter{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
  .branches-filter label{ min-width:0; }
  .branches-filter input[type="text"]{ width:100%; max-width:100%; }
  .branch-card{ width:100%; }

  /* ensure Google Maps icon/link aligns to the left on phone */
  .branches-filter .maps-search-right{
    margin-left:0;
    align-self:flex-start;
  }
}





/* ========== 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;
  flex-wrap:wrap;
  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; /* allow line breaks based on available width */
  flex: 1 1 auto;
}

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

/* FULLSCREEN GLOBAL LOADER: white full-viewport overlay with centered spinner */
.global-loader{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #ffffff; /* white background per spec */
  z-index: 9999;
  pointer-events: auto;
  transition: opacity 350ms linear, visibility 350ms linear;
  opacity: 1;
  visibility: visible;
}

/* visible state */
.global-loader.visible{
  display: flex;
  opacity: 1;
  visibility: visible;
}

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

/* inner wrapper */
.loader-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  font-family:var(--font-main);
  text-transform:none;
}

/* spinner: modern circular bordered spinner */
.loader-spinner{
  width:56px;
  height:56px;
  border-radius:50%;
  border:4px solid #eaeaea;               /* base light gray */
  border-top:4px solid var(--color-primary); /* active orange segment */
  box-sizing:border-box;
  animation:loader-rotate 0.9s linear infinite;
}

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

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

/* ensure hidden when aria-hidden true but not visible class */
.global-loader[aria-hidden="true"]{
  display:none;
}