/* ============================================================
   REGULASI KEARSIPAN — Scholarly Retro Document Library
   ============================================================ */

.regul {
    --c-navy: #1e3a5f;
    --c-navy-soft: #e8eff7;
    --c-blue: #2e5b8a;
    --c-blue-soft: #e6eef7;
    --c-gold: #b08947;
    --c-gold-soft: #f5edd9;
    --c-green: #2a5934;
    --c-green-soft: #e6f0e8;
    --c-red: #a23b3b;
    --c-red-soft: #f6e4e4;
    --c-gray: #5e5b54;
    --c-gray-soft: #efeee9;
    --c-cream: #faf6eb;
    --c-cream-2: #f0ede0;
    --c-text: #2b1810;
    --c-text-muted: #6b5d4a;
    --c-border: #d4c5a0;
}

/* ============ HERO ============ */
.regul-hero {
    background: linear-gradient(135deg, var(--c-cream) 0%, var(--c-cream-2) 100%);
    border-bottom: 1px solid var(--c-border);
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.regul-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at top, rgba(176,137,71,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.regul-hero__inner {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
}
.regul-hero__eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.25em;
    color: var(--c-gold);
    margin: 0 0 0.875rem;
    font-weight: 600;
}
.regul-hero__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: var(--c-text);
    margin: 0 0 0.875rem;
    line-height: 1.1;
    font-weight: 600;
}
.regul-hero__title em { font-style: italic; color: var(--c-gold); }
.regul-hero__lead {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    color: var(--c-text-muted);
    line-height: 1.65;
    margin: 0 auto 1.75rem;
    max-width: 620px;
}
.regul-hero__ornament {
    font-size: 1.25rem;
    color: var(--c-gold);
    letter-spacing: 1rem;
    margin: 1.25rem 0;
    opacity: 0.6;
}

/* ============ SEARCH BAR ============ */
.regul-search {
    max-width: 580px;
    margin: 0 auto;
    position: relative;
}
.regul-search__input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-family: 'Lora', serif;
    font-size: 1rem;
    background: white;
    border: 2px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.regul-search__input:focus {
    outline: none;
    border-color: var(--c-gold);
    box-shadow: 0 0 0 4px rgba(176,137,71,0.15);
}
.regul-search__icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-gold);
    font-size: 1.25rem;
    pointer-events: none;
}
.regul-search__submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1.25rem;
    background: var(--c-gold);
    color: white;
    border: none;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.regul-search__submit:hover { background: #8d6c33; }

/* ============ FILTER BAR ============ */
.regul-filters {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.regul-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.18s;
}
.regul-pill:hover { border-color: var(--c-gold); color: var(--c-gold); transform: translateY(-1px); }
.regul-pill .ti { font-size: 0.95rem; }
.regul-pill__count {
    background: var(--c-cream-2);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--c-text-muted);
}
.regul-pill.is-active { background: var(--c-text); border-color: var(--c-text); color: white; }
.regul-pill.is-active .regul-pill__count { background: var(--c-gold); color: white; }

/* ============ LIST ============ */
.regul-list-wrap {
    max-width: 1100px;
    margin: 1.5rem auto 4rem;
    padding: 0 1.5rem;
}
.regul-list-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.regul-list-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--c-text);
    margin: 0;
    font-weight: 600;
}
.regul-list-count {
    color: var(--c-text-muted);
    font-size: 0.9rem;
    font-family: 'Lora', serif;
}

/* Card grid 2 column */
.regul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1rem;
}
@media (max-width: 560px) {
    .regul-grid { grid-template-columns: 1fr; }
}

/* ============ CARD ============ */
.regul-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--c-text);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    position: relative;
}
.regul-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43,24,16,0.1);
    border-color: var(--c-gold);
}
.regul-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--c-gold-soft);
    color: var(--c-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}
.regul-card__body { flex: 1; min-width: 0; }
.regul-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
.regul-card__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--c-text);
    margin: 0 0 0.4rem;
    line-height: 1.3;
    font-weight: 600;
}
.regul-card__tentang {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: var(--c-text-muted);
    line-height: 1.55;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.regul-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--c-text-muted);
    font-family: 'Lora', serif;
    border-top: 1px dashed var(--c-border);
    padding-top: 0.5rem;
    margin-top: 0.35rem;
}
.regul-card__footer-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.regul-card__footer .ti { font-size: 13px; }

/* Card jadi grayed kalau belum ada file */
.regul-card--nofile {
    opacity: 0.6;
    background: var(--c-cream);
}
.regul-card--nofile .regul-card__icon {
    background: var(--c-gray-soft);
    color: var(--c-gray);
}

/* ============ BADGES (jenis) ============ */
.regul-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 0.15em;
    font-weight: 600;
    text-transform: uppercase;
}
.regul-badge .ti { font-size: 11px; }

