/* --- VARIABEL TEMA & SYSTEM RESET --- */
:root {
    /* Mode Terang (Default) */
    --primary: #61816c;
    --primary-light: #7b9c86;
    --primary-dark: #4b6654;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --text-main: #121413;
    --text-muted: #525b56;
    --border-color: rgba(97, 129, 108, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.06);
    --white: #ffffff;
    --black: #000000;
}

[data-theme="dark"] {
    /* Mode Gelap (Dark Mode) */
    --primary: #61816c;
    --primary-light: #89aa94;
    --primary-dark: #3e5546;
    --bg-main: #111312;
    --bg-card: #1a1d1b;
    --bg-glass: rgba(17, 19, 18, 0.8);
    --text-main: #f0f4f2;
    --text-muted: #a3b0a7;
    --border-color: rgba(97, 129, 108, 0.25);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- CUSTOM CURSOR --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s, opacity 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.expand {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary);
    mix-blend-mode: normal;
}

/* --- NAVBAR GLASSMORPHISM --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 10px;
}

.nav-links {
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.nav-links:hover, .nav-links.active {
    background-color: var(--primary);
    color: var(--white);
}

/* Tombol Toggle Theme */
.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 5px;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('asset/bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center; 
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 6rem); 
    font-weight: 900;
    color: var(--white);
    letter-spacing: 2px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.6);
    line-height: 1.1;
}

.hero-subtitle {
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin-top: 15px;
    font-weight: 400;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* --- RUNNING TEXT MARQUEE --- */
.marquee-container {
    background: var(--primary);
    color: var(--white);
    padding: 15px 0;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.1rem;
}

.marquee-content {
    display: flex;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    padding-right: 50px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- MAIN SECTIONS --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.about, .location {
    padding: 6rem 5%;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 50px var(--shadow-color);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.about-card h2, .location h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.about-card p, .location p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(97, 129, 108, 0.4);
}

.map-container {
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px var(--shadow-color);
}

/* Style Tambahan Logo & CTA Artikel di Homepage */
.paperka-main-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.paperka-main-logo:hover {
    transform: scale(1.08) rotate(3deg);
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-color, #10b981);
    margin-bottom: 0.8rem;
}


/*-----------------------------------------------------------*/
/* --- DOKUMENTASI PAGE GRID --- */
.page-content {
    padding-top: 120px; 
    min-height: 80vh;
    padding-bottom: 5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-main);
    font-weight: 900;
}

.page-title span { color: var(--primary); }

.page-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 5%;
}

.gallery-item {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 30px var(--shadow-color);
    height: 350px;
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--black), transparent);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    transition: bottom 0.4s ease-in-out;
}

.gallery-overlay h3 { font-size: 1.5rem; margin-bottom: 5px; }
.gallery-overlay p { font-size: 0.9rem; opacity: 0.9; }

.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { bottom: 0; }

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

/* --- LIGHTBOX MODAL (DOKUMENTASI) --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 85%;
    max-height: 75vh;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-caption {
    color: #ffffff;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary-light);
}

/* --- FOOTER --- */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: center;
    padding: 4rem 5% 2rem;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

.footer-content h3 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 900; color: var(--primary); }
.social-links { margin: 2rem 0; }
.social-links a { color: var(--text-main); text-decoration: none; margin: 0 15px; font-weight: 600; font-size: 1.1rem; transition: color 0.3s; }
.social-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 3rem; font-size: 0.9rem; color: var(--text-muted); }

/* --- ANIMASI SCROLL --- */
.hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE MOBILE --- */
@media screen and (max-width: 768px) {
    .custom-cursor { display: none; }
    * { cursor: auto; }
    .menu-toggle { display: flex; z-index: 1001; }
    
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: var(--bg-card); flex-direction: column; justify-content: center;
        align-items: center; transition: 0.5s ease-in-out;
    }
    
    .nav-menu.active { right: 0; }
    .nav-links { font-size: 1.5rem; margin: 15px 0; }
    .about-card { padding: 2rem; }
    }

/* ==========================================================================
   HALAMAN ARTIKEL (HERO, SEARCH FILTER, GRID & MODAL READER)
   ========================================================================== */

/* --- 1. Hero Section Artikel --- */
.article-hero {
    padding: 140px 20px 60px;
    background: linear-gradient(135deg, rgba(17, 19, 18, 0.92), rgba(26, 29, 27, 0.88)), 
                url('asset/icon.png') center/cover no-repeat;
    text-align: center;
    color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.article-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(97, 129, 108, 0.25);
    color: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.article-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 14px;
    line-height: 1.25;
    color: var(--white);
}

.article-hero p {
    font-size: 1.1rem;
    color: #d0d7d3;
    margin-bottom: 32px;
}

/* --- 2. Box Pencarian & Filter Kategori --- */
.search-filter-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    max-width: 650px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #a3b0a7;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 18px rgba(97, 129, 108, 0.4);
}

.category-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 9px 20px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(97, 129, 108, 0.35);
}

/* --- 3. Layout Grid & Kartu Artikel --- */
.article-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 5%;
}

.featured-article {
    margin-bottom: 45px;
}

.article-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.4s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px var(--shadow-color);
    border-color: var(--primary);
}

.article-card.featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-radius: 25px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* --- 4. Detail Komponen Dalam Kartu --- */
.card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.article-card.featured .card-image {
    height: 100%;
    min-height: 320px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.06);
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(17, 19, 18, 0.85);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-body h2, 
.card-body h3 {
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 12px;
}

.card-body h2 { font-size: 1.5rem; }
.card-body h3 { font-size: 1.2rem; }

.excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 22px;
    flex-grow: 1;
}

.btn-read-more {
    align-self: flex-start;
    padding: 10px 22px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(97, 129, 108, 0.35);
}

/* --- 5. Modal Reader (Jendela Baca) --- */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.article-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    color: var(--text-main);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 25px;
    overflow-y: auto;
    padding: 40px;
    z-index: 10;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px var(--shadow-color);
    transform: translateY(20px);
    transition: transform 0.3s ease, background-color 0.4s ease;
}

.article-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
}

.modal-body h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 800;
}

.modal-body .modal-hero-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 18px;
    margin: 20px 0 25px;
    border: 1px solid var(--border-color);
}

.modal-body p {
    margin-bottom: 18px;
    color: var(--text-muted);
}

.modal-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 22px 0;
    font-style: italic;
    color: var(--text-main);
    background: var(--bg-main);
    border-radius: 0 12px 12px 0;
}

/* Styling gambar yang berada di dalam paragraf modal */
.article-full-text img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 14px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px var(--shadow-color);
}

/* --- 6. Penyesuaian Responsif Layar Kecil (HP) --- */
@media screen and (max-width: 768px) {
    .article-hero {
        padding: 110px 15px 40px;
    }

    .article-card.featured {
        grid-template-columns: 1fr;
    }

    .article-card.featured .card-image {
        height: 220px;
    }

    .modal-content {
        padding: 25px 20px;
        width: 92%;
    }

    .modal-body h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   PAGINASI ARTIKEL
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px auto 20px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(97, 129, 108, 0.35);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
