@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap");
:root {
    --deep: #0a327a;
    --blue: #0167b7;
    --tint: #f0f6ff;
    --ink: #162b48;
    --muted: #53657a;
    --line: #d5e5fa;
    --gold: #c3a463;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    color: var(--ink);
    font:
        16px/1.65 "DM Sans",
        Arial,
        sans-serif;
    background: #fff;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1,
h2 {
    line-height: 1.2;
    letter-spacing: -0.025em;
}
h1 {
    font-size: clamp(2rem, 4vw, 3.7rem);
}
h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    font-family: "Libre Baskerville", Georgia, serif;
}
h3 {
    line-height: 1.35;
    font-size: 1.3rem;
}
a {
    color: var(--deep);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    object-fit: cover;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}
:focus-visible {
    outline: 3px solid #e4ae28;
    outline-offset: 4px;
}
.topbar {
    padding: 8px max(5vw, 20px);
    background: var(--deep);
    color: white;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.topbar a {
    color: white;
}
header {
    padding: 22px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 260px;
    font:
        bold 2rem Georgia,
        serif;
    line-height: 1;
}
.brand img {
    width: 54px;
    height: 65px;
    object-fit: contain;
}
.brand small {
    display: block;
    font:
        0.8rem/1.5 "DM Sans",
        Arial,
        sans-serif;
    margin-top: 7px;
}
nav {
    display: flex;
    gap: 22px;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}
.menu-toggle {
    display: none;
}
.hero {
    height: 560px;
    position: relative;
    background: var(--deep);
    color: white;
    overflow: hidden;
}
.slide {
    height: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}
.slide:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 24, 60, 0.85), rgba(3, 24, 60, 0.4) 55%, rgba(3, 24, 60, 0.1));
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 85px 7vw 65px;
}
.hero-content h1 {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(2.1rem, 4.2vw, 3.8rem);
}
.hero-content p {
    max-width: 550px;
}
.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 18px;
}
.hero .eyebrow {
    color: #eee1c1;
}
.button {
    display: inline-block;
    border: 1px solid var(--deep);
    background: var(--deep);
    color: white;
    padding: 12px 22px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.button:hover {
    background: var(--blue);
    text-decoration: none;
}
.button.light {
    background: white;
    color: var(--deep);
    border-color: white;
}

.quicklinks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 7vw;
    border-bottom: 1px solid var(--line);
    background: var(--tint);
}
.quicklinks a {
    padding: 24px 22px;
    border-right: 1px solid var(--line);
    font-weight: 700;
    font-size: 1.1rem;
}
.quicklinks a:first-child {
    border-left: 1px solid var(--line);
}
.quicklinks small {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 500;
    color: var(--muted);
}
.section {
    padding: 75px 7vw;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}
.section-heading h2,
.section-heading h1 {
    margin-bottom: 0;
}
.text-link {
    color: var(--blue);
    font-weight: 700;
    white-space: normal;
}
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.card {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: white;
}
.card img {
    width: 100%;
    height: 220px;
    display: block;
}
.card > div {
    padding: 25px;
}
.card time {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}
.card p {
    color: var(--muted);
}
.card h2 {
    font:
        700 1.3rem/1.4 "DM Sans",
        sans-serif;
}
.about {
    background: var(--tint);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}
.about img {
    width: 100%;
    height: 380px;
    border-radius: 6px;
}
.about p:not(.eyebrow) {
    color: var(--muted);
}
.pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    margin: 40px 0 0;
    max-width: none;
}

.pillars article {
    min-width: 0;
    padding: 20px 0 0;
    border: 0;
    border-top: 2px solid var(--deep);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.pillars img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 0;
    border-radius: 0;
}

.pillars h3 {
    margin: 20px 0 16px;
    color: var(--ink);
    font-size: 1.3rem;
}

