:root {
  --color-primary: #017A72;
  --color-primary-dark: #01635C;
  --color-heading: #0B1C30;
  --color-text: #4A5568;
  --color-border: #E2E8F0;
  --color-surface: #F8FAFC;
  --color-surface-soft: #F1F9F8;
  --color-white: #FFFFFF;
}

.home-page {
    font-family: fuente1, "Century Gothic", "AppleGothic", "Segoe UI", Roboto, Arial, sans-serif;
    color: #2D3748;
    background-color: #ffffff;
    font-size: 1.125rem; /* 18px */
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
.home-page h1, 
.home-page h2 {
    font-family: fuente1, "Century Gothic", "AppleGothic", "Segoe UI", Roboto, Arial, sans-serif;
    color: #0B1C30;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.home-page h3, 
.home-page h4 {
    font-family: fuente1, "Century Gothic", "AppleGothic", "Segoe UI", Roboto, Arial, sans-serif;
    color: #0B1C30;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.home-page .text-primary-color { color: #017A72; }
.home-page .text-accent-color { color: #01B8AE; }

/* Buttons */
.home-page .btn {
    font-size: 1.125rem; /* 18px */
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.home-page .btn-primary {
    background-color: #017A72;
    border: 2px solid #017A72;
    color: #ffffff;
}
.home-page .btn-primary:hover, 
.home-page .btn-primary:focus, 
.home-page .btn-primary:active, 
.home-page .btn-primary.active,
.home-page .btn-primary:not(:disabled):not(.disabled):active,
.home-page .btn-primary:not(:disabled):not(.disabled).active {
    background-color: #01635c;
    border-color: #01635c;
    color: white;
}
.home-page .btn-primary:focus, 
.home-page .btn-primary:focus-visible, 
.home-page .btn-primary.focus,
.home-page .btn-primary:active:focus,
.home-page .btn-primary.active:focus,
.home-page .btn-primary:not(:disabled):not(.disabled):active:focus,
.home-page .btn-primary:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 122, 114, 0.28);
    outline: none;
}

.home-page .btn-outline-primary {
    background-color: transparent;
    border: 2px solid #017A72;
    color: #017A72;
}
.home-page .btn-outline-primary:hover, 
.home-page .btn-outline-primary:focus, 
.home-page .btn-outline-primary:active, 
.home-page .btn-outline-primary.active,
.home-page .btn-outline-primary:not(:disabled):not(.disabled):active,
.home-page .btn-outline-primary:not(:disabled):not(.disabled).active {
    background-color: #EAF6F5;
    color: #01635c;
    border-color: #01635c;
}
.home-page .btn-outline-primary:focus, 
.home-page .btn-outline-primary:focus-visible, 
.home-page .btn-outline-primary.focus,
.home-page .btn-outline-primary:active:focus,
.home-page .btn-outline-primary.active:focus,
.home-page .btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.home-page .btn-outline-primary:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 122, 114, 0.28);
    outline: none;
}

/* Navigation */
.home-page .navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
    padding: 0.5rem 1rem;
}
.home-page .navbar-brand {
    color: #0B1C30;
    font-weight: bold;
}
.home-page .navbar-nav .nav-item {
    margin: 0 0.25rem;
}
.home-page .navbar-nav .nav-link {
    color: #4A5568 !important;
    font-weight: bold;
    font-size: 1.125rem; /* 18px */
    padding: 0.5rem 0.5rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
}
.home-page .navbar-nav .nav-link:hover {
    color: #017A72 !important;
}
.home-page .navbar-nav .active > .nav-link,
.home-page .navbar-nav .nav-link.active {
    color: #017A72 !important;
    border-bottom-color: #017A72;
}

