/* ================================================
   SERPAC – Modern Agroindustrial Website
   ================================================ */

:root {
  --primary: #28B200;
  --primary-light: #39D900;
  --primary-dark: #1A7D00;
  --accent: #5EF230;
  --silver: #B8C0C8;
  --silver-light: #D8E0E8;
  --dark: #0A0F0A;
  --dark-2: #111810;
  --dark-3: #1A2418;
  --text: #111810;
  --text-muted: #4A5A48;
  --text-light: #7A907A;
  --bg: #ffffff;
  --bg-light: #F4F8F3;
  --bg-dark: #EBF2EA;
  --border: #D8E8D5;
  --white: #ffffff;
  --success: #22c55e;

  --font-main: 'Inter', sans-serif;
  --font-heading: 'Sora', sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(40, 178, 0, 0.10);
  --shadow-md: 0 8px 40px rgba(40, 178, 0, 0.15);
  --shadow-lg: 0 16px 64px rgba(40, 178, 0, 0.20);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  scroll-behavior: smooth; 
  font-size: 16px; 
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- SECTIONS ---- */
.section {
  padding: 96px 0;
}

.section-dark {
  background: var(--dark-2);
  color: var(--white);
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255,255,255,0.75);
}

.section-light {
  background: var(--bg-light);
}

.section-accent {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.section-dark .section-header p {
  color: rgba(255,255,255,0.7);
}

/* ---- SECTION LABEL ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(40, 178, 0, 0.08);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-label.light {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
}

/* ---- GRADIENT TEXT ---- */
.gradient-text {
  background: linear-gradient(135deg, #5EF230, #39D900, #28B200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(40, 178, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(40, 178, 0, 0.45);
}

.btn-primary.full-width {
  width: 100%;
  justify-content: center;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 1rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 100px;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
}

.carousel-zoom-hint {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 15, 10, 0.56);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-content {
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lb-content img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 64px rgba(0, 0, 0, 0.6);
}

.lb-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: white;
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lb-prev {
  left: 20px;
}

.lb-next {
  right: 20px;
}

.lb-prev:hover,
.lb-next:hover {
  background: rgba(40, 178, 0, 0.3);
  border-color: rgba(40, 178, 0, 0.5);
}

/* ================================================
   ANIMATIONS
   ================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ================================================
   BACK TO TOP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ================================================
   RESPONSIVE GLOBAL — 3 vistas
   ● Desktop : > 900px   (estilos base, sin media query)
   ● Tablet  : 500px – 900px
   ● Mobile  : < 500px
   Cada sección gestiona su propio responsive en su CSS.
   Aquí solo van reglas verdaderamente globales.
   ================================================ */

@media (max-width: 900px) {
  .container      { padding: 0 24px; }
  .section        { padding: 72px 0; }
  .section-header { margin-bottom: 48px; }
  .carousel-zoom-hint {
    top: 14px;
    right: 14px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-content img { max-width: 92vw; max-height: 75vh; }
}

@media (max-width: 500px) {
  .container      { padding: 0 16px; }
  .section        { padding: 48px 0; }
  .section-header { margin-bottom: 32px; }
  .carousel-zoom-hint {
    gap: 6px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }
}
