:root {
    --blue: #0b5faa;
    --blue-dark: #0a3f82;
    --blue-light: #edf4fc;
    --gold: #c99b31;
    --gold-light: #f8f0da;
    --ink: #162842;
    --muted: #5d6f85;
    --line: #d9e2ed;
    --bg: #E5F3FB;
    --paper: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background: #E5F3FB;
}

/* =========================================================
   PORTADA DE INICIO SIN HERO
   ========================================================= */

.intro-panel--home {
    padding: clamp(38px, 5vw, 72px)
             clamp(18px, 4vw, 60px)
             clamp(18px, 3vw, 36px);

    background: #b1dbf3;
}

.intro-panel--home .welcome-frame {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: clamp(7px, 1vw, 12px);
    overflow: hidden;
    border: 6px ridge #98701e;
    background: linear-gradient(135deg, #765316, #e3c46f 20%, #987020 52%, #efd17b 82%, #775518);
    box-shadow: 0 16px 34px rgba(20, 50, 75, .18);
}

.intro-panel--home .welcome-image,
.intro-panel--home .welcome-frame img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid #705016;
    object-fit: contain;
}

main {
    background: var(--bg);
}



a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 2vw, 34px);
    padding: 6px clamp(20px, 2.5vw, 42px);
    background: #ffffff;
    border-top: 4px solid var(--blue-dark);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 2px 12px rgba(10, 63, 130, .08);
}

.header-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    width: auto;
    height: 78px;
}

.site-header .header-logo {
    flex: 0 0 auto;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 72px !important;
    min-height: 0 !important;
    max-height: 72px !important;
    display: block !important;
    object-fit: contain !important;
    filter: drop-shadow(0 3px 4px rgba(10, 63, 130, .12));
}

.header-brand .brand-copy {
    min-width: 145px;
    display: grid;
    gap: 2px;
    padding-left: 14px;
    border-left: 1px solid rgba(10, 63, 130, .25);
    color: var(--blue-dark);
    line-height: 1.08;
}

.header-brand .brand-copy span {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.header-brand .brand-copy strong {
    font-size: 19px;
}

.main-nav {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    color: var(--blue-dark);
    font-size: clamp(13px, .82vw, 16px);
    font-weight: 600;
    line-height: 1.25;
}

.main-nav > a,
.main-nav > .nav-item {
    position: relative;
    padding-right: clamp(9px, .75vw, 14px);
    padding-left: clamp(9px, .75vw, 14px);
}

.main-nav > :first-child {
    padding-left: 0;
}

.main-nav > :last-child {
    padding-right: 0;
}

.main-nav a {
    position: relative;
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
    white-space: nowrap;
}

.main-nav > * + *::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 21px;
    background: var(--gold);
    transform: translateY(-50%);
}

.nav-item {
    position: relative;
    padding: 8px 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 250px;
    display: none;
    padding: 8px 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-left: 3px solid var(--gold);
    box-shadow: 0 14px 28px rgba(10, 63, 130, 0.13);
}

.dropdown-menu a {
    display: block;
    padding: 12px 18px;
    color: var(--blue-dark);
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
    display: block;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--blue);
}

.main-nav > a:hover::after,
.main-nav > a:focus::after,
.nav-item > a:hover::after,
.nav-item > a:focus::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--gold);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    color: var(--blue-dark);
    background: var(--blue-light);
}

.has-chevron::after {
    content: "";
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-left: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
}

.intro-panel {
    padding: 56px 46px;
    background: var(--bg);
}

.intro-card {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    overflow: hidden;
    border: 1px solid #d8b4a6;
    box-shadow: 0 16px 40px rgba(23, 32, 51, 0.12);
    background: transparent
}

.intro-image {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    margin: 0 auto
}

.intro-photo {
    object-position: center;
    margin-left:auto;
    margin-right:auto;
    display: block;
}

.intro-text {
    object-fit: contain;
    background: #f2c3b1;
}

