/* ============================================================
   KalenderLengkap.id — Main stylesheet
   A clean, modern Indonesian calendar site with batik accents.
   No frameworks, pure CSS. Mobile-first.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    /* Colors — inspired by traditional Indonesian batik (sogan brown, indigo, cream) */
    --c-bg: #fefcf8;
    --c-bg-alt: #f6f1e6;
    --c-surface: #ffffff;
    --c-text: #1a1612;
    --c-text-soft: #5c544a;
    --c-text-muted: #8a8174;
    --c-border: #e8dfc9;
    --c-border-soft: #f0e9d4;
    --c-primary: #8b4513;      /* sogan brown */
    --c-primary-dark: #5d2e0c;
    --c-primary-light: #d4a574;
    --c-accent: #1e3a5f;       /* indigo */
    --c-accent-light: #3a5a8a;
    --c-red: #c0392b;          /* tanggal merah */
    --c-red-light: #fdecea;
    --c-green: #27ae60;
    --c-yellow: #f39c12;
    --c-shadow: rgba(60, 40, 20, 0.08);
    --c-shadow-strong: rgba(60, 40, 20, 0.15);

    /* Type */
    --f-display: 'Playfair Display', 'Georgia', serif;
    --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --f-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;
    --s-8: 4rem;

    /* Layout */
    --container: 1140px;
    --container-narrow: 760px;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    min-height: 100vh;
    overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--c-primary); text-decoration: underline; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }
input, select, textarea { font: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: var(--s-4); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: var(--s-7) 0 var(--s-4); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: var(--s-5) 0 var(--s-3); }
h4 { font-size: 1.1rem; margin: var(--s-4) 0 var(--s-2); }
p { margin-bottom: var(--s-4); }
ul, ol { padding-left: 1.25rem; margin-bottom: var(--s-4); }
li { margin-bottom: var(--s-2); }
strong { font-weight: 600; color: var(--c-text); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-4); }
.section { padding: var(--s-7) 0; }

/* ---------- Header ---------- */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--c-shadow);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--s-3) var(--s-4);
    max-width: var(--container);
    margin: 0 auto;
}
.logo {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--s-2);
}
.logo:hover { color: var(--c-primary-dark); text-decoration: none; }
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--c-primary);
    color: var(--c-bg);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-family: var(--f-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

/* Nav */
.main-nav ul { list-style: none; display: flex; gap: var(--s-5); padding: 0; margin: 0; }
.main-nav a {
    color: var(--c-text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--s-2) 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.main-nav a:hover { color: var(--c-primary); border-bottom-color: var(--c-primary); text-decoration: none; }
.main-nav a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

.nav-toggle { display: none; }

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        background: none;
        font-size: 1.5rem;
        color: var(--c-text);
        padding: var(--s-2);
    }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .main-nav.open { max-height: 400px; }
    .main-nav ul { flex-direction: column; gap: 0; padding: var(--s-3); }
    .main-nav li { margin: 0; }
    .main-nav a { display: block; padding: var(--s-3); border-bottom: 1px solid var(--c-border-soft); }
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #fefcf8 0%, #f6f1e6 100%);
    padding: var(--s-7) 0 var(--s-8);
    border-bottom: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero h1 { color: var(--c-primary-dark); }
.hero-lead { font-size: 1.15rem; color: var(--c-text-soft); max-width: 640px; margin: 0 auto var(--s-5); }

/* Today widget */
.today-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--s-6);
    margin: var(--s-5) auto;
    max-width: 720px;
    box-shadow: 0 4px 20px var(--c-shadow);
    position: relative;
}
.today-card .pill {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-primary);
    color: var(--c-bg);
    padding: var(--s-1) var(--s-3);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--s-4);
    margin-top: var(--s-4);
}
.today-cell {
    text-align: center;
    padding: var(--s-3);
    background: var(--c-bg-alt);
    border-radius: var(--radius);
}
.today-cell .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-text-muted); margin-bottom: var(--s-2); }
.today-cell .value { font-family: var(--f-display); font-size: 1.1rem; font-weight: 600; color: var(--c-text); }
.today-main {
    font-family: var(--f-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--c-primary-dark);
    text-align: center;
    margin-bottom: var(--s-2);
}
.today-weton {
    text-align: center;
    color: var(--c-accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--s-3);
}
.today-status {
    text-align: center;
    padding: var(--s-2) var(--s-4);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
}
.status-libur { background: var(--c-red-light); color: var(--c-red); }
.status-kerja { background: #e8f5e9; color: var(--c-green); }

@media (max-width: 600px) {
    .today-grid { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ---------- Tool grid (homepage) ---------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--s-4);
    margin: var(--s-5) 0;
}
.tool-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--s-5);
    text-decoration: none;
    color: var(--c-text);
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}
.tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--c-primary-light);
    box-shadow: 0 8px 24px var(--c-shadow);
    text-decoration: none;
    color: var(--c-text);
}
.tool-card .tool-icon {
    width: 44px;
    height: 44px;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    color: var(--c-primary);
    margin-bottom: var(--s-2);
}
.tool-card h3 {
    margin: 0 0 var(--s-1);
    font-size: 1.1rem;
    color: var(--c-primary-dark);
}
.tool-card p {
    color: var(--c-text-soft);
    font-size: 0.92rem;
    margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: var(--s-3) var(--s-5);
    background: var(--c-primary);
    color: var(--c-bg);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid var(--c-primary);
    cursor: pointer;
}
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: var(--c-bg); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--c-primary); }
.btn-secondary:hover { background: var(--c-primary); color: var(--c-bg); }

