/* * assets/css/archive-alam.css
 * Vibe: Ensiklopedia Flora & Fauna / Field Journal.
 */

:root {
    /* FIELD MODE (Terang, bersih, natural) */
    --alam-bg: #f4f7f6; 
    --alam-text: #2c3e2e; 
    --alam-accent: #4a7c59; 
    --alam-card-bg: #ffffff;
    --alam-border: #dce3dd;
    --font-alam-title: 'Georgia', 'Merriweather', serif;
    --font-alam-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* JUNGLE MODE (Gelap, tajam, ala Night Safari) */
html[data-theme="jungle"] {
    --alam-bg: #0a120d;
    --alam-text: #d1e0d5;
    --alam-accent: #68b37e;
    --alam-card-bg: #111e15;
    --alam-border: #1d3324;
}

body {
    background-color: var(--alam-bg) !important;
    color: var(--alam-text) !important;
    font-family: var(--font-alam-body) !important;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.alam-archive-wrapper {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 2rem;
}

/* Header Jurnal */
.alam-archive-header {
    text-align: center;
    margin-bottom: 5rem;
}

.alam-meta {
    font-family: var(--font-alam-body);
    font-size: 0.85rem;
    color: var(--alam-accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.alam-archive-title {
    font-family: var(--font-alam-title);
    font-size: 3.5rem;
    font-weight: normal;
    color: var(--alam-text);
    margin: 0 0 1rem 0;
}

.alam-archive-desc {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 0.5rem;
    opacity: 0.8;
    line-height: 1.8;
}

/* =========================================
   TOMBOL JUNGLE MODE (MINIMALIS & MEWAH)
   ========================================= */
.arc-vibe-controller {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.arc-vibe-btn {
    background: transparent;
    color: var(--alam-text);
    border: none;
    padding: 0.5rem 0;
    cursor: pointer;
    font-family: var(--font-alam-body);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    transition: color 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.7;
}

/* Garis bawah tipis eksklusif (Trik Animasi) */
.arc-vibe-btn::after {
    content: '';
    position: absolute;
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 1px;
    background-color: var(--alam-text);
    transform: scaleX(0.3);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s ease;
    opacity: 0.5;
}

.arc-vibe-btn::before {
    content: '🌿'; 
    font-size: 1rem;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(0.5); 
}

.arc-vibe-btn:hover {
    color: var(--alam-accent);
    opacity: 1;
}

.arc-vibe-btn:hover::after {
    transform: scaleX(1);
    background-color: var(--alam-accent);
    opacity: 1;
}

.arc-vibe-btn:hover::before {
    transform: rotate(15deg) scale(1.1);
    filter: grayscale(0);
}

html[data-theme="jungle"] .arc-vibe-btn::before {
    content: '🌙'; 
    filter: grayscale(0.3) brightness(1.5);
}

/* =========================================
   BILAH PENCARIAN (SEARCH BAR BARU)
   ========================================= */
.alam-search-wrapper {
    max-width: 600px;
    margin: 3rem auto 0;
    position: relative;
}

.alam-search-form {
    display: flex;
    position: relative;
    width: 100%;
}

.alam-search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    border: 1px solid var(--alam-border);
    border-radius: 50px;
    background-color: var(--alam-card-bg);
    color: var(--alam-text);
    font-family: var(--font-alam-body);
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.alam-search-input:focus {
    outline: none;
    border-color: var(--alam-accent);
    box-shadow: 0 15px 30px rgba(74, 124, 89, 0.08);
    transform: translateY(-2px);
}

/* Placeholder Warna */
.alam-search-input::placeholder {
    color: var(--alam-text);
    opacity: 0.4;
}

.alam-search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    pointer-events: none;
    color: var(--alam-text);
}

html[data-theme="jungle"] .alam-search-input {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* =========================================
   SAYAP MUSEUM (KATEGORI GRID BARU FIX!)
   ========================================= */
.alam-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
    padding-bottom: 4rem;
    border-bottom: 1px dashed var(--alam-border);
}

.alam-category-card {
    background-color: var(--alam-card-bg);
    border: 1px solid var(--alam-border);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.alam-category-card:hover {
    border-color: var(--alam-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    background-color: rgba(74, 124, 89, 0.02);
}

html[data-theme="jungle"] .alam-category-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.alam-category-title {
    font-family: var(--font-alam-title);
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    font-weight: normal;
    color: var(--alam-text);
}

.alam-category-count {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--alam-accent);
    opacity: 0.8;
}

/* =========================================
   GRID SPESIMEN (ARTIKEL)
   ========================================= */
.alam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.alam-card {
    background-color: var(--alam-card-bg);
    border: 1px solid var(--alam-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.alam-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
    border-color: var(--alam-accent);
}

html[data-theme="jungle"] .alam-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.alam-card-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--alam-border);
    background-color: rgba(74, 124, 89, 0.05);
}

.alam-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.alam-card:hover .alam-card-img {
    transform: scale(1.05);
}

.alam-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.alam-card-content {
    padding: 2rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.alam-card-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--alam-accent);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.alam-card-title {
    font-family: var(--font-alam-title);
    font-size: 1.6rem;
    margin: 0 0 1rem 0;
    font-weight: normal;
    line-height: 1.3;
}

.alam-card-excerpt {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* =========================================
   PAGINASI (LEBIH MINIMALIS, ELEGAN & MAGIS)
   ========================================= */
.alam-pagination {
    margin-top: 6rem;
    text-align: center;
    border-top: 1px solid rgba(74, 124, 89, 0.2); /* Garis tipis elegan */
    padding-top: 4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* Jarak aman biar kaga tabrakan di HP */
    position: relative;
}

/* Ornamen Mandala Lotus 8 Titik di tengah garis pagination */
.alam-pagination::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px; /* Digeedan dikit biar garis 8 kelopaknya tajem */
    height: 32px;
    background-color: var(--alam-accent);
    /* Masking SVG Mandala Lotus 8 Titik (Anti-Blob Line Art) */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1 Q 15 6 12 12 Q 9 6 12 1 Z'/%3E%3Cpath d='M12 23 Q 15 18 12 12 Q 9 18 12 23 Z'/%3E%3Cpath d='M1 12 Q 6 15 12 12 Q 6 9 1 12 Z'/%3E%3Cpath d='M23 12 Q 18 15 12 12 Q 18 9 23 12 Z'/%3E%3Cpath d='M4.22 4.22 Q 9.88 5.64 12 12 Q 5.64 9.88 4.22 4.22 Z'/%3E%3Cpath d='M19.78 4.22 Q 14.12 5.64 12 12 Q 18.36 9.88 19.78 4.22 Z'/%3E%3Cpath d='M4.22 19.78 Q 9.88 18.36 12 12 Q 5.64 14.12 4.22 19.78 Z'/%3E%3Cpath d='M19.78 19.78 Q 14.12 18.36 12 12 Q 18.36 14.12 19.78 19.78 Z'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1 Q 15 6 12 12 Q 9 6 12 1 Z'/%3E%3Cpath d='M12 23 Q 15 18 12 12 Q 9 18 12 23 Z'/%3E%3Cpath d='M1 12 Q 6 15 12 12 Q 6 9 1 12 Z'/%3E%3Cpath d='M23 12 Q 18 15 12 12 Q 18 9 23 12 Z'/%3E%3Cpath d='M4.22 4.22 Q 9.88 5.64 12 12 Q 5.64 9.88 4.22 4.22 Z'/%3E%3Cpath d='M19.78 4.22 Q 14.12 5.64 12 12 Q 18.36 9.88 19.78 4.22 Z'/%3E%3Cpath d='M4.22 19.78 Q 9.88 18.36 12 12 Q 5.64 14.12 4.22 19.78 Z'/%3E%3Cpath d='M19.78 19.78 Q 14.12 18.36 12 12 Q 18.36 14.12 19.78 19.78 Z'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    
    /* KUNCI FIX 2: Ganti trik border yang bikin error masking SVG pake box-shadow! */
    box-shadow: 0 0 0 12px var(--alam-bg); 
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.alam-pagination a,
.alam-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    margin: 0;
    border: 1px solid transparent; /* Hilangin border kaku */
    color: var(--alam-text);
    text-decoration: none;
    border-radius: 50px; /* Bentuk kapsul / lingkaran elegan */
    font-size: 0.95rem;
    font-family: var(--font-ui);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.6;
}

/* Efek Hover Magis */
.alam-pagination a:hover {
    opacity: 1;
    color: var(--alam-accent);
    background-color: rgba(74, 124, 89, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

html[data-theme="jungle"] .alam-pagination a:hover {
    box-shadow: 0 5px 15px rgba(104, 179, 126, 0.15); /* Pendaran hijau di Jungle Mode */
}

/* Halaman Yang Aktif */
.alam-pagination .current {
    opacity: 1;
    color: var(--alam-bg);
    background-color: var(--alam-accent);
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.25);
}

/* Khusus tombol prev & next biar beda sendiri panjangnya */
.alam-pagination .prev,
.alam-pagination .next {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    padding: 0 2rem;
    border: 1px dashed var(--alam-border); /* Garis putus-putus estetik */
}

.alam-pagination .prev:hover,
.alam-pagination .next:hover {
    border-style: solid;
    border-color: var(--alam-accent);
}

@media (max-width: 768px) {
    .alam-archive-title { font-size: 2.8rem; }
    .alam-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    /* FIX HP: Jarak paginasi & tombol Next manjang */
    .alam-pagination {
        gap: 0.8rem; 
    }
    .alam-pagination .prev,
    .alam-pagination .next {
        width: 100%; /* Paksa tombol next/prev ngebentang full di HP biar jempol enak */
        margin-top: 0.8rem;
    }
}