:root {
    /* PALETA DE COLORES ACTUALIZADA */
    --primary-color: #59b0ae;
    /* Color Principal (Teal/Verde Azulado) para acentos visuales */
    --primary-accessible: #2a7371;
    /* Teal con contraste WCAG AA (>= 4.5:1 con blanco) para botones, textos y fondos oscuros */
    --primary-dark: #215b59;
    /* Versión más oscura para hovers */
    --secondary-color: #ffffff;
    /* Color Secundario (Blanco) */

    --dark-color: #2b2b2b;
    /* Para textos generales */
    --light-bg: #f4fcfc;
    /* Fondo muy suave con tinte del color principal */
    --text-muted: #596068;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--primary-accessible);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    z-index: 2000;
    text-decoration: none;
    font-weight: 600;
}

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

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    background-color: var(--secondary-color);
}

.navbar-brand img {
    max-height: 60px;
    width: auto;
    height: auto;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin-left: 15px;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-accessible) !important;
}

.btn-appointment {
    background-color: var(--primary-accessible);
    color: var(--secondary-color);
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--primary-accessible);
}

.btn-appointment:hover {
    background-color: transparent;
    color: var(--primary-accessible);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.85)), url('image/bg-hero.avif');
    background-size: cover;
    background-position: center;
    padding: 96px 0 72px;
    min-height: 88vh;
    display: flex;
    align-items: center;
    position: relative;
}

.scroll-down-container {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-down-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(89, 176, 174, 0.12);
    border: 2px solid var(--primary-accessible);
    color: var(--primary-accessible);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-down-btn:hover {
    background: var(--primary-accessible);
    color: white;
    transform: translateY(-3px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.hero-title {
    font-weight: 700;
    color: var(--primary-accessible);
    font-size: 3.4rem;
    line-height: 1.15;
}

.hero-specialty {
    color: #111111;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 16px;
    font-weight: 600;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.hero-image-container {
    position: relative;
    z-index: 1;
}

.hero-image {
    border-radius: 20px;
    box-shadow: 20px 20px 0px var(--primary-color);
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.certification-logos {
    flex-wrap: nowrap;
    align-items: center;
}

.cert-logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Buttons Standard */
.btn-primary {
    background-color: var(--primary-accessible);
    border-color: var(--primary-accessible);
    color: var(--secondary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-accessible);
    border-color: var(--primary-accessible);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-accessible);
    border-color: var(--primary-accessible);
    color: var(--secondary-color);
}

/* Stats/Info Cards */
.info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-10px);
}

/* Services Section */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.text-primary {
    color: var(--primary-accessible) !important;
}

.bg-primary {
    background-color: var(--primary-accessible) !important;
}

.service-box {
    background: white;
    padding: 36px 28px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-bottom: 4px solid transparent;
}

.service-box:hover {
    border-bottom: 4px solid var(--primary-color);
    transform: translateY(-5px);
}

.service-card-link {
    color: var(--primary-accessible);
    display: inline-flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
}

.service-card-link:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* Service Detail Pages (Fase 3) */
.service-page-hero {
    background: linear-gradient(135deg, var(--light-bg) 0%, #ffffff 100%);
    padding: 108px 0 44px;
    border-bottom: 1px solid rgba(42, 115, 113, 0.12);
}

.service-page-hero .breadcrumb-item a {
    color: var(--primary-accessible);
    text-decoration: none;
    font-weight: 500;
}

.service-page-hero .breadcrumb-item a:hover {
    text-decoration: underline;
}

.service-page-title {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 2.35rem;
    line-height: 1.2;
}

.service-toc {
    background-color: var(--light-bg);
    border-left: 4px solid var(--primary-accessible);
}

.service-article-section {
    scroll-margin-top: 96px;
}

.service-faq {
    scroll-margin-top: 96px;
}

.service-faq-accordion .accordion-button:not(.collapsed) {
    background-color: var(--light-bg);
    color: var(--primary-accessible);
    font-weight: 600;
    box-shadow: none;
}

.service-faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(42, 115, 113, 0.2);
    border-color: var(--primary-accessible);
}

.service-cta-box {
    background: linear-gradient(135deg, var(--primary-accessible) 0%, var(--primary-dark) 100%);
}

.service-sidebar-sticky {
    position: sticky;
    top: 96px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    /* Área táctil mínima de 44 px y separación entre enlaces (accesibilidad móvil) */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.25rem;
}

.footer-nav a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(89, 176, 174, 0.14);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-accessible);
    font-size: 1.8rem;
}

/* Education Section */
.education-section {
    background-color: var(--light-bg);
}

.education-card-simple {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    border-left: 3px solid var(--primary-color);
}

