/* Jejak Acara — base stylesheet (native CSS, no framework) */

:root {
    --color-bg: #f7f6f3;
    --color-surface: #ffffff;
    --color-border: #e0ddd5;
    --color-text: #2c2c2a;
    --color-text-muted: #767570;
    --color-accent: #185fa5;
    --color-accent-bg: #e6f1fb;
    --color-danger: #a32d2d;
    --color-success: #3b6d11;
    --radius: 8px;
    --radius-lg: 12px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-header .brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.site-header .admin-link {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* --- Search --- */
.search-bar {
    margin: 28px 0 20px;
}

.search-bar input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.search-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* --- Event grid --- */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.event-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.15s ease;
}

.event-card:hover {
    border-color: var(--color-accent);
}

.event-card a.card-banner-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.event-card .banner {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: var(--color-bg);
}

.event-card .banner-placeholder {
    width: 100%;
    height: 130px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.event-card .card-body {
    padding: 12px 14px 16px;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px;
}

.event-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.event-card .card-title:hover {
    text-decoration: underline;
}

.event-card .card-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 60px 0;
    font-size: 15px;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* --- Event page: breadcrumb + hero --- */
.breadcrumb {
    margin: 16px 0;
    font-size: 13px;
}

.event-banner {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.event-banner-placeholder {
    width: 100%;
    height: 200px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.event-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
}

.event-meta {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 16px;
}

.event-meta span + span {
    margin-left: 16px;
}

.event-description {
    font-size: 15px;
    margin: 0 0 32px;
    max-width: 700px;
}

/* --- Content sections --- */
.event-section {
    margin-bottom: 36px;
}

.event-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 14px;
}

.section-empty {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* --- Documents --- */
.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
}

.doc-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
}

.doc-list li + li {
    border-top: 1px solid var(--color-border);
}

.doc-type-tag {
    font-size: 12px;
    color: var(--color-text-muted);
}

.doc-row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* --- Photos --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.photo-grid figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.photo-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.photo-grid figcaption {
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 6px 8px;
}

.photo-grid-link,
.photo-grid-item {
    all: unset;
    display: block;
    cursor: pointer;
}

.photo-grid-link:focus-visible,
.photo-grid-item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* --- Galeri foto: toolbar & pagination (halaman gallery.php) --- */
.gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.gallery-toolbar-label {
    color: var(--color-text-muted);
}

.gallery-per-page-option {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
}

.gallery-per-page-option:hover {
    border-color: var(--color-accent);
}

.gallery-per-page-option.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

.gallery-toolbar-count {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: 13px;
}

.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    font-size: 14px;
}

.gallery-pagination-status {
    color: var(--color-text-muted);
}

.gallery-pagination-disabled {
    color: var(--color-border);
}

/* --- Galeri foto: lightbox --- */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 100;
    background: rgba(20, 19, 17, 0.92);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

body.lightbox-open {
    overflow: hidden;
}

.gallery-lightbox-image {
    max-width: min(92vw, 1100px);
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.gallery-lightbox-close {
    all: unset;
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
}

.gallery-lightbox-nav {
    all: unset;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    padding: 10px 16px;
    opacity: 0.85;
}

.gallery-lightbox-nav:hover {
    opacity: 1;
}

.gallery-lightbox-prev {
    left: 8px;
}

.gallery-lightbox-next {
    right: 8px;
}

.gallery-lightbox-footer {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
}

.gallery-lightbox-caption {
    font-size: 14px;
    margin: 0 0 4px;
}

.gallery-lightbox-counter {
    font-size: 12px;
    opacity: 0.7;
    margin: 0;
}

@media (max-width: 600px) {
    .gallery-lightbox-nav {
        font-size: 30px;
        padding: 8px 10px;
    }

    .gallery-lightbox-close {
        font-size: 26px;
    }
}

/* --- Rundown --- */
.rundown-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 14px;
}

.rundown-table th,
.rundown-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
}

.rundown-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 13px;
}

.rundown-table tr:last-child td {
    border-bottom: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .rundown-table {
    min-width: 560px;
}

/* --- Finance --- */
.finance-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .finance-columns {
        grid-template-columns: 1fr;
    }
}

.finance-column h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}

.finance-entry-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
}

.finance-entry-row .amount.income {
    color: var(--color-success);
}

.finance-entry-row .amount.expense {
    color: var(--color-danger);
}

.finance-group {
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    margin-top: 10px;
}

.finance-group-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin: 0 0 6px;
}

.finance-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid var(--color-border);
    padding-top: 6px;
    margin-top: 4px;
}

.finance-summary {
    border-top: 2px solid var(--color-border);
    margin-top: 24px;
    padding-top: 16px;
    display: grid;
    gap: 6px;
    max-width: 320px;
    font-size: 14px;
}

/* Public event page only (admin dashboard keeps the narrower version) */
.event-section .finance-summary {
    max-width: none;
}

.finance-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.finance-summary-row.balance {
    font-weight: 600;
    font-size: 16px;
    margin-top: 4px;
}

/* --- Susunan Panitia --- */
.committee-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
}

.committee-list li {
    padding: 12px 16px;
    font-size: 14px;
}

.committee-list li + li {
    border-top: 1px solid var(--color-border);
}

.committee-list li strong {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

/* --- Donasi Barang --- */
.donation-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.donation-item-row:last-child {
    border-bottom: none;
}

.donation-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.donation-item-info {
    flex: 1;
    min-width: 0;
}

.donation-item-main {
    font-size: 14px;
    margin: 0 0 2px;
    color: var(--color-text);
}

.donation-item-detail {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

/* --- Copy link button --- */
.copy-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.copy-link-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.copy-link-btn.copied {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #ffffff;
}

/* --- Finance toggle (collapsible Laporan Keuangan) --- */
.finance-toggle summary {
    display: inline-block;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-accent-bg);
    color: var(--color-accent);
}

.finance-toggle summary:hover {
    opacity: 0.88;
}

.finance-toggle summary::-webkit-details-marker {
    display: none;
}

.finance-toggle-chevron {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.finance-toggle[open] .finance-toggle-chevron {
    transform: rotate(180deg);
}

.finance-toggle-content {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

/* --- Not found --- */
.not-found {
    text-align: center;
    padding: 80px 0;
}

.not-found h1 {
    font-size: 22px;
    margin-bottom: 8px;
}