.intro-placeholder {
    min-height: 360px;
    display: grid;
    place-items: center;
    width: 100%;
    padding: 24px;
    color: none;
    text-align: center;
    background: transparent;
    font-weight: 700;
}

.page-heading {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 64px 46px;
    background: var(--blue-light);
    border-bottom: 4px solid var(--gold);
}

.page-heading > div {
    max-width: 920px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    max-width: 760px;
    color: var(--blue-dark);
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
}

.lead {
    max-width: 620px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 22px;
    line-height: 1.5;
}

.info-section {
    padding: 64px 46px;
    background: var(--bg);
}

.documents-page {
    padding: 64px 46px;
    background: var(--paper);
}

.section-title {
    max-width: 1100px;
    margin: 0 auto 28px;
    padding-left: 18px;
    border-left: 4px solid var(--gold);
}

h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.info-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.info-card,
.document-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 8px 20px rgba(10, 63, 130, 0.08);
}

.info-card:hover,
.info-card:focus,
.document-link:hover,
.document-link:focus {
    border-color: var(--blue-dark);
    box-shadow: 0 10px 22px rgba(10, 63, 130, 0.14);
}

.info-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--blue-dark);
    font-weight: 700;
}

.info-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.info-kicker {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.info-text {
    color: var(--muted);
    line-height: 1.45;
}

.info-action,
.document-link small {
    margin-top: auto;
    color: var(--blue);
    font-weight: 700;
}

.documents-page {
    min-height: 520px;
}

.documents-page > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.document-list {
    display: grid;
    gap: 14px;
    margin-top: 36px;
}

.course-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-top: 28px;
}

.course-filter label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 700;
}

.course-filter select {
    min-width: 240px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
}

.course-groups {
    display: grid;
    gap: 28px;
    margin-top: 36px;
}

.document-group h2 {
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 26px;
}

.document-group .document-list {
    margin-top: 0;
}

.regulations-page {
    min-height: 520px;
    padding: 60px 46px 76px;
    background: var(--paper);
}

.regulations-intro,
.regulation-groups {
    max-width: 1100px;
    margin: 0 auto;
}

.regulations-intro {
    padding: 6px 0 30px;
    text-align: center;
    border-bottom: 1px solid #d9cba9;
}

.regulations-intro h1 {
    margin: 0 auto;
    color: var(--blue-dark);
}

.regulations-intro .lead {
    margin-right: auto;
    margin-left: auto;
}

.regulation-groups {
    display: grid;
    gap: 34px;
    margin-top: 42px;
}

