:root {
    --green: #006a4e;
    --green-dark: #004735;
    --red: #f42a41;
    --gold: #b78a2a;
    --ink: #17324d;
    --muted: #607086;
    --paper: #fffdf7;
    --soft: #f3f8f5;
    --line: #dce7df;
    --white: #ffffff;
    --shadow: 0 18px 42px rgba(23, 50, 77, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f7faf8;
    font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
}

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

img {
    max-width: 100%;
}

.gov-ribbon {
    color: #fff;
    background: var(--green-dark);
    font-size: 14px;
    padding: 8px 0;
}

.gov-ribbon a {
    color: #fff;
    opacity: 0.9;
}

.gov-ribbon a:hover {
    opacity: 1;
}

.brand-bar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.brand-logo {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--green), var(--red));
    border-radius: 50%;
    flex: 0 0 auto;
}

.site-title {
    color: var(--green-dark);
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.site-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 4px 0 0;
}

.navbar {
    background: var(--green);
    padding: 0;
}

.navbar .nav-link {
    color: #fff;
    font-weight: 700;
    padding: 15px 14px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.hero-classic {
    min-height: 560px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 71, 53, 0.92), rgba(0, 106, 78, 0.52)),
        url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=1800&auto=format&fit=crop") center/cover;
    display: flex;
    align-items: center;
}

.hero-ministry {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0, 71, 53, 0.96), rgba(0, 106, 78, 0.82)),
        url("https://images.unsplash.com/photo-1584515979956-d9f6e5d09982?q=80&w=1800&auto=format&fit=crop") center/cover;
    padding: 86px 0 42px;
}

.hero-academic {
    padding: 78px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.hero-portal {
    color: #fff;
    background:
        linear-gradient(120deg, rgba(0, 71, 53, 0.95), rgba(244, 42, 65, 0.62)),
        url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?q=80&w=1800&auto=format&fit=crop") center/cover;
    padding: 86px 0;
}

.eyebrow {
    display: inline-flex;
    color: var(--green-dark);
    background: #e7f3ee;
    border: 1px solid #cfe4da;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-classic .eyebrow,
.hero-ministry .eyebrow,
.hero-portal .eyebrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.hero-title {
    max-width: 900px;
    font-size: clamp(2.15rem, 5vw, 4.6rem);
    font-weight: 850;
    line-height: 1.05;
    margin: 16px 0;
}

.hero-text {
    max-width: 720px;
    color: inherit;
    opacity: 0.92;
    font-size: 1.12rem;
    line-height: 1.7;
}

.btn-gov,
.btn-outline-gov,
.btn-light-gov {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 10px 18px;
    font-weight: 800;
}

.btn-gov {
    color: #fff;
    background: var(--green);
    border: 1px solid var(--green);
}

.btn-gov:hover {
    color: #fff;
    background: var(--green-dark);
}

.btn-outline-gov {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-outline-gov:hover {
    color: var(--green-dark);
    background: #fff;
}

.btn-light-gov {
    color: var(--green-dark);
    background: #fff;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: var(--soft);
}

.section-title {
    color: var(--green-dark);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 850;
    line-height: 1.15;
    margin: 8px 0 12px;
}

.section-lead {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

.gov-card,
.notice-panel,
.service-tile,
.classic-panel,
.link-panel,
.officer-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 10px 26px rgba(23, 50, 77, 0.06);
}

.gov-card,
.classic-panel,
.link-panel,
.officer-card {
    padding: 24px;
}

.gov-card i,
.service-tile i,
.link-panel i {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--green);
    border-radius: 4px;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.gov-card h3,
.service-tile h3,
.link-panel h3,
.officer-card h3 {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 850;
}

.gov-card p,
.service-tile p,
.link-panel p,
.officer-card p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

.notice-panel {
    padding: 18px;
}

.notice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}

.notice-head h2 {
    color: var(--green-dark);
    font-size: 1.45rem;
    font-weight: 850;
    margin: 0;
}

.notice-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.notice-item:last-child {
    border-bottom: 0;
}

.date-box {
    color: var(--green-dark);
    background: #e7f3ee;
    border-left: 4px solid var(--red);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-weight: 850;
}

.date-box span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.notice-item strong {
    color: var(--ink);
    display: block;
    line-height: 1.35;
}

.notice-item small {
    color: var(--muted);
}

.stats-band {
    color: #fff;
    background: var(--green-dark);
    padding: 44px 0;
}

.stat {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.stat:last-child {
    border-right: 0;
}

.stat strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.stat span {
    color: #d8fff3;
    font-weight: 700;
}

.service-tile {
    height: 100%;
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-tile:hover,
.link-panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.ministry-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.important-links {
    display: grid;
    gap: 12px;
}

.important-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 4px;
    padding: 13px 15px;
    font-weight: 750;
}

.academic-visual {
    min-height: 420px;
    border-radius: 4px;
    background:
        linear-gradient(0deg, rgba(0, 71, 53, 0.32), rgba(0, 71, 53, 0.08)),
        url("https://images.unsplash.com/photo-1516549655169-df83a0774514?q=80&w=1000&auto=format&fit=crop") center/cover;
    box-shadow: var(--shadow);
}

.officer-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 16px;
}

.portal-search {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 18px;
    margin-top: 28px;
}

.portal-search .form-control {
    min-height: 52px;
    border-radius: 4px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.portal-grid .link-panel {
    min-height: 190px;
}

footer {
    color: #d6e7e1;
    background: #062019;
    padding: 54px 0 18px;
}

footer h3,
footer h4 {
    color: #fff;
    font-weight: 850;
}

footer a,
footer p,
footer li {
    color: #d6e7e1;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 36px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--red);
    border: 0;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.back-to-top.is-visible {
    display: inline-flex;
}

@media (max-width: 991.98px) {
    .ministry-grid,
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        padding: 18px 0;
    }
}

@media (max-width: 767.98px) {
    .hero-classic,
    .hero-ministry,
    .hero-academic,
    .hero-portal {
        min-height: auto;
        padding: 64px 0;
    }

    .ministry-grid,
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .notice-item {
        grid-template-columns: 72px 1fr;
    }
}
