/* =========================================================
   Pagina Medicina: variables globales y base visual
   ========================================================= */
.medicina-page {
    --med-blue: #070d87;
    --med-blue-2: #14219a;
    --med-cyan: #00d9ff;
    --med-green: #289447;
    --med-ink: #101649;
    --med-muted: #66708c;
    --med-line: #dfe5f4;
    --med-surface: #ffffff;
    background: #f5f7fb;
    color: var(--med-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.medicina-page a {
    color: var(--med-blue);
}

.med-hidden-gallery {
    display: none !important;
}

/* =========================================================
   Header, navegacion principal y selector de idioma
   ========================================================= */
.med-header {
    background: #fff;
    box-shadow: 0 10px 30px rgba(10, 20, 80, .08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.med-header-inner {
    align-items: center;
    display: flex;
    min-height: 84px;
}

.med-brand {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
}

.med-brand img {
    display: block;
    max-height: 68px;
    width: auto;
}

.med-primary-nav {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 22px;
    justify-content: flex-end;
    text-transform: uppercase;
}

.med-primary-nav a {
    color: var(--med-blue);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.med-primary-nav a:hover {
    color: #0aa3ce;
}

.med-cta-small {
    background: var(--med-green);
    border-radius: 6px;
    color: #fff !important;
    padding: 14px 16px;
    white-space: nowrap;
}

.med-lang {
    align-items: center;
    color: var(--med-blue);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    position: relative;
}

.med-lang-flag {
    border: 1px solid #d7dbe8;
    display: inline-block;
    height: 14px;
    overflow: hidden;
    width: 22px;
}

.med-lang-flag-es {
    background: linear-gradient(to bottom, #d7001f 0 33%, #fff 33% 66%, #0046ad 66% 100%);
}

.med-lang-flag-br {
    background: #009c3b;
    position: relative;
}

.med-lang-flag-br::before {
    background: #ffdf00;
    content: "";
    height: 10px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 10px;
}

.med-lang-flag-br::after {
    background: #002776;
    border-radius: 50%;
    content: "";
    height: 6px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
}

.med-lang-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--med-line);
    border-radius: 6px;
    color: var(--med-blue);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    min-height: 36px;
    padding: 8px 10px;
}

.med-lang-toggle:focus,
.med-lang-toggle:hover {
    border-color: rgba(7, 13, 135, .35);
    box-shadow: 0 8px 18px rgba(7, 13, 135, .08);
    outline: 0;
}

.med-lang-menu {
    background: #fff;
    border: 1px solid var(--med-line);
    border-radius: 6px;
    box-shadow: 0 18px 34px rgba(10, 20, 80, .14);
    display: none;
    min-width: 92px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1100;
}

.med-lang.is-open .med-lang-menu {
    display: block;
}

.med-lang-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: var(--med-blue);
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    padding: 8px;
    text-align: left;
    width: 100%;
}

.med-lang-option:focus,
.med-lang-option:hover,
.med-lang-option.is-active {
    background: #eef3ff;
    outline: 0;
}

.med-menu-toggle {
    background: transparent;
    border: 0;
    display: none;
    margin-left: auto;
    padding: 8px;
}

.med-menu-toggle span {
    background: var(--med-blue);
    display: block;
    height: 2px;
    margin: 5px 0;
    width: 25px;
}

/* =========================================================
   Hero principal de Medicina
   ========================================================= */
.med-hero {
    min-height: 590px;
    overflow: hidden;
    position: relative;
}

.med-hero-bg {
    background-image:
        linear-gradient(90deg, rgba(7, 13, 135, .96) 0%, rgba(7, 13, 135, .92) 34%, rgba(7, 13, 135, .55) 54%, rgba(7, 13, 135, .05) 78%),
        url("../img/infraestructura/jpeg/infra31.jpg");
    background-position: center;
    background-size: cover;
    inset: 0;
    position: absolute;
}

.med-hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(7,13,135,.16) 100%);
    bottom: 0;
    content: "";
    height: 44%;
    left: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.med-hero-content {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 590px;
    position: relative;
    z-index: 1;
}

.med-hero-copy {
    color: #fff;
    max-width: 570px;
    padding: 58px 0;
}

.med-eyebrow {
    color: var(--med-cyan);
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.med-hero h1 {
    color: #fff;
    font-family: Impact, "Arial Narrow", Arial, sans-serif;
    font-size: clamp(72px, 13vw, 158px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: .9;
    margin: 0;
    text-transform: uppercase;
}

.med-title-line {
    background: var(--med-cyan);
    height: 3px;
    margin: 22px 0 24px;
    max-width: 430px;
}

.med-hero-lead,
.med-hero-note {
    color: #fff;
    font-size: 25px;
    line-height: 1.25;
    margin: 0 0 22px;
}

.med-hero-lead strong,
.med-hero-note strong {
    color: var(--med-cyan);
    font-weight: 600;
}

.med-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 30px;
}

.med-btn {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    line-height: 1.1;
    min-height: 52px;
    padding: 15px 28px;
    text-decoration: none;
    text-transform: uppercase;
}

.med-btn:hover {
    text-decoration: none;
}

.med-btn-outline {
    border: 1px solid rgba(255,255,255,.78);
    color: #fff !important;
}

.med-btn-outline:hover {
    background: rgba(255,255,255,.12);
}

.med-btn-primary {
    background: #2637e0;
    border: 1px solid #5d6aff;
    color: #fff !important;
}

.med-btn-primary:hover {
    background: #1726bd;
}

.med-btn-dark {
    background: var(--med-blue);
    color: #fff !important;
}

.med-btn-dark:hover {
    background: #11199f;
}

.med-hero-badges {
    align-items: flex-end;
    align-self: flex-end;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    padding-bottom: 42px;
}

.med-faculty-seal,
.med-accredited-seal {
    
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(2, 7, 47, .22);
    object-fit: contain;
}

.med-faculty-seal {
    height: 176px;
    padding: 9px;
    width: 176px;
}

.med-accredited-seal {
    border-radius: 8px;
    height: 138px;
    padding: 10px;
    width: 184px;
}

.med-stats {
    background: linear-gradient(90deg, #131b94 0%, #1a258f 58%, #1f297e 100%);
    color: #fff;
}

.med-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.med-stat {
    align-items: center;
    display: flex;
    gap: 18px;
    min-height: 150px;
    padding: 28px 20px;
}

.med-stat + .med-stat {
    border-left: 1px solid rgba(255,255,255,.3);
}

.med-stat i {
    color: #fff;
    flex: 0 0 auto;
    font-size: 46px;
    opacity: .92;
}

.med-stat h2 {
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.med-stat p {
    color: rgba(255,255,255,.88);
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.med-section {
    padding: 28px 0;
}

/* =========================================================
   Recorrido virtual 360 e infraestructura
   ========================================================= */
.med-tour-layout {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(17, 25, 81, .1);
    display: grid;
    gap: 28px;
    grid-template-columns: .75fr 1.55fr .95fr;
    padding: 26px;
}

.med-tour-intro h2,
.med-contact h2,
.med-curriculum-panel h2,
.med-tabs-content h2 {
    color: var(--med-blue);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.18;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.med-tour-intro p {
    color: var(--med-blue);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.65;
    margin: 0 0 22px;
}

.med-tour-preview {
    border-radius: 8px;
    display: block;
    min-height: 310px;
    overflow: hidden;
    position: relative;
    transition: box-shadow .22s ease, transform .22s ease;
}

.med-tour-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    width: 100%;
}

.med-tour-preview::after {
    background: rgba(0, 0, 0, .18);
    content: "";
    inset: 0;
    position: absolute;
    transition: background .22s ease;
}

.med-360 {
    color: #fff;
    font-size: 68px;
    font-weight: 700;
    left: 50%;
    line-height: 1;
    position: absolute;
    text-shadow: 0 3px 14px rgba(0,0,0,.55);
    top: 50%;
    transform: translate(-50%, -50%);
    transition: letter-spacing .22s ease, transform .22s ease;
    z-index: 1;
}

.med-tour-preview:hover {
    box-shadow: 0 18px 38px rgba(17, 25, 81, .18);
    transform: translateY(-3px);
}

.med-tour-preview:hover img {
    transform: scale(1.05);
}

.med-tour-preview:hover::after {
    background: rgba(7, 13, 135, .26);
}

.med-tour-preview:hover .med-360 {
    letter-spacing: 2px;
    transform: translate(-50%, -50%) scale(1.04);
}

.med-tour-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.med-tour-list a {
    align-items: center;
    border-bottom: 1px solid var(--med-line);
    border-radius: 8px;
    color: var(--med-blue);
    display: grid;
    gap: 16px;
    grid-template-columns: 82px 1fr 18px;
    min-height: 58px;
    padding: 8px 0;
    position: relative;
    text-decoration: none;
    transition: background .22s ease, box-shadow .22s ease, color .22s ease, padding .22s ease, transform .22s ease;
}

.med-tour-list a::before {
    background: var(--med-cyan);
    border-radius: 999px;
    content: "";
    height: 0;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: height .22s ease;
    width: 3px;
}

.med-tour-list a:last-child {
    border-bottom: 0;
}

.med-tour-list img {
    border-radius: 6px;
    height: 46px;
    object-fit: cover;
    transition: transform .22s ease;
    width: 82px;
}

.med-tour-list span {
    font-size: 14px;
    font-weight: 800;
}

.med-tour-list i {
    font-size: 18px;
    transition: color .22s ease, transform .22s ease;
}

.med-tour-list a:hover {
    background: #f7faff;
    box-shadow: 0 10px 24px rgba(17, 25, 81, .08);
    color: #0aa3ce;
    padding-left: 12px;
    padding-right: 10px;
    transform: translateY(-2px);
}

.med-tour-list a:hover::before {
    height: 70%;
}

.med-tour-list a:hover img {
    transform: scale(1.06);
}

.med-tour-list a:hover i {
    color: #0aa3ce;
    transform: translateX(4px);
}

.med-section-title {
    color: var(--med-blue);
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 22px;
    text-align: center;
    text-transform: uppercase;
}

/* =========================================================
   Motivos para estudiar Medicina
   ========================================================= */
.med-why-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.med-why-grid article {
    background: #fff;
    border: 1px solid #eef2fb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20, 33, 154, .06);
    min-height: 230px;
    padding: 32px 24px;
    position: relative;
    text-align: center;
    transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.med-why-grid article:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border-color: rgba(17, 24, 220, .28);
    box-shadow: 0 16px 34px rgba(20, 33, 154, .12);
    transform: translateY(-3px);
}

.med-why-grid article:hover i {
    transform: scale(1.08);
}

.med-why-grid i {
    color: #1118dc;
    font-size: 58px;
    margin-bottom: 24px;
    transition: color .22s ease, transform .22s ease;
}

.med-why-grid article:hover h3,
.med-why-grid article:hover i {
    color: #0aa3ce;
}

.med-why-grid h3 {
    color: var(--med-blue);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 18px;
    text-transform: uppercase;
    transition: color .22s ease;
}

.med-why-grid p {
    color: var(--med-blue);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    margin: 0;
}

/* =========================================================
   Pestañas superiores y paneles institucionales
   ========================================================= */
.med-info-tabs {
    background: #fff;
    border: 1px solid var(--med-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(17, 25, 81, .08);
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    margin: 0 0 24px;
    overflow: hidden;
}

.med-info-tabs li {
    border-right: 1px solid var(--med-line);
    list-style: none;
    min-width: 0;
}

.med-info-tabs li:last-child {
    border-right: 0;
}

.med-info-tabs a {
    align-items: center;
    color: var(--med-blue);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 900;
    gap: 9px;
    justify-content: center;
    min-height: 116px;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.med-info-tabs a.active,
.med-info-tabs a:hover {
    background: #f1f4ff;
    color: #1118dc;
}

.med-info-tabs i {
    font-size: 28px;
}

.med-info-tabs span {
    overflow-wrap: anywhere;
}

.med-academic-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
}

.med-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(17, 25, 81, .08);
    padding: 28px;
}

.med-curriculum-panel {
    grid-column: auto;
    order: 2;
}

.med-faculty-intro-panel {
    align-self: start;
    order: 3;
}

.med-tabs-content {
    display: none;
    grid-column: 1 / -1;
    order: 1;
}

.med-tabs-content.is-open {
    display: block;
}

.medicina-page .med-tabs-content .tab-content,
.medicina-page .med-tabs-content .tab-pane {
    background: #fff !important;
    background-color: #fff !important;
    color: var(--med-ink);
    margin-top: 0 !important;
}

.med-tab-content {
    border-radius: 8px;
}

.med-faculty-intro-copy h3 {
    color: var(--med-blue);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.med-faculty-intro-copy p {
    color: #34405f;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

.med-faculty-intro-copy strong {
    color: var(--med-blue);
}

.med-faculty-intro-video {
    background: #f5f8ff;
    border: 1px solid #e5ebfb;
    box-shadow: 0 8px 22px rgba(17, 25, 81, .07);
    margin-top: 22px;
}

.med-tab-header {
    align-items: center;
    background: linear-gradient(90deg, #f5f8ff 0%, #ffffff 100%);
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
    padding: 20px 22px;
}

.med-tab-header > i {
    align-items: center;
    background: var(--med-blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 28px;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.med-tab-header span {
    color: var(--med-muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.med-tab-header h2 {
    margin: 0;
}

.med-content-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}

.med-copy-card,
.med-video-card,
.med-objective-card,
.med-image-panel {
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 25, 81, .06);
    padding: 22px;
}

.med-lead-text {
    color: #34405f !important;
    font-size: 18px !important;
    font-weight: 500;
    line-height: 1.75 !important;
    margin: 0;
}

.med-video-card .med-video {
    margin-top: 0;
}

.med-value-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 22px;
}

.med-value-grid article {
    background: #f5f8ff;
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    min-height: 140px;
    padding: 22px 16px;
    text-align: center;
}

.med-value-grid i {
    color: #1118dc;
    font-size: 32px;
    margin-bottom: 14px;
}

.med-value-grid h3 {
    color: var(--med-blue);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    margin: 0;
    text-transform: uppercase;
}

.med-objective-card {
    margin-bottom: 24px;
}

.med-objective-card span {
    color: var(--med-blue);
    display: block;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.med-objective-card p {
    margin: 0;
}

.med-subtitle {
    color: var(--med-blue);
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.med-feature-list,
.med-profile-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.med-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-feature-list li,
.med-profile-list li {
    background: #f7f9ff;
    border: 1px solid #e7edf9;
    border-radius: 8px;
    color: #34405f !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    padding: 14px 16px 14px 42px;
    position: relative;
}

.med-feature-list li::before,
.med-profile-list li::before {
    color: #1118dc;
    content: "\f00c";
    font-family: FontAwesome;
    font-size: 14px;
    left: 16px;
    position: absolute;
    top: 16px;
}

.med-profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.med-image-panel {
    text-align: center;
}

.med-plan-grid,
.med-admission-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.med-plan-card,
.med-admission-grid a {
    background: #fff;
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 25, 81, .07);
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.med-plan-card img,
.med-admission-grid img {
    display: block;
    height: 190px;
    object-fit: cover;
    width: 100%;
}

.med-plan-card span,
.med-admission-grid span {
    align-items: center;
    color: var(--med-blue);
    display: flex;
    font-size: 15px;
    font-weight: 900;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    text-transform: uppercase;
}

.med-doc-grid-spaced {
    margin-top: 18px;
}

.med-admission-banner {
    align-items: center;
    background: #f5f8ff;
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 18px 20px;
}

.med-admission-banner strong {
    color: var(--med-blue);
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.med-admission-banner a {
    align-items: center;
    background: #20a24a;
    border-radius: 6px;
    color: #fff !important;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    text-transform: uppercase;
}

/* =========================================================
   Acordeon de malla curricular y bloques de documentos
   ========================================================= */
.med-accordion-item {
    margin-bottom: 10px;
}

.med-accordion-btn,
.med-accordion-link {
    align-items: center;
    background: #eef2fb;
    border: 0;
    border-radius: 6px;
    color: var(--med-blue);
    display: flex;
    font-size: 15px;
    font-weight: 900;
    gap: 14px;
    min-height: 46px;
    padding: 12px 16px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.med-accordion-btn:hover,
.med-accordion-link:hover {
    background: #e3e8f8;
    color: var(--med-blue);
    text-decoration: none;
}

.med-accordion-content {
    border: 1px solid #eef2fb;
    border-radius: 0 0 6px 6px;
    border-top: 0;
    display: grid;
    gap: 8px;
    padding: 14px 16px;
}

.med-accordion-content a {
    color: var(--med-blue);
    font-size: 14px;
    font-weight: 700;
}

.med-accordion-content p {
    color: var(--med-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.med-tabs-content p,
.med-tabs-content li {
    color: #3e4664;
    font-size: 17px;
    line-height: 1.65;
}

.med-video {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    margin-top: 18px;
    overflow: hidden;
}

.med-video iframe,
.med-map iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.med-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.med-pill-list span {
    background: #eef2fb;
    border-radius: 6px;
    color: var(--med-blue);
    font-size: 15px;
    font-weight: 800;
    padding: 12px 15px;
}

.med-check-list {
    margin: 18px 0 0;
    padding-left: 22px;
}

.med-tab-image {
    border-radius: 8px;
    max-width: 100%;
}

.med-doc-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-doc-grid a {
    align-items: center;
    background: #f1f4ff;
    border-radius: 6px;
    color: var(--med-blue);
    display: flex;
    font-size: 15px;
    font-weight: 800;
    gap: 10px;
    min-height: 54px;
    padding: 14px 16px;
    text-decoration: none;
}

.med-doc-grid a:hover {
    background: #e3e9ff;
}

.med-malla-image,
.med-side-banner {
    border-radius: 8px;
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.med-side-banner {
    margin-top: 22px;
}

.med-doc-button,
.med-subsection-link {
    align-items: center;
    background: #f1f4ff;
    border: 1px solid #e5ebfb;
    border-radius: 6px;
    color: var(--med-blue) !important;
    display: inline-flex;
    font-size: 15px;
    font-weight: 900;
    gap: 10px;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    text-decoration: none;
    width: fit-content;
}

.med-doc-button:hover,
.med-subsection-link:hover {
    background: #e3e9ff;
    color: var(--med-blue) !important;
    text-decoration: none;
}

.med-accordion-btn > span,
.med-accordion-link > span {
    color: inherit;
    font-size: 18px;
    line-height: 1;
}

.med-subsection {
    border: 1px solid #e8eefb;
    border-radius: 8px;
    overflow: hidden;
}

.med-subsection-toggle {
    align-items: center;
    background: #f6f8ff;
    border: 0;
    color: var(--med-blue);
    display: flex;
    font-size: 15px;
    min-height: 48px;
    padding: 13px 16px;
    text-align: left;
    width: 100%;
}

.med-subsection-toggle:hover {
    background: #eef3ff;
}

.med-text-card {
    background: #fff;
    padding: 18px;
}

.med-text-card p,
.med-text-card li {
    color: #3e4664;
    font-size: 15px;
    line-height: 1.65;
}

.med-text-card h5,
.med-alert-box h4 {
    color: var(--med-blue);
    font-size: 17px;
    font-weight: 900;
    margin: 0 0 12px;
}

.med-text-card ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

/* =========================================================
   Tablas y bloques compactos dentro de Extension/Bienestar
   ========================================================= */
.med-table-wrap {
    overflow-x: auto;
}

.med-table-wrap table {
    border-collapse: collapse;
    color: #3e4664;
    min-width: 620px;
    width: 100%;
}

.med-table-wrap th,
.med-table-wrap td {
    border: 1px solid #dfe6f6;
    font-size: 14px;
    line-height: 1.55;
    padding: 12px;
    vertical-align: top;
}

.med-table-wrap th {
    background: var(--med-blue);
    color: #fff;
    text-align: center;
}

.med-extension-tab-content .med-table-wrap,
.med-welfare-tab-content .med-table-wrap {
    overflow: visible;
}

.med-extension-tab-content .med-table-wrap table,
.med-extension-tab-content .med-table-wrap tbody,
.med-extension-tab-content .med-table-wrap tr,
.med-extension-tab-content .med-table-wrap td,
.med-welfare-tab-content .med-table-wrap table,
.med-welfare-tab-content .med-table-wrap tbody,
.med-welfare-tab-content .med-table-wrap tr,
.med-welfare-tab-content .med-table-wrap th,
.med-welfare-tab-content .med-table-wrap td {
    display: block;
    min-width: 0;
    width: 100%;
}

.med-extension-tab-content .med-table-wrap table,
.med-welfare-tab-content .med-table-wrap table {
    border-collapse: separate;
    border-spacing: 0;
}

.med-extension-tab-content .med-table-wrap tr,
.med-welfare-tab-content .med-table-wrap tr {
    background: #fff;
    border: 1px solid #e3eaf8;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(17, 25, 81, .05);
    margin-bottom: 12px;
    overflow: hidden;
}

.med-extension-tab-content .med-table-wrap tr:last-child,
.med-welfare-tab-content .med-table-wrap tr:last-child {
    margin-bottom: 0;
}

.med-extension-tab-content .med-table-wrap td,
.med-welfare-tab-content .med-table-wrap th,
.med-welfare-tab-content .med-table-wrap td {
    border: 0;
    overflow-wrap: anywhere;
}

.med-extension-tab-content .med-table-wrap td:first-child {
    background: #eef3ff;
    color: var(--med-blue);
    font-weight: 900;
    text-transform: uppercase;
}

.med-extension-tab-content .med-table-wrap td + td {
    border-top: 1px solid #e3eaf8;
}

.med-extension-tab-content .med-table-wrap p {
    color: #4f5b78;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.med-welfare-tab-content .med-table-wrap th {
    border-radius: 0;
}

.med-welfare-tab-content .med-table-wrap td {
    border-top: 1px solid #e3eaf8;
    text-align: center;
}

.med-welfare-tab-content .med-table-wrap td strong {
    color: var(--med-blue);
}

.med-welfare-schedule {
    background: #fff;
    border: 1px solid #e3eaf8;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(17, 25, 81, .05);
    margin-bottom: 18px;
    overflow: hidden;
}

.med-welfare-schedule-head {
    align-items: center;
    background: linear-gradient(90deg, var(--med-blue) 0%, #1728c5 100%);
    color: #fff;
    display: flex;
    gap: 10px;
    padding: 14px 16px;
}

.med-welfare-schedule-head i {
    align-items: center;
    background: rgba(255,255,255,.16);
    border-radius: 50%;
    display: flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.med-welfare-schedule-head strong {
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.med-welfare-schedule-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
}

.med-welfare-schedule-grid article {
    background: #f7faff;
    border: 1px solid #e3eaf8;
    border-radius: 8px;
    padding: 13px;
    text-align: center;
}

.med-welfare-schedule-grid h6 {
    color: var(--med-blue);
    font-size: 13px;
    font-weight: 900;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.med-welfare-schedule-grid p {
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 6px;
    color: #34405f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 7px;
    padding: 8px 6px;
}

.med-welfare-schedule-grid p:last-child {
    margin-bottom: 0;
}

.med-alert-box {
    background: #f5f8ff;
    border: 1px solid #dfe8ff;
    border-radius: 8px;
    margin-top: 18px;
    padding: 16px;
}

.med-alert-box p {
    margin: 0 0 10px;
}

.med-alert-box p:last-child {
    margin-bottom: 0;
}

.med-welfare-tab-content .med-alert-box {
    overflow: hidden;
}

.med-welfare-tab-content .med-alert-box a {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.med-welfare-tab-content .med-alert-box i {
    flex: 0 0 auto;
    margin-top: 2px;
}

.med-resource-grid,
.med-logo-grid,
.med-photo-grid {
    display: grid;
    gap: 14px;
}

.med-resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}

.med-resource-grid a,
.med-logo-grid img {
    align-items: center;
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(17, 25, 81, .06);
    display: flex;
    justify-content: center;
    min-height: 96px;
    padding: 12px;
}

.med-resource-grid img {
    display: block;
    max-height: 72px;
    max-width: 100%;
    object-fit: contain;
}

.med-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-photo-grid figure {
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
}

.med-photo-grid img {
    display: block;
    height: 190px;
    object-fit: cover;
    width: 100%;
}

.med-photo-grid figcaption {
    color: var(--med-blue);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    padding: 14px;
}

.med-logo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.med-logo-grid img {
    height: 110px;
    object-fit: contain;
    width: 100%;
}

.med-facebook-link {
    background: var(--med-blue);
    color: #fff !important;
}

.med-facebook-link:hover {
    background: #1118dc;
    color: #fff !important;
}

.med-tour-embed {
    background: #f5f8ff;
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    min-height: 320px;
    overflow: hidden;
}

.med-research-content {
    background: #f8faff;
    gap: 22px;
    padding: 18px;
}

.med-research-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #14219a 0%, #1118dc 62%, #00c8ef 100%);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(17, 25, 81, .18);
    color: #fff;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 26px;
}

.med-research-hero span,
.med-research-block-header span {
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.med-research-hero h3,
.med-research-block-header h3 {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.med-research-hero p {
    color: rgba(255, 255, 255, .92);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    margin: 16px 0 0;
}

.med-research-hero a {
    align-items: center;
    align-self: center;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    color: #fff !important;
    display: inline-flex;
    font-size: 15px;
    font-weight: 900;
    gap: 10px;
    min-height: 54px;
    padding: 14px 16px;
    text-decoration: none;
    white-space: nowrap;
}

.med-research-actions {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.med-research-actions a {
    align-items: center;
    background: #fff;
    border: 1px solid #e4ebfb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 25, 81, .07);
    color: var(--med-blue) !important;
    display: flex;
    gap: 14px;
    min-height: 74px;
    padding: 16px;
    text-decoration: none;
}

.med-research-actions i {
    align-items: center;
    background: #eef3ff;
    border-radius: 8px;
    color: #1118dc;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 22px;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.med-research-actions strong {
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
}

.med-research-block {
    background: #fff;
    border: 1px solid #e4ebfb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 25, 81, .06);
    padding: 22px;
}

.med-research-block-header {
    border-bottom: 1px solid #edf1fb;
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.med-research-block-header span {
    color: var(--med-muted);
}

.med-research-block-header h3 {
    color: var(--med-blue);
}

.med-research-note {
    background: #f5f8ff;
    border-left: 4px solid #00c8ef;
    border-radius: 6px;
    color: #3e4664;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 18px;
    padding: 16px;
}

.med-research-lines {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-research-lines article {
    background: #fbfcff;
    border: 1px solid #edf1fb;
    border-radius: 8px;
    padding: 18px;
}

.med-research-lines h4 {
    color: var(--med-blue);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 10px;
}

.med-research-lines p {
    color: #3e4664;
    font-size: 14px;
    line-height: 1.65;
    margin: 0;
}

.med-research-boletines {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.med-research-boletines a {
    align-items: center;
    background: #f1f4ff;
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    color: var(--med-blue) !important;
    display: flex;
    font-size: 15px;
    font-weight: 900;
    gap: 10px;
    min-height: 60px;
    padding: 14px;
    text-decoration: none;
}

.med-research-boletines a:hover,
.med-research-actions a:hover,
.med-research-hero a:hover {
    transform: translateY(-1px);
}

.med-resource-grid-polished {
    margin-top: 18px;
}

.med-research-collapsed-layout {
    background: #f8faff;
    gap: 12px;
    padding: 18px;
}

.med-research-row-link,
.med-research-subsection .med-subsection-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #e4ebfb;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(17, 25, 81, .06);
    color: var(--med-blue) !important;
    display: flex;
    font-size: 15px;
    font-weight: 900;
    gap: 14px;
    min-height: 58px;
    padding: 14px 16px;
    text-decoration: none;
    width: 100%;
}

.med-research-row-link:hover,
.med-research-subsection .med-subsection-toggle:hover {
    background: #f1f4ff;
    color: var(--med-blue) !important;
    text-decoration: none;
}

.med-research-row-link > i,
.med-research-subsection .med-subsection-toggle > i {
    align-items: center;
    background: #eef3ff;
    border-radius: 8px;
    color: #1118dc;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 20px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.med-research-subsection {
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    overflow: visible;
}

.med-research-subsection .med-text-card,
.med-research-subsection .med-research-doc-grid {
    border: 1px solid #e8eefb;
    border-top: 0;
    border-radius: 0 0 8px 8px;
}

.med-research-doc-grid {
    background: #fff;
    padding: 16px;
}

/* =========================================================
   Sub-tabs internos: investigacion, extension, bienestar y egresados
   ========================================================= */
.med-research-tab-layout {
    background: #f8faff;
    gap: 16px;
    padding: 18px;
}

.med-research-tabs {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
}

.med-research-tabs li {
    list-style: none;
}

.med-research-tabs a {
    align-items: center;
    background: #fff;
    border: 1px solid #e4ebfb;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(17, 25, 81, .06);
    color: var(--med-blue) !important;
    display: flex;
    gap: 12px;
    min-height: 68px;
    padding: 14px;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.med-research-tabs a:hover,
.med-research-tabs a:focus {
    background: #f1f4ff;
    border-color: #cfdbfb;
    color: var(--med-blue) !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.med-research-tabs a.active {
    background: var(--med-blue);
    border-color: var(--med-blue);
    box-shadow: 0 12px 28px rgba(17, 25, 81, .16);
    color: #fff !important;
}

.med-research-tabs i {
    align-items: center;
    background: #eef3ff;
    border-radius: 8px;
    color: #1118dc;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 20px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.med-research-tabs a.active i {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.med-research-tabs span {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.med-extension-tabs,
.med-welfare-tabs,
.med-graduate-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.med-curriculum-panel .med-research-tab-layout {
    gap: 14px;
    padding: 14px;
}

.med-curriculum-panel .med-research-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-curriculum-panel .med-research-tabs a {
    min-height: 60px;
    padding: 12px;
}

.med-curriculum-panel .med-research-tabs i {
    font-size: 18px;
    height: 38px;
    width: 38px;
}

.med-curriculum-panel .med-research-tabs span {
    font-size: 13px;
}

.med-curriculum-panel .med-research-tab-content {
    padding: 16px;
}

.med-curriculum-panel .med-resource-grid,
.med-curriculum-panel .med-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-research-tab-content {
    background: #fff !important;
    border: 1px solid #e4ebfb;
    border-radius: 8px;
    display: none;
    padding: 18px;
}

.med-research-tab-content.is-open {
    display: block;
}

.med-research-tab-content .tab-pane {
    background: #fff !important;
}

.med-research-tab-content .med-text-card,
.med-research-tab-content .med-research-doc-grid {
    border: 0;
    box-shadow: none;
    padding: 0;
}

.med-programs-content {
    gap: 22px;
}

/* =========================================================
   Convenios institucionales
   ========================================================= */
.med-agreements-content {
    background: #f8faff;
    gap: 18px;
}

.med-agreements-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #07108f 0%, #1728c5 58%, #0aa3ce 100%);
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr auto;
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.med-agreements-hero span {
    color: rgba(255,255,255,.82);
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.med-agreements-hero h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.med-agreements-hero p {
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
    max-width: 720px;
}

.med-agreements-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.med-agreements-stats div {
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    min-width: 120px;
    padding: 14px;
    text-align: center;
}

.med-agreements-stats strong {
    color: #fff;
    display: block;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 7px;
}

.med-agreements-stats span {
    color: rgba(255,255,255,.86);
    font-size: 11px;
    letter-spacing: 0;
    margin: 0;
}

.med-agreements-block {
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(17, 25, 81, .06);
    padding: 18px;
}

.med-agreements-block h4 {
    color: var(--med-blue);
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.med-agreement-doc-grid {
    gap: 10px;
    grid-template-columns: 1fr;
}

.med-doc-grid a.med-agreement-doc {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8eefb;
    box-shadow: 0 6px 18px rgba(17, 25, 81, .04);
    display: grid;
    gap: 12px;
    grid-template-columns: 42px 1fr auto;
    min-height: auto;
    padding: 12px;
}

.med-doc-grid a.med-agreement-doc:hover {
    background: #f7faff;
    border-color: rgba(7, 13, 135, .22);
    box-shadow: 0 12px 28px rgba(17, 25, 81, .08);
    transform: translateY(-1px);
}

.med-agreement-doc-icon {
    align-items: center;
    background: #eef3ff;
    border-radius: 8px;
    color: var(--med-blue);
    display: flex;
    font-size: 19px;
    justify-content: center;
}

.med-agreement-doc-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.med-agreement-doc-copy strong {
    color: var(--med-blue);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.med-agreement-doc-copy small {
    color: #4f5b78;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.med-agreement-doc-action {
    align-self: center;
    background: #eef3ff;
    border-radius: 999px;
    color: var(--med-blue);
    font-size: 11px;
    font-weight: 900;
    padding: 7px 10px;
    text-transform: uppercase;
}

.med-agreements-photo-grid {
    gap: 12px;
}

.med-agreements-photo-grid figure {
    box-shadow: 0 10px 24px rgba(17, 25, 81, .08);
    position: relative;
}

.med-agreements-photo-grid img {
    height: 168px;
}

.med-agreements-photo-grid figcaption {
    background: linear-gradient(180deg, rgba(7,13,135,0) 0%, rgba(7,13,135,.88) 100%);
    bottom: 0;
    color: #fff;
    font-size: 14px;
    left: 0;
    padding: 34px 14px 14px;
    position: absolute;
    right: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,.28);
}

.med-study-program-layout {
    background: #f8faff;
}

.med-study-program-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.med-study-program-tabs a {
    min-height: 68px;
}

.med-study-program-heading {
    background: linear-gradient(90deg, #f5f8ff 0%, #ffffff 100%);
    border: 1px solid #e5ebfb;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.med-study-program-heading h3 {
    color: var(--med-blue);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.med-study-program-card {
    background: transparent;
    border: 0;
    padding: 0;
}

.med-programs-group {
    background: #fff;
    border: 1px solid #e8eefb;
    border-radius: 8px;
    padding: 18px;
}

.med-programs-group h3 {
    color: var(--med-blue);
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.med-program-course {
    border: 1px solid #e8eefb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.med-program-course:last-child {
    margin-bottom: 0;
}

.med-program-course-btn {
    align-items: center;
    background: #f6f8ff;
    border: 0;
    color: var(--med-blue);
    display: flex;
    font-size: 15px;
    font-weight: 900;
    justify-content: space-between;
    min-height: 48px;
    padding: 13px 16px;
    text-align: left;
    text-transform: uppercase;
    width: 100%;
}

.med-program-course-btn:hover {
    background: #eef3ff;
}

.med-program-course-btn i {
    transition: transform .2s ease;
}

.med-program-course-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.med-program-links {
    background: #fff;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
}

.med-program-links a {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #edf1fb;
    border-radius: 6px;
    color: #34405f !important;
    display: flex;
    font-size: 14px !important;
    font-weight: 700 !important;
    gap: 9px;
    line-height: 1.35;
    padding: 12px;
    text-decoration: none;
}

.med-program-links a:hover {
    background: #f5f8ff;
    color: var(--med-blue) !important;
}

.med-curriculum-panel .med-program-course {
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 25, 81, .05);
}

.med-curriculum-panel .med-program-course-btn {
    background: #fff;
}

.med-curriculum-panel .med-program-course-btn:hover {
    background: #f1f4ff;
}

.med-curriculum-panel .med-program-links {
    background: #fbfcff;
    grid-template-columns: 1fr;
}

/* =========================================================
   Pie propio de Medicina: contacto, mapa y redes
   ========================================================= */
.med-contact {
    padding-bottom: 48px;
}

.med-contact-grid {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(17, 25, 81, .08);
    display: grid;
    gap: 24px;
    grid-template-columns: .85fr 1.55fr .85fr;
    min-height: 218px;
    padding: 28px;
}

.med-contact-info p {
    color: var(--med-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 16px;
    padding-left: 31px;
    position: relative;
}

.med-contact-info i {
    color: var(--med-blue);
    font-size: 22px;
    left: 0;
    position: absolute;
    top: 1px;
}

.med-map {
    background:
        linear-gradient(135deg, rgba(0,217,255,.08), rgba(20,33,154,.1)),
        #eef2fb;
    border-radius: 8px;
    min-height: 210px;
    overflow: hidden;
}

.med-social {
    align-self: center;
    text-align: center;
}

.med-social-links {
    display: flex;
    gap: 18px;
    justify-content: center;
}

.med-social-links a {
    align-items: center;
    border-radius: 50%;
    color: var(--med-blue);
    display: inline-flex;
    font-size: 28px;
    height: 44px;
    justify-content: center;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
    width: 44px;
}

.med-social-links a:hover {
    background: #edf2ff;
    transform: translateY(-2px);
}

.med-social-links a:nth-child(2) {
    color: #e52668;
}

.med-social-links a:nth-child(3) {
    color: #e02020;
}

.med-social-links a:nth-child(4) {
    color: #000;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 992px) {
    .med-primary-nav.collapse {
        display: flex !important;
    }
}

@media (max-width: 1199.98px) {
    .med-primary-nav {
        gap: 14px;
    }

    .med-stats-grid,
    .med-why-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .med-info-tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .med-tour-layout {
        grid-template-columns: 1fr;
    }

    .med-tour-preview {
        min-height: 360px;
    }

    .med-why-grid article {
        min-height: 215px;
    }

    .med-agreements-hero {
        grid-template-columns: 1fr;
    }

    .med-value-grid,
    .med-plan-grid,
    .med-admission-grid,
    .med-resource-grid,
    .med-logo-grid,
    .med-research-boletines,
    .med-research-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .med-header-inner {
        min-height: 76px;
    }

    .med-brand img {
        max-height: 58px;
    }

    .med-menu-toggle {
        display: block;
    }

    .med-primary-nav {
        background: #fff;
        border-top: 1px solid var(--med-line);
        flex-basis: 100%;
        flex-direction: column;
        gap: 0;
        padding: 10px 0 18px;
    }

    .med-primary-nav a,
    .med-lang {
        justify-content: center;
        padding: 12px;
        width: 100%;
    }

    .med-lang-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .med-header-inner {
        flex-wrap: wrap;
    }

    .med-hero,
    .med-hero-content {
        min-height: auto;
    }

    .med-hero-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .med-hero-copy {
        max-width: 100%;
        padding: 54px 0 28px;
    }

    .med-hero-badges {
        align-self: flex-start;
        padding-bottom: 34px;
    }

    .med-academic-grid,
    .med-contact-grid {
        grid-template-columns: 1fr;
    }

    .med-info-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .med-content-grid,
    .med-feature-list,
    .med-profile-list {
        grid-template-columns: 1fr;
    }

    .med-value-grid,
    .med-plan-grid,
    .med-admission-grid,
    .med-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .med-resource-grid,
    .med-logo-grid,
    .med-research-actions,
    .med-research-lines,
    .med-research-boletines,
    .med-research-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .med-research-hero {
        grid-template-columns: 1fr;
    }

    .med-research-hero a {
        justify-self: flex-start;
    }

    .med-research-lines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .med-eyebrow {
        font-size: 18px;
    }

    .med-hero-lead,
    .med-hero-note {
        font-size: 20px;
    }

    .med-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .med-btn {
        width: 100%;
    }

    .med-faculty-seal {
        height: 124px;
        width: 124px;
    }

    .med-accredited-seal {
        height: 104px;
        width: 142px;
    }

    .med-stats-grid,
    .med-why-grid,
    .med-info-tabs,
    .med-doc-grid,
    .med-value-grid,
    .med-plan-grid,
    .med-admission-grid,
    .med-program-links,
    .med-resource-grid,
    .med-logo-grid,
    .med-photo-grid,
    .med-research-actions,
    .med-research-lines,
    .med-research-boletines,
    .med-research-tabs {
        grid-template-columns: 1fr;
    }

    .med-agreements-stats,
    .med-doc-grid a.med-agreement-doc {
        grid-template-columns: 1fr;
    }

    .med-welfare-schedule-grid {
        grid-template-columns: 1fr;
    }

    .med-agreement-doc-icon {
        height: 42px;
        width: 42px;
    }

    .med-agreement-doc-action {
        justify-self: flex-start;
    }

    .med-why-grid article {
        min-height: auto;
        padding: 26px 22px;
    }

    .med-research-content,
    .med-research-block {
        padding: 16px;
    }

    .med-research-hero {
        padding: 20px;
    }

    .med-research-hero a {
        white-space: normal;
        width: 100%;
    }

    .med-stat + .med-stat,
    .med-info-tabs li {
        border-left: 0;
        border-right: 0;
        border-top: 1px solid rgba(255,255,255,.22);
    }

    .med-info-tabs li {
        border-top-color: var(--med-line);
    }

    .med-info-tabs a {
        flex-direction: row;
        justify-content: flex-start;
        min-height: 62px;
        text-align: left;
    }

    .med-curriculum-panel .med-research-tabs,
    .med-curriculum-panel .med-resource-grid,
    .med-curriculum-panel .med-logo-grid {
        grid-template-columns: 1fr;
    }

    .med-tour-layout,
    .med-panel,
    .med-contact-grid {
        padding: 20px;
    }

    .med-tour-preview {
        min-height: 240px;
    }

    .med-tab-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .med-copy-card,
    .med-video-card,
    .med-objective-card,
    .med-image-panel,
    .med-programs-group {
        padding: 18px;
    }

    .med-admission-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .med-plan-card img,
    .med-admission-grid img {
        height: 170px;
    }
}
