/* =========================================
   COLORS AND BASE
   ========================================= */

:root {
    --brand: #49345f;
    --brand-dark: #352445;
    --accent: #a45532;

    --bg: #f7f5f1;
    --surface: #ffffff;
    --surface-muted: #efebe5;

    --text: #25232a;
    --text-soft: #625d69;
    --line: #ddd6cd;

    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding-bottom: 145px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

button,
input {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #b9a3d4;
    outline-offset: 3px;
}

.site-shell {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 14px;
    z-index: 10000;
    padding: 10px 16px;
    border-radius: 6px;
    background: #fff;
}

.skip-link:focus {
    top: 12px;
}


/* =========================================
   HEADER
   ========================================= */

.hybrid-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 1px 4px rgb(37 35 42 / 3%);
}

.hybrid-header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 76px;
    padding-block: 15px;
}

.hybrid-brand {
    flex: 1;
    min-width: 0;
    color: var(--brand);
    font-size: 23px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -.5px;
    overflow-wrap: anywhere;
}

.hybrid-brand:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

.hybrid-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hybrid-nav a {
    color: var(--text-soft);
    font-size: 14px;
    white-space: nowrap;
}

.hybrid-nav a:hover {
    color: var(--brand);
    text-decoration: none;
}

.hybrid-search {
    display: flex;
    align-items: center;
    width: 270px;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.hybrid-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.hybrid-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
}

.hybrid-search button:hover {
    background: var(--surface-muted);
}


/* =========================================
   MAIN LAYOUT
   ========================================= */

.site-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 40px;
    padding-block: 30px 55px;
}

.site-main,
.site-sidebar {
    min-width: 0;
}

.site-sidebar {
    display: grid;
    gap: 25px;
}

.ed-intro {
    margin: 28px 0 24px;
}

.ed-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ed-intro h1 {
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: clamp(28px, 3.5vw, 36px);
    line-height: 1.2;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.ed-intro p:not(.ed-kicker) {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
}


/* =========================================
   ARTICLE CARDS — DEFAULT / SEARCH
   ========================================= */

.ed-list {
    display: grid;
    gap: 23px;
}

.ed-item {
    padding: 27px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 6px rgb(37 35 42 / 4%);
}

.ed-item-layout {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.ed-item-copy {
    flex: 1;
    min-width: 0;
}

.ed-item h2 {
    margin: 0 0 11px;
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
}

.ed-item h2 a {
    color: var(--text);
}

.ed-item h2 a:hover {
    color: var(--brand);
    text-decoration: none;
}

.ed-excerpt {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.ed-article-date {
    margin: 0 0 10px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.6;
}

.ed-readmore {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
}

.ed-thumb {
    flex-shrink: 0;
}

.ed-thumb img {
    display: block;
    width: 140px;
    height: 105px;
    border-radius: 8px;
    background: var(--surface-muted);
    object-fit: cover;
}

.ed-empty {
    padding: 28px 0;
    color: var(--text-soft);
}

.ed-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 28px;
    color: var(--text-soft);
    font-size: 13px;
}

.ed-pagination a {
    padding: 9px 15px;
    border: 1px solid var(--brand);
    border-radius: 7px;
    background: var(--surface);
    font-weight: 600;
}


/* =========================================
   HOME — ONE PANEL WITH ARTICLE DIVIDERS
   ========================================= */

/* Satu panel untuk seluruh daftar */
#home-collection-feed {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 6px rgb(37 35 42 / 3%);
}

/* Setiap artikel menjadi baris, bukan kartu */
#home-collection-feed > .home-collection-row {
    position: relative;
    display: block;

    margin: 0;
    padding: 25px 27px;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Satu garis tipis di antara artikel */
#home-collection-feed
> .home-collection-row
+ .home-collection-row::before {
    content: "";

    position: absolute;
    top: 0;
    right: 27px;
    left: 27px;

    height: 1px;
    background: var(--line);
}

/*
 * Hilangkan dekorasi kartu dari partial.
 * Display flex/grid di dalam artikel tetap dipertahankan.
 */
#home-collection-feed > .home-collection-row > *,
#home-collection-feed .ed-item,
#home-collection-feed .ed-card {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Susunan teks dan gambar */
#home-collection-feed .ed-item-layout {
    align-items: flex-start;
    gap: 22px;
}

/* Judul tetap serif sesuai identitas website */
#home-collection-feed .ed-item h2 {
    margin: 0 0 9px;

    font-family: var(--serif);
    font-size: 23px;
    line-height: 1.35;
    letter-spacing: -.015em;
}

/* Cuplikan sedikit lebih ringkas */
#home-collection-feed .ed-excerpt {
    margin: 0 0 10px;

    font-size: 14px;
    line-height: 1.75;

    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Tanggal tidak terlalu dominan */
#home-collection-feed .ed-article-date {
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1.6;
}

/* Link baca tetap tersedia */
#home-collection-feed .ed-readmore {
    font-size: 12px;
    font-weight: 700;
}

/* Gambar tetap di kanan */
#home-collection-feed .ed-thumb img {
    width: 140px;
    height: 105px;
    border-radius: 6px;
    object-fit: cover;
}

/* Kondisi kosong */
#home-collection-feed .home-collection-empty {
    margin: 0;
    padding: 27px;
    color: var(--text-soft);
}

/* =========================================
   SIDEBAR
   ========================================= */

.ed-widget {
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 6px rgb(37 35 42 / 4%);
}

