:root {
    --primary: #073763;
    --secondary: #0b5f73;
    --accent: #0f9f8f;
    --gold: #f4b942;
    --light: #f8fafc;
    --dark: #0f172a;
    --border-color: #e2e8f0;
}

* {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* =========================
   HEADER
========================= */
.portal-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 22px 0;
}

.portal-header .container-fluid {
    padding-left: 42px;
    padding-right: 42px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25));
}

.header-text {
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.header-text .office-name {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-text .office-subname {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    opacity: .9;
}

/* =========================
   HERO
========================= */
.hero {
    min-height: 100vh;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding: 95px 0 120px;
    background:
        linear-gradient(135deg, rgb(110, 110, 110), rgba(11, 214, 228, 0.358)),
        url("/img/arsip.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero--image .hero-video {
    display: none;
}

.hero--video .hero-video {
    display: block;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 15% 20%, rgba(244, 185, 66, .15), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(15, 159, 143, .22), transparent 38%),
        linear-gradient(135deg, rgba(7, 55, 99, .76), rgba(11, 95, 115, .72));
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    left: -300px;
    top: -300px;
    z-index: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1050px;
    margin: 0 auto;
}

/* =========================
   LOGO HERO
========================= */
.logo-container-top {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-top {
    width: 90px !important;
    height: auto !important;
    max-width: 90px !important;
    max-height: 90px !important;
    object-fit: contain !important;
    margin-bottom: 18px !important;
    display: inline-block !important;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.30));
}

.hero-title {
    margin: 0;
    font-size: clamp(52px, 8.5vw, 118px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -2px;
    color: #e4e66f;
    text-transform: uppercase;
    -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.25);
    text-shadow:
        0 4px 0 rgba(0, 0, 0, 0.35),
        0 12px 32px rgba(0, 0, 0, 0.65),
        0 22px 55px rgba(0, 0, 0, 0.55);
}

.hero-subtitle {
    margin: 16px auto 0;
    font-size: 21px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .25);
}

.hero-description {
    max-width: 830px;
    margin: 22px auto 0;
    font-size: 20px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .92);
    font-weight: 400;
}

.hero-actions {
    margin-top: 38px;
}

/* =========================
   BUTTON
========================= */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 42px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 18px;
    transition: all .28s ease;
}

.btn-main {
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 14px 34px rgba(15, 159, 143, .36);
}

.btn-main:hover {
    color: #fff;
    background: #0b8577;
    border-color: #0b8577;
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 159, 143, .48);
}

/* =========================
   PORTAL APLIKASI
========================= */
.portal-section {
    position: relative;
    z-index: 20;
    margin-top: -78px;
    padding-bottom: 72px;
}

.portal-wrapper {
    background: rgba(30, 67, 84, 0.436);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 48px 42px;
    box-shadow: 0 32px 70px rgba(15, 23, 42, .10);
    backdrop-filter: blur(10px);
}

.section-title {
    margin-bottom: 8px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -.6px;
    font-size: 40px;
}

.section-subtitle {
    max-width: 620px;
    margin: 0 auto;
    color: #e2e8f0;
    font-size: 14.5px;
}

.minimal-app-card {
    height: 100%;
    min-height: 156px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 28px 16px;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all .28s ease;
    box-shadow: 0 6px 16px rgba(29, 15, 106, 0.35);
}

