@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================================
   PORTAL PANDUAN DIGITAL BBPP KETINDAN
   Stylesheet utama - tema hijau final
   ========================================================= */


/* =========================================================
   1. VARIABEL WARNA DAN RESET
   ========================================================= */

:root {
    --forest: #075638;
    --forest-dark: #03452f;
    --forest-light: #087849;
    --gold: #e8c92d;
    --ink: #193326;
    --muted: #66766c;
    --line: #e5ece6;
    --green-soft: #eaf4e3;
    --green-panel: #ddeed5;
    --green-pale: #f0f7e9;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Inter', Arial, sans-serif;
    background: #ffffff;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

[hidden] {
    display: none !important;
}


/* =========================================================
   2. HEADER DAN NAVIGASI
   ========================================================= */

.header {
    position: relative;
    z-index: 10;
    height: 76px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(11, 58, 28, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    width: 100%;
    max-width: 1500px;
    height: 100%;
    margin: 0 auto;
    padding: 8px 5%;
}

.brand {
    display: flex;
    align-items: center;
    flex: 0 1 470px;
    min-width: 0;
    max-width: 470px;
}

.brand img {
    display: block;
    width: 100%;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav a {
    padding: 12px 16px;
    border-radius: 9px;
    color: #34473a;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

nav a.active,
nav a:hover {
    color: #ffffff;
    background: var(--forest);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--forest);
    font-size: 25px;
    cursor: pointer;
}


/* =========================================================
   3. HERO / BANNER UTAMA
   Background foto dan logo portal dibuat TERPISAH.
   File background: assets/img/hero-bg.jpg
   File logo      : assets/img/logo-portal.png
   ========================================================= */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;

    width: 100%;
    height: 400px;
    min-height: 400px;
    overflow: hidden;

    background-color: var(--forest);
    background-image: url('../img/hero-ketindan.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/*
   Gradasi tipis di sisi kanan.
   Tidak menutupi gedung, gunung, dan pemandangan.
*/

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(
        90deg,
        rgba(3, 69, 47, 0) 0%,
        rgba(3, 69, 47, 0) 48%,
        rgba(3, 69, 47, 0.10) 68%,
        rgba(3, 69, 47, 0.24) 100%
    );
}

/* Logo Portal Digital */

.hero-logo {
    position: absolute;
    z-index: 2;

    top: 35%;
    right: 6%;
    transform: translateY(-43%);

    display: block;
    width: min(620px, 42%);
    height: auto;
    max-height: 300px;

    object-fit: contain;
    object-position: center;
}

/* Ornamen bawah hero */

.hero-bottom {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;

    height: 13px;

    background: linear-gradient(
        90deg,
        #e7ce36 0%,
        #a7c52d 50%,
        #0a7847 100%
    );

    clip-path: polygon(
        0 55%,
        25% 10%,
        50% 80%,
        75% 15%,
        100% 55%,
        100% 100%,
        0 100%
    );
}


/* =========================================================
   4. KONTEN UTAMA
   ========================================================= */

.main {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(300px, 0.92fr);
    gap: 28px;

    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px 5% 42px;
}


/* =========================================================
   5. JUDUL BAGIAN PANDUAN
   ========================================================= */

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    margin: 0;
    color: #123d28;
    font-size: 25px;
    line-height: 1.3;
}

.sprout {
    margin-right: 8px;
    color: #18824c;
    font-size: 29px;
}

.section-head > a {
    color: #087344;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.section-head > a b {
    margin-left: 8px;
    font-size: 18px;
}


/* =========================================================
   6. GRID DAN KARTU PANDUAN
   ========================================================= */

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.guide-card {
    display: flex;
    flex-direction: column;
    min-width: 0;

    /* Tinggi kartu desktop agar mendekati batas bawah Kontak Kami */
    min-height: 450px;

    overflow: hidden;

    border: 1px solid #d9e9d0;
    border-radius: 16px;
    background: linear-gradient(145deg, #f1f8ec 0%, #e5f1dc 100%);
    box-shadow: 0 5px 18px rgba(36, 91, 48, 0.08);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-3px);
    border-color: #c4dfb8;
    box-shadow: 0 9px 22px rgba(36, 91, 48, 0.13);
}

.guide-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    background: #eaf2e9;
}

.guide-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-tag {
    position: absolute;
    top: 10px;
    left: 10px;

    padding: 5px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--forest);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.guide-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.guide-info h3 {
    min-height: 40px;
    margin: 0 0 9px;

    color: #17452d;
    font-size: 15px;
    line-height: 1.4;
}

.guide-info p {
    flex: 1;
    margin: 0 0 17px;

    color: #536b57;
    font-size: 12px;
    line-height: 1.55;
}

.guide-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;

    /* Menjaga informasi PDF selalu di bagian paling bawah */
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid #d4e5cc;
}

