/* ==========================================================================
   CLÍNICA DENTAL & MÉDICA SAN RAFAEL - HOJA DE ESTILOS PROFESIONAL
   Diseño Médico de Alta Conversión • Costa Rica
   ========================================================================== */

:root {
    --primary: #0284c7;        /* Azul médico de confianza */
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --secondary: #0d9488;      /* Verde azulado clínico */
    --accent: #10b981;         /* Verde éxito / WhatsApp */
    --dark: #0f172a;           /* Azul noche profundo */
    --dark-muted: #334155;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #38bdf8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 30px -4px rgba(2, 132, 199, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background-color: var(--light-bg);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* 1. Barra Superior de Anuncios y Urgencias */
.top-announcement {
    background-color: var(--dark);
    color: #94a3b8;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-item strong {
    color: #f1f5f9;
}

.emergency-call a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
}

.emergency-call a:hover {
    text-decoration: underline;
}

.badge-promo i {
    color: #38bdf8;
}

/* 2. Barra de Navegación */
.navbar-wrapper {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dark);
    display: block;
    line-height: 1.1;
}

.brand-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-muted);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-whatsapp-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #10b981;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-whatsapp-nav:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--dark);
    cursor: pointer;
}

.mobile-only {
    display: none;
}

/* 3. Hero Section */
.hero-section {
    position: relative;
    padding: 70px 0 90px;
    background-color: #f0f9ff;
    overflow: hidden;
    isolation: isolate;
}

/* Imagen de fondo del consultorio dental real con desenfoque suave */
.hero-bg-clinic-image {
    position: absolute;
    inset: -30px;
    background-image: url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?auto=format&fit=crop&w=1920&q=85');
    background-size: cover;
    background-position: center 38%;
    filter: blur(8px);
    transform: scale(1.06);
    z-index: -2;
    opacity: 0.38;
    pointer-events: none;
}

/* Velo translúcido blanco y celeste médico para contraste perfecto */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.94) 0%, 
        rgba(240, 249, 255, 0.88) 50%, 
        rgba(224, 242, 254, 0.78) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.hero-bg-glow {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: white;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.trust-pill .dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 16px;
    color: var(--dark-muted);
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.45);
}

.btn-secondary {
    background-color: white;
    color: var(--dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.hero-metrics {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.metric-number {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}

.metric-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.metric-divider {
    width: 1px;
    height: 35px;
    background-color: var(--border-color);
}

/* Tarjeta Flotante de Agendar Cita */
.hero-card-booking {
    position: relative;
}

.booking-card-inner {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 50px -10px rgba(2, 132, 199, 0.16), 0 10px 20px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.95);
    position: relative;
}

.booking-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.booking-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.booking-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 0.5px;
}

.booking-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.booking-form .form-group {
    margin-bottom: 16px;
}

.booking-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.booking-form input,
.booking-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    color: var(--dark);
    background-color: #f8fafc;
    transition: all 0.2s;
}

.booking-form input:focus,
.booking-form select:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.btn-booking-submit {
    width: 100%;
    background-color: #10b981;
    color: white;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-booking-submit:hover {
    background-color: #059669;
}

.form-disclaimer {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-top: 14px;
}

/* 4. Tratamientos Médicos */
.section-treatments {
    padding: 90px 0;
    background-color: white;
}

.section-header {
    max-width: 680px;
    margin: 0 auto 50px;
}

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

.section-badge {
    display: inline-block;
    padding: 5px 14px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 34px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

.treatments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.treatment-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.treatment-card:hover {
    transform: translateY(-5px);
    background-color: white;
    border-color: #bae6fd;
    box-shadow: var(--shadow-md);
}

.treatment-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.treatment-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.treatment-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.treatment-desc {
    font-size: 13px;
    color: var(--dark-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.treatment-features {
    list-style: none;
    margin-bottom: 24px;
    font-size: 12px;
    color: #475569;
}

.treatment-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.treatment-features i {
    color: var(--primary);
    font-size: 11px;
}

.treatment-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.treatment-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: color 0.2s;
}

.treatment-link:hover {
    color: var(--primary-hover);
}

/* 5. Especialistas Médicos */
.section-doctors {
    padding: 90px 0;
    background-color: #f1f5f9;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.doctor-card {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.doctor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}

.doctor-specialty {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.doctor-name {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.doctor-bio {
    font-size: 13px;
    color: var(--dark-muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.doctor-code {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-full);
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

/* 6. Testimonios */
.section-reviews {
    padding: 80px 0;
    background-color: white;
}

.google-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.google-badge i {
    color: #ea4335;
    font-size: 18px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.review-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 26px;
    border-radius: var(--radius-md);
}

.stars {
    color: #f59e0b;
    font-size: 14px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.review-text {
    font-size: 13px;
    color: var(--dark-muted);
    line-height: 1.7;
    margin-bottom: 18px;
    font-style: italic;
}

.reviewer-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

.reviewer-tag {
    font-size: 11px;
    color: #64748b;
}

/* 7. Sedes y Ubicaciones */
.section-locations {
    padding: 80px 0 100px;
    background-color: #f1f5f9;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.location-card {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.location-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.location-header i {
    font-size: 26px;
    color: var(--primary);
}

.location-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.location-sub {
    font-size: 12px;
    color: #64748b;
}

.location-details {
    list-style: none;
    font-size: 13px;
    color: var(--dark-muted);
    margin-bottom: 24px;
}

.location-details li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.location-details i {
    color: var(--primary);
    font-size: 14px;
    margin-top: 3px;
}

.btn-outline-location {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-outline-location:hover {
    background-color: var(--primary-light);
}

/* 8. Footer */
.footer-wrapper {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 70px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo .brand-name {
    color: white;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.7;
    margin-top: 14px;
    max-width: 360px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Outfit', sans-serif;
    color: white;
    font-size: 15px;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-contact p {
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    padding: 24px 0;
    font-size: 12px;
}

.watermark strong {
    color: #38bdf8;
}

/* 9. Botón Flotante Permanente de WhatsApp */
.floating-wa-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 999;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.floating-wa-btn:hover {
    transform: scale(1.08);
}

.wa-tooltip {
    position: absolute;
    right: 70px;
    background-color: var(--dark);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.floating-wa-btn:hover .wa-tooltip {
    opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

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

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        gap: 16px;
    }

    .nav-menu.active {
        display: flex;
    }

    .top-announcement .emergency-call,
    .top-announcement .badge-promo {
        display: none;
    }
}
