/* ===== TOKEN ===== */
:root {
    --green: #2f3e34;
    --green-dark: #222e26;
    --gold: #c9b48a;
    --cream: #f7f5f0;
    --ink: #1f2421;
    --text: #5a615c;
    --line: #e5e2da;
    --radius: 8px;
    --serif: Georgia, "Times New Roman", serif;
    --hero-h: 600px; /* tinggi MINIMAL hero; hero boleh memanjang bila teks panjang */
    --accent: var(--green);
    --accent-deep: var(--green-dark);
    --book-bg: var(--cream);
    --book-card: #e9e3d3;
    --book-border: var(--gold);
    --ink-main: var(--ink);
    --ink-muted: #5f6f63;
    --soft-hover: #d8cfb9;
    --font: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; }
a { transition: color .2s, background-color .2s, border-color .2s; }
[id] { scroll-margin-top: 72px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ===== TOMBOL ===== */
.btn-m {
    display: inline-block;
    padding: .7rem 1.4rem;
    background: var(--green);
    border: 1px solid var(--green);
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.btn-m:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: transparent; color: #fff; border-color: #fff; }

/* ===== NAVBAR ===== */
.navbar-m { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 0; }
.navbar-m .navbar-brand { color: var(--green); font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.navbar-m .navbar-brand span { color: var(--gold); }
.navbar-m .nav-link { color: var(--ink); font-size: 14px; font-weight: 500; padding: 8px 14px; }
.navbar-m .nav-link:hover, .navbar-m .active .nav-link { color: var(--green); font-weight: 700; }
.navbar-m .nav-link.btn-m, .navbar-m .nav-link.btn-m:hover { color: #fff; font-weight: 600; }
.navbar-m .btn-m { margin-left: 8px; padding: 9px 18px; color: #fff; }
.navbar-m .navbar-toggler { border-color: var(--green); color: var(--green); }
@media (max-width: 991.98px) {
    .navbar-m .nav-link.btn-m, .navbar-m .nav-link.btn-m:hover { color: #fff; font-weight: 600; }
    .navbar-m .btn-m { margin: 8px 0 0; text-align: center; }
}

/* ===== HERO ===== */
/* Tinggi tidak lagi dikunci: min-height menjaga tampilan awal,
   height:auto membiarkan hero memanjang jika judul/paragraf panjang. */
.hero-slide {
    position: relative;
    display: flex;
    align-items: center;

    width: 100%;
    height: auto;
    min-height: var(--hero-h);
    box-sizing: border-box;

    padding: 40px 0 72px;
    overflow: hidden;
}

.hero-slide.is-photo { background: var(--accent-deep); }

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-slide.is-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        90deg,
        rgba(34, 46, 38, .92) 0%,
        rgba(34, 46, 38, .70) 45%,
        rgba(34, 46, 38, .25) 100%
    );
}

.hero-slide > .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-copy { max-width: 36rem; }

.hero h1 {
    margin: 0 0 1.25rem;

    color: var(--book-bg);
    font-size: clamp(2.4rem, 5.2vw, 4.2rem);
    font-weight: 600;
    line-height: 1.08;
}

.hero p {
    max-width: 30rem;
    margin: 0 0 2rem;

    color: var(--book-bg);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero .btn-m { margin: 0 8px 8px 0; }

/* ===== INDIKATOR & KONTROL CAROUSEL ===== */
.hero .carousel-indicators {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;

    display: flex;
    justify-content: flex-start;

    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;

    box-sizing: border-box;
    z-index: 3;
}

.hero .carousel-indicators li {
    width: 36px;
    height: 4px;
    margin: 0 6px 0 0;

    background: #fff;
    border: 0;
    opacity: .4;

    transition: opacity .25s ease;
}

.hero .carousel-indicators .active {
    background: var(--book-bg);
    opacity: 1;
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
    z-index: 3;
    width: 56px;
    opacity: .6;
    transition: opacity .25s ease;
}

.hero .carousel-control-prev:hover,
.hero .carousel-control-next:hover { opacity: 1; }

@media (max-width: 1279.98px) {
    .hero .carousel-control-prev,
    .hero .carousel-control-next { display: none; }
}

@media (max-width: 767.98px) {
    .hero { --hero-h: 680px; }

    .hero h1 { font-size: clamp(2.2rem, 8vw, 3rem); }

    .hero p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-copy { max-width: 100%; }

    .hero-slide.is-photo::before {
        background: linear-gradient(
            180deg,
            rgba(34, 46, 38, .55) 0%,
            rgba(34, 46, 38, .90) 100%
        );
    }

    .hero .carousel-indicators { bottom: 20px; }
}

/* ===== TOMBOL DI HERO ===== */
/* Default (btn-light-m): putih, saat hover jadi transparan */
.hero .btn-m,
.hero a.btn-m,
.hero .btn-light-m {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 24px;
    min-height: 46px;

    background: #fff;
    color: var(--green-dark);

    border: 1px solid #fff;
    border-radius: 4px;

    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition:
        background-color .25s ease,
        color .25s ease,
        border-color .25s ease;
}

.hero .btn-m:hover,
.hero .btn-light-m:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    text-decoration: none;
}

.hero .btn-m:focus-visible,
.hero .btn-light-m:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .hero .btn-m,
    .hero .btn-light-m {
        padding: 11px 16px;
        font-size: .9rem;
    }
}

/* ===== ANIMASI PERGANTIAN SLIDE ===== */
.hero .carousel-item { transition-duration: .9s; }

@keyframes naik       { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes zoom-pelan { from { transform: scale(1.12); } to { transform: scale(1); } }

/* Teks: judul, paragraf, tombol muncul satu per satu */
.hero .carousel-item:is(.active, .carousel-item-next) .hero-copy > * {
    animation: naik .7s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: .25s;
}
.hero .carousel-item:is(.active, .carousel-item-next) .hero-copy > :nth-child(2) { animation-delay: .4s; }
.hero .carousel-item:is(.active, .carousel-item-next) .hero-copy > :nth-child(n+3) { animation-delay: .55s; }

/* Foto latar: zoom pelan (efek Ken Burns) */
.hero .carousel-item:is(.active, .carousel-item-next) .hero-photo {
    animation: zoom-pelan 9s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .hero * { animation: none !important; }
}

/* ===== SECTION ===== */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--cream); }
.heading { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.heading p { margin: 0; }

/* ===== KARTU ===== */
.card-m {
    height: 100%;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s, transform .2s;
}
.card-m:hover { border-color: var(--green); transform: translateY(-3px); }
.card-m i {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 18px;
    background: var(--cream); border-radius: 50%;
    color: var(--green); font-size: 18px;
}
.card-m h5 { font-size: 17px; margin-bottom: 8px; }
.card-m p { margin: 0; font-size: 14px; }

/* ===== BUKU ===== */
a.book { display: block; padding: 0; overflow: hidden; color: inherit; text-decoration: none; }
.book img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--cream); }
.book-info { padding: 16px 16px 18px; }
.book-info small { display: block; color: #8a8f8b; font-weight: 500; }
.book-info h5 { font-size: 15px; margin: 4px 0 2px; }
.book-info p { font-size: 13px; }
.book-info em { display: block; margin-top: 10px; color: var(--green); font-size: 13px; font-style: normal; font-weight: 700; }

/* ===== CTA & FOOTER ===== */
.cta { padding: 64px 0; background: var(--green); color: #dfe4dd; }
.cta small { color: var(--gold); font-weight: 600; letter-spacing: 2px; }
.cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0 12px; }
.cta p { margin: 0; max-width: 600px; }

.footer { padding: 56px 0 0; background: var(--green-dark); color: #b9c1b9; font-size: 14px; }
.footer h5 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer a { color: #b9c1b9; text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer .brand { color: #fff; font-size: 26px; font-weight: 800; }
.footer .brand span { color: var(--gold); }
.footer li i { width: 22px; color: var(--gold); }
.copyright { margin-top: 40px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; }

/* ===== HALAMAN DALAM (Tentang Kami, dst.) ===== */
.page-header { padding: clamp(40px, 6vw, 64px) 0; background: var(--green); color: #dfe4dd; }
.page-header h1 { margin: 0 0 8px; color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-header p { margin: 0; font-size: 14px; }
.page-header a { color: var(--gold); text-decoration: none; }
.page-header a:hover { color: #fff; }

.label { display: block; margin-bottom: 10px; color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: 2px; }
.about-title { margin-bottom: 18px; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.25; }
.about-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--cream); }

/* ===== TEKS BERFORMAT DARI ADMIN (rich editor) ===== */
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p { margin-bottom: 1rem; }
.rich-content h2, .rich-content h3 { margin: 1.75rem 0 .75rem; }
.rich-content h2 { font-size: 1.5rem; }
.rich-content h3 { font-size: 1.2rem; }
.rich-content ul, .rich-content ol { margin-bottom: 1rem; padding-left: 1.4rem; }
.rich-content li { margin-bottom: .35rem; }
.rich-content blockquote { margin: 1.25rem 0; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--gold); color: var(--ink); font-style: italic; }
.rich-content a { color: var(--green); text-decoration: underline; }
.rich-content a:hover { color: var(--green-dark); }

/* ===== HALAMAN LAYANAN / ARTIKEL ===== */
.article { max-width: 780px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 15px; }
.article h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; }
.article-meta { margin-bottom: 24px; color: #8a8f8b; font-size: 14px; font-weight: 500; }
.article-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 32px; border-radius: var(--radius); background: var(--cream); }
.article-content { font-size: 1.05rem; line-height: 1.8; }
.article-cta { margin-top: 2.5rem; padding: 28px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.article-cta h4 { margin-bottom: 8px; font-size: 1.15rem; }
.article-cta p { margin-bottom: 18px; font-size: 15px; }
.article-back { display: inline-block; margin-top: 32px; color: var(--green); font-size: 14px; font-weight: 600; text-decoration: none; }
.article-back:hover { color: var(--green-dark); text-decoration: underline; }
.rich-content li p { margin: 0; }

/* ===== DAFTAR BLOG ===== */
.daftar { max-width: 860px; margin: 0 auto; }
.daftar .baris { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.daftar .baris:first-child { border-top: 1px solid var(--line); }
.daftar .baris:hover { text-decoration: none; }
.daftar .meta { margin-bottom: 6px; color: #8a8f8b; font-size: 13px; font-weight: 500; }
.daftar .baris h2 { margin: 0 0 8px; font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.3; transition: color .2s; }
.daftar .baris:hover h2 { color: var(--green); }
.daftar .baris p { margin: 0; font-size: 15px; }
.daftar .go { flex: none; color: var(--green); font-size: 14px; font-weight: 700; white-space: nowrap; }
.daftar .go::after { content: " \2192"; }
@media (max-width: 575.98px) {
    .daftar .baris { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* paragraf pembuka artikel tampil sedikit lebih besar */
.post-body > p:first-child { color: var(--ink); font-size: 1.2rem; line-height: 1.7; }

/* ===== GAMBAR DI BLOG ===== */
.daftar .baris > div { flex: 1 1 auto; min-width: 0; }
.daftar .thumb { flex: none; width: 168px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--cream); }
@media (max-width: 575.98px) {
    .daftar .thumb { width: 100%; aspect-ratio: 16 / 9; }
}

/* gambar yang disisipkan di dalam isi artikel */
.rich-content img { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; border-radius: var(--radius); }

/* ===== GALERI ===== */
.galeri { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.galeri > p { grid-column: 1 / -1; }
.galeri figure { margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.galeri figure:hover { border-color: var(--green); transform: translateY(-3px); }
.galeri img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream); }
.galeri figcaption { padding: 14px 16px; color: var(--ink); font-size: 14px; font-weight: 600; }

/* tombol di dalam kartu (halaman Kontak): alamat email panjang boleh turun baris */
.card-m .btn-m { max-width: 100%; overflow-wrap: anywhere; }