/* Hero Section */
.home-page .hero-section {
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.68) 100%), url('../src/imgs/consultorio-portada-ilustrativo-v2.png') no-repeat center center;
    background-size: cover;
    padding: 72px 15px; /* Desktop padding */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0; /* Let it adapt to content */
}
.home-page .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}
.home-page .hero-emblems-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}
.home-page .hero-emblem {
    max-width: 120px;
    height: 90px;
    object-fit: contain;
}
.home-page .hero-title {
    font-size: clamp(2rem, 3vw + 1.5rem, 3rem); /* 32px to 48px */
    line-height: 1.2;
    margin: 0 0 12px 0;
    text-shadow: none !important;
}
.home-page .hero-subtitle {
    font-size: clamp(1.25rem, 1vw + 1rem, 1.375rem); /* 20px to 22px */
    color: #0B1C30;
    font-weight: bold;
    margin: 0 0 16px 0;
}
.home-page .hero-text {
    font-size: 1.125rem; /* 18px */
    color: #4A5568 !important;
    opacity: 1 !important;
    margin: 0 0 32px 0;
}
.home-page .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Services Section */
.home-page .services-section {
    background-color: #F7FAFB;
    padding: 72px 15px;
}
.home-page .section-label {
    text-transform: uppercase;
    font-size: 1rem; /* 16px */
    color: #01B8AE;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.home-page .section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 4px;
    background-color: #017A72;
    margin-right: 12px;
}
.home-page .services-title {
    font-size: clamp(1.625rem, 2vw + 1.1rem, 2rem); /* 26px to 32px */
    text-align: left;
    margin-bottom: 48px;
}
.home-page .service-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    padding: 32px 24px; /* Desktop padding */
    height: 100%;
    box-shadow: 0 4px 12px rgba(11, 28, 48, 0.03);
    display: flex;
    flex-direction: column;
}
.home-page .service-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    color: #01B8AE;
}
.home-page .service-card h3 {
    font-size: clamp(1.25rem, 1vw + 1rem, 1.375rem); /* 20px to 22px */
    margin-bottom: 12px;
    color: #0B1C30;
}
.home-page .service-card p {
    font-size: 1.125rem; /* 18px */
    line-height: 1.5;
    color: #4A5568;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Link Focus/Hover logic */
.home-page a:focus {
    outline: none;
}
.home-page a:focus-visible {
    outline: 2px solid #01B8AE;
    outline-offset: 4px;
}
.home-page .service-link {
    color: #017A72;
    font-weight: bold;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}
.home-page .service-link:hover, .home-page .service-link:focus {
    color: #01635c;
    outline: none;
}
.home-page .service-link:focus-visible {
    outline: 2px solid #01B8AE;
    outline-offset: 4px;
}

.home-page .zoomable-img {
    cursor: pointer;
    transition: opacity 0.2s;
}
.home-page .zoomable-img:hover, .home-page .zoomable-img:focus {
    opacity: 0.85;
}
.home-page .zoomable-img:focus-visible {
    outline: 2px solid #01B8AE;
    outline-offset: 2px;
}

/* About Section */
.home-page .about-section {
    background-color: #F1F9F8;
    padding: 72px 15px;
}
.home-page .about-section h2 {
    font-size: clamp(1.625rem, 2vw + 1.1rem, 2rem); /* 26px to 32px */
    text-align: left;
}
.home-page .about-img-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
}
.home-page .about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact Section */
.home-page .contact-section {
    background-color: #EAF6F5;
    padding: 72px 15px; /* Desktop */
    border-bottom: 1px solid #e2e8f0;
}
.home-page .contact-title {
    font-size: clamp(1.75rem, 2vw + 1.25rem, 2rem); /* 28-32px */
    color: #0B1C30;
    line-height: 1.3;
}
.home-page .contact-hospital {
    font-size: clamp(1.25rem, 1vw + 1rem, 1.375rem); /* 20-22px */
    color: #4A5568;
    line-height: 1.4;
    font-weight: bold;
}
.home-page .contact-buttons-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.home-page .contact-btn-primary {
    background-color: #017A72;
    border: 2px solid #017A72;
    color: #ffffff;
    border-radius: 4px;
}
.home-page .contact-btn-primary:hover, 
.home-page .contact-btn-primary:focus,
.home-page .contact-btn-primary:active,
.home-page .contact-btn-primary.active,
.home-page .contact-btn-primary:not(:disabled):not(.disabled):active,
.home-page .contact-btn-primary:not(:disabled):not(.disabled).active {
    background-color: #01635c;
    border-color: #01635c;
    color: #ffffff;
}
.home-page .contact-btn-primary:focus, 
.home-page .contact-btn-primary:focus-visible, 
.home-page .contact-btn-primary.focus,
.home-page .contact-btn-primary:active:focus,
.home-page .contact-btn-primary.active:focus,
.home-page .contact-btn-primary:not(:disabled):not(.disabled):active:focus,
.home-page .contact-btn-primary:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 122, 114, 0.28);
    outline: none;
}
.home-page .contact-btn-secondary {
    background-color: #ffffff;
    border: 2px solid #01B8AE;
    color: #017A72;
    border-radius: 4px;
}
.home-page .contact-btn-secondary:hover, 
.home-page .contact-btn-secondary:focus,
.home-page .contact-btn-secondary:active,
.home-page .contact-btn-secondary.active,
.home-page .contact-btn-secondary:not(:disabled):not(.disabled):active,
.home-page .contact-btn-secondary:not(:disabled):not(.disabled).active {
    background-color: #EAF6F5;
    color: #01635c;
    border-color: #01635c;
}
.home-page .contact-btn-secondary:focus, 
.home-page .contact-btn-secondary:focus-visible, 
.home-page .contact-btn-secondary.focus,
.home-page .contact-btn-secondary:active:focus,
.home-page .contact-btn-secondary.active:focus,
.home-page .contact-btn-secondary:not(:disabled):not(.disabled):active:focus,
.home-page .contact-btn-secondary:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 122, 114, 0.28);
    outline: none;
}
.home-page .contact-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    text-align: left;
}
.home-page .contact-info-text {
    font-size: 1.125rem; /* 18px */
    color: #4A5568;
    line-height: 1.5;
}
.home-page .contact-info-text strong {
    color: #0B1C30;
}
.home-page .contact-phone-link {
    color: #017A72;
    text-decoration: none;
    font-weight: bold;
}
.home-page .contact-phone-link:hover, .home-page .contact-phone-link:focus {
    color: #01635c;
    outline: none;
}
.home-page .contact-phone-link:focus-visible {
    outline: 2px solid #01B8AE;
    outline-offset: 4px;
}