.ed-widget h2 {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ed-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ed-widget li + li {
    border-top: 1px solid var(--line);
}

.ed-widget li a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ed-widget li:last-child a {
    padding-bottom: 0;
}

.ed-widget li a:hover {
    color: var(--brand);
    text-decoration: none;
}

.ed-widget-arrow {
    flex-shrink: 0;
    color: var(--accent);
}


/* =========================================
   INFORMATION PAGES
   ========================================= */

.info-document {
    margin-top: 26px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 6px rgb(37 35 42 / 4%);
    overflow-wrap: anywhere;
}

.info-document h1 {
    margin: 0 0 18px;
    font-family: var(--serif);
    font-size: 34px;
    line-height: 1.25;
}

.info-document h2 {
    margin: 30px 0 11px;
    font-family: var(--serif);
    font-size: 23px;
    line-height: 1.35;
}

.info-document p {
    margin: 0 0 17px;
}

.info-document ul,
.info-document ol {
    padding-left: 23px;
}

.info-document ul {
    list-style: disc;
}

.info-document ol {
    list-style: decimal;
}

.info-document li {
    margin-bottom: 9px;
}

.info-meta {
    color: var(--text-soft);
    font-size: 13px;
}

.contact-box {
    margin: 20px 0;
    padding: 17px 19px;
    border-left: 3px solid var(--brand);
    background: var(--surface-muted);
}


/* =========================================
   FOOTER
   ========================================= */

.ed-footer {
    margin-top: 20px;
    background: var(--brand-dark);
    color: #ddd3e9;
    font-size: 13px;
}

.ed-footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
    padding-block: 32px;
}

.ed-footer-name {
    color: #fff;
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: .08em;
}

.ed-footer p {
    max-width: 420px;
    margin: 8px 0 0;
}

.ed-footer nav {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 23px;
}

.ed-footer a {
    color: #fff;
}


/* =========================================
   ADS — COMMON
   ========================================= */

.site-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.site-ad.ad-top,
.ad-top .ad-content {
    min-height: 90px;
}

.site-ad.ad-sidebar,
.ad-sidebar .ad-content {
    min-height: 250px;
}

/* Hide preview elements and our own labels */
.ad-label,
.ad-placeholder {
    display: none;
}


/* =========================================
   ADS — LEFT AND RIGHT VIEWPORT RAILS
   ========================================= */

.site-ad.ad-left,
.site-ad.ad-right {
    display: none;
    position: fixed;

    top: 110px;
    bottom: auto;
    z-index: 20;

    align-items: center;
    justify-content: flex-start;

    width: 160px;
    min-width: 160px;
    min-height: 600px;
    height: auto;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.site-ad.ad-left {
    left: 10px;
    right: auto;
}

.site-ad.ad-right {
    right: 10px;
    left: auto;
}

.site-ad.ad-left .ad-content,
.site-ad.ad-right .ad-content {
    align-items: flex-start;
    justify-content: center;

    width: 160px;
    min-width: 160px;
    min-height: 600px;

    margin: 0;
    padding: 0;
}


/* =========================================
   FLOATING AD VISIBILITY
   ========================================= */

.mobileShow {
    display: none;
}

.mobileHide {
    display: inline;
}


/* =========================================
   RESPONSIVE — WIDE DESKTOP
   ========================================= */

@media (min-width: 1640px) {
    .site-ad.ad-left,
    .site-ad.ad-right {
        display: flex;
    }
}

/* Avoid a 600px fixed banner overflowing a short viewport */
@media (max-height: 729px) {
    .site-ad.ad-left,
    .site-ad.ad-right {
        display: none;
    }
}

/* =========================================
   FLOATING AD — SINGLE RESPONSIVE SLOT
   ========================================= */

.public-floating-ad[hidden] {
    display: none !important;
}

.public-floating-ad {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    margin: 0;
    padding: 0;

    pointer-events: none;
}

.public-floating-content {
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.public-floating-close {
    align-self: center;
    margin: 0;
    padding: 4px 10px;

    border: 0;
    border-radius: 4px 4px 0 0;

    background: #49345f;
    color: #fff;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;

    pointer-events: auto;
}

.public-floating-close:hover {
    background: #352445;
}

@media (max-width: 767px) {
    body {
        padding-bottom: 290px;
    }
}

/* =========================================
   RESPONSIVE — HEADER
   ========================================= */

@media (max-width: 1050px) {
    .hybrid-header-inner {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    .hybrid-brand {
        flex-basis: 100%;
    }

    .hybrid-search {
        margin-left: auto;
    }
}


/* =========================================
   RESPONSIVE — SINGLE COLUMN
   ========================================= */

@media (max-width: 960px) {
    .site-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
}


/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */

@media (max-width: 640px) {
    .site-shell {
        width: calc(100% - 28px);
    }

    .hybrid-brand {
        font-size: 21px;
    }

    .hybrid-nav {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .hybrid-nav a {
        font-size: 13px;
    }

    .hybrid-search {
        width: 100%;
        margin-left: 0;
    }

    .ed-item {
        padding: 22px;
    }

    .ed-item h2 {
        font-size: 22px;
    }

    .ed-thumb {
        display: none;
    }

    .info-document {
        padding: 22px;
    }

    #home-collection-feed > .home-collection-row,
    #home-collection-feed .home-collection-empty {
        padding: 21px 20px;
    }

    #home-collection-feed
    > .home-collection-row
    + .home-collection-row::before {
        right: 20px;
        left: 20px;
    }

    #home-collection-feed .ed-item h2 {
        font-size: 21px;
    }

    #home-collection-feed .ed-excerpt {
        font-size: 14px;
    }
}


/* =========================================
   RESPONSIVE — SMALL MOBILE / ADS
   ========================================= */

@media (max-width: 480px) {
    .site-ad.ad-top,
    .ad-top .ad-content {
        min-height: 250px;
    }

    .mobileShow {
        display: inline;
    }

    .mobileHide {
        display: none;
    }
}