/* =====================================================
   🌿 RESET GENERAL
===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    display: flex;
    flex-direction: column;
    min-height: 100vh;  /* ← CLAVE: body ocupa al menos toda la pantalla */
}

main {
    flex: 1 0 auto;     /* ← CLAVE: main crece y empuja el footer hacia abajo */
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;  /* ← nunca ocultar el overflow de main */
}

footer {
    flex-shrink: 0;     /* ← footer no se encoge */
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

a {
    text-decoration: none;
}

section {
    position: relative;
}

.navbar-spacer {
    height: 75px;
}

/* =====================================================
   🎨 COLORES CORPORATIVOS
===================================================== */

.bg-green {
    background: linear-gradient(135deg, #134f1d, #0f3c16);
}

.bg-dark-green {
    background-color: #206e25;
}

.text-green {
    color: #1b5e20;
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.logo-nav-wrapper {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
}

.logo-navbar {
    height: 40px;
    width: auto;
}

.brand-text {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #a5d6a7 !important;
}

/* =====================================================
   🦶 FOOTER REDES SOCIALES
===================================================== */

footer h5 {
    font-family: 'Poppins', sans-serif;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    font-size: 1.8rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-4px);
}

.social-link.whatsapp:hover {
    color: #25D366;
}

.social-link.instagram:hover {
    color: #E1306C;
}

/* =====================================================
   📦 SECCIONES
===================================================== */

.section-light {
    background: linear-gradient(135deg, #f4f9f4, #e9f5ea);
    padding: 70px 0;
}

.section-white {
    background-color: #ffffff;
    padding: 70px 0;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.45rem;
}

.section-text {
    color: #555;
}

/* =====================================================
   🟢 BOTONES
===================================================== */

.btn-green {
    background-color: #1b5e20;
    color: #fff;
    border: none;
}

.btn-green:hover {
    background-color: #144d18;
    color: #fff;
}

/* =====================================================
   🟢 HERO BASE
===================================================== */

.hero-section {
    background-color: #e8f5e9;
    padding: 80px 0;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3rem;
}

.hero-text {
    font-size: 1.1rem;
    color: #555;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* =====================================================
   🌿 VALUE CARDS
===================================================== */

.value-card-modern {
    background: #ffffff;
    border-radius: 20px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.value-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.value-card-modern h5 {
    font-size: 1.45rem;
    font-weight: 600;
}

.value-icon {
    font-size: 3rem;
    color: #1b5e20;
}

/* =====================================================
   🌿 CTA FINAL
===================================================== */

.cta-section {
    background: linear-gradient(135deg, #44bb4c, #19691f);
    padding: 100px 0;
}

.cta-title {
    font-weight: 700;
    font-size: 2rem;
}

.cta-section p {
    opacity: 0.9;
}

/* =====================================================
   TIPOGRAFÍA CONTENIDO
===================================================== */

.historia-text,
.section-text,
.value-card-modern p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
}

@media (min-width: 992px) {
    .historia-text,
    .section-text,
    .value-card-modern p {
        font-size: 1.25rem;
    }
}

/* =====================================================
   🛒 CATALOGO
===================================================== */

.catalogo-bg {
    position: relative;
    width: 100%;
    background-image: url("/static/img/fondo_catalogo.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.catalogo-overlay {
    background: rgba(0, 0, 0, 0.4);
    padding: 120px 0;
}

.catalogo-bg .card {
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.catalogo-bg .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.20);
}

.catalogo-bg .card img {
    height: 220px;
    width: 100%;
    object-fit: contain;
    background-color: #fff;
    padding: 15px;
}

.catalogo-descarga a {
    font-size: 1.2rem;
    border-radius: 40px;
}

/* =====================================================
   👥 CLIENTES
===================================================== */

.clientes-full {
    position: relative;
    width: 100%;
    background: url("/static/img/fondo_clientes.png") center center no-repeat;
    background-size: cover;
}

.cliente-card-modern {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 320px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.cliente-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.20);
}

.cliente-logo-modern {
    width: 100%;
    height: 120px;
    object-fit: contain;
}

/* =====================================================
   🌿 CONTACTO
===================================================== */

.contacto-full {
    position: relative;
    width: 100%;
    background: url("/static/img/fondo_catalogo.png") center center no-repeat;
    background-size: cover;
}

.contacto-overlay {
    background: rgba(0, 0, 0, 0.55);
    padding-top: 120px;
    padding-bottom: 80px;
}

.contacto-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    transition: all 0.4s ease;
}

.contacto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.contacto-form input,
.contacto-form textarea {
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid #ddd;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    border-color: #1b5e20;
    box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.15);
}

/* =====================================================
   ✨ ANIMACIONES
===================================================== */

.reveal {
    opacity: 0;
    transform: translateX(120px);
    transition: all 0.9s cubic-bezier(.21, 1.02, .73, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateX(0);
}

/* Excepción: historia-home-section no debe desplazarse */
.historia-home-section.reveal {
    transform: none !important;
}

.fade-in-hero {
    animation: heroFade 1.2s ease forwards;
    opacity: 0;
}

@keyframes heroFade {
    to { opacity: 1; }
}

@keyframes breathingEffect {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.025); }
    100% { transform: scale(1); }
}

@keyframes softPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.015); }
    100% { transform: scale(1); }
}

