* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.no-seleccionable {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* =========================================
   BARRA SUPERIOR (LOGOS INSTITUCIONALES)
   ========================================= */
.barraSuperior {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 10px 5%;
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.brandNavegacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.nav-logo-img:hover {
    transform: scale(1.03);
}

/* =========================================
   BARRA DE NAVEGACIÓN
   ========================================= */
.barraNavegacion {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #0284c7;
    border-image: linear-gradient(to right, #0284c7 70%, #e11d48 100%) 1;
}

.principal-navegacion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.barraNavegacion .logo {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.barraNavegacion .logo span {
    color: #0284c7;
}

.enlaces-navegacion {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.enlaces-navegacion a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.enlaces-navegacion a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #0284c7;
    transition: width 0.3s ease;
}

.enlaces-navegacion a:hover,
.enlaces-navegacion a.active {
    color: #0284c7;
}

.enlaces-navegacion a:hover::after,
.enlaces-navegacion a.active::after {
    width: 100%;
}

/* =========================================
   CONTENEDOR CENTRAL SPA
   ========================================= */
#app {
    flex: 1 0 auto;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 5%;
}

/* =========================================
   GRID Y TARJETA MODELO EXACTO
   ========================================= */
#grid-especialidades {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 32px !important;
    width: 100% !important;
    padding: 10px 0 30px !important;
}

.tarjeta-especialidad {
    width: 275px !important;
    min-width: 275px !important;
    max-width: 275px !important;
    background: #ffffff !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    text-align: center !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    cursor: default;
}

.tarjeta-especialidad:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12) !important;
}

/* Contenedor y foto con curvatura natural superior */
.tarjeta-img-contenedor {
    width: 100% !important;
    height: 205px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #e2e8f0;
}

.tarjeta-img-contenedor img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
}

.tarjeta-img-contenedor.sin-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    background: #f8fafc;
}

/* Tipografía y márgenes */
.tarjeta-cuerpo {
    padding: 24px 18px 12px !important;
    text-align: center !important;
}

.tarjeta-cuerpo h3 {
    color: #0052cc !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    margin: 0 0 10px 0 !important;
    letter-spacing: -0.3px !important;
}

.tarjeta-cuerpo p {
    color: #64748b !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    margin: 0 auto !important;
    max-width: 230px !important;
}

/* Botón inferior */
.tarjeta-pie {
    padding: 12px 18px 28px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.tarjeta-pie button {
    background: #0052cc !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-size: 14.5px !important;
    width: 82% !important;
    box-shadow: 0 6px 16px rgba(0, 82, 204, 0.28) !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.tarjeta-pie button:hover {
    background: #0043a8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 82, 204, 0.38) !important;
}

/* =========================================
   SECCIÓN DE NOTICIAS Y CARTELERA
   ========================================= */
#contenedor-noticias {
    margin-bottom: 45px;
    width: 100%;
}

.grid-noticias-secundarias {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px;
    width: 100%;
}

.grid-noticias-secundarias .tarjeta-secundaria {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-noticias-secundarias .tarjeta-secundaria:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* =========================================
   PIE DE PÁGINA
   ========================================= */
.pieDePagina {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: 50px;
    border-top: 3px solid #0284c7;
    margin-top: auto;
}

.pieDePagina-contenedor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 30px 5%;
}

.pieDePagina-logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.pieDePagina-logo span {
    color: #0284c7;
}

.pieDePagina-descripcion {
    font-size: 14px;
    line-height: 1.6;
}

.pieDePagina-columna h3 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
}

.pieDePagina-columna h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: #0284c7;
    margin-top: 6px;
}

.pieDePagina-informacion {
    list-style: none;
}

.pieDePagina-informacion li {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.pieDePagina a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pieDePagina a:hover {
    color: #0284c7;
}

.pieDePagina-informacion strong {
    color: #e2e8f0;
}

.subpieDePagina {
    border-top: 1px solid #1e293b;
    background-color: #0b1329;
    padding: 16px 0;
}

.subpieDePagina-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column-reverse;
    text-align: center;
    gap: 12px;
}

.subpieDePagina p {
    font-size: 13px;
    color: #64748b;
}

.subpieDePagina-img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* =========================================
   RESPONSIVE MÓVIL Y TABLETS
   ========================================= */
@media (max-width: 992px) {
    .grid-noticias-secundarias {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .grid-noticias-secundarias .tarjeta-secundaria:nth-child(3) {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .brandNavegacion {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .principal-navegacion {
        flex-direction: column;
        gap: 12px;
    }

    .enlaces-navegacion {
        gap: 16px;
    }

    .grid-noticias-secundarias {
        grid-template-columns: 1fr !important;
    }
    
    .grid-noticias-secundarias .tarjeta-secundaria:nth-child(3) {
        display: none !important;
    }

    .tarjeta-especialidad:hover {
        transform: none;
    }
}