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

  /* layout: column flow so footer can stick to bottom when content is short */
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* 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}
/* ensure social icons render at the requested dimensions */
.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;
}



/* ========== JOBS / TRABAJÁ CON NOSOTROS ========== */
.jobs-page{
  width:100%;
  background:var(--color-light);
  padding-top:72px;   /* spacious top (60-80px suggested) */
  /* reduce large bottom padding now that layout handles spacing */
  padding-bottom:40px;
  display:flex;
  justify-content:center;

  /* allow main content to grow so footer is pushed to bottom */
  flex:1 0 auto;
}
.jobs-container{
  max-width:760px;
  width:90%;
  margin:0 auto;
  box-sizing:border-box;
  text-align:left; /* centered container, left-aligned content */
}

/* header: icon + title */
.jobs-header{
  display:flex;
  flex-direction:row; /* icon and title inline */
  align-items:center;
  gap:20px; /* required 20px gap between icon and title */
}
.jobs-header img{
  height:60px;
  width:auto;
  flex-shrink:0;
}

/* wrap title + underline in a vertical stack so underline stays under the title */
.jobs-title-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.jobs-header h1{
  font-family:var(--font-main);
  font-size:34px;
  color:var(--color-primary);
  margin:0;
  line-height:1;
  text-transform:lowercase;
}
.jobs-header .light{ font-weight:400; }
.jobs-header .bold{ font-weight:700; }

/* orange underline styles (moved into its own row) */
.jobs-underline{
  width:117px;
  max-width:none;
  height:3px;
  background:var(--color-primary);
  margin:0; /* spacing handled by row */
  border-radius:2px;
}

/* separate row for underline, offset from left by icon width (50px) + gap (20px) = 70px */
.jobs-underline-row{
  margin-left: calc(50px + 20px);
  margin-top:10px;
  margin-bottom:18px;
}

/* on small screens keep header inline and ensure underline offsets beneath the title */
@media (max-width:768px){
  /* keep header inline (icon + text on same row for phone) */
  .jobs-header{
    flex-direction:row;
    align-items:center;
    gap:20px;
  }

  /* keep CTA stacked on very small screens */
  .jobs-cta{ flex-direction:column; align-items:flex-start; gap:8px; }

  /* offset underline so it sits under the title (icon width 60px + gap 20px) */
  .jobs-underline-row{
    margin-left: calc(60px + 20px);
  }
}

/* descriptive text */
.jobs-content{
  margin-top:22px;
  color:#777777;
  font-size:15px;
  line-height:1.75;
  font-weight:400;
  max-width:100%;
}
.jobs-content p{ margin:0; }
.jobs-content strong{ font-weight:700; color:#555555; }

/* CTA block: label + button */
.jobs-cta{
  display:flex;
  align-items:center;
  gap:15px;
  margin-top:20px;
}
.jobs-cta .label{
  font-weight:600;
  font-size:14px;
  color:var(--color-primary);
  text-transform:none;
}

/* magenta / fucsia primary CTA */
.btn-formulario{
  background-color:#ff00cc;
  color:#ffffff;
  padding:6px 14px;
  border-radius:4px;
  font-weight:600;
  font-size:14px;
  text-decoration:none;
  display:inline-block;
  transition:opacity .25s ease, transform .12s ease;
}
.btn-formulario:hover{ opacity:0.9; transform:translateY(-1px); }

/* responsive: tablet */
@media (max-width:1024px){
  .jobs-header h1{ font-size:28px; }
  .jobs-header img{ height:50px; }
}

/* responsive: mobile */
@media (max-width:768px){
  /* ensure layout stays inline: icon and "trabajá con nosotros!" remain on one line */
  .jobs-header{ flex-direction:row; align-items:center; gap:20px; }
  .jobs-cta{ flex-direction:column; align-items:flex-start; gap:8px; }
}





/* ========== 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 (displayed as negative/white on orange footer) */
.footer-small-logo{
  height:24px; /* small, discreet */
  width:auto;
  display:block;
  /* ensure clear rendering on various devices */
  image-rendering: -webkit-optimize-contrast;
}

/* 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 wrapping by default for small screens */
}

/* keep single-line layout on wider displays */
@media(min-width:769px){
  .footer-right{ 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;
  }
  /* ensure legales wraps nicely and centers on small screens */
  .footer-right{
    justify-content:center;
    white-space:normal;
  }
}

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

/* ========== PAGE LOADER ========== */
#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 or corporate color */
  transition:opacity .35s ease, visibility .35s ease;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

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

/* inner composition */
#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%;
  box-sizing:border-box;
  border:4px solid #eaeaea;
  border-top:4px solid var(--color-primary);
  animation:loader-rotate 0.9s linear infinite;
}

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

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

/* ensure main content hidden for assistive tech while loader active */
body.loader-active main,
body.loader-active header,
body.loader-active footer,
body.loader-active .whatsapp-float,
body.loader-active .modal{
  visibility:hidden;
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
}

/* small tweak on very small screens to keep loader centered */
@media(max-height:420px){
  #page-loader .loader-inner{ transform:translateY(-6%); }
}