/* ==========================================================================
   TU CSS ORIGINAL (INTACTO)
   ========================================================================== */
:root {
    /* Brand Colors */
    --navy: #04142f;
    --teal: #50bec0;
    --teal-light: #6fd6d8;
    --teal-dark: #3a8e90;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #6c757d;
    --dark: #212529;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--teal), var(--navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: var(--white);
}

.loading-spinner p {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

/* Glass Navigation */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: var(--transition);
}

.glass-nav.scrolled {
    background: rgba(4, 20, 47, 0.95);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.nav-link {
    color: var(--white) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: var(--teal-dark);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--teal);
    border-radius: 50%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(4, 20, 47, 0.9) 0%, rgba(80, 190, 192, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Glass Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.glass-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--teal);
    box-shadow: 0 0 0 0.25rem rgba(80, 190, 192, 0.25);
    color: var(--white);
    outline: none; /* Asegurar que no salga el borde default */
}

/* Fix para selects en glassmorphism para que las opciones sean legibles */
select.glass-input option {
    background: var(--navy);
    color: var(--white);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Buttons */
.btn-teal {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--white);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-teal:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(80, 190, 192, 0.3);
}

.btn-outline-light {
    border-width: 2px;
    padding: 0.75rem 2rem;
    border-radius: 50px;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-item {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--teal), var(--navy));
}

.bento-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(80, 190, 192, 0.2);
}

.bento-item.large {
    grid-column: span 2;
}

/* Ajuste responsive para bento grid large */
@media (max-width: 768px) {
    .bento-item.large {
        grid-column: span 1;
    }
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.service-card h4 {
    margin-bottom: 1rem;
    color: var(--navy);
}

.service-link {
    color: var(--teal);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
}

.service-link i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* .gallery-item-wrapper rule removed because it was empty */

.gallery-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--teal);
    color: var(--teal);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--teal);
    color: var(--white);
}

/* Appointment Form */
.appointment-form {
    background: var(--white); /* Fallback si no soporta backdrop-filter */
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Sobreescribimos con glassmorphism si está dentro de glass-card */
.glass-card .appointment-form {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.form-label {
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.5rem;
}
/* En modo oscuro o glass, label blanco */
.glass-card .form-label {
    color: var(--white);
}

.benefits-list {
    margin: 2rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.benefit-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item i {
    margin-right: 1rem;
    font-size: 1.5rem;
}

/* Footer */
.glass-footer {
    background: var(--navy);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
    z-index: 10;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--teal);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--teal);
    transform: translateY(-3px);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.5rem;
    animation: float 2s ease-in-out infinite;
    text-decoration: none;
}

/* SPA Transitions */
.spa-page {
    /* Por defecto oculto si usas JS para mostrar */
    /* display: none; */ 
    /* Pero para PHP renderizado inicial, mejor visible o controlado por JS */
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Trust Indicators */
.trust-indicators {
    margin-top: 3rem;
}

.trust-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.trust-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.trust-item i {
    font-size: 2rem;
    color: var(--teal);
    margin-bottom: 1rem;
}

.trust-item h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.trust-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design Overrides */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .glass-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   AJUSTES AGREGADOS PARA FUNCIONALIDAD (Scroll y Botones)
   ========================================================================== */

/* 1. Hacer que las secciones sean visibles para el scroll (Anula efecto SPA oculto) */
.spa-page {
    display: block !important;
    opacity: 1 !important;
}

/* 2. Scroll suave en toda la página */
html {
    scroll-behavior: smooth;
}

/* 3. Estilos de Botones Flotantes */
.floating-container { 
    position: fixed; bottom: 20px; right: 20px; z-index: 9999; 
    display: flex; flex-direction: column; gap: 15px; 
}
.float-btn { 
    width: 60px; height: 60px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: white; font-size: 30px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transition: transform 0.3s; text-decoration: none; 
}
.float-btn:hover { 
    transform: scale(1.1); color: white; 
}
.btn-wa { background-color: #25d366; }
.btn-messenger { background-color: #0084ff; }

/* =========================================
   AGREGAR AL FINAL DE TU CSS
   ========================================= */

/* 1. Activar Scroll Suave y corrección de altura de menú */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Evita que el menú tape el título */
}

/* 2. Desactivar ocultamiento SPA (Para que el scroll funcione) */
.spa-page {
    display: block !important;
    opacity: 1 !important;
}

/* 3. Estilos Inputs Sólidos (Para el formulario de abajo) */
.input-solid {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #04142f;
}
.input-solid:focus {
    background: #fff;
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(80, 190, 192, 0.15);
}
.form-label-dark {
    color: #04142f;
    font-weight: 600;
}