/* =========================================
   1. VARIABLES & RESET (Estilo Premium)
   ========================================= */
:root {
    /* Paleta Clínica Premium - Inspirada en Dentum/Salud Moderna */
    --primary: #00a8cc;       /* Cian clínico vibrante */
    --primary-dark: #008ba8;
    --secondary: #2c3e50;     /* Azul oscuro elegante para textos */
    --accent: #2ecc71;        /* Verde sutil para éxito/whatsapp */
    --gold: #f1c40f;          /* Para estrellas de rating */
    
    --white: #ffffff;
    --light-bg: #f8f9fa;      /* Gris muy claro para fondos alternos */
    --text-main: #34495e;     /* Gris oscuro para lectura cómoda */
    --text-light: #7f8c8d;    /* Gris medio para subtítulos */
    
    --border: #ecf0f1;
    --radius: 12px;           /* Bordes redondeados modernos */
    
    /* Sombras Premium (Suaves y difusas) */
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(0,168,204,0.15);
    
    --container-width: 1200px;
    --header-height: 90px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.8; /* Mayor legibilidad */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased; /* Renderizado de fuente nítido */
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif; /* Tipografía más geométrica para títulos */
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.3;
}

a { text-decoration: none; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   2. LAYOUT & UTILITIES
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-padding { 
    padding: 100px 0; 
    background-color: var(--white);
}
.bg-light { background-color: var(--light-bg); }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 168, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 204, 0.4);
    text-decoration: none;
    color: var(--white);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #20bd5a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 0;
    font-weight: 700;
}
.btn-link:hover { text-decoration: underline; }

/* =========================================
   3. HEADER PREMIUM
   ========================================= */
.top-bar {
    background: linear-gradient(90deg, #006ec2 0%, #00d2fa 100%);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
    position: relative;
    z-index: 1001;
}

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

.top-address i {
    color: var(--white);
    margin-right: 8px;
}

.top-social {
    display: flex;
    gap: 15px;
}

.top-social a {
    color: var(--white);
    opacity: 0.9;
    transition: var(--transition);
    font-size: 0.9rem;
}

.top-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.main-header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

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

.logo img { height: 55px; width: auto; }

.nav-links { display: flex; gap: 40px; align-items: center; }

.nav-links a {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-links a.btn-primary {
    color: var(--white);
    padding: 10px 25px;
}
.nav-links a.btn-primary:hover {
    color: var(--white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

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

.hamburger { display: none; font-size: 1.8rem; color: var(--secondary); cursor: pointer; }

/* =========================================
   4. HERO SLIDER SECTION
   ========================================= */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: 85vh; /* Misma altura que el hero anterior */
    overflow: hidden;
    background: var(--light-bg);
}

.hero-slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    text-align: center;
    color: var(--white);
}

/* Ajustes de texto para el slider con fondo oscuro */
.hero-slide .hero-content h1 {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-slide .hero-content p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Controles del Slider */
.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.slider-prev:hover, .slider-next:hover {
    background: var(--primary);
    color: var(--white);
}

.slider-prev { left: 30px; }
.slider-next { right: 30px; }

/* Indicadores (Dots) */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active, .dot:hover {
    background: var(--primary);
    transform: scale(1.2);
}

/* =========================================
   5. CARDS (Staff & Servicios)
   ========================================= */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.staff-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.staff-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}

.staff-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center top;
}

.staff-info { padding: 25px; text-align: center; }
.staff-info h3 { margin-bottom: 5px; font-size: 1.2rem; }
.staff-info p { color: var(--primary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   6. CONTACTO PREMIUM
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    margin-top: 50px;
    align-items: start;
}

.contact-details {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 168, 204, 0.08);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.contact-item h3 { font-size: 1.1rem; margin-bottom: 5px; }
.contact-item p { color: var(--text-light); font-size: 1rem; }

.map-container {
    height: 100%;
    min-height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 5px solid var(--white);
}

.map-container iframe { width: 100%; height: 100%; border: 0; }

/* =========================================
   7. FOOTER
   ========================================= */
.main-footer {
    background-color: var(--secondary);
    color: var(--white);
    padding: 80px 0 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-column h3 { color: var(--white); margin-bottom: 30px; font-size: 1.3rem; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: var(--primary); padding-left: 8px; }

.footer-bottom {
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .hero-slide .hero-content h1 { font-size: 2.8rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .staff-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    /* Header & Top Bar */
    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 5px 0;
    }
    
    .top-address { font-size: 0.75rem; }
    
    /* Navigation */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px; /* Match new header height */
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        text-align: center;
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    
    .main-header { height: 70px; }
    .logo img { height: 45px; }

    /* Hero Section */
    .hero-slider-section { height: auto; min-height: 600px; }
    .hero-slide .hero-content h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    
    .slider-prev, .slider-next { width: 40px; height: 40px; font-size: 1.2rem; }
    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }
    
    /* General Layout */
    .section-padding { padding: 60px 0; }
    .form-container { padding: 30px; }
    .map-container { min-height: 300px; }
    
    /* WhatsApp Widget */
    .whatsapp-float { right: 20px; bottom: 20px; }
    .wa-bubble { display: none !important; }
    
    /* Footer */
    .footer-content { gap: 30px; text-align: center; }
    .footer-column h3 { margin-bottom: 20px; }
    .contact-info li { justify-content: center; }
}

@media (max-width: 480px) {
    .hero-slide .hero-content h1 { font-size: 1.8rem; }
    .hero-slide .hero-content p { font-size: 1rem; }
    .staff-grid { grid-template-columns: 1fr; }
    .types-grid { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr; }
    
    /* Ensure containers don't overflow */
    .container { width: 95%; }
}

/* =========================================
   9. FORMS & ALERTS (Citas)
   ========================================= */
.form-container {
    max-width: 800px;
    margin: 50px auto 0;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.02);
}

.form-group { margin-bottom: 25px; }

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #eef2f7;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    background-color: #fcfdfe;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 168, 204, 0.1);
}