.regulation-group {
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.regulation-group-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.regulation-group-heading > span {
    width: 36px;
    height: 3px;
    background: var(--gold);
}

.regulation-group h2 {
    color: var(--blue-dark);
    font-size: 28px;
}

.regulation-documents {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.regulation-document {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 6px 16px rgba(10, 63, 130, 0.06);
}

.regulation-document:hover,
.regulation-document:focus {
    border-color: var(--blue-dark);
    box-shadow: 0 10px 22px rgba(10, 63, 130, 0.12);
}

.regulation-file {
    width: 44px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #9b2c37;
    font-size: 12px;
    font-weight: 700;
}

.regulation-document-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.regulation-document small {
    color: var(--muted);
    line-height: 1.4;
}

.regulation-document small:last-child {
    margin-top: auto;
    color: var(--blue-dark);
    font-weight: 700;
}

.regulation-empty {
    margin: 0;
    padding: 18px 0;
    color: var(--muted);
}

.empty-state {
    margin-top: 32px;
    padding: 22px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--blue-light);
}

.document-viewer {
    width: 100%;
    height: 720px;
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.founder-page {
    padding: 64px 46px;
    background: var(--paper);
}

.founder-header,
.founder-block {
    max-width: 1120px;
    margin: 0 auto;
}

.founder-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.founder-block {
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.founder-block h2 {
    margin-bottom: 14px;
    color: var(--blue-dark);
    font-size: 26px;
}

.founder-block p {
    margin: 0 0 16px;
    color: #344054;
    font-size: 18px;
    line-height: 1.75;
}

.founder-block.with-image {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    align-items: center;
    gap: 30px;
}

.founder-block.image-left {
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
}

.founder-block img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.12);
}

.founder-stack {
    display: grid;
    gap: 18px;
}

.founder-flow {
    max-width: 980px;
    margin: 0 auto;
    color: #27384e;
}

.founder-flow::after {
    content: "";
    display: block;
    clear: both;
}

.founder-flow p {
    margin: 0 0 24px;
    font-size: 21px;
    line-height: 1.55;
    text-align: justify;
}

.founder-flow h2 {
    margin: 34px 0 16px;
    color: var(--blue-dark);
    font-size: 26px;
}

.founder-flow ul {
    margin: -8px 0 24px;
    padding-left: 28px;
    font-size: 21px;
    line-height: 1.45;
}

.founder-flow li + li {
    margin-top: 10px;
}

.student-board {
    width: 100%;
    margin: -8px 0 24px;
    border-collapse: collapse;
    font-size: 21px;
}

.student-board th,
.student-board td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.student-board th {
    color: var(--blue-dark);
}

.founder-flow strong {
    margin-right: 6px;
    color: var(--blue-dark);
    font-weight: 800;
    letter-spacing: 0;
}

.founder-float {
    width: min(32%, 280px);
    height: auto;
    display: block;
    margin-bottom: 18px;
    border: 1px solid #cfd9e5;
    box-shadow: 0 8px 20px rgba(10, 63, 130, 0.1);
    border-radius: 5px;
}

.founder-float.right {
    float: right;
    margin-left: 28px;
}

.founder-float.left {
    float: left;
    margin-right: 28px;
}

.known-section {
    padding: 64px 46px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.known-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 270px));
    justify-content: center;
    gap: 18px;
}

.known-grid[hidden] {
    display: none;
}

.known-controls {
    max-width: 1280px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: -52px auto 14px;
}

.known-control {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: 1px solid var(--blue);
    border-radius: 6px;
    color: var(--blue-dark);
    background: var(--paper);
    font-size: 22px;
}

.known-control:hover,
.known-control:focus {
    color: #fff;
    background: var(--blue-dark);
}

.known-control:disabled {
    cursor: default;
    opacity: 0.4;
}

.known-card {
    min-width: 0;
}

.known-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #dbe8f6;
}

.known-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.known-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(100%);
    transition: transform 180ms ease;
}

.known-card:hover .known-overlay,
.known-card:focus-within .known-overlay {
    transform: translateY(0);
}

.known-overlay p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.known-card h3 {
    margin: 14px 0 0;
    color: var(--blue-dark);
    font-size: 20px;
    line-height: 1.25;
}

.site-footer {
    display: grid;
    grid-template-columns: 160px 1fr 1fr 1.2fr;
    align-items: center;
    gap: 36px;
    padding: 34px 46px;
    color: #fff;
    background: var(--blue-dark);
    border-top: 4px solid var(--gold);
}

.footer-brand img {
    width: 120px;
    height: auto;
    display: block;
}

.footer-block {
    display: grid;
    gap: 10px;
}

.footer-block h2 {
    color: #fff;
    font-size: 20px;
}

.footer-social {
    justify-self: center;
}

.footer-services {
    justify-self: center;
}

.social-links,
.digital-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links span,
.digital-links a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
}

.digital-links a {
    font-weight: 700;
}

.digital-links a:hover,
.digital-links a:focus {
    color: var(--blue-dark);
    background: var(--gold-light);
}

.footer-location {
    justify-self: end;
    max-width: 360px;
}

.footer-location address {
    font-style: normal;
    line-height: 1.45;
}

.footer-location a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.admin-body {
    background: var(--bg);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 46px;
    color: #fff;
    background: var(--blue-dark);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header a,
.admin-header button,
.admin-button,
.admin-form button {
    font: inherit;
    font-weight: 700;
}

.admin-header button,
.admin-button,
.admin-form button {
    cursor: pointer;
    border: 0;
    border-radius: 8px;
}

.admin-header button {
    color: #fff;
    background: transparent;
}

.admin-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 42px 24px;
}

.admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-button,
.admin-form button {
    display: inline-block;
    padding: 12px 18px;
    color: #fff;
    background: var(--blue);
}

.admin-status {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    color: #0b5132;
    background: #dcfce7;
}

.admin-table-wrap,
.admin-form {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table small,
.admin-current-file {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.admin-thumb {
    width: 88px;
    height: 66px;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-actions button {
    padding: 0;
    color: #b42318;
    font: inherit;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.admin-form {
    max-width: 680px;
    display: grid;
    gap: 18px;
    padding: 26px;
}

.admin-login {
    margin: 60px auto 0;
}

.admin-form label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.form-error {
    margin: -8px 0 0;
    color: #b42318;
}

@media (max-width: 900px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 10px 22px;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        font-size: 15px;
    }

    .main-nav > * + *::before {
        display: none;
    }

    .dropdown-menu {
        position: static;
        margin-top: 10px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .footer-social,
    .footer-services,
    .footer-location {
        justify-self: start;
    }

    .intro-card {
        grid-template-columns: 1fr;
    }

    .intro-image,
    .intro-placeholder {
        min-height: 240px;
    }

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

    .known-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 270px));
    }

    .founder-block.with-image,
    .founder-block.image-left {
        grid-template-columns: 1fr;
    }

    .founder-flow p {
        font-size: 18px;
    }

    .founder-flow ul {
        font-size: 18px;
    }

    .student-board {
        font-size: 18px;
    }

    .founder-float {
        width: min(42%, 240px);
    }

    .admin-title,
    .admin-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-header,
    .intro-panel,
    .page-heading,
    .info-section,
    .known-section,
    .founder-page,
    .documents-page,
    .regulations-page,
    .site-footer {
        padding-left: 22px;
        padding-right: 22px;
    }

    .site-header .header-logo {
        width: 54px !important;
        min-width: 54px !important;
        max-width: 54px !important;
        height: 62px !important;
        max-height: 62px !important;
    }

    .header-brand .brand-copy {
        min-width: 0;
        padding-left: 12px;
    }

    .header-brand .brand-copy strong {
        font-size: 17px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .known-grid {
        grid-template-columns: minmax(0, 320px);
    }

    .known-controls {
        margin-top: -18px;
    }

    .founder-float,
    .founder-float.left,
    .founder-float.right {
        float: none;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 18px;
    }

    .document-viewer {
        height: 520px;
    }

    .admin-header {
        padding-left: 22px;
        padding-right: 22px;
    }
}

/* Documentos: cinco tarjetas por fila. */
.regulations-page .regulation-documents,
.documents-page .document-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.regulation-document,
.document-link {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .regulations-page .regulation-documents,
    .documents-page .document-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .regulations-page .regulation-documents,
    .documents-page .document-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .regulations-page .regulation-documents,
    .documents-page .document-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   AVISO EMERGENTE ADAPTADO A LA IMAGEN
   ========================================================= */

.notice-modal {
    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);

    margin: auto;
    padding: 0;

    overflow: visible;

    color: inherit;
    background: transparent;

    border: 0;
    border-radius: 12px;

    box-shadow:
        0 25px 70px rgba(4, 25, 48, 0.42);
}

/* Fondo oscuro detrás del modal */

.notice-modal::backdrop {
    background: rgba(4, 25, 48, 0.75);
    backdrop-filter: blur(3px);
}

/* El contenido adopta el ancho real de la imagen */

.notice-modal-content {
    position: relative;

    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);

    display: inline-block;

    padding: 0;
    overflow: hidden;

    line-height: 0;

    background: transparent;

    border: 3px solid var(--gold);
    border-radius: 12px;
}

/* Imagen conservando sus proporciones */

.notice-modal-image {
    width: auto;
    max-width: calc(100vw - 38px);

    height: auto;
    max-height: calc(100vh - 38px);

    display: block;

    margin: 0;

    object-fit: contain;

    border-radius: 9px;
}

/* Botón de cierre */

.notice-modal-close {
    position: absolute;
    z-index: 5;

    top: 10px;
    right: 10px;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    margin: 0;
    padding: 0;

    cursor: pointer;

    color: #ffffff;
    background: rgba(5, 42, 79, 0.92);

    border: 2px solid #ffffff;
    border-radius: 50%;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.notice-modal-close:hover {
    background: var(--blue);
    transform: scale(1.06);
}

.notice-modal-close:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.notice-modal[open] {
    display: block;
}

/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 600px) {
    .notice-modal {
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .notice-modal-content {
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);

        border-width: 2px;
    }

    .notice-modal-image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .notice-modal-close {
        top: 7px;
        right: 7px;

        width: 38px;
        height: 38px;

        font-size: 27px;
    }
}

/* Separador decorativo entre bienvenida y publicaciones */

.intro-panel.intro-panel--home {
    padding: clamp(38px, 5vw, 72px)
             clamp(18px, 4vw, 60px)
             clamp(18px, 3vw, 36px);

    background: #b1dbf3;
}

.publications-separator {
    width: 100%;
    height: clamp(150px, 20vw, 280px);
    overflow: hidden;
    background: #b1dbf3;
    line-height: 0;
}

.publications-separator img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 53%;
}

