/* =========================================
   VARIABLES Y RESET GLOBAL
   ========================================= */
:root {
    --primary: #2D5A27;
    --primary-light: #3d7a37;
    --primary-dark: #1a3d17;
    --secondary: #F4C430;
    --secondary-light: #ffd700;
    --accent: #FF6B35;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --shadow-md: 0 8px 30px rgba(0,0,0,0.15);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 40px rgba(244, 196, 48, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { 
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   HEADER & NAVEGACIÓN
   ========================================= */
.main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: linear-gradient(135deg, rgba(240, 241, 240, 0.98) 0%, rgba(240, 241, 240, 0.98) 0%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-img { 
    height: 50px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.logo-img:hover { transform: rotate(-5deg) scale(1.1); }

/* OCULTAR TEXTO DEL LOGO COMO SOLICITADO */
.logo-text { display: none; }

.nav-list { list-style: none; display: flex; gap: 2rem; align-items: center; }

.nav-list a { 
    color: #181716; text-decoration: none; font-weight: 600;
    font-size: 0.95rem; position: relative; padding: 0.5rem 0;
    transition: all 0.3s ease; text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.nav-list a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transition: width 0.3s ease; border-radius: 2px;
}

.nav-list a:hover { color: var(--secondary); }
.nav-list a:hover::after { width: 100%; }

.menu-toggle { 
    display: none; background: rgba(255,255,255,0.2);
    border: 2px solid var(--white); color: var(--white); 
    font-size: 1.5rem; cursor: pointer; padding: 0.5rem;
    border-radius: 10px; transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--secondary); border-color: var(--secondary);
    color: var(--primary);
}

/* =========================================
   HERO SECTION - OPTIMIZADO MÓVIL
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center; /* Centrado vertical en desktop */
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    padding: 120px 0 60px; /* Espacio para header fijo */
}

.hero-background { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
}

.video-container { width: 100%; height: 100%; overflow: hidden; }
.video-container iframe { 
    width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.77vh; 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    pointer-events: none;
}

.slider-container { width: 100%; height: 100%; position: relative; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 2s ease-in-out;
}
.slide.active { opacity: 1; }

@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(-3%, -3%); }
}
.ken-burns.active { animation: kenburns 10s ease-in-out infinite alternate; }

.hero-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(45, 90, 39, 0.4) 100%);
    z-index: -1;
}

.hero-content { 
    position: relative; z-index: 2; padding: 2rem 1rem;
    max-width: 1000px; margin: 0 auto; width: 100%;
    display: flex; flex-direction: column; align-items: center;
}

.hero-title { 
    font-size: clamp(1.8rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
    font-weight: 700; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #F4C430 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1.2; word-wrap: break-word;
}

.hero-subtitle { 
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 2.5rem; max-width: 800px; margin-left: auto; margin-right: auto;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); font-weight: 400;
    line-height: 1.6; color: #ffffff;
}

.btn {
    display: inline-block; padding: 15px 40px; border-radius: 50px;
    text-decoration: none; font-weight: 700; font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }

.btn-primary { 
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--primary-dark);
}
.btn-primary:hover { 
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(244, 196, 48, 0.4);
}

/* STATS COMPACTOS PARA MÓVIL */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem; margin-top: 3rem; padding: 0 1rem; width: 100%;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px; padding: 1.5rem 1rem;
    text-align: center; transition: all 0.4s ease;
    box-shadow: var(--shadow-md);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--secondary);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
    color: var(--secondary); display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); margin-bottom: 0.5rem;
}

.stat-label {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--white); font-weight: 500; line-height: 1.4;
}

/* =========================================
   SECCIONES GENERALES & CARDS
   ========================================= */
.section { padding: 6rem 0; position: relative; }

.section-title { 
    text-align: center; font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary); margin-bottom: 1.5rem;
    position: relative; display: inline-block;
    left: 50%; transform: translateX(-50%);
}

.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

.section-subtitle { 
    text-align: center; color: var(--gray); margin-bottom: 4rem;
    font-size: 1.2rem; max-width: 600px; margin-left: auto; margin-right: auto;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 25px; padding: 2.5rem;
    box-shadow: var(--shadow-md); border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}

.glass-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transform: scaleX(0); transition: transform 0.5s ease;
}
.glass-card:hover::before { transform: scaleX(1); }

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(45, 90, 39, 0.2);
    border-color: var(--secondary);
}

/* About Section */
.about-section { background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%); }
.about-grid { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.about-card { text-align: center; }

.card-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; font-size: 2.5rem; color: var(--white);
    box-shadow: 0 10px 30px rgba(45, 90, 39, 0.3); transition: all 0.4s ease;
}
.about-card:hover .card-icon { transform: rotate(360deg) scale(1.1); }

.about-card h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 1rem; }
.about-card p { color: var(--gray); line-height: 1.8; font-size: 1rem; }

