/* =========================================
   Variables y Configuración Base
========================================= */
:root {
    /* Paleta de Colores (Inspiración Miel y Naturaleza) */
    --primary: #e5a93d;        /* Dorado Miel Oscuro */
    --primary-light: #f6c358;  /* Dorado Miel Claro */
    --secondary: #2c5530;      /* Verde Bosque Profundo */
    --secondary-light: #3d7342;/* Verde Hoja */
    --dark: #1e293b;           /* Texto principal oscuro */
    --dark-light: #475569;     /* Texto secundario */
    --light: #f8fafc;          /* Fondo claro general */
    --white: #ffffff;
    --border: #e2e8f0;
    
    /* Tipografía */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transiciones y Sombras */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--dark-light);
    max-width: 600px;
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--secondary);
}

/* =========================================
   Navegación
========================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 50px;
    transition: var(--transition);
    filter: brightness(0) invert(1); /* Logo blanco inicial */
}

#navbar.scrolled .nav-logo {
    height: 40px;
    filter: none; /* Logo color original al scrollear */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    font-weight: 500;
    color: var(--white);
    position: relative;
}

#navbar.scrolled .nav-item {
    color: var(--dark);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

#navbar.scrolled .hamburger span {
    background: var(--dark);
}

/* =========================================
   Hero Section
========================================= */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('imagenes/hero_acadec.png') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 40, 20, 0.7), rgba(44, 85, 48, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 24px;
}

.hero-title {
    font-size: 4.5rem;
    color: var(--white);
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 300;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* =========================================
   Quiénes Somos
========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.lead-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 24px;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--dark-light);
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--dark-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

.image-wrapper {
    position: relative;
    padding: 40px;
    background: linear-gradient(135deg, var(--light), #e2e8f0);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px dashed var(--primary);
    border-radius: 30px;
    z-index: -1;
}

.floating-logo {
    width: 100%;
    max-width: 350px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   Productos
========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-image-wrapper {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(229, 169, 61, 0.15);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card-content p {
    color: var(--dark-light);
    font-size: 0.95rem;
}

/* =========================================
   Territorio
========================================= */
.territorio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.territorio-list {
    list-style: none;
    margin-top: 32px;
}

.territorio-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.territorio-list .icon {
    font-size: 24px;
    background: rgba(44, 85, 48, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.territorio-list .text strong {
    display: block;
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 4px;
}

.territorio-list .text span {
    color: var(--dark-light);
}

.map-card {
    background: var(--secondary);
    color: var(--white);
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.map-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.map-card h3 {
    color: var(--primary-light);
    font-size: 2rem;
    margin-bottom: 24px;
}

.map-card p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.map-card .quote {
    font-style: italic;
    font-size: 1.25rem;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    margin-top: 32px;
    color: var(--white);
}

/* =========================================
   Footer
========================================= */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    max-width: 300px;
}

.footer-contact h3,
.footer-links h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--primary);
}

.footer-contact p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    display: inline-block;
    width: fit-content;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

/* =========================================
   Animaciones & Utilidades
========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.is-visible {
    opacity: 1;
    transform: translate(0);
}

/* =========================================
   Responsive Design
========================================= */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-grid,
    .territorio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p,
    .footer-links a {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-item {
        color: var(--dark) !important;
        font-size: 1.5rem;
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background: var(--dark);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background: var(--dark);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* =========================================
   Botones Flotantes (WhatsApp & Volver Arriba)
========================================= */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.whatsapp-btn {
    background-color: #25D366; /* WhatsApp Green */
}

.whatsapp-btn:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
}

.back-top-btn {
    background-color: var(--primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

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

.back-top-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }
    
    .float-btn {
        width: 50px;
        height: 50px;
    }
}