@media (max-width: 600px) {
    .publications-separator {
        height: 160px;
    }
}



/* =========================================================
   ADMINISTRADOR - MODULO DE NOTICIAS
   ========================================================= */

.admin-section {
    width: 100%;
    display: grid;
    gap: 24px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-section-header h1 {
    margin: 0 0 10px;
    color: var(--blue-dark);
    font-size: clamp(26px, 3vw, 36px);
}

.admin-section-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

/* Botones */

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    color: #fff;
    background: var(--blue);
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease;
}

.admin-button:hover {
    color: #fff;
    background: var(--blue-dark);
}

.admin-button--secondary {
    color: var(--blue-dark);
    background: var(--blue-light);
    border: 1px solid var(--line);
}

.admin-button--secondary:hover {
    color: #fff;
    background: var(--blue-dark);
}

.admin-button--danger {
    color: #fff;
    background: #b42318;
}

.admin-button--danger:hover {
    background: #8f1d14;
}

/* Resumen */

.admin-news-summary {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(180px, 1fr)
    );
    gap: 16px;
}

.admin-news-stat {
    display: grid;
    gap: 10px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
}

.admin-news-stat span {
    color: var(--muted);
    font-size: 14px;
}

.admin-news-stat strong {
    color: var(--blue-dark);
    font-size: 30px;
}

/* Tabla */

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(23,32,51,.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--blue-light);
}

