/* ====== VARIABLES GLOBALES ====== */
:root {
    --primary-dark: #004063ff;
    --primary-teal: #00bec6ff;
    --light-bg: #f8f9fa;
    --card-bg: #efeff5;
    --text-light: #ffffff;
    --footer-bg: #1a3b56;        /* Fondo del footer */
    --footer-teal: #4bbbc4;       /* Color para enlaces hover y títulos */
}

/* ====== RESET Y UTILIDADES ====== */
.imagen-card {
    max-width: 100% !important;
    height: auto;
    display: block;
}

/* Contenedor para pantallas ultra-wide (>25") */
.ultra-wide-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== TIPOGRAFÍA RESPONSIVE ====== */
.lead {
    color: var(--primary-dark);
    font-size: calc(1.2rem + 0.6vw);
    line-height: 1.4;
}

.lead strong {
    font-weight: 700;
}

.display-4 {
    font-size: calc(2rem + 2vw);
    color: var(--primary-teal);
}

@media (min-width: 1200px) {
    .display-4 {
        font-size: 4rem;
    }
}

/* ====== SECCIÓN PACIENTE ====== */
.patient-container {
    width: 100%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: var(--light-bg);
    padding: 15px 0;
}

#patient-header {
    align-content: center;
}

.patient-header {
    color: var(--primary-teal);
    padding: 20px;
    font-weight: bold;
    font-size: 1.5rem;
    width: 100%;
    text-align: left;
}

#contenedor-columas {
    width: 40em;
}

.first-menu-section,
.second-menu-section {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
    height: auto;
}

