/* =========================================================
   DUVETA CAREER CONNECT — STYLE.CSS
   Pendekatan MOBILE-FIRST:
   - Style dasar ditulis untuk layar kecil (HP) dahulu
   - @media (min-width: ...) menambah/menyesuaikan untuk layar besar
   ========================================================= */

:root {
    --biru-tua: #1e3a8a;
    --biru: #2563eb;
    --biru-muda: #93c5fd;
    --biru-bg: #eff6ff;
    --abu-teks: #475569;
    --putih: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 14px rgba(30, 58, 138, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px; /* padding kecil untuk HP */
}

/* Section full-width — dipakai untuk Ringkasan Kesempatan, Galeri, Pembekalan
   supaya lebarnya konsisten dengan .hero dan .grid-fitur (tidak dibatasi 1200px) */
.section-full {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* =========================================================
   NAVBAR — di HP jadi hamburger menu (collapse)
   ========================================================= */
.navbar {
    background: var(--putih);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--biru-tua);
    font-size: 1rem;
    flex-shrink: 0;
}
.navbar-brand img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Menu DESKTOP — sejajar satu baris dengan logo, hanya tampil mulai tablet */
.navbar-menu-desktop {
    display: none;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.navbar-menu-desktop a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px; /* pill */
    font-weight: 500;
    font-size: 0.88rem;
    color: #475569;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.navbar-menu-desktop a i { font-size: 0.8rem; opacity: 0.85; }
.navbar-menu-desktop a:hover {
    color: var(--biru);
    background: var(--biru-bg);
}
.navbar-menu-desktop a.active {
    color: var(--biru);
    background: var(--biru-bg);
    font-weight: 700;
}
/* Garis kecil penanda menu aktif di bawah pill */
.navbar-menu-desktop a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 3px;
    background: var(--biru);
}

/* Tombol hamburger - hanya tampil di HP */
.navbar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--biru-tua);
    cursor: pointer;
    flex-shrink: 0;
}

/* Menu MOBILE (dropdown) — full width, tersembunyi sampai hamburger diklik.
   display:none SELALU jadi default; hanya JS yang menambah class .active untuk memunculkannya. */
.navbar-menu-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--putih);
    border-top: 1px solid #e2e8f0;
}
.navbar-menu-mobile.active { display: flex; }

.navbar-menu-mobile a {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
    color: #334155;
}
.navbar-menu-mobile a.active,
.navbar-menu-mobile a:hover { color: var(--biru); background: var(--biru-bg); }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Sembunyi di HP, tampil mulai tablet — dipakai untuk nama user / tombol Masuk-Daftar di navbar */
.hide-mobile { display: none; }
@media (min-width: 768px) {
    .hide-mobile { display: inline-flex; align-items: center; }
    .navbar-menu-desktop { display: flex; }
    .navbar-toggle { display: none !important; }
    /* PENTING: menu mobile HARUS tersembunyi total di layar >=768px,
       apa pun class yang menempel padanya (termasuk .active) */
    .navbar-menu-mobile,
    .navbar-menu-mobile.active { display: none !important; }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
    background: linear-gradient(135deg, var(--biru-bg), #dbeafe);
    border-radius: var(--radius);
    padding: 16px; /* diperkecil dari 24px */
    margin: 16px;
}
.hero-inner {
    display: flex;
    flex-direction: column; /* mobile: teks di atas, gambar di bawah */
    gap: 12px; /* diperkecil dari 20px */
}
.hero-text { text-align: center; }
.hero h1 {
    color: var(--biru-tua);
    font-size: 1.3rem; /* diperkecil dari 1.5rem */
    margin: 4px 0; /* diperkecil dari 8px */
    line-height: 1.25;
}
.hero p {
    color: var(--abu-teks);
    font-size: 0.85rem;
    margin-bottom: 10px; /* diperkecil dari 16px */
}

/* =========================================================
   HERO IMAGE — ilustrasi statis di sisi kanan hero
   ========================================================= */
.hero-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 110px; /* diperkecil lagi dari 160px */
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    max-width: 200px; /* diperkecil dari 320px */
    max-height: 110px;
    height: auto;
    object-fit: contain;
    /* Tidak perlu mix-blend-mode lagi — gambar sudah PNG dengan latar transparan asli */
}

