/* =================================================================
   1. RESET & VARIABEL DASAR
   ================================================================= */
:root {
    --primary: #03438a; /* Biru Gelap */
    --nav-bg: #022c5c; /* Sedikit lebih gelap dari primary untuk kontras navbar */
    --accent: #2394f5; /* Biru Muda */
    --text-dark: #333;
    --text-muted: #555;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #fff !important; font-family: 'Noto Sans', sans-serif; color: var(--text-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: #011d3d; } /* Hover biru yang lebih pekat */
.headings { color: var(--primary); font-family: 'Cardo', serif; font-size: 26px; border-bottom: 2px solid #ddd; padding-bottom: 10px; margin-bottom: 20px; }

/* =================================================================
   2. HEADER & BANNER (FULL WIDTH & PROPORTIONAL)
   ================================================================= */
.site-header { 
    background: var(--primary) !important; 
    padding: 0;
    width: 100%;
}
.header-banner-link { display: block; width: 100%; }

.journal-banner-img { 
    width: 100%; 
    height: auto; /* Biarkan tinggi proporsional mengikuti lebar */
    object-fit: contain; /* Pastikan seluruh gambar 4301x1094 masuk tanpa crop di desktop */
    display: block; 
}

/* =================================================================
   3. NAVIGATION & BURGER MENU
   ================================================================= */
.navigation {
    position: sticky; 
    top: 0; 
    z-index: 1000;
    background: var(--nav-bg) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    height: 50px;
}

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.primary-nav, .user-nav { display: flex; list-style: none; height: 100%; }

.hamburger-btn { 
    display: none; background: none; border: none; color: #fff; 
    font-size: 1.1rem; cursor: pointer; height: 100%; padding: 0 15px; align-items: center;
}
.hamburger-btn i { margin-right: 8px; }

.primary-nav li a, .user-nav li a {
    display: flex; align-items: center; padding: 0 20px; height: 100%;
    color: #fff; font-weight: 600; text-transform: uppercase; font-size: 14px;
}
.primary-nav li a:hover, .user-nav li a:hover { background: rgba(255,255,255,0.1); }

/* --- Trik Tombol Home Segitiga "Gigi Gergaji" --- */
.primary-nav > li.nav-home {
    position: relative;
    background: var(--accent) !important;
    border-right: 2px solid #fff; /* Garis vertikal utama */
    margin-right: 18px; /* Memberi ruang untuk segitiga */
}

/* Segitiga Border Putih */
.primary-nav > li.nav-home::before {
    content: "";
    position: absolute;
    top: 50%; /* Letakkan di tengah secara vertikal */
    right: -12px; /* Ditarik keluar tombol */
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 12px solid #fff;
    z-index: 1;
}

/* Segitiga Isi Biru Muda (Overlap menutupi garis vertikal) */
.primary-nav > li.nav-home::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -9px;
    transform: translateY(-50%);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 11px solid var(--accent); /* Lebar 11px */
    z-index: 2;
}
.primary-nav > li.nav-home a i { margin-right: 8px; }

/* =================================================================
   4. MAIN CONTENT (FULL WIDTH)
   ================================================================= */
.main-content { margin-top: 40px; margin-bottom: 50px; }
.content-area { width: 100%; }
.intro-text { line-height: 1.8; color: var(--text-muted); margin-bottom: 30px; font-size: 16px; }

/* --- Grid Card Jurnal (2 Kolom Desktop) --- */
.journals { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); /* Memaksa layout menjadi 2 kolom sejajar */
    gap: 30px; 
}
.journal-card { 
    background: #f9f9f9; padding: 20px; 
    display: flex; flex-direction: row; /* Gambar di kiri, Teks di kanan */
    gap: 20px; border: 1px solid #eee; border-radius: 6px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
.journal-card img { 
    width: 140px; height: 200px; /* Ukuran tetap agar rapi */
    object-fit: cover; box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    border-radius: 4px; flex-shrink: 0; /* Mencegah gambar gepeng */
}
.journal-info h3 { font-family: 'Cardo', serif; margin-bottom: 10px; font-size: 20px; }
.journal-info p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.nav-pills { display: flex; gap: 10px; list-style: none; flex-wrap: wrap; }
.nav-pills a { border: 1px solid #ddd; padding: 6px 12px; font-size: 12px; font-weight: bold; background: #fff; border-radius: 4px; color: var(--primary) !important; }
.nav-pills a:hover { background: #eee; }

/* =================================================================
   5. CUSTOM TECHNOLOGIES & SLIDER ANIMATION
   ================================================================= */
.custom-technologies-section { margin: 60px 0 0 0; border-top: 1px solid #eee; padding-top: 40px; background: #fcfcfc;}
.ctext { font-family: 'Cardo', serif; color: #ababab; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; text-align: center;}

.marquee-wrapper { width: 100%; overflow: hidden; white-space: nowrap; padding: 20px 0; box-sizing: border-box; }
.tech-logos {
    display: inline-flex; align-items: center; gap: 60px; padding-left: 60px; 
    list-style: none; margin: 0; animation: marquee 20s linear infinite; 
}
.tech-logos img { max-height: 45px; filter: grayscale(100%); opacity: 0.6; transition: 0.3s; }
.tech-logos img:hover { filter: grayscale(0%); opacity: 1; }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* =================================================================
   6. FOOTER
   ================================================================= */
footer { 
    /* Variasi gradien: biru gelap di atas (#03438a) ke biru muda di bawah (#2394f5) */
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%) !important; 
    color: #e6f2ff; /* Teks dicerahkan agar lebih kontras dengan warna biru */
    padding: 50px 0 20px 0; 
    font-family: 'Noto Sans', sans-serif; 
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 40px; }
.footer-inner-text h3 { color: #fff; font-size: 18px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; }
.footer-inner-text ul { list-style: none; }
.footer-inner-text ul li { margin-bottom: 8px; }
.footer-inner-text ul li a { color: #cce5ff; font-size: 14px; }
.footer-inner-text ul li a:hover { color: #fff; }
.contact-text { color: #cce5ff; font-size: 14px; }

.footer-bottom-wrapper { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.cc-icons a { color: #fff; font-size: 24px; margin-right: 10px; opacity: 0.8; }
.cc-icons a:hover { opacity: 1; }
.bottomfoot { text-align: right; font-size: 14px; }
.bottomfoot .copyright { color: #cce5ff !important; }
.bottomfoot a { color: #fff; font-weight: bold; } /* Mengubah tautan di bawah agar menonjol */

/* =================================================================
   7. MOBILE RESPONSIVE
   ================================================================= */
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1040; opacity: 0; visibility: hidden; transition: 0.3s; }
.menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-offcanvas { 
    position: fixed; top: 0; left: -300px; width: 280px; height: 100vh; background: #fff; 
    z-index: 1050; transition: transform 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0); overflow-y: auto; box-shadow: 2px 0 15px rgba(0,0,0,0.2); 
}
.mobile-offcanvas.active { transform: translateX(300px); }
.offcanvas-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: var(--primary); color: #fff; }
.close-btn { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.offcanvas-nav { list-style: none; }
.offcanvas-nav li a { display: block; padding: 15px 20px; color: var(--text-dark); border-bottom: 1px solid #eee; font-weight: 600; }

@media (max-width: 992px) {
    /* Header di mobile sengaja dicrop di kiri agar tidak terlihat sekecil semut */
    .journal-banner-img {
        height: 120px; 
        object-fit: cover; 
        object-position: left center;
    }

    .primary-nav, .user-nav { display: none; }
    .hamburger-btn { display: flex; } 
    .nav-wrapper { justify-content: flex-start; } 
    
    /* Grid jurnal di mobile kembali menjadi 1 kolom (atas-bawah) */
    .journals { grid-template-columns: 1fr; }
    .journal-card { flex-direction: column; align-items: center; text-align: center; }
    .journal-card img { align-self: center; }
    
    .bottomfoot { text-align: center; margin-top: 20px; width: 100%; }
    .footer-bottom-wrapper { justify-content: center; }
}

/* =================================================================
   8. CONTROLS (SEARCH, FILTER & VIEW TOGGLE)
   ================================================================= */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    background: #fcfcfc;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.left-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
    align-items: center;
}

/* --- Search Box --- */
.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: 280px;
    background: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
.search-box input {
    border: none;
    padding: 9px 15px;
    outline: none;
    flex: 1;
    font-family: 'Noto Sans', sans-serif;
    font-size: 13.5px;
}
.search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.search-box button:hover {
    background: var(--nav-bg);
}

/* --- Filter Alfabet --- */
.alpha-filter {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.alpha-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    transition: 0.2s;
    font-size: 13px;
}
.alpha-btn:hover, .alpha-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Toggle View Buttons --- */
.view-toggle {
    display: flex;
    gap: 8px;
}
.view-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}
.view-btn:hover, .view-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* =================================================================
   9. PENGATURAN LAYOUT JURNAL (LIST VS GRID)
   ================================================================= */
.journals {
    display: grid;
    gap: 30px;
    width: 100%;
}

/* GRID VIEW - Tegas 2 Kolom Sejajar */
.journals.grid-view {
    grid-template-columns: repeat(2, 1fr);
}

/* LIST VIEW - Tegas 1 Kolom Memanjang ke Bawah */
.journals.list-view {
    grid-template-columns: 1fr;
}
.journals.list-view .journal-card {
    width: 100%; /* Memastikan card memenuhi area horizontal */
}

/* Class untuk menyembunyikan elemen saat dicari/difilter */
.journal-card.hidden {
    display: none !important;
}

/* --- Responsivitas Khusus Tablet & Mobile --- */
@media (max-width: 992px) {
    .journals.grid-view {
        grid-template-columns: 1fr; /* Memaksa grid menjadi 1 kolom di layar kecil */
    }
}

@media (max-width: 768px) {
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .left-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        width: 100%; /* Search bar full width di mobile */
    }
    .view-toggle {
        display: none;
    }
}