.admin-table th {
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 700;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.admin-news-thumbnail {
    width: 90px;
    height: 65px;
    display: block;
    object-fit: cover;
    border-radius: 6px;
}

.admin-news-no-image {
    color: var(--muted);
    font-size: 13px;
}

.admin-news-description {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Estados */

.admin-news-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.admin-news-status--published {
    color: #166534;
    background: #dcfce7;
}

.admin-news-status--draft {
    color: #92400e;
    background: #fef3c7;
}

.admin-news-status--scheduled {
    color: #1d4ed8;
    background: #dbeafe;
}

/* Acciones */

.admin-news-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-news-actions form {
    margin: 0;
}

/* Formularios */

.admin-section .admin-form {
    width: 100%;
    max-width: 800px;
}

.admin-form-group {
    display: grid;
    gap: 8px;
}

.admin-form-group label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.admin-form-group small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.admin-form-group textarea {
    resize: vertical;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.admin-form-group input[type="checkbox"] {
    width: auto;
    min-width: auto;
    accent-color: var(--blue);
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.admin-form-actions .admin-button {
    font: inherit;
    font-weight: 700;
}

/* Mensajes */

.admin-error {
    padding: 16px 20px;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.admin-error ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

/* Sin registros */

.admin-empty-state {
    padding: 45px 24px;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
    text-align: center;
}

.admin-empty-state h2 {
    margin-bottom: 12px;
    font-size: 25px;
}

.admin-empty-state p {
    margin-bottom: 24px;
    color: var(--muted);
}

/* Paginacion */

.admin-news-pagination {
    margin-top: 10px;
    overflow-x: auto;
}

.admin-news-pagination nav {
    max-width: 100%;
}

/* Responsive */

@media (max-width: 768px) {
    .admin-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-section-header h1 {
        font-size: 28px;
    }

    .admin-table {
        min-width: 650px;
    }

    .admin-news-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-form-actions {
        flex-direction: column;
    }

    .admin-form-actions .admin-button {
        width: 100%;
    }
}


/* ==========================================
   NOTICIAS PUBLICAS - LISTADO
   ========================================== */

.news-page {
    width: 100%;
    min-height: 60vh;
    background: #e5f3fb;
    padding-bottom: 70px;
}

/* Encabezado */

.news-page-header {
    padding: 55px 24px 45px;
    border-top: 4px solid #c99b31;
    text-align: center;
}

.news-page-header-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.news-page-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #a57822;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.news-page-header h1 {
    margin: 0 0 18px;
    color: #0a3f82;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.2;
}

.news-page-header p {
    max-width: 720px;
    margin: 0 auto;
    color: #50677e;
    font-size: 17px;
    line-height: 1.7;
}

/* Contenedor */

.news-page-container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* Grilla de tarjetas */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* Tarjeta individual */

.news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dce6ef;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(15, 54, 95, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(15, 54, 95, 0.16);
}

/* Imagen */

.news-card-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #dce8f5;
}

.news-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image {
    transform: scale(1.04);
}

/* Marcador cuando no existe imagen */

.news-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(
        135deg,
        #0a3f82,
        #4089bc
    );
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Contenido de la tarjeta */

.news-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.news-card-meta {
    margin-bottom: 12px;
    color: #8b691f;
    font-size: 13px;
    font-weight: 600;
}

.news-card-title {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
}

.news-card-title a {
    color: #0a3f82;
    text-decoration: none;
}

.news-card-title a:hover {
    color: #1765a3;
}

.news-card-summary {
    margin: 0 0 22px;
    color: #526579;
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* Enlace al detalle */

.news-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #0a5da5;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.news-card-readmore:hover {
    color: #a57822;
}

.news-card-readmore span {
    transition: transform 0.2s ease;
}

.news-card-readmore:hover span {
    transform: translateX(4px);
}

/* Paginacion */

.news-pagination {
    display: flex;
    justify-content: center;
    margin-top: 45px;
}

.news-pagination nav {
    max-width: 100%;
}

/* Estado sin noticias */

.news-empty-state {
    max-width: 680px;
    margin: 20px auto;
    padding: 55px 30px;
    background: #ffffff;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 5px 18px rgba(15, 54, 95, 0.08);
}

.news-empty-state h2 {
    margin-bottom: 15px;
    color: #0a3f82;
}

.news-empty-state p {
    color: #526579;
    line-height: 1.7;
}

.news-empty-state a {
    display: inline-block;
    margin-top: 20px;
    color: #0a5da5;
    font-weight: 700;
}

/* Tablets */

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

/* Celulares */

@media (max-width: 640px) {
    .news-page-header {
        padding: 38px 18px 32px;
    }

    .news-page-header p {
        font-size: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .news-page-container {
        width: min(100% - 32px, 480px);
    }

    .news-card-content {
        padding: 20px;
    }

    .news-card-title {
        font-size: 20px;
    }

    .news-page {
        padding-bottom: 45px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card-image,
    .news-card-readmore span {
        transition: none;
    }
}

/* Centrar encabezado de Noticias */

.news-page-header {
    text-align: center;
}

.news-page-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.news-page-eyebrow,
.news-page-header h1,
.news-page-header p {
    text-align: center;
}

.news-page-header p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