/* =====================================================
   🏠 HOME CAROUSEL
===================================================== */

.home-carousel {
    position: relative;
}

/* El carousel y sus items sí necesitan overflow hidden */
.carousel,
.carousel-item {
    overflow: hidden;
}

.carousel-item {
    position: relative;
    min-height: 60vh;
}

.carousel-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform 8s ease;
}

.carousel-item.active .carousel-bg {
    transform: scale(1.12);
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55));
}

.hero-banner-content {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.hero-banner-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    animation: breathingEffect 6s ease-in-out infinite;
}

.hero-banner-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.35);
    animation: breathingEffect 6s ease-in-out infinite;
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 60vh;
    }
    .hero-banner-title {
        font-size: 1.6rem;
    }
    .hero-banner-subtitle {
        font-size: 0.95rem;
    }
}

/* =====================================================
   🌿 LOGO GLASS
===================================================== */

.hero-logo {
    height: 140px;
    width: auto;
}

.logo-card-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 25px 50px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 25px 50px rgba(0,0,0,0.35), inset 0 0 20px rgba(255,255,255,0.05);
    width: auto;
    max-width: 90%;
    transition: all 0.4s ease;
}

.logo-card-mobile:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 0 25px rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .hero-logo {
        height: 85px;
    }
    .logo-card-mobile {
        padding: 18px 28px;
        border-radius: 18px;
    }
}

/* =====================================================
   🌿 HISTORIA HOME SECTION
===================================================== */

.historia-home-section {
    position: relative;
    padding: 90px 0;
    background: url("/static/img/socios.jpg") center/cover no-repeat;
}

.historia-home-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.45));
    z-index: 1;
}

.historia-home-section .container {
    position: relative;
    z-index: 2;
    animation: softPulse 6s ease-in-out infinite;
}

.historia-home-section .section-title,
.historia-home-section .section-text {
    color: #ffffff;
}

/* =====================================================
   HOME FONDO AGRÍCOLA
===================================================== */

.home-agro-bg {
    position: relative;
    background: url("/static/img/fondo_catalogo.png") center center no-repeat;
    background-size: cover;
}

.home-agro-overlay {
    background: rgba(255, 255, 255, 0.65);
    padding-top: 80px;
    padding-bottom: 80px;
}

.home-agro-bg .section-white,
.home-agro-bg .section-light {
    background: transparent;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* =====================================================
   📖 HISTORIA PAGE
===================================================== */

/* historia-hero NO debe tener overflow hidden, solo el carousel interno */
.historia-hero {
    position: relative;
    overflow: visible;
}

.historia-slide {
    min-height: 60vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.historia-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.45));
}

.historia-overlay .hero-title {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 6px 25px rgba(0, 0, 0, 0.75);
    animation: breathingEffect 6s ease-in-out infinite;
}

.historia-overlay .hero-text {
    color: #ffffff;
    font-size: 1.2rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    animation: breathingEffect 6s ease-in-out infinite;
}

.historia-overlay i {
    color: #ffffff;
}

.historia-bg {
    position: relative;
    background: url("/static/img/fondo_clientes.png") center center no-repeat;
    background-size: cover;
}

.historia-overlay-bg {
    background: rgba(255, 255, 255, 0.65);
    padding-top: 80px;
    padding-bottom: 80px;
}

.historia-bg .section-white,
.historia-bg .section-light {
    background: transparent;
}

.historia-bg .value-card-modern {
    background: rgba(255, 255, 255, 0.95);
}

/* =====================================================
   MAPA
===================================================== */

.map-container {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   UTILIDADES
===================================================== */

.container,
.container-fluid {
    position: relative;
}

.row {
    min-height: 1px;
}

.text-highlight {
    color: #8bc34a;
}