/* Footer */
.home-page .custom-footer {
    padding: 48px 15px 24px 15px;
    background-color: #0B1C30;
    border-top: none;
    color: #E2E8F0;
}
.home-page .footer-brand-title {
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 8px;
}
.home-page .footer-brand-desc {
    color: #A0AEC0;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}
.home-page .footer-col-title {
    color: #FFFFFF;
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 16px;
    border-bottom: 2px solid #017A72;
    padding-bottom: 6px;
    display: inline-block;
}
.home-page .footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.home-page .footer-links-list li {
    margin-bottom: 10px;
}
.home-page .footer-links-list a {
    color: #CBD5E0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}
.home-page .footer-links-list a:hover, .home-page .footer-links-list a:focus {
    color: #01B8AE;
}
.home-page .footer-bottom-bar {
    border-top: 1px solid #1A365D;
    padding-top: 20px;
    margin-top: 32px;
}
.home-page .footer-text {
    color: #A0AEC0;
    font-size: 0.9375rem;
    margin: 0;
}

/* Modal Fullscreen */
body.modal-open #imageModal {
    overflow: hidden !important;
}
#imageModal {
    padding: 0 !important;
}
#imageModal .modal-dialog.modal-fullscreen {
    max-width: 100%;
    margin: 0;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
}
#imageModal .modal-content {
    height: 100%;
    width: 100%;
    border-radius: 0;
    border: none;
    background-color: rgba(11, 28, 48, 0.96) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
