/* Variables & Reset */
:root {
    --primary-color: #3b4281;
    --secondary-color: #5865c7;
    --accent-color: #00a8e8;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --success: #25D366; /* WhatsApp Green */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 80px; /* Espacio para el header fijo */
}

/* --- HEADER & NAV --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    transition: all 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link img { height: 180px; width: auto; display: block; }

/* Menú de Escritorio */
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-color); }

/* Selector de Idioma */
.language-dropdown { position: relative; }
.language-current {
    background: var(--bg-light); border: none; padding: 0.5rem 1rem;
    border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
}
.language-options {
    position: absolute; top: 120%; right: 0; background: var(--white);
    border: 1px solid #eee; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none; min-width: 120px; z-index: 1001;
}
.language-options.show { display: block; }
.language-option { padding: 0.8rem; cursor: pointer; display: flex; gap: 0.5rem; }
.language-option:hover { background: var(--bg-light); color: var(--primary-color); }

/* --- MENU MÓVIL (Hamburguesa) --- */
.mobile-menu-toggle {
    display: none; /* Oculto en escritorio */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Animación de la X cuando se abre */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Contenedor del Menú Móvil */
.mobile-menu-container {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(-150%); /* Escondido arriba */
    transition: transform 0.3s ease;
    z-index: 999;
    text-align: center;
}

.mobile-menu-container.active { transform: translateY(0); } /* Mostrar */
.mobile-menu-container a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 80vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: var(--white); padding: 2rem; position: relative; overflow: hidden;
}

.hero-content { max-width: 800px; z-index: 2; animation: fadeUp 1s ease; }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; line-height: 1.2; }
.hero p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }

.cta-button {
    background: var(--accent-color); color: var(--white); padding: 1rem 2rem;
    border-radius: 50px; text-decoration: none; font-weight: bold; transition: transform 0.2s;
    display: inline-block;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* --- SECTIONS GENERAL --- */
.section { padding: 5rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 3rem; color: var(--primary-color); }

/* --- PRODUCTS GRID --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.product-card {
    background: var(--white); border-radius: 15px; padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s;
    border-top: 4px solid var(--accent-color); display: flex; flex-direction: column; height: 100%;
}
.product-card:hover { transform: translateY(-10px); }
.product-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.product-card h3 { margin-bottom: 1rem; color: var(--primary-color); }
.product-card p { color: var(--text-light); margin-bottom: 2rem; flex-grow: 1; }
.btn-outline {
    border: 2px solid var(--primary-color); color: var(--primary-color);
    padding: 0.8rem 1.5rem; border-radius: 30px; text-decoration: none; font-weight: 600;
}
.btn-outline:hover { background: var(--primary-color); color: var(--white); }

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
    position: fixed; bottom: 30px; left: 30px;
    background: var(--success); color: white; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 2000; transition: transform 0.3s; text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* --- FOOTER --- */
footer { background: var(--primary-color); color: var(--white); text-align: center; padding: 2rem; margin-top: auto; }
.footer-links a { color: rgba(255,255,255,0.7); margin: 0 10px; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: white; }

/* --- MOBILE & UTILITIES --- */
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

@media (max-width: 768px) {
    .nav-links { display: none; } /* Ocultar menú escritorio */
    .mobile-menu-toggle { display: flex; } /* Mostrar botón hamburguesa */
    
    /* Ajustes visuales móvil */
    .hero h1 { font-size: 2rem; }
    .product-card { margin-bottom: 1rem; }
    nav { padding: 0 1.5rem; }
    .logo-link img { height: 140px; } /* Logo un poco más chico en móvil */
}