textarea.form-control { resize: vertical; min-height: 120px; }

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* =========================================
   10. BEFORE / AFTER SLIDER
   ========================================= */
.comparison-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 5px solid var(--white);
    position: relative;
    user-select: none; /* Previene selección al arrastrar */
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    height: 350px; /* Altura fija para igualar tamaño */
    line-height: 0;
    cursor: col-resize;
    overflow: hidden; /* Asegurar recorte */
}

/* Imagen de fondo (Después) - Ocupa todo el espacio */
.img-background {
    width: 100%;
    height: 100%;
    position: relative;
}

.img-background img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorte inteligente para llenar */
    object-position: center;
    display: block;
}

/* Imagen frontal (Antes) - Recortada */
.img-foreground {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Estado inicial */
    height: 100%;
    overflow: hidden;
    border-right: 3px solid var(--white);
    box-shadow: 5px 0 15px rgba(0,0,0,0.15);
    z-index: 10;
}

.img-foreground img {
    height: 100%;
    width: auto; /* Se ajustará vía JS para coincidir con containerWidth */
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* Etiquetas */
.label-badge {
    position: absolute;
    top: 20px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary);
    font-weight: 700;
    border-radius: 20px;
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: none; /* No interfiere con el drag */
}

.label-after { right: 20px; }
.label-before { left: 20px; }

/* Manija del Slider */
.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Coincide con el width inicial de img-foreground */
    width: 40px;
    margin-left: -20px; /* Centrar manija */
    z-index: 20;
    pointer-events: none; /* El evento se captura en el wrapper */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.handle-line {
    width: 2px;
    height: 100%;
    background: transparent; /* La línea visible ya es el borde de img-foreground */
}

.handle-circle {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border: 4px solid var(--white);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 1.2rem;
}

/* =========================================
   11. SERVICIOS (Brackets & Others)
   ========================================= */
.trust-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trust-item {
    padding: 20px;
}

/* Timeline vertical simplificado para mobile y desktop */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px; /* Alineado con el centro del círculo (40px / 2) */
    width: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
}

/* Acordeón FAQ */
.faq-accordion details {
    background: var(--white);
    transition: var(--transition);
}

.faq-accordion details[open] {
    box-shadow: var(--shadow-soft);
    border-color: var(--primary) !important;
}

.faq-accordion summary {
    list-style: none; /* Ocultar flecha default en algunos navegadores */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 300;
}

.faq-accordion details[open] summary::after {
    content: '-';
}

/* Cards de Tipos de Brackets */
.type-card {
    background: var(--white);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: transparent !important;
}

.type-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}