.menu-item {
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.menu-item .nav-link {
    color: var(--primary-dark);
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item .nav-link:hover {
    color: var(--primary-teal);
}

@media (min-width: 768px) {
    .menu-item {
        text-align: left;
    }
}

@media (max-width: 425px) {
    .patient-header {
        font-size: 1.3rem;
        padding: 10px;
    }
    .first-menu-section,
    .second-menu-section {
        padding: 0 5px;
    }
    .menu-item {
        padding: 8px 5px;
    }
    .menu-item .nav-link {
        font-size: 0.85rem;
    }
}

.hero-section {
    background: linear-gradient(rgba(255,255,255,0), rgba(255,253,253,0)) no-repeat center;
    background-size: cover;
    background-color: var(--footer-bg); /* Color de respaldo */
    height: 50em;
    color: white;
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.hero-imagen {
    width: 100%;
    height: 100%;
}

.imagen {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
}

/* ====== STATS SECTION ====== */
.stats-section {
    background-color: var(--light-bg);
    padding: 60px 0;
}

.stats-section .row p {
    color: var(--primary-dark);
}

/* ====== CARDS DE SERVICIOS ====== */
.card {
    transition: transform 0.3s ease;
    border: none;
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2rem;
    margin-bottom: 1rem;
}

#btn-servicios {
    background-color: var(--primary-teal);
    color: white;
    font-size: 1rem;
    width: 150px;
    text-align: center;
    border: none;
    padding: 0.5rem 1rem;
    align-self: center;
    transition: background-color 0.2s;
}

#btn-servicios:hover {
    background-color: var(--primary-dark);
}

.card-body img {
    max-width: 80px;
    margin: 0 auto 1rem;
}

/*========== card de carrera de la salud ==========*/
.card-invertida {
    background-color: #00bec6; /* Color del botón (teal) */
    color: #ffffff; /* Letras blancas */
    border: none;
}

.card-invertida .card-title,
.card-invertida .card-text {
    color: #ffffff; /* Letras blancas para títulos y texto */
}

.card-invertida .btn-primary {
    background-color: #ffffff; /* Fondo del botón = color de la card original */
    color: #00bec6; /* Texto del botón = color teal */
    border: 2px solid #ffffff !important; /* Borde blanco */
}

.card-invertida .btn-primary:hover {
    background-color: #f0f0f0 !important; /* Efecto hover opcional */
    color: #00bec6 !important; /* Mantener el color del texto en hover */
}

/* ====== SECCIÓN ESPECIALIDADES / NOVEDADES ====== */
.specialties-section {
    padding: 60px 0;
}

.specialties-section h4 {
    color: var(--primary-teal);
    font-size: 1.2rem;
}

.specialties-section h2 {
    color: var(--primary-dark);
    font-weight: 700;
}

.specialties-section .card {
    border: none;
    background: transparent;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.specialties-section .card:hover {
    transform: scale(1.02);
}

.specialties-section .card-body {
    position: relative;
    min-height: 280px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.specialties-section .card-body img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.specialties-section .card-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    z-index: 2;
}

.contenido-card-especialidades {
    position: relative;
    z-index: 3;
    padding: 1.5rem;
    color: white;
    width: 100%;
    margin-top: auto;
    align-self: flex-end;
}

.contenido-card-especialidades p {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.contenido-card-especialidades h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .specialties-section .card-body {
        min-height: 320px;
    }
    .contenido-card-especialidades h3 {
        font-size: 1.5rem;
    }
}

/* ====== FOOTER ====== */
.footer {
    background-color: var(--footer-bg);
    padding: 20px 0;
    color: white;
}

.footer a {
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    color: white;
}

.footer a:hover {
    color: var(--footer-teal) !important;
}

.imgLogoSanatorio {
    width: 15rem;
    height: auto;
    display: block;
}

.logoSanatorio {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
}

.containerLogo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.redesSociales {
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    margin-top: 15px;
}

.redesSociales img {
    width: 3.5em;
    height: auto;
    transition: transform 0.3s ease;
}

.redesSociales img:hover {
    transform: scale(1.1);
}

/* Layout principal del footer */
.row-footer-body {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
}

/* Bloque izquierdo: 40% con contenido centrado */
.footer-brand {
    flex: 0 0 30%;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

/* Bloque derecho: 60% que contiene los tres menús */
.footer-menus {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
    padding: 15px;
    box-sizing: border-box;
}

/* Cada columna del menú */
.footer-menu {
    flex: 1;
    min-width: 150px;
}

/* Clases para anchos específicos de cada menú (opcional) */
.footer-menu-1,
.footer-menu-2,
.footer-menu-3 {
    flex: 0 0 30%; /* Ajusta según prefieras */
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--footer-teal);
}

.footer ul {
    padding-left: 0;
}

.footer li {
    margin-bottom: 8px;
    list-style: none;
    width: fit-content;
    font-size: 0.95rem;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* Ajustes responsivos del footer */
@media (max-width: 767px) {
    .hero-section {
        height: 10em;
        width: 100%;
        background-size: contain;
        background-color: var(--footer-bg); /* Fondo oscuro para bordes */
    }
    .row-footer-body {
        flex-direction: column;
        gap: 0;
    }
    .footer-brand,
    .footer-menus {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .footer-menus {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }
    .footer-menu {
        width: 100%;
        margin-bottom: 5px;
    }
    .footer h4 {
        font-size: 1rem;
    }
    .list-unstyled {
        margin-bottom: 2px;
        
    }
    .footer a {
        font-size: 0.85rem;
    }
    .logoSanatorio {
        max-width: 150px;
    }
    .redesSociales {
        gap: 10px;
    }
    .redesSociales img {
        width: 50px;
        height: 50px;
    }
    .footer li {
        width: 100%;
    }
    .footer li i {
        margin-right: 5px;
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .footer-menus {
        flex-wrap: wrap;
    }
    .footer-menu {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }
    .logoSanatorio {
        max-width: 180px;
    }
}

/* ====== MEDIA QUERIES ADICIONALES ====== */
@media (min-width: 768px) and (max-width: 991px) {
    .patient-header {
        font-size: 1.7rem;
    }
    .hero-section {
        height: 40vh;
    }
}

@media (min-width: 992px) {
    .hero-section {
        height: 60vh;
    }
}

@media (min-width: 1400px) {
    .hero-section {
        height: 70vh;
    }
    .specialties-section .card-body {
        min-height: 380px;
    }
}