/* ---------- Calendar grid ---------- */
.calendar-grid {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--s-5) 0;
}
.calendar-header {
    padding: var(--s-4);
    background: var(--c-bg-alt);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-3);
}
.calendar-header h2 { margin: 0; font-size: 1.4rem; color: var(--c-primary-dark); }
.calendar-nav { display: flex; gap: var(--s-2); }
.calendar-nav a {
    padding: var(--s-2) var(--s-3);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text-soft);
    font-size: 0.9rem;
    text-decoration: none;
}
.calendar-nav a:hover { background: var(--c-primary); color: var(--c-bg); border-color: var(--c-primary); text-decoration: none; }

.cal-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface);
}
.cal-table th {
    padding: var(--s-3) var(--s-2);
    background: var(--c-bg-alt);
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-text-soft);
    border-bottom: 1px solid var(--c-border);
}
.cal-table th:first-child, .cal-table td.sunday { color: var(--c-red); }
.cal-table td {
    padding: var(--s-3) var(--s-2);
    text-align: center;
    border: 1px solid var(--c-border-soft);
    vertical-align: top;
    min-height: 60px;
    width: 14.28%;
    position: relative;
}
.cal-table td.empty { background: var(--c-bg-alt); }
.cal-table td.today {
    background: var(--c-primary);
    color: var(--c-bg);
    font-weight: 700;
}
.cal-table td.holiday { background: var(--c-red-light); }
.cal-table td.holiday .day-num { color: var(--c-red); font-weight: 700; }
.cal-table td a { color: inherit; text-decoration: none; display: block; }
.cal-table .day-num { font-size: 1.1rem; font-weight: 600; }
.cal-table .pasaran { font-size: 0.7rem; color: var(--c-text-muted); margin-top: 2px; }
.cal-table td.today .pasaran { color: var(--c-bg); opacity: 0.85; }

@media (max-width: 600px) {
    .cal-table td { padding: var(--s-2) 2px; min-height: 50px; }
    .cal-table .day-num { font-size: 0.95rem; }
    .cal-table .pasaran { font-size: 0.6rem; }
    .cal-table th { font-size: 0.75rem; padding: var(--s-2) 2px; }
}

/* ---------- Forms / Tools ---------- */
.tool-box {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--s-6);
    margin: var(--s-5) 0;
    box-shadow: 0 2px 10px var(--c-shadow);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}
.form-row.two-cols { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) {
    .form-row.two-cols { grid-template-columns: 1fr; }
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-text-soft);
    margin-bottom: var(--s-1);
}
.form-group input, .form-group select {
    width: 100%;
    padding: var(--s-3);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--c-bg);
    color: var(--c-text);
    transition: border-color 0.18s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

