@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === RESET & BASE === */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body, 'Inter', sans-serif); line-height: 1.6; color: #334155; overflow-x: hidden; background-color: #f8fafc; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

/* Contenedor Maestro */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 24px; 
    width: 100%;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head, 'Montserrat', sans-serif); }

/* === HEADER GENERAL (Premium Base) === */
.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Sombra sutil inicial */
    transition: all 0.3s ease;
}

/* === EFECTOS DE SCROLL (Shrinking & Glass) === */
.site-header.sticky { 
    position: sticky; 
    top: 0; 
    transform: translate3d(0,0,0); /* FIX: Evita vibración/temblor en Chrome/Safari */
    will-change: transform, background-color, box-shadow; /* Optimización de rendimiento */
}

/* Estado "Scrolled": Cuando el usuario baja la página */
.site-header.sticky.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    /* Si el navegador lo soporta, hacemos el fondo un poco translúcido */
    background: color-mix(in srgb, var(--header-bg), transparent 10%);
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    height: 80px; /* Altura fija para consistencia */
    transition: height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reducir altura al hacer scroll */
.site-header.sticky.scrolled .header-container { height: 60px; }

/* Logo */
.logo { flex-shrink: 0; z-index: 20; } /* Evita que el logo se aplaste */
.logo img { 
    height: 45px; 
    width: auto; 
    object-fit: contain; 
    transition: transform 0.3s;
}
.logo:hover img { transform: scale(1.02); }

/* Reducir logo al hacer scroll */
.site-header.sticky.scrolled .logo img { height: 38px; }

.text-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }

/* === NAVEGACIÓN DESKTOP === */
.desktop-nav { margin: 0 20px; }
.desktop-nav ul { display: flex; align-items: center; gap: 32px; }
.desktop-nav a { 
    font-weight: 500; 
    font-size: 0.95rem; 
    position: relative;
    padding: 5px 0;
}

/* Efecto Hover en Links (Subrayado animado) */
.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--header-hover);
    transition: width 0.3s ease;
}
.desktop-nav a:hover { color: var(--header-hover); }
.desktop-nav a:hover::after { width: 100%; }

