/* SISTEMA DE DISEÑO INSTITUCIONAL - I.E. N° 80018 REPÚBLICA DE MÉXICO
   Framework de Estilos Globales, Variables, Componentes y Responsividad*/

:root {
    /* Paleta Institucional Temática: Rojo, Verde y Blanco*/
    --primary-color: #062319;         /* Verde Bosque Imperial Oscuro */
    --primary-light: #0d3b2b;         /* Verde Oscuro Suave */
    --primary-dark: #03140e;          /* Verde Profundo Fondo */
    --secondary-color: #006847;       /* Verde Mexicano Institucional */
    --secondary-hover: #005036;       /* Verde Profundo Interactivo */
    --secondary-light: #e6f5ee;       /* Verde Menta Claro Fondos */
    --accent-color: #ce1126;          /* Rojo Mexicano Institucional */
    --accent-hover: #a50d1e;          /* Rojo Carmesí Interactivo */
    --accent-glow: #ef4444;           /* Brillo Rojo Destacado */
    --accent-light: #fef2f2;          /* Fondo Rojo Suave */
    --sky-blue: #ce1126;              /* Rojo de Énfasis Institucional */
    --sky-light: #fee2e2;             /* Rojo Claro Fondos */

    /* Neutros y Superficies */
    --text-main: #0c1c15;             /* Texto Principal Alto Contraste */
    --text-muted: #3d5246;            /* Texto Secundario Legible */
    --text-light: #71897c;            /* Texto Desactivado / Metas */
    --bg-light: #f1efd5;              /* Fondo General Suave y Limpio */
    --bg-white: #ffffff;              /* Blanco Puro */
    --bg-card: #ffffff;               /* Fondo Tarjetas */
    --border-color: #e2ebe5;          /* Bordes Suaves Neutro-Verde */
    --border-card: rgba(226, 235, 229, 0.85);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-dark: rgba(6, 35, 25, 0.82);

    /* Tipografía */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Sombras Elevadas */
    --shadow-sm: 0 2px 4px rgba(6, 35, 25, 0.04);
    --shadow-md: 0 8px 20px rgba(6, 35, 25, 0.08);
    --shadow-lg: 0 16px 36px rgba(6, 35, 25, 0.12);
    --shadow-xl: 0 24px 55px rgba(6, 35, 25, 0.16);
    --shadow-glow: 0 0 25px rgba(0, 104, 71, 0.35);
    --shadow-glow-red: 0 0 25px rgba(206, 17, 38, 0.35);

    /* Transiciones */
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease-in-out;
}

/* Reset y Bases Globales */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.65;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

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

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
}

/* Accesibilidad Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 20px;
    background: var(--accent-color);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 4px;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 15px;
}

/* Contenedores y Estructura */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 95px 0;
    position: relative;
}

.section.compact {
    padding: 60px 0;
}

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

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

.bg-navy {
    background-color: var(--primary-color);
    color: #fff;
}

.text-center {
    text-align: center;
}

/* Títulos y Encabezados de Sección */
.section-header {
    margin-bottom: 50px;
    position: relative;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    background-color: var(--secondary-light);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.8vw, 2.75rem);
    color: var(--primary-color);
    line-height: 1.22;
    margin-bottom: 12px;
    font-weight: 700;
}

.bg-navy .section-title {
    color: #ffffff;
}

.title-underline {
    height: 4px;
    width: 64px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
    margin-bottom: 22px;
}

.title-underline.center {
    margin: 0 auto 22px auto;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.65;
}

.bg-navy .section-desc {
    color: rgba(255, 255, 255, 0.82);
}