.regul-badge--navy   { background: var(--c-navy-soft); color: var(--c-navy); }
.regul-badge--blue   { background: var(--c-blue-soft); color: var(--c-blue); }
.regul-badge--gold   { background: var(--c-gold-soft); color: var(--c-gold); }
.regul-badge--green  { background: var(--c-green-soft); color: var(--c-green); }
.regul-badge--red    { background: var(--c-red-soft); color: var(--c-red); }
.regul-badge--gray   { background: var(--c-gray-soft); color: var(--c-gray); }

.regul-badge--lg {
    padding: 0.35rem 0.875rem;
    font-size: 11px;
    letter-spacing: 0.18em;
}

/* Level chip */
.regul-level {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 11px;
    color: var(--c-text-muted);
    font-family: 'Lora', serif;
}
.regul-level .ti { font-size: 12px; }

/* ============ DETAIL PAGE ============ */
.regul-detail-hero {
    background: linear-gradient(135deg, var(--c-cream) 0%, var(--c-cream-2) 100%);
    border-bottom: 1px solid var(--c-border);
    padding: 2.5rem 1.5rem 2rem;
}
.regul-detail-hero__inner {
    max-width: 980px;
    margin: 0 auto;
}
.regul-crumb {
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    color: var(--c-text-muted);
    margin-bottom: 0.875rem;
}
.regul-crumb a {
    color: var(--c-text-muted);
    text-decoration: none;
}
.regul-crumb a:hover { color: var(--c-gold); }
.regul-crumb-sep { margin: 0 0.4rem; opacity: 0.5; }

.regul-detail__meta-line {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.regul-detail__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: var(--c-text);
    margin: 0 0 0.875rem;
    line-height: 1.18;
    font-weight: 600;
}
.regul-detail__tentang {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--c-text-muted);
    line-height: 1.55;
    font-style: italic;
    border-left: 3px solid var(--c-gold);
    padding-left: 0.875rem;
    margin: 0;
    max-width: 720px;
}

.regul-detail-body {
    max-width: 980px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}
@media (max-width: 880px) {
    .regul-detail-body { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* PDF Viewer */
.regul-viewer {
    background: white;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    overflow: hidden;
}
.regul-viewer__header {
    padding: 0.625rem 1rem;
    background: var(--c-cream);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-family: 'Lora', serif;
    color: var(--c-text);
}
.regul-viewer__iframe {
    width: 100%;
    height: 750px;
    border: 0;
    display: block;
    background: #f5f3ed;
}
@media (max-width: 768px) {
    .regul-viewer__iframe { height: 480px; }
}
.regul-viewer__noplugin {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--c-text-muted);
    font-family: 'Lora', serif;
}
.regul-viewer__noplugin .ti {
    font-size: 3rem;
    color: var(--c-gold);
    opacity: 0.5;
    display: block;
    margin-bottom: 0.5rem;
}

/* Action buttons */
.regul-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.regul-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid var(--c-border);
    background: white;
    color: var(--c-text);
    cursor: pointer;
    transition: all 0.18s;
}
.regul-btn:hover { border-color: var(--c-gold); color: var(--c-gold); }
.regul-btn--primary {
    background: var(--c-gold);
    border-color: var(--c-gold);
    color: white;
}
.regul-btn--primary:hover {
    background: #8d6c33;
    border-color: #8d6c33;
    color: white;
}

/* Sidebar */
.regul-sidebar { align-self: start; }
.regul-sidebar__card {
    background: var(--c-cream);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.regul-sidebar__title {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--c-gold);
    margin: 0 0 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}
.regul-sidebar__item {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    align-items: flex-start;
}
.regul-sidebar__item .ti {
    color: var(--c-gold);
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.regul-sidebar__label {
    color: var(--c-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.1rem;
}
.regul-sidebar__value { color: var(--c-text); }

/* Related */
.regul-related {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--c-border);
}
.regul-related__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--c-text);
    margin: 0 0 1rem;
    font-weight: 600;
}
.regul-related__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.regul-related__item {
    border-bottom: 1px dashed var(--c-border);
    padding: 0.625rem 0;
}
.regul-related__item a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--c-text);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
}
.regul-related__item a:hover { color: var(--c-gold); }
.regul-related__item .ti { color: var(--c-gold); }

/* ============ PAGINATION ============ */
.regul-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.regul-pagination a,
.regul-pagination__current,
.regul-pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.65rem;
    border-radius: 6px;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--c-text);
    border: 1px solid var(--c-border);
    background: white;
    transition: all 0.18s;
}
.regul-pagination a:hover { border-color: var(--c-gold); color: var(--c-gold); }
.regul-pagination__current {
    background: var(--c-text);
    color: white;
    border-color: var(--c-text);
    font-weight: 600;
}
.regul-pagination__dots { border: none; background: transparent; }

/* Empty state */
.regul-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--c-text-muted);
    font-family: 'Lora', serif;
}
.regul-empty__icon {
    font-size: 4rem;
    color: var(--c-gold);
    opacity: 0.4;
    margin-bottom: 1rem;
}