.file-type {
    color: #617564;
    font-size: 11px;
}

.file-type b {
    color: #d9483b;
}

.guide-link {
    color: #087247;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.guide-link b {
    margin-left: 5px;
}

.guide-link.muted {
    color: #8b9c8c;
    font-weight: 500;
}

/* Pesan ketika daftar panduan kosong */

.empty-guide {
    grid-column: 1 / -1;
    padding: 35px 20px;
    border: 1px dashed #cbdccf;
    border-radius: 14px;
    background: #f8fbf7;
    text-align: center;
}

.empty-guide > span {
    font-size: 34px;
}

.empty-guide h3 {
    margin: 10px 0 6px;
    color: var(--forest);
    font-size: 17px;
}

.empty-guide p,
.empty {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.empty {
    margin: 20px 0;
    text-align: center;
}


/* =========================================================
   7. SIDEBAR / PANEL INFORMASI
   ========================================================= */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 34px;
}

.about,
.contact {
    position: relative;
    overflow: hidden;
    padding: 22px 22px 20px;
    border-radius: 16px;
}

.about {
    background: linear-gradient(135deg, #eff7e8 0%, #e3f0d9 100%);
}

.contact {
    background: linear-gradient(135deg, #f0f7e9 0%, #e5f1dc 100%);
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 13px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d4e4ce;
}

.contact .panel-head {
    border-color: #d4e4ce;
}

.panel-head h2 {
    margin: 0;
    color: #17402a;
    font-size: 19px;
}

.contact .panel-head h2 {
    color: #17402a;
}

.panel-icon {
    display: grid;
    flex: none;
    place-items: center;

    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #087b47;
    color: #ffffff;

    font-size: 21px;
    font-weight: 800;
}

.contact .panel-icon {
    background: #087b47;
}

.about p,
.contact p {
    position: relative;
    z-index: 1;

    margin: 0 0 16px;
    color: #43584a;
    font-size: 13px;
    line-height: 1.65;
}

.more {
    position: relative;
    z-index: 1;

    display: inline-flex;
    align-items: center;
    gap: 18px;

    padding: 10px 14px;
    border: 1px solid #16834b;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.66);
    color: #08643d;

    font-size: 12px;
    font-weight: 700;
}

.more b {
    font-size: 17px;
}

.contact strong {
    display: block;
    margin-bottom: 11px;
    color: #17402a;
    font-size: 13px;
}

.contact-line {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin: 8px 0;
    color: #43584a;
    font-size: 12px;
    line-height: 1.5;
}

.contact-line span {
    flex: none;
    color: #087b47;
    font-weight: 800;
}

.website {
    display: inline-block;
    margin-top: 9px;
    color: #087247;
    font-size: 12px;
    font-weight: 700;
}

.decoration {
    position: absolute;
    right: -9px;
    bottom: -27px;

    color: #b7d9ac;
    font-size: 94px;
    opacity: 0.4;
    pointer-events: none;
}

.contact .decoration {
    color: #b7d9ac;
}


/* =========================================================
   8. FOOTER
   ========================================================= */

.footer {
    position: relative;
    overflow: hidden;

    padding: 25px 5% 12px;
    background: linear-gradient(
        110deg,
        #004a34,
        #005c3c 60%,
        #0a633d
    );
    color: #ffffff;
}

.footer::after {
    content: '';
    position: absolute;
    right: -5%;
    bottom: -70px;

    width: 40%;
    height: 150px;

    background: linear-gradient(120deg, #398b42, #d7bd2a);
    opacity: 0.22;
    transform: skewY(-9deg);
    pointer-events: none;
}

.footer-main {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 1.2fr 1.6fr 0.7fr;
    align-items: center;
    gap: 28px;

    max-width: 1500px;
    margin: 0 auto;
    padding-bottom: 19px;
}

.identity {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 10px;
    line-height: 1.55;
}

.identity b {
    font-size: 17px;
}

.seal {
    display: grid;
    flex: none;
    place-items: center;

    width: 52px;
    height: 52px;
    border: 2px solid #e4d04a;
    border-radius: 50%;

    color: #e4d04a;
    font-size: 30px;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;

    padding-left: 25px;
    border-left: 1px solid rgba(255, 255, 255, 0.4);

    font-size: 10px;
    line-height: 1.5;
}

.motto {
    color: #f3e9b9;
    font-family: Georgia, serif;
    font-size: 22px;
    font-style: italic;
    line-height: 1.2;
    text-align: right;
    text-shadow: 0 2px 7px #00351f;
}

.footer-bottom {
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: space-between;
    gap: 10px;

    max-width: 1500px;
    margin: 0 auto;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);

    color: #e0ece4;
    font-size: 10px;
}


/* =========================================================
   9. RESPONSIVE TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .guide-card {
        min-height: 400px;
    }

    .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main {
        grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
    }

    .hero-logo {
        right: 4%;
        width: 45%;
    }

    .footer-main {
        grid-template-columns: 1.1fr 1.4fr 0.7fr;
        gap: 18px;
    }

    .footer-links {
        padding-left: 16px;
    }
}


/* =========================================================
   10. RESPONSIVE MOBILE
   ========================================================= */

@media (max-width: 760px) {
    .guide-card {
        min-height: 0;
    }

    .header {
        height: auto;
    }

    .header-inner {
        min-height: 68px;
        padding: 8px 5%;
    }

    .brand {
        flex: 0 1 78%;
        max-width: 78%;
        min-width: 0;
    }

    .brand img {
        max-height: 49px;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 68px;
        right: 0;
        left: 0;

        display: none;
        flex-direction: column;
        align-items: stretch;

        padding: 12px 5%;
        background: #ffffff;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
    }

    nav.open {
        display: flex;
    }

    nav a {
        width: 100%;
    }

    .hero {
        height: 330px;
        min-height: 330px;

        background-position: 35% center;
    }

    .hero::before {
        background: linear-gradient(
            90deg,
            rgba(3, 69, 47, 0.04) 0%,
            rgba(3, 69, 47, 0.12) 48%,
            rgba(3, 69, 47, 0.30) 100%
        );
    }

    .hero-logo {
        top: auto;
        right: 5%;
        bottom: 35px;
        transform: none;

        width: 55%;
        max-height: 180px;
    }

    .main {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 28px 5%;
    }

    .sidebar {
        padding-top: 16px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
        padding: 15px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        border-left: 0;
    }

    .motto {
        font-size: 20px;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
    }
}


/* =========================================================
   11. RESPONSIVE MOBILE KECIL
   ========================================================= */

@media (max-width: 430px) {
    .hero {
        height: 290px;
        min-height: 290px;
        background-position: 32% center;
    }

    .hero-logo {
        right: 4%;
        bottom: 30px;
        width: 62%;
        max-height: 145px;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .guide-photo {
        aspect-ratio: 4 / 3;
    }

    .guide-info {
        padding: 11px;
    }

    .guide-info h3 {
        min-height: 0;
        font-size: 13px;
    }

    .guide-info p {
        font-size: 11px;
    }

    .guide-bottom {
        flex-wrap: wrap;
    }

    .section-head h2 {
        font-size: 20px;
    }

    .section-head > a {
        font-size: 10px;
    }

    .about,
    .contact {
        padding: 18px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