#imageModal .modal-header-custom {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
}
#imageModal .modal-body-custom {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
#imageModal .modal-image-container {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
#imageModal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#imageModal .modal-text-container {
    flex-shrink: 0;
    text-align: center;
    padding: 15px 10px 5px;
    color: #ffffff;
}
#imageModal .modal-caption-title {
    font-size: clamp(1.375rem, 1.5vw + 1rem, 1.5rem); /* ~22-24px */
    color: #ffffff;
    margin-bottom: 0.5rem;
}
#imageModal .modal-caption-desc {
    font-size: clamp(1.125rem, 1vw + 1rem, 1.25rem); /* ~18-20px */
    color: #e2e8f0;
    margin-bottom: 0;
}
#imageModal .modal-body-reading {
    flex: 1;
    overflow-y: auto;
    padding: 30px 15px;
    box-sizing: border-box;
    color: #ffffff;
    display: flex;
    justify-content: center;
}
#imageModal .reading-content-wrapper {
    max-width: 800px;
    width: 100%;
}
#imageModal .modal-close-btn {
    width: 48px;
    height: 48px;
    font-size: 2.5rem;
    color: #fff;
    opacity: 0.8;
    background: none;
    border: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#imageModal .modal-close-btn:hover, #imageModal .modal-close-btn:focus { 
    opacity: 1; 
    color: #fff;
    outline: none;
}
#imageModal .modal-close-btn:focus-visible {
    outline: 2px solid #fff;
}

/* Helpers */
.home-page .gap-3 { gap: 1rem !important; }

/* Responsive Overrides */
@media (max-width: 767px) {
    .home-page .hero-section,
    .home-page .services-section,
    .home-page .about-section,
    .home-page .contact-section {
        padding: 48px 15px; /* Mobile padding */
    }
    .home-page .hero-emblems-row {
        flex-direction: row;
        gap: 16px;
    }
    .home-page .hero-emblem {
        max-width: 70px;
        height: 60px;
    }
    .home-page .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .home-page .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    .home-page .service-card {
        padding: 24px 20px; /* Mobile padding */
    }
    .home-page .footer-links {
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
    }
    .home-page .footer-text {
        text-align: center;
    }
    .home-page .contact-buttons-row {
        flex-direction: column;
    }
    .home-page .contact-buttons-row .btn {
        width: 100%;
        max-width: none;
    }
}

/* Animations & Transitions */
.home-page .btn {
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.home-page .service-link {
    transition: color 0.18s ease;
}
.home-page .service-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
@media (hover: hover) and (pointer: fine) {
    .home-page .service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(11, 28, 48, 0.08);
    }
}


.home-page .gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    cursor: pointer;
}
@media (max-width: 390px) {
    .home-page .hero-emblems-row {
        gap: 8px;
    }
    .home-page .hero-emblem {
        max-width: 55px;
        height: 50px;
    }
}

/* Shared Internal Service Hero Section */
.service-hero-section {
    background-color: var(--color-surface-soft, #F1F9F8);
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.service-hero-section .section-label {
    color: var(--color-primary, #017A72);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.service-hero-title {
    color: var(--color-heading, #0B1C30);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-hero-description {
    color: var(--color-text, #4A5568);
    line-height: 1.7;
}

/* Mobile Navbar Toggler Styling */
.navbar-toggler {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    background-color: #FFFFFF !important;
    border: 1px solid rgba(11, 28, 48, 0.14) !important;
    border-radius: 8px !important;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(11, 28, 48, 0.05);
    position: relative;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    outline: none !important;
    background-color: #F8FAFC !important;
    border-color: rgba(1, 122, 114, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(1, 122, 114, 0.20) !important;
}

.navbar-toggler .navbar-toggler-icon {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background-color: #0B1C30 !important;
    background-image: none !important;
    position: relative !important;
    border-radius: 1px;
    margin: 0 auto;
    transition: background-color 0.2s ease;
}

.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    width: 20px !important;
    height: 2px !important;
    background-color: #0B1C30 !important;
    border-radius: 1px;
    transition: transform 0.2s ease, top 0.2s ease;
}

.navbar-toggler .navbar-toggler-icon::before {
    top: -6px !important;
}

.navbar-toggler .navbar-toggler-icon::after {
    top: 6px !important;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent !important;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0 !important;
    transform: rotate(45deg) !important;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0 !important;
    transform: rotate(-45deg) !important;
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}