/* Botón en Menú (Clase especial) */
.desktop-nav a.btn-nav {
    background: var(--header-hover);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.desktop-nav a.btn-nav::after { display: none; } /* Quitar subrayado al botón */
.desktop-nav a.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

/* Redes Sociales Header */
.header-socials { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-socials a { 
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.03); /* Fondo sutil */
    transition: all 0.3s;
}
.header-socials a:hover { 
    background: var(--header-hover); 
    color: #fff; 
    transform: translateY(-2px);
}

/* === TOP BAR (Estilo 3) === */
.header-top-bar { 
    display: none; /* Oculto por defecto */
    background: #0f172a; /* Slate 900 siempre oscuro para contraste */
    color: rgba(255,255,255,0.9); 
    padding: 10px 0; 
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-contact { display: flex; gap: 24px; }
.top-contact a { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.top-contact a i { color: var(--header-hover); } /* Iconos con color de acento */
.top-socials { display: flex; gap: 15px; }
.top-socials a { opacity: 0.7; transition: 0.2s; }
.top-socials a:hover { opacity: 1; color: #fff; }

/* === VARIACIONES DE ESTILO (Logic) === */

/* Estilo 1: Clásico */
.style-1 .header-container { justify-content: space-between; }

/* Estilo 2: Moderno (Logo Izq - Menú Der) */
.style-2 .header-socials { display: none; }
.style-2 .desktop-nav { margin-left: auto; margin-right: 0; }

/* === ESTILO 3: CORPORATIVO (Doble Nivel / Top Bar) === */
.style-3 .header-top-bar { display: block; } /* Muestra la barra superior */
.style-3 .header-socials { display: none; } /* Oculta redes del nivel principal (ya están arriba) */
.style-3 .desktop-nav { margin-left: auto; margin-right: 0; }
.style-3 .header-container { height: 70px; } /* Altura inicial un poco menor pues tiene Top Bar */

/* === ESTILO 4: ACTION (Botón Contacto Destacado) === */
.style-4 .header-socials { display: none; }
.style-4 .desktop-nav { margin-left: auto; margin-right: 0; }
.style-4 .desktop-nav ul li:last-child a { /* Transforma el último link en botón */
    background: var(--header-hover);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.style-4 .desktop-nav ul li:last-child a::after { display: none; }
.style-4 .desktop-nav ul li:last-child a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

/* === ESTILO 5: FLOATING ISLAND (Isla Flotante) === */
.style-5 {
    background: transparent !important; /* El fondo es transparente, la isla tiene el color */
    box-shadow: none !important;
    padding-top: 20px;
    pointer-events: none; /* Permite clicks a los lados de la isla */
}
.style-5 .header-container {
    background: var(--header-bg);
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 50px; /* Bordes completamente redondos */
    padding: 0 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    pointer-events: auto; /* Reactivar clicks dentro de la isla */
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación elástica */
}
.style-5 .desktop-nav { margin-left: auto; }
.style-5 .header-socials { display: none; }
/* Efecto Scroll Isla */
.style-5.sticky.scrolled { padding-top: 10px; }
.style-5.sticky.scrolled .header-container {
    width: 95%;
    max-width: 1200px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}


/* === MENÚ MÓVIL (DRAWER) === */
.mobile-toggle { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer; 
    flex-direction: column; 
    gap: 6px; 
    padding: 5px;
    z-index: 1001;
}
.mobile-toggle span { 
    display: block; 
    width: 28px; 
    height: 2px; 
    background: var(--header-text); 
    border-radius: 2px; 
    transition: 0.3s;
}

.mobile-drawer {
    position: fixed; top: 0; right: -100%;
    width: 85%; max-width: 400px; height: 100vh;
    background: var(--mobile-menu-bg);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; padding: 30px;
}
.mobile-drawer.active { right: 0; }

/* === ESTILO GLASS PARA MENÚ MÓVIL === */
.mobile-drawer.glass {
    /* Fondo semitransparente basado en el color del header */
    background: color-mix(in srgb, var(--mobile-menu-bg), transparent 15%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.mobile-drawer.glass .mobile-nav a {
    border-bottom: none; /* Quitamos líneas divisorias */
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

/* Efecto de coloreado al pasar por encima */
.mobile-drawer.glass .mobile-nav a:hover {
    background: var(--mobile-menu-active);
    color: #fff; /* Texto blanco para contraste */
    padding-left: 25px; /* Pequeño desplazamiento animado */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.drawer-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 40px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}
.drawer-header img { height: 40px; }
.drawer-close { 
    background: none; border: none; 
    font-size: 1.5rem; cursor: pointer; 
    color: var(--mobile-menu-text); 
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
}

.mobile-nav { display: flex; flex-direction: column; gap: 15px; }
.mobile-nav a { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--mobile-menu-text); 
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03); 
}
.mobile-nav a:hover { color: var(--mobile-menu-active); padding-left: 10px; }

.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1900;
    opacity: 0; visibility: hidden;
    transition: 0.3s;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

/* === FOOTER === */
.site-footer { 
    background: var(--footer-bg); 
    color: var(--footer-text);
    padding: 80px 0 30px; 
    font-size: 0.95rem;
}

.site-footer h4 {
    color: var(--footer-title);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer a { color: var(--footer-text); opacity: 0.8; }
.site-footer a:hover { color: var(--footer-hover); opacity: 1; padding-left: 5px; }

.footer-logo-img { height: 50px; margin-bottom: 20px; }

.footer-socials { display: flex; gap: 15px; margin-top: 20px; }
.footer-socials a { 
    width: 36px; height: 36px; 
    background: rgba(255,255,255,0.1); 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; 
    transition: 0.3s;
    opacity: 1;
}
.footer-socials a:hover { background: var(--footer-hover); color: #fff; transform: translateY(-3px); padding-left: 0; }

.footer-grid { 
    display: grid; 
    gap: 60px; 
    margin-bottom: 60px; 
}

.footer-links ul li { margin-bottom: 10px; }
.footer-contact p { margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; opacity: 0.8; }
.footer-contact i { color: var(--footer-hover); margin-top: 4px; }

.footer-bottom { 
    text-align: center; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    padding-top: 30px; 
    font-size: 0.85rem; 
    opacity: 0.5; 
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .desktop-nav, .header-socials { display: none; }
    .mobile-toggle { display: flex; }
    .style-3 .header-top-bar { display: none; } /* Ocultar top bar en móvil */
    .header-container { height: 70px; }
}

/* === FOOTER STYLES === */

/* Estilo 1: Minimalista (Centrado) */
.footer-style-1 .footer-grid { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 30px;
}
.footer-style-1 .footer-brand { max-width: 600px; display: flex; flex-direction: column; align-items: center; }
.footer-style-1 .footer-socials { justify-content: center; }

/* Estilo 2: Corporativo (3 Columnas) */
.footer-style-2 .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
}
@media (max-width: 768px) { .footer-style-2 .footer-grid { grid-template-columns: 1fr; } }

/* Estilo 3: Moderno (Dark/Tech) */
.footer-style-3 {
    border-top: 4px solid var(--footer-hover); /* Acento superior */
}
.footer-style-3 .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
}
.footer-style-3 h4 { font-size: 1.3rem; letter-spacing: 1px; }
.footer-style-3 .footer-logo-img { height: 60px; }

/* === FLOATING SOCIAL SIDEBAR (Glassmorphism) === */
.floating-socials {
    position: fixed;
    left: 20px; /* Despegado del borde izquierdo */
    top: 50%;
    transform: translateY(-50%) scale(var(--sidebar-scale, 1)); /* Escala dinámica */
    z-index: 1100; /* Por encima del header normal, debajo de modales */
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 25px 12px;
    border-radius: 50px;
    
    /* Efecto Vidrio Premium */
    background: var(--sidebar-bg, rgba(255, 255, 255, 0.65)); /* Fondo dinámico */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.floating-socials a {
    color: var(--sidebar-icon, #334155); /* Color dinámico */
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
}

.floating-socials a:hover {
    color: var(--header-hover); /* Usa el color de acento configurado */
    transform: scale(1.25);
}

/* Ocultar en móviles para no estorbar */
@media (max-width: 768px) {
    .floating-socials { display: none; }
}

/* === HOME SECTIONS === */

/* Hero General */
.hero-static, .hero-slider { position: relative; width: 100%; min-height: 600px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; overflow: hidden; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 1; }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 800px; padding: 20px; }
.hero-content h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 15px; line-height: 1.2; }
.hero-content p { font-size: 1.25rem; margin-bottom: 30px; font-weight: 400; }
.hero-btn { display: inline-block; padding: 15px 35px; border-radius: 50px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: transform 0.2s; }
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* Parallax */
.hero-static.parallax { background-attachment: fixed; }

/* Slider */
.slider-wrapper { width: 100%; height: 600px; position: relative; }
.slide { display: none; width: 100%; height: 100%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 0; }

/* Slider Mobile Logic */
.hero-img-mobile { display: none !important; }
@media (max-width: 768px) {
    .hero-img-desktop.has-mobile { display: none !important; }
    .hero-img-mobile { display: block !important; }
}

.slide .hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 100%; }
.fade { animation-name: fade; animation-duration: 1.5s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }
.prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; z-index: 3; background: rgba(0,0,0,0.3); }
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); }

/* Section 2: Text + Gallery */
.section-2 { padding: 80px 0; }
.sec2-content { margin-bottom: 50px; width: 100%; }
.sec2-content h2 { font-size: 2.5rem; margin-bottom: 10px; }
.sec2-content h3 { font-size: 1.5rem; margin-bottom: 20px; font-weight: 400; }
.sec2-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Efecto Flotante / Borde */
.gallery-item { 
    position: relative; 
    overflow: hidden; 
    border-radius: 24px; /* Bordes muy redondeados */
    box-shadow: 0 20px 40px -5px rgba(0,0,0,0.2); /* Sombra profunda para flotar */
    border: 8px solid #fff; /* Borde blanco grueso */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación elástica */
}
.gallery-item:hover {
    transform: translateY(-10px) scale(1.02); /* Se eleva y crece un poco */
    box-shadow: 0 30px 60px -10px rgba(0,0,0,0.3);
    z-index: 2;
}
.gallery-item img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s ease; display: block; }

/* Efecto Hover Interactivo */
.gallery-link { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; }
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%); /* Degradado elegante */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all 0.3s ease;
}
.gallery-cta {
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}