.education-card-simple:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.education-card-simple .degree-title {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.education-card-simple .institution-name {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.education-card-simple .institution-name i {
    color: var(--primary-accessible);
}

.education-card-simple .badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    font-weight: 500;
}

/* Casos Tratados Section */
.casos-carousel {
    position: relative;
    padding-bottom: 70px;
}

.casos-image-box {
    width: 100%;
    height: 380px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4f4;
}

.casos-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.casos-carousel-control {
    top: 42%;
    transform: translateY(-50%);
    background-color: var(--primary-accessible);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    opacity: 0.9;
}

.casos-carousel-control:hover {
    opacity: 1;
}

.casos-carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: 0;
}

.casos-carousel-indicators [data-bs-target] {
    background-color: var(--primary-accessible);
    border: none;
}

/* About Section */
.about-section {
    background-color: var(--light-bg);
}

/* Location Section */
.contact-info-box {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    min-width: 50px;
    height: 50px;
    background-color: var(--primary-accessible);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.2rem;
}

/* Custom BG for contact box */
.bg-custom-dark {
    background-color: var(--primary-accessible);
}

.contact-muted {
    color: rgba(255, 255, 255, 0.92);
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 58px;
    height: 58px;
    bottom: 24px;
    right: 24px;
    background-color: #1f8f48;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    background-color: #177238;
    color: white;
    transform: scale(1.08);
}

/* Footer */
footer {
    background-color: #2b2b2b;
    color: white;
    padding: 40px 0 24px;
    border-top: 5px solid var(--primary-color);
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.footer-muted {
    color: rgba(255, 255, 255, 0.82);
}

footer a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-section {
        padding: 84px 0 44px;
        min-height: auto;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        border-left: none;
        border-bottom: 3px solid var(--primary-color);
        padding-left: 0;
        padding-bottom: 4px;
        display: inline-block;
        margin-bottom: 10px;
    }

    .hero-title {
        font-size: 2.05rem;
        margin-top: 4px;
        text-align: center;
    }

    .hero-specialty {
        font-size: 1.35rem;
        margin-bottom: 12px !important;
    }

    .hero-desc {
        font-size: 0.98rem;
        margin-bottom: 18px !important;
        text-align: center;
    }

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

    .hero-btns .btn-lg {
        font-size: 0.98rem;
        padding: 0.55rem 1.25rem !important;
    }

    .hero-image {
        max-width: 240px;
        margin-top: 12px;
        box-shadow: 10px 10px 0px var(--primary-color);
    }

    .hero-badges {
        margin-top: 24px !important;
    }

    .cert-logo {
        height: 60px;
        width: 60px;
    }

    .casos-image-box {
        height: 280px;
    }

    .navbar-brand img {
        max-height: 44px;
    }

    .service-page-hero {
        padding: 88px 0 36px;
    }

    .service-page-title {
        font-size: 1.7rem;
    }
}


/* Fase 2: ubicación en hero, credenciales y reseñas */
.hero-location {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--primary-accessible);
}

.credentials-box {
    border-left: 4px solid var(--primary-color);
}

/* Fase 3: páginas de servicio, enlazado interno y 404 */
.service-card-link {
    color: var(--primary-accessible);
    transition: color 0.2s ease;
}

.service-card-link:hover {
    color: var(--primary-dark);
}

.service-page-hero {
    background: linear-gradient(rgba(244, 252, 252, 0.95), rgba(255, 255, 255, 0.98));
    padding: 112px 0 48px;
    border-bottom: 1px solid rgba(89, 176, 174, 0.18);
}

.service-page-h1 {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 2.35rem;
    line-height: 1.2;
}

.service-breadcrumb {
    font-size: 0.9rem;
}

.service-breadcrumb a {
    color: var(--primary-accessible);
    text-decoration: none;
}

.service-breadcrumb a:hover {
    text-decoration: underline;
}

.service-toc {
    background-color: var(--light-bg);
    border: 1px solid rgba(89, 176, 174, 0.25);
}

.service-toc-link {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.service-toc-link:hover {
    color: var(--primary-accessible);
}

.service-article-section {
    scroll-margin-top: 96px;
}

.service-bullet-list {
    list-style: none;
    padding-left: 0;
}

.service-bullet-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: var(--text-muted);
    line-height: 1.65;
}

.service-bullet-list i {
    margin-top: 5px;
    flex-shrink: 0;
}

.service-faq-accordion .accordion-button:not(.collapsed) {
    background-color: var(--light-bg);
    color: var(--primary-dark);
    font-weight: 600;
}

.service-faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(42, 115, 113, 0.2);
}

.service-sidebar-card.sticky-lg-top {
    top: 96px;
}

.service-related-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-related-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 991px) {
    .service-page-hero {
        padding: 88px 0 36px;
    }

    .service-page-h1 {
        font-size: 1.75rem;
    }
}