.search-box {
    display: flex;
    flex-direction: column; /* di HP tombol Cari turun ke bawah */
    gap: 8px;
    background: var(--putih);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.search-box input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    width: 100%;
}
.search-box button {
    background: var(--biru);
    color: var(--putih);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* =========================================================
   GRID KARTU FITUR (Lowongan, Jadwal, Pembekalan, dst)
   Mobile: 1 kolom → Tablet: 2 kolom → Desktop: 3-6 kolom
   ========================================================= */
.grid-fitur {
    display: grid;
    grid-template-columns: 1fr; /* mobile: 1 kolom */
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.card-fitur {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.card-fitur .icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--biru-bg);
    color: var(--biru);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.card-fitur h3 { font-size: 1rem; margin: 6px 0; color: var(--biru-tua); }
.card-fitur p { font-size: 0.85rem; color: var(--abu-teks); margin: 0; }

/* =========================================================
   RINGKASAN KESEMPATAN (angka statistik)
   Mobile: 1 kolom (stack) → Desktop: 3 kolom sejajar
   ========================================================= */
.grid-ringkasan {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
/* Varian 4 kartu (dipakai di dashboard admin): 2 kolom di HP, 4 kolom di desktop */
.grid-ringkasan-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.stat-box {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-align: center;
}
.stat-box .angka { font-size: 1.8rem; font-weight: 700; color: var(--biru-tua); }
.stat-box .label { font-size: 0.8rem; color: var(--abu-teks); }
.stat-box .naik { font-size: 0.75rem; color: #16a34a; margin-top: 4px; }

/* =========================================================
   PANEL 2 KOLOM (Jadwal Rekrutmen + Tracer Study)
   Mobile: stack vertikal → Desktop: berdampingan
   ========================================================= */
.grid-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
    margin-bottom: 16px;
}
.panel {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--biru-tua);
}
.panel-header a { font-size: 0.8rem; color: var(--biru); font-weight: 500; }

.list-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.list-item:last-child { border-bottom: none; }
.list-item .logo-box {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--biru-bg);
    flex-shrink: 0;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .nama { font-weight: 600; font-size: 0.85rem; }
.list-item .info .sub { font-size: 0.75rem; color: var(--abu-teks); }
.list-item .tanggal { font-size: 0.75rem; color: var(--abu-teks); text-align: right; white-space: nowrap; }

/* =========================================================
   TOMBOL & UTILITAS
   ========================================================= */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: var(--biru); color: var(--putih); }
.btn-outline { background: transparent; border: 1px solid var(--biru); color: var(--biru); }
.btn-block { width: 100%; } /* full width di HP */

.footer {
    background: var(--biru-tua);
    color: var(--putih);
    padding: 12px 16px;
    font-size: 0.75rem;
    margin-top: 24px;
}
.footer-row {
    display: flex;
    flex-wrap: wrap; /* di HP boleh melipat ke baris ke-2 jika kepepet */
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-quote {
    font-style: italic;
    opacity: 0.9;
    white-space: nowrap;
}
.footer-contact { white-space: nowrap; opacity: 0.95; }
.footer-contact i { margin-right: 4px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
    color: var(--putih);
    background: rgba(255,255,255,0.15);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Di HP sangat kecil, sembunyikan kutipan panjang agar kontak & ikon sosial tetap muat 1 baris */
@media (max-width: 480px) {
    .footer-quote { display: none; }
}

/* =========================================================
   BREAKPOINT: TABLET (>= 768px)
   ========================================================= */
@media (min-width: 768px) {
    .hero h1 { font-size: 1.7rem; } /* diperkecil dari 2rem */
    .hero p { font-size: 0.95rem; }

    .search-box { flex-direction: row; }
    .search-box button { width: auto; padding: 12px 28px; }

    .grid-fitur { grid-template-columns: repeat(2, 1fr); }
    .grid-ringkasan { grid-template-columns: repeat(3, 1fr); }
    /* grid-ringkasan-4 SENGAJA tidak diubah di sini — tetap 2 kolom di semua ukuran
       layar supaya membentuk grid 2x2 (2 baris x 2 kolom), sesuai permintaan */

    .footer-row { flex-wrap: nowrap; justify-content: space-between; }
}

/* =========================================================
   BREAKPOINT: DESKTOP (>= 1024px)
   ========================================================= */
@media (min-width: 1024px) {
    .grid-fitur { grid-template-columns: repeat(6, 1fr); } /* 6 kartu sejajar spt landing page */
    .grid-panel { grid-template-columns: 1fr 1fr; } /* Jadwal Rekrutmen + Tracer Study berdampingan */
    .btn-block { width: auto; }

    .hero { padding: 20px 32px; } /* diperkecil dari 40px agar header tidak terlalu tinggi */
    .hero-inner {
        flex-direction: row; /* teks kiri, gambar kanan */
        align-items: center;
        gap: 32px;
    }
    .hero-text { text-align: left; flex: 1; }
    .hero-image { flex: 0 0 180px; max-height: 140px; }
    .hero-image img { max-width: 180px; max-height: 140px; }
    .search-box { justify-content: flex-start; }
}

/* Card lowongan kerja - dipakai di modules/lowongan */
.card-lowongan {
    background: var(--putih);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}
.card-lowongan .posisi { font-weight: 700; color: var(--biru-tua); font-size: 1rem; }
.card-lowongan .perusahaan { font-size: 0.85rem; color: var(--abu-teks); margin-bottom: 8px; }
.card-lowongan .meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.75rem; margin-bottom: 10px; }
.card-lowongan .meta span { background: var(--biru-bg); color: var(--biru); padding: 4px 10px; border-radius: 20px; }

@media (min-width: 768px) {
    .card-lowongan { display: flex; justify-content: space-between; align-items: center; }
}

/* =========================================================
   GALERI — kartu gaya overlay (foto + gradasi gelap + judul + tombol)
   1 kolom di HP -> 2 kolom di tablet -> 3 kolom di desktop
   ========================================================= */
.grid-galeri {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.galeri-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.galeri-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30,58,138,0.18); }
.galeri-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Gradasi gelap dari bawah supaya judul putih tetap terbaca di atas foto apa pun */
.galeri-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0) 75%);
}
.galeri-overlay .galeri-tanggal {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.45);
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(2px);
}
.galeri-overlay h3 {
    color: #fff;
    font-size: 1rem;
    line-height: 1.3;
    margin: 0 0 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.galeri-btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    background: var(--biru);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.galeri-btn-detail:hover { background: var(--biru-tua); }

@media (min-width: 768px) {
    .grid-galeri { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-galeri { grid-template-columns: repeat(3, 1fr); }
}

/* Pagination galeri */
.galeri-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.galeri-pagination a,
.galeri-pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--biru-bg);
    color: var(--biru);
}
.galeri-pagination a.aktif { background: var(--biru); color: #fff; }
.galeri-pagination a.nonaktif,
.galeri-pagination span.nonaktif { opacity: 0.4; pointer-events: none; }

/* =========================================================
   MODAL / LIGHTBOX GALERI — tampil saat "Lihat Detail" diklik
   ========================================================= */
.galeri-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.galeri-modal-overlay.active { display: flex; }
.galeri-modal-box {
    background: var(--putih);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.galeri-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15,23,42,0.6);
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.galeri-modal-close:hover { background: rgba(15,23,42,0.85); }
.galeri-modal-box img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}
.galeri-modal-body { padding: 18px; }
.galeri-modal-body .galeri-tanggal {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--biru);
    background: var(--biru-bg);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.galeri-modal-body h3 { color: var(--biru-tua); font-size: 1.15rem; margin: 0 0 8px; }