/* Services Section */
.services-section { background: linear-gradient(135deg, #ffffff 0%, #f0f9f0 100%); }
.services-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.service-card { text-align: center; padding: 2rem; }

.service-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; font-size: 2rem; color: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(244, 196, 48, 0.3); transition: all 0.4s ease;
}
.service-card:hover .service-icon { transform: rotate(-10deg) scale(1.15); }

.service-card h4 { color: var(--primary); margin-bottom: 1rem; font-size: 1.4rem; }
.service-card p { color: var(--gray); font-size: 0.95rem; line-height: 1.7; }

/* Values Section */
.values-section { background: linear-gradient(135deg, #e8f5e9 0%, #fff9c4 100%); }
.values-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.value-card { padding: 2rem; text-align: center; }
.value-card h4 { color: var(--primary); margin-bottom: 1rem; font-size: 1.3rem; }
.value-card p { color: var(--gray); font-size: 0.95rem; line-height: 1.7; }

/* Contact Section */
.contact-section { background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); }
.contact-grid { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.contact-info { padding: 3rem; }
.contact-info h3 { color: var(--primary); font-size: 2rem; margin-bottom: 2rem; }

.contact-info p {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--dark);
}

.contact-info i {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 1.2rem;
}

.social-links { display: flex; gap: 1rem; margin-top: 2rem; }
.social-links a {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 1.5rem; transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(45, 90, 39, 0.3);
}
.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--primary-dark);
}

.contact-form { padding: 3rem; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px; margin-bottom: 1.5rem;
    border: 2px solid rgba(45, 90, 39, 0.2); border-radius: 15px; 
    font-family: inherit; font-size: 1rem; transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 20px rgba(45, 90, 39, 0.2); transform: translateY(-2px);
}
.contact-form button { width: 100%; padding: 18px; font-size: 1.1rem; }

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white); padding: 3rem 0; text-align: center;
}
.main-footer p { font-size: 1rem; opacity: 0.9; }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--white); width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; text-decoration: none;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 999; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    50% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
}
.whatsapp-float:hover { 
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6); animation: none;
}

/* Animations */
.fade-in-up { 
    opacity: 0; transform: translateY(50px); 
    animation: fadeInUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
}
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.reveal { 
    opacity: 0; transform: translateY(60px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }

/* Butterflies */
.butterfly {
    position: absolute; width: 40px; height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23F4C430"><path d="M12 2C10 2 8 4 8 6C8 8 10 10 12 10C14 10 16 8 16 6C16 4 14 2 12 2ZM12 12C10 12 8 14 8 16C8 18 10 20 12 20C14 20 16 18 16 16C16 14 14 12 12 12Z"/></svg>') no-repeat center;
    background-size: contain; opacity: 0.7; z-index: 1;
    animation: fly 20s infinite ease-in-out;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}
.b1 { top: 15%; left: 10%; animation-duration: 15s; }
.b2 { top: 60%; right: 10%; animation-duration: 18s; animation-delay: 3s; }
.b3 { top: 30%; right: 20%; animation-duration: 20s; animation-delay: 5s; }

@keyframes fly {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(150px, -80px) rotate(15deg) scale(1.1); }
    50% { transform: translate(300px, 0) rotate(-10deg) scale(1); }
    75% { transform: translate(150px, 80px) rotate(5deg) scale(0.9); }
}

/* Page Loader */
.page-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white); display: flex; align-items: center; justify-content: center;
    z-index: 9999; transition: opacity 0.5s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-butterfly {
    width: 60px; height: 60px; background: var(--secondary);
    border-radius: 50%; animation: butterflyPulse 1.5s infinite;
}
@keyframes butterflyPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 0.7; }
}

/* Alert Messages */
.alert { padding: 1rem; border-radius: 10px; margin-bottom: 1rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; text-align: center; font-weight: 600; }

/* =========================================
   RESPONSIVE DESIGN - AJUSTES CRÍTICOS
   ========================================= */
@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .about-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); max-width: 800px; }
}

@media (max-width: 768px) {
    .nav-list {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        flex-direction: column; padding: 2rem; gap: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .nav-list.active { display: flex; animation: slideDown 0.3s ease; }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .menu-toggle { display: block; }
    
    /* HERO MÓVIL CORREGIDO */
    .hero {
        min-height: 100svh; /* Viewport real móvil */
        padding: 90px 0 30px;
        align-items: flex-start; /* Alinea arriba para ver texto */
        justify-content: center;
    }
    
    .hero-content { padding: 0.5rem; margin-top: 1rem; }
    
    .hero-title { font-size: 1.7rem; margin-bottom: 0.8rem; line-height: 1.25; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.2rem; line-height: 1.45; }
    
    .btn { padding: 10px 25px; font-size: 0.95rem; margin-bottom: 1.5rem; }
    
    /* Stats en 3 columnas siempre en móvil, muy compactos */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem; margin-top: 0; padding: 0;
    }
    
    .stat-card { padding: 0.8rem 0.5rem; border-radius: 12px; }
    .stat-number { font-size: 1.4rem; margin-bottom: 0.2rem; }
    .stat-label { font-size: 0.7rem; line-height: 1.2; }
    
    .section { padding: 4rem 0; }
    .section-title { font-size: 2rem; }
    .glass-card { padding: 1.5rem; }
    .contact-info, .contact-form { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
    .hero { padding: 85px 0 25px; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.85rem; }
    .hero-stats { gap: 0.5rem; }
    .stat-card { padding: 0.6rem 0.4rem; }
    .stat-number { font-size: 1.2rem; }
    .stat-label { font-size: 0.65rem; }
    .logo-img { height: 40px; }
}