/* ==========================================================================
   BOTONES Y LLAMADOS A LA ACCIÓN
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1;
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
    border-radius: 50px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 104, 71, 0.35);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 104, 71, 0.45);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 104, 71, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(206, 17, 38, 0.35);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(206, 17, 38, 0.45);
}

.btn-glass {
    background-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   TOPBAR Y HEADER DE NAVEGACIÓN INSTITUCIONAL
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.topbar {
    background-color: rgba(4, 20, 14, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
    max-height: 55px;
    overflow: hidden;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-contact {
    display: flex;
    gap: 22px;
    align-items: center;
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.topbar-item i {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-badge {
    background-color: rgba(206, 17, 38, 0.18);
    border: 1px solid rgba(206, 17, 38, 0.45);
    color: #fca5a5;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-link {
    color: #4ade80;
    font-weight: 600;
    text-decoration: underline;
    transition: var(--transition-fast);
}

.topbar-link:hover {
    color: #ffffff;
}

/* Header Content */
.header-nav-wrap {
    background: linear-gradient(180deg, rgba(6, 35, 25, 0.92) 0%, rgba(6, 35, 25, 0.55) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    transition: var(--transition);
}

/* Scrolled Header State */
.header.scrolled .header-nav-wrap {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header.scrolled .topbar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    border-bottom: none;
}

.header.scrolled .header-content {
    padding: 11px 0;
}

.header.scrolled .logo,
.header.scrolled .nav-link {
    color: var(--primary-color);
}

.header.scrolled .mobile-menu-btn {
    color: var(--primary-color);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--secondary-color);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    transition: var(--transition-fast);
}

.logo-icon-wrap {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--secondary-color), #045237);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 104, 71, 0.35);
    transition: var(--transition);
    overflow: hidden;
}

.logo-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo:hover .logo-icon-wrap {
    transform: rotate(-6deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.2px;
}

.logo-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4ade80;
    margin-top: 2px;
}

.header.scrolled .logo-subtitle {
    color: var(--secondary-color);
}

/* Navigation Links */
.nav-list {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.94rem;
    position: relative;
    padding: 6px 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #4ade80;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    color: #ffffff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 1001;
    position: relative;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.04);
}

.header.scrolled .mobile-menu-btn {
    background: rgba(11, 21, 40, 0.06);
    border-color: rgba(11, 21, 40, 0.12);
    color: var(--primary-color);
}

.header.scrolled .mobile-menu-btn:hover {
    background: rgba(11, 21, 40, 0.1);
}

.mobile-menu-btn[aria-expanded="true"] {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Nav Drawer Header & Footer (ocultos por defecto en pantallas de escritorio) */
.nav-drawer-header,
.nav-drawer-footer {
    display: none;
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 13, 26, 0.65);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   PAGE HERO BANNER (Para páginas interiores: Nosotros, Niveles, Contacto)
   ========================================================================== */
.page-hero {
    position: relative;
    background-color: var(--primary-color);
    padding: 165px 0 80px 0;
    color: #ffffff;
    overflow: hidden;
    text-align: center;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: saturate(1.2);
    transform: scale(1.03);
    z-index: 1;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(6, 35, 25, 0.95) 0%,
        rgba(0, 104, 71, 0.82) 100%
    );
    z-index: 2;
}

.page-hero-content {
    position: relative;
    z-index: 3;
    max-width: 820px;
    margin: 0 auto;
}

.page-hero .section-tag {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}

.page-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    line-height: 1.18;
    margin-bottom: 18px;
    font-weight: 700;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.page-hero-title .highlight {
    background: linear-gradient(120deg, #4ade80 0%, #ffffff 50%, #fca5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero-desc {
    font-size: 1.15rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    font-weight: 300;
}

/* Breadcrumb */
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.breadcrumb a {
    color: #ffffff;
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: #4ade80;
}

.breadcrumb i {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb span.current {
    color: #fca5a5;
    font-weight: 600;
}

/* ==========================================================================
   BANNER CTA PRE-FOOTER (Unificado para todas las páginas)
   ========================================================================== */
.cta-banner {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #063c29 55%, var(--secondary-color) 100%);
    padding: 85px 0;
    color: #ffffff;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(206, 17, 38, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.cta-text {
    max-width: 650px;
}

.cta-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fca5a5;
    background-color: rgba(206, 17, 38, 0.2);
    border: 1px solid rgba(206, 17, 38, 0.45);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.cta-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    line-height: 1.25;
    margin-bottom: 14px;
}

.cta-text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/*FOOTER INSTITUCIONAL COMPLETO Y UNIFICADO*/
.footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding-top: 85px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1.3fr;
    gap: 45px;
    margin-bottom: 50px;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 20px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 22px;
    line-height: 1.65;
    font-size: 0.92rem;
}