/* Result display */
.result-box {
    background: linear-gradient(135deg, var(--c-bg-alt) 0%, var(--c-bg) 100%);
    border: 2px solid var(--c-primary-light);
    border-radius: var(--radius-lg);
    padding: var(--s-5);
    margin-top: var(--s-4);
}
.result-box h3 { color: var(--c-primary-dark); margin-top: 0; }
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--s-3);
    margin: var(--s-3) 0;
}
.result-item {
    background: var(--c-surface);
    padding: var(--s-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border-soft);
}
.result-item .label { font-size: 0.75rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.result-item .value { font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; color: var(--c-primary-dark); margin-top: 2px; }

/* ---------- Holiday list ---------- */
.holiday-list {
    list-style: none;
    padding: 0;
    margin: var(--s-4) 0;
}
.holiday-list li {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3);
    border-bottom: 1px solid var(--c-border-soft);
    margin: 0;
}
.holiday-list li:hover { background: var(--c-bg-alt); }
.holiday-date {
    flex-shrink: 0;
    width: 70px;
    text-align: center;
    background: var(--c-bg-alt);
    border-radius: var(--radius-sm);
    padding: var(--s-2);
}
.holiday-date .d { font-size: 1.4rem; font-weight: 700; color: var(--c-red); font-family: var(--f-display); }
.holiday-date .m { font-size: 0.75rem; color: var(--c-text-muted); text-transform: uppercase; }
.holiday-info { flex: 1; }
.holiday-info .name { font-weight: 600; color: var(--c-text); }
.holiday-info .type {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: var(--s-2);
}
.type-libur { background: var(--c-red-light); color: var(--c-red); }
.type-cuti { background: #fff3e0; color: var(--c-yellow); }

/* ---------- FAQ ---------- */
.faq-list { margin: var(--s-5) 0; }
.faq-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    margin-bottom: var(--s-3);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: var(--s-4);
    font-family: var(--f-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-text);
    background: var(--c-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
}
.faq-question:hover { background: var(--c-bg-alt); }
.faq-question .icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 100px;
    background: var(--c-bg-alt);
    display: grid;
    place-items: center;
    color: var(--c-primary);
    transition: transform 0.2s;
    font-weight: 700;
}
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer {
    padding: 0 var(--s-4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--c-text-soft);
}
.faq-item.open .faq-answer { padding: 0 var(--s-4) var(--s-4); max-height: 800px; }

/* ---------- Article content ---------- */
.article {
    max-width: var(--container-narrow);
    margin: 0 auto;
}
.article h2 { border-bottom: 2px solid var(--c-border); padding-bottom: var(--s-2); }
.article p { color: var(--c-text-soft); }
.article ul, .article ol { color: var(--c-text-soft); }

/* Tables in content */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-4) 0;
    background: var(--c-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--c-border);
}
.content-table th {
    background: var(--c-bg-alt);
    padding: var(--s-3);
    text-align: left;
    font-family: var(--f-display);
    color: var(--c-primary-dark);
    font-weight: 600;
}
.content-table td {
    padding: var(--s-3);
    border-top: 1px solid var(--c-border-soft);
    color: var(--c-text-soft);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    margin: var(--s-4) 0;
}
.breadcrumbs a { color: var(--c-text-muted); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs .sep { margin: 0 var(--s-2); }

/* ---------- Related/Internal link blocks ---------- */
.related-block {
    background: var(--c-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--s-5);
    margin: var(--s-6) 0;
}
.related-block h3 { margin-top: 0; color: var(--c-primary-dark); }
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--s-3);
}
.related-grid a {
    background: var(--c-surface);
    padding: var(--s-3);
    border-radius: var(--radius);
    border: 1px solid var(--c-border-soft);
    color: var(--c-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.18s;
}
.related-grid a:hover { background: var(--c-primary); color: var(--c-bg); border-color: var(--c-primary); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
    background: #2a1f17;
    color: #d4c4ad;
    padding: var(--s-7) 0 var(--s-4);
    margin-top: var(--s-8);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--s-5);
    margin-bottom: var(--s-5);
}
.footer-col h4 {
    font-family: var(--f-display);
    color: var(--c-bg);
    margin: 0 0 var(--s-3);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a { color: #d4c4ad; font-size: 0.92rem; }
.footer-col a:hover { color: var(--c-bg); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid #4a3a2a;
    padding-top: var(--s-4);
    text-align: center;
    font-size: 0.85rem;
    color: #a89682;
}
.footer-bottom .brand { color: var(--c-bg); font-family: var(--f-display); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s-4); }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--c-text-muted); }
.small { font-size: 0.875rem; }

/* Ad placeholder boxes (style for when AdSense is added) */
.ad-slot {
    background: var(--c-bg-alt);
    border: 1px dashed var(--c-border);
    border-radius: var(--radius);
    padding: var(--s-5);
    text-align: center;
    color: var(--c-text-muted);
    font-size: 0.85rem;
    margin: var(--s-5) 0;
    min-height: 100px;
    display: grid;
    place-items: center;
}