.galeri-modal-body p { color: var(--abu-teks); font-size: 0.9rem; line-height: 1.6; margin: 0; white-space: pre-line; }

/* =========================================================
   CETAK LAPORAN — dipakai oleh admin/laporan.php
   .no-print disembunyikan saat cetak, .only-print sebaliknya
   ========================================================= */
.only-print { display: none; }

@media print {
    .navbar, .footer, .no-print, .btn { display: none !important; }
    .only-print { display: block !important; }
    body { background: #fff; }
    .container { max-width: 100%; padding: 0; }
    .panel { box-shadow: none; border: 1px solid #e2e8f0; page-break-inside: avoid; }
    table { font-size: 11px; }
    th, td { padding: 6px !important; }
}


/* Kategori pengguna di beranda: 4 kolom desktop, responsif di layar kecil. */
.role-directory-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
@media (max-width: 900px) { .role-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .role-directory-grid { grid-template-columns:1fr; } }

/* =========================================================
   ADMIN SIDEBAR — desktop, tetap responsif di HP
   ========================================================= */
@media (min-width: 992px) {
    body:has(.admin-sidebar) { padding-left: 260px; }
    body:has(.admin-sidebar) .navbar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 260px;
        height: 100vh;
        overflow-y: auto;
        border-right: 1px solid #e2e8f0;
        box-shadow: 4px 0 18px rgba(15,23,42,.06);
    }
    body:has(.admin-sidebar) .navbar-inner {
        min-height: 76px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        padding: 20px 16px 16px;
    }
    body:has(.admin-sidebar) .navbar-brand { padding: 0 8px 18px; border-bottom: 1px solid #e2e8f0; }
    body:has(.admin-sidebar) .navbar-menu-desktop {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 5px;
        padding: 18px 0;
    }
    body:has(.admin-sidebar) .navbar-menu-desktop a {
        border-radius: 10px;
        padding: 11px 13px;
        justify-content: flex-start;
        white-space: normal;
    }
    body:has(.admin-sidebar) .navbar-menu-desktop a.active::after { display:none; }
    body:has(.admin-sidebar) .navbar-user { margin-top:auto; padding: 12px 8px 0; border-top:1px solid #e2e8f0; }
    body:has(.admin-sidebar) .navbar-user .navbar-toggle { display:none !important; }
    body:has(.admin-sidebar) .navbar-menu-mobile { display:none !important; }
    body:has(.admin-sidebar) .container { max-width: 1280px; padding-top: 24px !important; }
}