.footer-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.pill-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.pill-badge i {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    transition: var(--transition);
    color: #ffffff;
    font-size: 1rem;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 104, 71, 0.35);
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 12px;
    color: #ffffff;
    font-weight: 700;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 38px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

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

.footer-links li a {
    color: rgba(255, 255, 255, 0.72);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.footer-links li a i {
    font-size: 0.72rem;
    color: var(--secondary-color);
    transition: var(--transition-fast);
}

.footer-links li a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-links li a:hover i {
    color: #f87171;
}

.footer-contact .contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact .contact-list li {
    display: flex;
    gap: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    line-height: 1.5;
}

.footer-contact .contact-list i {
    color: var(--secondary-color);
    margin-top: 3px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.footer-contact .contact-list a {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition-fast);
}

.footer-contact .contact-list a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: rgba(4, 20, 14, 0.92);
    padding: 24px 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-legal-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition-fast);
}

.footer-legal-links a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   BOTONES FLOTANTES: WHATSAPP Y BACK TO TOP
   ========================================================================== */
.floating-actions {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 990;
}

.whatsapp-float {
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    position: relative;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.6;
    z-index: -1;
    animation: waPulse 2s infinite ease-out;
}

@keyframes waPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.whatsapp-tooltip {
    position: absolute;
    right: 68px;
    background: #0f172a;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: var(--transition-fast);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent #0f172a;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.back-to-top {
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
}

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

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   SISTEMA DE MODAL LIGHTBOX PARA GALERÍAS
   ========================================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 13, 26, 0.94);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-dialog {
    position: relative;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    color: #ffffff;
    margin-top: 14px;
    font-size: 1.05rem;
    text-align: center;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* ==========================================================================
   ANIMACIONES DE SCROLL (IntersectionObserver)
   ========================================================================== */
.scroll-anim {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ==========================================================================
   RESPONSIVIDAD Y BREAKPOINTS GLOBALES
   ========================================================================== */
@media (max-width: 1024px) {
    .section {
        padding: 75px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .cta-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text {
        max-width: 100%;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 868px) {
    .topbar {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-cta .btn {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 86vw;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, var(--primary-color) 0%, #03140e 100%);
        padding: 24px 22px 35px 22px;
        transition: right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.55);
        z-index: 1000;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .nav.active {
        right: 0;
    }

    .nav-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 18px;
        margin-bottom: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-drawer-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #ffffff;
        font-family: var(--font-heading);
        font-size: 1.05rem;
        font-weight: 700;
    }

    .nav-drawer-brand i {
        color: #4ade80;
        font-size: 1.25rem;
    }

    .nav-close-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        cursor: pointer;
        transition: var(--transition-fast);
    }

    .nav-close-btn:hover {
        background: rgba(206, 17, 38, 0.25);
        border-color: rgba(206, 17, 38, 0.4);
        color: #f87171;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
        border-bottom: none;
        color: rgba(255, 255, 255, 0.88);
        transition: var(--transition-fast);
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(0, 104, 71, 0.25);
        color: #4ade80;
        transform: translateX(4px);
    }

    .nav-link::after {
        display: none;
    }

    .nav-drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: auto;
        padding-top: 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-drawer-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .drawer-contact-info p {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.72);
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .drawer-contact-info i {
        color: var(--secondary-color);
        width: 16px;
    }

    .page-hero {
        padding: 135px 0 65px 0;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 60px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}
