/* ========================================================
    1. VARIABLES & DESIGN TOKENS (:root)
    ======================================================== */
:root {
    /* Color Palette (Tema Hijau Instansi & Aksentuasi Emas) */
    --primary: #006316;
    --primary-dark: #004c10;
    --primary-light: #eaf7ec;

    --accent: #d4af37;
    --accent-hover: #c99b00;

    --white: #ffffff;

    /* Typography Colors */
    --text: #1e293b;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    /* Structure Colors */
    --border: #dbe5d7;
    --bg: #f5f8f4;
    --bg-light: #f8fafc;

    /* Feedback / Shadow */
    --shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

/* ========================================================
    2. BASE STYLES & LAYOUT
    ======================================================== */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.main-content {
    max-width: 1300px;
    margin: auto;
    padding: 10px 20px;
}

h1.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-dark);
}

/* ========================================================
    3. HEADER & BRANDING
    ======================================================== */
.site-header {
    background: var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}

.header-top {
    height: 10px;
    background: linear-gradient(90deg, var(--primary), #0d8b24);
}

.header-branding {
    padding: 22px 0;
}

.logo-area {
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-area img {
    width: 85px;
}

.site-info h1 {
    margin: 0;
    color: var(--primary);
    font-size: 31px;
    font-weight: 700;
}

.site-info p {
    margin-top: 6px;
    color: var(--text-light);
}

/* ========================================================
    4. CALENDAR & AGENDA CONTAINER
    ======================================================== */
.siap-container {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.calendar-section {
    flex: 1.2;
    background: var(--white);
    padding: 30px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.details-section {
    flex: 0.8;
    min-width: 350px;
    background: var(--white);
    padding: 30px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

/* ========================================================
    5. CALENDAR COMPONENTS
    ======================================================== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.current-month-year {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-btn {
    border: 1px solid #e2e8f0;
    background: var(--white);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 25px;
    column-gap: 10px;
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.day-name {
    font-weight: 500;
    color: var(--text-light);
    font-size: 14px;
    padding-bottom: 10px;
}

.day-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.day-cell {
    position: relative; /* WAJIB: Agar posisi titik absolute mengacu ke cell ini */
    width: 55px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    user-select: none;
    transition: all 0.2s ease;
    z-index: 1; /* Pastikan di atas background */
}

.day-cell.other-month {
    color: #cbd5e1;
}

.day-cell .event-dot {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    background-color: var(--accent) !important; /* Memaksa warna emas tetap muncul */
    border-radius: 50%;
    position: absolute;
    bottom: 6px; /* Mengatur jarak dari bawah cell tanggal */
    left: 50%;
    transform: translateX(-50%); /* Memastikan titik tepat berada di tengah horizontal */
    z-index: 2; /* Berada di atas cell */
}

.day-cell.selected {
    background-color: var(--primary);
    color: var(--white) !important;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0, 99, 22, 0.35);
}

.day-cell.selected .event-dot {
    background-color: var(--white) !important; /* Berubah jadi putih agar kontras dengan warna hijau */
    bottom: 6px;
}

/* ========================================================
    6. DETAILS & AGENDA CARDS
    ======================================================== */
.details-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.agenda-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--primary);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 15px;
    transition: .25s ease;
    animation: fadeIn 0.3s ease;
}

.agenda-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.agenda-icon-box {
    color: var(--accent);
    font-size: 18px;
    margin-top: 2px;
}

.agenda-content h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
}

.agenda-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    gap: 15px;
}

.no-agenda {
    color: var(--text-muted);
    font-style: italic;
    font-size: 14px;
}

.badge-pimpinan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
    7. FOOTER
    ======================================================== */
.site-footer {
    margin-top: 70px;
    background: #111;
    color: #ddd;
    font-size: 15px;
    line-height: 1.7;
}

.footer-main {
    padding: 50px 20px;
}

/* Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Kolom */
.footer-column h3 {
    color: var(--accent);
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 600;
}

.footer-column p {
    margin: 0 0 12px;
    color: #ccc;
}

/* Google Maps */
.footer-column iframe {
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,.3);
}

/* Footer Bottom */
.footer-bottom {
    background: #0b0b0b;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
    padding: 18px 20px;
    font-size: 14px;
    color: #999;
}

/* ========================================================
    8. RESPONSIVE MEDIA QUERIES
    ======================================================== */
@media (max-width: 992px) {
    .logo-area {
        flex-direction: column;
        text-align: center;
    }
    .siap-container {
        flex-direction: column;
    }
    .details-section {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    h1.page-title {
        font-size: 24px;
        margin-bottom: 25px;
        text-align: center;
    }
    .calendar-section, .details-section {
        padding: 18px;
    }
    .calendar-grid {
        row-gap: 15px;
        column-gap: 5px;
    }
    .day-cell {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }
    .day-cell.selected {
        width: 42px;
        height: 42px;
    }
    .day-cell .event-dot {
        width: 5px;
        height: 5px;
        bottom: 4px;
    }
    .logo-area img {
        width: 65px;
    }
    .site-info h1 {
        font-size: 22px;
    }
    .site-info p {
        font-size: 13px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    iframe {
        height: 220px;
    }
    .footer-main {
        padding: 40px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-column h3 {
        font-size: 20px;
    }

    .footer-column iframe {
        height: 240px;
    }

    .footer-bottom {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .page-title {
        text-align: center;
    }
    .day-name {
        font-size: 11px;
    }
    .current-month-year {
        font-size: 18px;
    }
    .nav-btn {
        width: 32px;
        height: 32px;
    }
    .agenda-card {
        padding: 15px;
    }
    .agenda-meta {
        flex-direction: column;
        gap: 5px;
    }
}