:root {
    --primary: #0d3b66;
    --primary-dark: #082f49;
    --secondary: #f4b400;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #64748b;
    --soft: #f5f7fa;
    --border: #e2e8f0;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

/* =====================================================
   RESET DAN DASAR
   ===================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.5;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.public-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* =====================================================
   HEADER
   ===================================================== */

.top-information {
    padding: 9px 0;
    color: rgba(255, 255, 255, 0.85);
    background: var(--primary-dark);
    font-size: 12px;
}

.top-information-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.top-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-header {
    background: var(--white);
}

.main-header-inner {
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.school-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.school-brand-logo {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: var(--secondary);
    font-size: 23px;
    font-weight: 900;
}

.school-brand strong,
.school-brand span {
    display: block;
}

.school-brand strong {
    color: var(--primary-dark);
    font-size: 21px;
}

.school-brand span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.admin-login-link {
    padding: 10px 15px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s ease;
}

.admin-login-link:hover {
    color: var(--white);
    background: var(--primary);
}

/* =====================================================
   NAVIGASI DROPDOWN
   ===================================================== */

.main-navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.navigation-container {
    position: relative;
}

.navigation-content {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.navigation-list {
    min-height: 64px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: stretch;
    gap: 5px;
}

.navigation-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.navigation-link-row {
    display: flex;
    align-items: center;
}

.navigation-link {
    min-height: 64px;
    padding: 0 14px;
    color: #334155;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.navigation-link:hover,
.navigation-link:focus-visible {
    color: var(--primary);
    background: #f8fafc;
}

.dropdown-button {
    width: 28px;
    min-height: 64px;
    margin-left: -10px;
    padding: 0;
    border: 0;
    color: #475569;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dropdown-menu {
    min-width: 230px;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 1100;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--white);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.15);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.dropdown-menu a {
    display: block;
    padding: 12px 15px;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    color: var(--primary);
    background: #f1f5f9;
}

.has-dropdown:hover > .dropdown-menu,
.has-dropdown:focus-within > .dropdown-menu,
.has-dropdown.dropdown-open > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.has-dropdown.dropdown-open .dropdown-button {
    transform: rotate(180deg);
}

.navigation-login {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 1px solid #0d6efd;
    border-radius: 24px;
    color: #0d6efd;
    font-size: 14px;
    font-weight: 700;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.navigation-login:hover {
    color: var(--white);
    background: #0d6efd;
}

.mobile-menu-button {
    display: none;
}

/* =====================================================
   HERO BERANDA
   ===================================================== */

.hero-home {
    min-height: 570px;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            rgba(13, 59, 102, 0.96),
            rgba(8, 47, 73, 0.96)
        );
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at right,
            rgba(244, 180, 0, 0.18),
            transparent 45%
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 70px;
    padding-bottom: 70px;
}

.hero-label {
    margin: 0 0 15px;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(39px, 6vw, 68px);
    line-height: 1.08;
}

.hero-content > p:not(.hero-label) {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 32px;
}

.button {
    min-height: 48px;
    padding: 12px 19px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--primary-dark);
    background: var(--secondary);
}

.button-primary:hover {
    background: #ffd24d;
}

.button-outline {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.button-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =====================================================
   BAGIAN UMUM BERANDA
   ===================================================== */

.home-section,
.portal-section {
    padding: 75px 0;
}

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

.section-heading {
    max-width: 730px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-heading span {
    color: var(--secondary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.section-heading h2 {
    margin: 8px 0 12px;
    color: var(--primary-dark);
    font-size: 36px;
    line-height: 1.2;
}

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

.profile-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.information-card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.information-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.information-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(13, 59, 102, 0.09);
    font-size: 27px;
}

.information-card h3 {
    margin: 18px 0 10px;
    color: var(--primary-dark);
}

.information-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.information-card a {
    color: var(--primary);
    font-weight: 700;
}

.empty-public-content {
    padding: 45px 25px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--muted);
    background: var(--white);
    text-align: center;
}

/* =====================================================
   BERITA
   ===================================================== */

.news-public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-public-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.news-public-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.news-public-image {
    height: 220px;
    background: #dbe4ee;
}

.news-public-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-weight: 800;
}

.news-public-content {
    padding: 22px;
}

.news-public-date {
    color: var(--secondary);
    font-size: 12px;
    font-weight: 800;
}

.news-public-content h3 {
    margin: 10px 0;
    color: var(--primary-dark);
    font-size: 19px;
    line-height: 1.4;
}

.news-public-content p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.news-public-content a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

/* =====================================================
   PORTAL SMK
   ===================================================== */

.portal-public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.portal-public-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.portal-public-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.portal-public-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: rgba(13, 59, 102, 0.09);
}

.portal-public-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.portal-public-logo span {
    color: var(--primary);
    font-size: 32px;
}

.portal-public-card h3 {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: 21px;
}

.portal-public-card p {
    flex: 1;
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.65;
}

.portal-public-description {
    flex: 1;
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.65;
}

.portal-public-description > :first-child {
    margin-top: 0;
}

.portal-public-description > :last-child {
    margin-bottom: 0;
}

.portal-public-button {
    min-height: 46px;
    padding: 11px 16px;
    border-radius: 11px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.portal-public-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =====================================================
   HALAMAN TERPISAH
   ===================================================== */

.page-hero {
    padding: 55px 0;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            rgba(13, 59, 102, 0.97),
            rgba(8, 47, 73, 0.97)
        );
}

.page-hero h1 {
    margin: 12px 0 0;
    font-size: clamp(34px, 5vw, 52px);
}

.page-breadcrumb {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.page-breadcrumb a {
    color: var(--secondary);
}

.page-breadcrumb span {
    margin: 0 8px;
}

.page-content-section {
    padding: 60px 0;
    background: var(--soft);
}

.page-content-card {
    overflow: hidden;
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.page-main-image {
    width: 100%;
    max-height: 480px;
    margin-bottom: 30px;
    border-radius: 14px;
    object-fit: cover;
}

.page-article-content {
    color: #334155;
    font-size: 16px;
    line-height: 1.8;
}

.page-article-content h2,
.page-article-content h3,
.page-article-content h4 {
    color: var(--primary-dark);
}

/* =====================================================
   FOOTER
   ===================================================== */

.public-footer {
    color: rgba(255, 255, 255, 0.78);
    background: var(--primary-dark);
}

.footer-grid {
    padding-top: 55px;
    padding-bottom: 45px;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 40px;
}

.footer-grid h3,
.footer-grid h4 {
    margin-top: 0;
    color: var(--white);
}

.footer-grid p {
    line-height: 1.7;
}

.footer-grid a {
    display: block;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: var(--secondary);
}

.footer-bottom {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {
    .mobile-menu-button {
        min-height: 50px;
        padding: 0;
        border: 0;
        color: var(--primary);
        background: transparent;
        display: flex;
        align-items: center;
        font-weight: 700;
        cursor: pointer;
    }

    .navigation-content {
        min-height: auto;
        padding-bottom: 15px;
        display: none;
        align-items: stretch;
        flex-direction: column;
    }

    .navigation-content.navigation-open {
        display: flex;
    }

    .navigation-list {
        width: 100%;
        min-height: auto;
        display: block;
    }

    .navigation-item {
        width: 100%;
        display: block;
        border-bottom: 1px solid #edf2f7;
    }

    .navigation-link-row {
        width: 100%;
    }

    .navigation-link {
        min-height: 48px;
        flex: 1;
        padding: 0 8px;
    }

    .dropdown-button {
        width: 50px;
        min-height: 48px;
        margin-left: 0;
    }

    .dropdown-menu {
        width: 100%;
        min-width: 0;
        padding: 0 0 8px 14px;
        position: static;
        display: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        border: 0;
        border-radius: 0;
        background: #f8fafc;
        box-shadow: none;
    }

    .has-dropdown.dropdown-open > .dropdown-menu {
        display: block;
    }

    .navigation-login {
        width: 100%;
        text-align: center;
    }

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

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

@media (max-width: 650px) {
    .public-container {
        width: min(100% - 28px, 1180px);
    }

    .top-information {
        display: none;
    }

    .main-header-inner {
        min-height: 80px;
    }

    .school-brand span {
        display: none;
    }

    .school-brand strong {
        font-size: 16px;
    }

    .school-brand-logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        border-radius: 13px;
        font-size: 20px;
    }

    .admin-login-link {
        display: none;
    }

    .hero-home {
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: clamp(36px, 12vw, 50px);
    }

    .hero-content > p:not(.hero-label) {
        font-size: 16px;
    }

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

    .button {
        width: 100%;
    }

    .home-section,
    .portal-section {
        padding: 58px 0;
    }

    .section-heading h2 {
        font-size: 29px;
    }

    .profile-home-grid,
    .news-public-grid,
    .portal-public-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .news-public-image {
        height: 210px;
    }

    .page-content-card {
        padding: 22px;
    }
}

/* =====================================================
   TOMBOL SEMUA BERITA DI BERANDA
   ===================================================== */

.home-news-action {
    margin-top: 35px;
    text-align: center;
}

.button-news-all {
    min-width: 190px;
    color: #ffffff;
    background: var(--primary);
}

.button-news-all:hover {
    color: #ffffff;
    background: var(--primary-dark);
}