.minimal-app-card:hover {
    transform: translateY(-6px);
    border-color: rgba(15, 159, 143, .45);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.minimal-icon-box {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: rgba(15, 159, 143, .08);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    transition: all .28s ease;
}

.minimal-app-card:hover .minimal-icon-box {
    background: var(--accent);
    color: #fff;
    transform: scale(1.06);
}

.minimal-title {
    margin: 0;
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

/* =========================
   FOOTER
========================= */
.footer {
    background: linear-gradient(135deg, #073763, #0b5f73);
    color: #ffffff;
    padding: 64px 0 24px;
}

.footer .row {
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    min-width: 48px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.footer-brand > div,
.footer-brand-text {
    max-width: 290px;
}

.footer-brand h5 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.footer-brand p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0;
    text-align: left;
    word-spacing: normal;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li:empty {
    display: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.5;
    text-decoration: none;
    transition: 0.25s ease;
}

.footer-links a:empty {
    display: none;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-contact i {
    width: 22px;
    min-width: 22px;
    color: var(--gold);
    font-size: 1.08rem;
    margin-top: 2px;
    line-height: 1.4;
}

.footer-contact span {
    display: block;
    word-break: normal;
    overflow-wrap: anywhere;
}

.footer-bottom {
    margin-top: 52px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.88rem;
}

/* =========================
   VISITOR COUNTER
========================= */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    padding: 7px 15px;
    border-radius: 999px;
}

.visitor-counter i {
    color: var(--gold);
}

/* =========================
   RESPONSIVE TABLET
========================= */
@media (max-width: 991px) {
    .portal-header .container-fluid {
        padding-left: 24px;
        padding-right: 24px;
    }

    .header-logo {
        width: 54px;
        height: 54px;
        max-width: 54px;
        max-height: 54px;
    }

    .header-text .office-name {
        font-size: 14px;
    }

    .header-text .office-subname {
        font-size: 12px;
    }

    .hero {
        padding-top: 125px;
        padding-bottom: 105px;
    }

    .hero-logo-top {
        width: 78px !important;
        max-width: 78px !important;
        max-height: 78px !important;
        margin-bottom: 16px !important;
    }

    .hero-title {
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 17px;
    }

    .portal-section {
        margin-top: -58px;
    }

    .portal-wrapper {
        padding: 36px 26px;
        border-radius: 26px;
    }

    .footer {
        padding: 54px 0 24px;
    }

    .footer-logo {
        width: 44px !important;
        height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        min-width: 44px !important;
    }

    .footer-bottom {
        margin-top: 42px;
        text-align: center;
        justify-content: center;
    }
}

/* =========================
   RESPONSIVE FOOTER / TABLET KECIL
========================= */
@media (max-width: 768px) {
    .footer {
        padding: 48px 0 22px;
    }

    .footer-brand {
        flex-direction: row;
        align-items: flex-start;
    }

    .footer-logo {
        width: 42px !important;
        height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
        min-width: 42px !important;
    }

    .footer-title {
        margin-top: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* =========================
   RESPONSIVE HP
========================= */
@media (max-width: 575px) {
    .portal-header {
        padding: 18px 0;
    }

    .portal-header .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .header-logo {
        width: 42px;
        height: 42px;
        max-width: 42px;
        max-height: 42px;
    }

    .header-text .office-name {
        font-size: 11px;
        letter-spacing: .6px;
    }

    .header-text .office-subname {
        font-size: 9.5px;
    }

    .hero {
        min-height: 92vh;
        padding-top: 95px;
        padding-bottom: 88px;
    }

    .hero-logo-top {
        width: 54px !important;
        height: auto !important;
        max-width: 54px !important;
        max-height: 54px !important;
        min-width: 54px !important;
        object-fit: contain !important;
        margin-bottom: 12px !important;
    }

    .hero-title {
        font-size: clamp(40px, 14vw, 58px);
        font-weight: 900;
        letter-spacing: -1px;
        -webkit-text-stroke: .7px rgba(255, 255, 255, 0.22);
    }

    .hero-subtitle {
        margin-top: 12px;
        font-size: 13px;
        line-height: 1.45;
        letter-spacing: .5px;
    }

    .hero-description {
        margin-top: 15px;
        font-size: 14px;
        line-height: 1.65;
    }

    .hero-actions {
        margin-top: 28px;
    }

    .btn-custom {
        width: 100%;
        padding: 14px 22px;
        font-size: 15px;
    }

    .portal-section {
        margin-top: -48px;
        padding-bottom: 50px;
    }

    .portal-wrapper {
        padding: 28px 16px;
        border-radius: 24px;
    }

    .section-title {
        font-size: 26px;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 13.5px;
    }

    .minimal-app-card {
        min-height: 138px;
        padding: 24px 14px;
    }

    .minimal-icon-box {
        width: 56px;
        height: 56px;
        font-size: 25px;
    }

    .footer {
        padding: 42px 0 20px;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer-logo {
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
        min-width: 36px !important;
        object-fit: contain !important;
        display: block !important;
    }

    .footer-brand > div,
    .footer-brand-text {
        max-width: 100%;
    }

    .footer-brand h5 {
        font-size: 1rem;
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .footer-brand p {
        font-size: 0.86rem;
        line-height: 1.6;
        text-align: center;
    }

    .footer-title {
        margin-top: 14px;
        margin-bottom: 14px;
        font-size: 0.9rem;
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 9px;
    }

    .footer-links a {
        font-size: 0.88rem;
    }

    .footer-contact li {
        justify-content: center;
        text-align: center;
        gap: 8px;
        margin-bottom: 12px;
        font-size: 0.88rem;
    }

    .footer-contact i {
        width: auto;
        min-width: auto;
        font-size: 1rem;
    }

    .footer-bottom {
        margin-top: 32px;
        padding-top: 18px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
        font-size: 0.82rem;
    }

    .visitor-counter {
        padding: 6px 13px;
        font-size: 0.82rem;
    }
}

/* =====================================================
   KARTU PORTAL LEBIH KECIL DAN RESPONSIF
===================================================== */

.portal-wrapper {
    padding: 36px 32px;
}

.portal-wrapper .row {
    --bs-gutter-x: 0.85rem;
    --bs-gutter-y: 0.85rem;
}

/* Lima kartu per baris pada desktop */
@media (min-width: 992px) {
    .portal-wrapper .col {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Empat kartu per baris pada tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .portal-wrapper .col {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Tiga kartu per baris pada tablet kecil */
@media (min-width: 576px) and (max-width: 767.98px) {
    .portal-wrapper .col {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

.minimal-app-card {
    min-height: 112px;
    padding: 16px 10px;
    border-radius: 16px;
    box-shadow: 0 5px 14px rgba(29, 15, 106, 0.22);
}

.minimal-app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 13px 28px rgba(15, 23, 42, 0.15);
}

.minimal-icon-box {
    width: 43px;
    height: 43px;
    margin-bottom: 9px;
    border-radius: 12px;
    font-size: 20px;
}

.minimal-title {
    font-size: 12.5px;
    line-height: 1.3;
}

/* =====================================================
   FOOTER COMPACT FINAL
===================================================== */

.portal-section {
    padding-bottom: 32px;
}

.footer {
    padding: 28px 0 12px;
}

.footer-grid {
    row-gap: 18px;
}

.footer-logo {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    min-width: 46px !important;
}

.footer-brand {
    gap: 12px;
}

.footer-brand h5 {
    margin-bottom: 6px;
    font-size: 1rem;
    line-height: 1.25;
}

.footer-brand p {
    margin-bottom: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.footer-title {
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    font-size: 0.86rem;
    line-height: 1.35;
}

.footer-contact li {
    margin-bottom: 7px;
    gap: 9px;
    font-size: 0.86rem;
    line-height: 1.35;
}

.footer-contact i {
    font-size: 1rem;
    line-height: 1.2;
}

.footer-bottom {
    margin-top: 18px;
    padding-top: 12px;
    font-size: 0.82rem;
}

.visitor-counter {
    padding: 5px 12px;
    font-size: 0.82rem;
}

/* =====================================================
   TAMPILAN HP
===================================================== */

@media (max-width: 575.98px) {
    .portal-section {
        padding-bottom: 24px;
    }

    .portal-wrapper {
        padding: 22px 11px;
        border-radius: 20px;
    }

    .portal-wrapper .row {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.65rem;
    }

    /* Dua kartu per baris pada HP */
    .portal-wrapper .col {
        flex: 0 0 auto;
        width: 50%;
    }

    .minimal-app-card {
        min-height: 92px;
        padding: 12px 7px;
        border-radius: 13px;
    }

    .minimal-icon-box {
        width: 36px;
        height: 36px;
        margin-bottom: 7px;
        border-radius: 10px;
        font-size: 17px;
    }

    .minimal-title {
        font-size: 10.5px;
        line-height: 1.25;
    }

    .footer {
        padding: 24px 0 12px;
    }

    .footer-logo {
        width: 42px !important;
        height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
        min-width: 42px !important;
    }

    .footer-brand {
        gap: 6px;
    }

    .footer-brand h5 {
        margin-bottom: 4px;
        font-size: 0.92rem;
    }

    .footer-brand p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .footer-title {
        margin-top: 6px;
        margin-bottom: 6px;
        font-size: 0.82rem;
    }

    .footer-links li {
        margin-bottom: 5px;
    }

    .footer-links a,
    .footer-contact li {
        font-size: 0.8rem;
    }

    .footer-contact li {
        margin-bottom: 6px;
    }

    .footer-bottom {
        margin-top: 14px;
        padding-top: 10px;
        gap: 6px;
        font-size: 0.76rem;
    }

    .visitor-counter {
        padding: 4px 10px;
        font-size: 0.76rem;
    }
}