.gallery-link:hover img { transform: scale(1.1); }
.gallery-link:hover .gallery-overlay { opacity: 1; }
.gallery-link:hover .gallery-cta { transform: translateY(0); background: #fff; color: #000; border-color: #fff; }

/* Si no es link, solo zoom suave */
.gallery-item > img:hover { transform: scale(1.05); }

/* Section 3: Image + Text */
.section-3 { padding: 80px 0; }
.sec3-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.sec3-content h2 { font-size: 2rem; margin-bottom: 20px; }

/* Section 4: Full Width */
.section-4 { padding: 60px 0 0; }
.section-4 h2 { font-size: 2.5rem; }
.full-width-img img { width: 100%; height: auto; max-height: 600px; object-fit: cover; }

/* Responsive Home */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .sec2-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .sec2-gallery { grid-template-columns: 1fr; }
}

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp-bg);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2100; /* Capa superior (encima de todo) */
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* Ajuste específico para imagen de historia limpia */
.about-hist-img img {
    box-shadow: none !important; /* Quitar recuadro/sombra */
    border-radius: 0 !important; /* Quitar bordes redondeados si se desea totalmente cuadrada, o dejar si es leve */
}

/* Animación sutil para lista de valores */
.value-item:hover .value-bullet {
    transform: scale(1.3) rotate(45deg); /* Pequeño efecto al pasar el mouse */
    transition: transform 0.3s ease;
}

/* Letra Capitular para Texto Editorial */
.editorial-text::first-letter {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    font-weight: 700;
    color: var(--header-hover);
    margin-right: 10px;
}