.pillars p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 760px) {
    .pillars {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pillars img {
        height: 210px;
    }
}
.facilities {
    background: #f7f9fc;
}
.mission {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    background: var(--deep);
    color: white;
}
.mission .eyebrow {
    color: #e7d9b8;
}
.mission a {
    color: white;
    text-decoration: underline;
}
.mission h2 {
    font-size: 2rem;
}
footer {
    background: #071f48;
    color: #dce7fa;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 45px;
    padding: 55px 7vw 20px;
    font-size: 0.9rem;
}
footer h2 {
    color: white;
    font-size: 1.6rem;
}
footer h3 {
    font-size: 1rem;
}
footer a {
    display: block;
    color: #dce7fa;
    margin-bottom: 8px;
}
.copyright {
    grid-column: 1/-1;
    border-top: 1px solid #ffffff25;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
}
.article {
    max-width: 1050px;
    margin: auto;
}
.article > img {
    width: 100%;
    max-height: 550px;
    margin: 20px 0 35px;
}
.prose {
    white-space: normal;
    overflow-wrap: anywhere;
}
.lead {
    font-size: 1.2rem;
    color: var(--muted);
}
.pagination {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}
.pagination [aria-current] {
    background: var(--blue);
}
.institution {
    max-width: 1200px;
    margin: auto;
}
.institution section {
    padding: 30px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 20px;
}
.link-list a {
    display: block;
    margin: 12px 0;
}
.login {
    background: var(--tint);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}
.login form {
    width: min(460px, 100%);
}
.login h1 {
    font-size: 1.9rem;
}
.login-logo {
    height: 95px;
    object-fit: contain;
    margin: 0 auto 25px;
    display: block;
}
.login .button {
    width: 100%;
    margin-bottom: 20px;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
}
label {
    display: block;
    font-weight: 600;
    margin: 0 0 22px;
}
input:not([type="checkbox"]),
select,
textarea {
    display: block;
    width: 100%;
    border: 1px solid #b8c9df;
    border-radius: 4px;
    padding: 11px 12px;
    margin-top: 6px;
    color: var(--ink);
    background: white;
}
textarea {
    resize: vertical;
}
.check {
    display: flex;
    gap: 10px;
    align-items: center;
}
.alert {
    background: #e5f4e9;
    padding: 15px 20px;
    border-left: 4px solid #328648;
    border-radius: 4px;
}
.alert.error {
    background: #ffefef;
    border-color: #ba3131;
}
.admin-shell {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    min-height: 100vh;
    background: #f4f7fb;
}
.admin-shell aside {
    background: var(--deep);
    color: white;
    padding: 35px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.admin-shell aside a {
    color: white;
}
.admin-brand {
    font:
        700 2rem Georgia,
        serif;
}
.admin-brand small {
    font:
        0.9rem "DM Sans",
        Arial;
    display: block;
    margin-top: 8px;
}
.admin-shell aside nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.admin-shell aside nav a {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 1rem;
}
.admin-shell .selected {
    background: #ffffff20;
}
.aside-user {
    margin-top: auto;
}
.aside-user small {
    display: block;
}
.aside-user button {
    background: transparent;
    color: white;
    border: 1px solid #ffffff50;
    padding: 7px 10px;
    margin-top: 15px;
    cursor: pointer;
}
.admin-main {
    padding: 50px;
    min-width: 0;
}
.admin-main h1 {
    font-size: 2.2rem;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.metrics strong {
    display: block;
    font-size: 2.5rem;
    color: var(--deep);
}
.metrics span {
    color: var(--muted);
}
.table-wrap {
    overflow-x: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
}
th {
    color: var(--muted);
    font-size: 0.875rem;
    background: var(--tint);
}
td,
th {
    padding: 15px;
    border-bottom: 1px solid var(--line);
}
td small {
    display: block;
    color: var(--muted);
}
.thumb {
    width: 90px;
    height: 55px;
    border-radius: 4px;
}
.actions {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}
.actions form {
    margin: 0;
}
.danger {
    background: none;
    border: none;
    color: #a52828;
    cursor: pointer;
}
.badge {
    display: inline-block;
    background: var(--tint);
    color: var(--deep);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.875rem;
}
.editor {
    max-width: 900px;
}
.image-preview {
    max-height: 220px;
    display: block;
    margin-bottom: 25px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
[hidden] {
    display: none !important;
}
@media (max-width: 1150px) {
    header {
        flex-wrap: wrap;
    }
    header nav {
        width: 100%;
        justify-content: space-between;
    }
    .hero-content {
        max-width: 800px;
    }
    .admin-main {
        padding: 30px;
    }
}
@media (max-width: 760px) {
    .topbar {
        font-size: 0.75rem;
    }
    .topbar span {
        max-width: 210px;
    }
    header {
        padding: 18px 20px;
    }
    .brand {
        min-width: 0;
        font-size: 1.7rem;
    }
    .brand small {
        font-size: 0.7rem;
    }
    .menu-toggle {
        display: block;
        background: white;
        border: 1px solid var(--line);
        padding: 8px 10px;
    }
    header nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
    }
    header nav.open {
        display: flex;
    }
    .hero {
        height: 540px;
    }
    .hero-content {
        padding: 60px 25px 90px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .quicklinks {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }
    .quicklinks a {
        font-size: 0.95rem;
        padding: 20px;
        border-bottom: 1px solid var(--line);
    }
    .section {
        padding: 50px 24px;
    }
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .cards,
    .about,
    .pillars,
    .mission {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .about img {
        height: 280px;
    }
    .card img {
        height: 240px;
    }
    footer {
        grid-template-columns: 1fr;
        padding: 45px 24px 20px;
        gap: 20px;
    }
    .copyright {
        flex-direction: column;
    }
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-shell aside {
        padding: 22px;
        gap: 18px;
    }
    .admin-shell aside nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .aside-user {
        margin-top: 0;
    }
    .admin-main {
        padding: 25px 18px;
    }
    .metrics {
        grid-template-columns: 1fr;
    }
    .panel {
        padding: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Cabecera en dos filas; conserva los colores e imágenes institucionales. */
.site-header {
    position: relative;
    z-index: 30;
    display: block;
    padding: 0;
    background: white;
    border: 0;
}
.site-masthead {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 190px;
    align-items: center;
    gap: 24px;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 22px 32px;
}
.site-brand {
    display: block;
    justify-self: center;
}
.site-brand img {
    display: block;
    width: 480px;
    height: 100px;
    object-fit: contain;
}
.site-title {
    min-width: 0;
    color: var(--deep);
    text-align: center;
    font-family: "Libre Baskerville", Georgia, serif;
}
.site-title-name {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 1.65vw, 1.65rem);
    line-height: 1.35;
    font-weight: 700;
    text-transform: uppercase;
}
.site-title-university {
    margin: 0;
    font-size: clamp(0.95rem, 1.35vw, 1.3rem);
    line-height: 1.45;
}
.site-header .site-navigation {
    display: flex;
    width: 100%;
    justify-content: center;
    background: var(--deep);
}
.site-nav-list,
.site-dropdown,
.official-socials ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: min(1440px, 100%);
    padding: 0 20px;
    gap: 4px;
}
.site-nav-item {
    position: relative;
}
.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 64px;
    padding: 18px 12px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}
.site-nav-link:hover,
.site-nav-link[aria-expanded="true"] {
    background: var(--blue);
    color: white;
    text-decoration: none;
}
.site-nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    bottom: 9px;
    left: 12px;
    right: 12px;
    height: 4px;
    background: #40c3ff;
}
.dropdown-arrow {
    flex-shrink: 0;
}
.site-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    width: max-content;
    min-width: 230px;
    max-width: 340px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 0 0 7px 7px;
    background: white;
    box-shadow: 0 10px 28px rgba(10, 50, 122, 0.14);
}
.site-dropdown a {
    display: block;
    padding: 12px;
    color: var(--deep);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    overflow-wrap: anywhere;
    border-radius: 4px;
}
.site-dropdown a:hover,
.site-dropdown a:focus-visible {
    background: var(--tint);
    text-decoration: none;
}
.site-nav-item:nth-last-child(-n + 3) .site-dropdown {
    left: auto;
    right: 0;
}
.official-socials {
    text-align: center;
    border-left: 1px solid var(--line);
    padding-left: 20px;
}
.official-socials h2 {
    margin: 0 0 8px;
    color: var(--deep);
    font: 400 18px/1.4 "Libre Baskerville", Georgia, serif;
    letter-spacing: normal;
}
.official-socials ul {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.official-socials a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    color: white;
    transition: transform 150ms ease;
}
.official-socials a:hover {
    transform: translateY(-2px);
}
.official-socials .social-youtube {
    background: #e62117;
}
.official-socials .social-facebook {
    background: #1877f2;
    border-radius: 50%;
}
.official-socials .social-instagram {
    background: linear-gradient(35deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}
.official-socials .social-twitter {
    background: #111;
}
.site-header .menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--deep);
    background: white;
    border: 1px solid var(--line);
    border-radius: 5px;
    cursor: pointer;
}
@media (max-width: 1279px) {
    .site-masthead {
        grid-template-columns: 120px minmax(0, 1fr) 120px;
        gap: 16px;
        padding: 18px 24px;
    }
    .site-brand img {
        width: 80px;
        height: 80px;
    }
    .site-header .menu-toggle {
        display: inline-flex;
        justify-self: end;
        grid-column: 3;
        grid-row: 1;
    }
    .official-socials {
        grid-column: 1 / -1;
        padding: 12px 0 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .official-socials h2 {
        font-size: 15px;
    }
    .official-socials a {
        width: 44px;
        height: 44px;
    }
    .site-header .site-navigation {
        display: none;
    }
    .site-header .site-navigation.open {
        display: flex;
        align-items: stretch;
    }
    .site-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px;
    }
    .site-nav-link {
        width: 100%;
        min-height: 48px;
        justify-content: space-between;
        text-align: left;
        padding: 14px 12px;
        font-size: 16px;
    }
    .site-nav-link[aria-current="page"]::after {
        bottom: 4px;
        right: auto;
        width: 35px;
        height: 3px;
    }
    .site-dropdown {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: none;
        box-shadow: none;
        border-radius: 5px;
        margin-bottom: 8px;
    }
}
@media (max-width: 600px) {
.site-masthead {
    grid-template-columns: 160px minmax(0, 1fr) 88px;
    gap: 12px;
    padding: 14px 16px;
}

.site-brand {
    width: 160px;
    justify-self: start;
}

.site-brand img {
    display: block;
    width: 160px;
    height: 72px;
    max-width: 100%;
    object-fit: contain;
}
    .site-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .site-title-name {
        margin-bottom: 6px;
        font-size: 1.1rem;
    }
    .site-title-university {
        font-size: 0.9rem;
    }
    
}
@media (prefers-reduced-motion: reduce) {
    .official-socials a {
        transition: none;
    }
}
@media (min-width: 1280px) {
    .site-masthead {
        grid-template-columns: 260px minmax(0, 1fr) 260px;
    }

    .site-brand {
        position: relative;
        justify-self: start;
        width: 260px;
        height: 160px;
    }

    .site-brand img {
        position: absolute;
        top: 50%;
        left: calc(50% - 120px);
        width: 460px;
        height: 260px;
        max-width: none;
        object-fit: contain;
        transform: translate(-50%, -50%);
    }
}

@media (min-width: 1280px) {
    .official-socials {
        position: relative;
        left: 160px;
    }
}

.carousel-arrows button {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 48px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    cursor: pointer;
    transform: translateY(-50%);
}

.carousel-arrows [data-prev] {
    left: 12px;
}

.carousel-arrows [data-next] {
    right: 12px;
}

.carousel-arrows svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel-arrows button:hover {
    background: rgba(0, 0, 0, 0.45);
}

@media (max-width: 600px) {
    .carousel-arrows button {
        top: auto;
        bottom: 16px;
        width: 44px;
        height: 44px;
        transform: none;
    }
}

.video-campus {
    display: block;
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 760px) {
    .video-campus {
        height: 280px;
    }
}

.institution-carousel {
    display: grid;
    place-items: center;
    min-height: 450px;
    padding: 70px 24px;
    color: white;
    text-align: center;
    background-color: var(--deep);
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.7),
            rgba(0, 0, 0, 0.7)
        ),
        url("fondocunoc.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.institution-carousel-content {
    width: 100%;
    max-width: 900px;
}

.institution-carousel h2 {
    margin: 0 0 30px;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 1.9rem;
    letter-spacing: 0.03em;
}

.institution-carousel h3 {
    margin: 0 0 20px;
    font-size: 1.3rem;
}

.institution-carousel p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
}

.institution-carousel a {
    display: inline-block;
    margin-top: 20px;
    color: white;
    text-decoration: underline;
}

.institution-carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.institution-carousel-dots button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.institution-carousel-dots button::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 2px solid white;
    border-radius: 50%;
}

.institution-carousel-dots button[aria-pressed="true"]::before {
    width: 16px;
    height: 16px;
    border-color: var(--blue);
    background: var(--blue);
}

@media (max-width: 760px) {
    .institution-carousel {
        min-height: 400px;
        padding: 50px 24px;
    }

    .institution-carousel h2 {
        font-size: 1.6rem;
    }

    .institution-carousel p {
        font-size: 0.95rem;
    }
}