/*
  Color Palette Theme:
  - Kemenag Green: #107C41
  - Darker Green (Hover): #0d6334
  - Tosca/Turquoise (Accent): #48D1CC
  - Light Green (BG Accent): #e8f5e9
  - White: #FFFFFF
  - Text: #333333
*/

/* General Body & Font Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding-top: 80px; /* Beri ruang untuk header yang fixed */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header and Navigation Styles */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link { display: flex; align-items: center; text-decoration: none; color: inherit; }
.logo-img { height: 50px; margin-right: 15px; }
.logo-text h1 { font-size: 1.2em; margin: 0; font-weight: 700; color: #107C41; }
.logo-text p { font-size: 0.8em; margin: 0; color: #666; }

.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 25px; }
.main-nav a { text-decoration: none; color: #333; font-weight: 600; transition: color 0.2s; }
.main-nav a:hover, .nav-dropdown:hover > span { color: #107C41; }

.button-login { background-color: #107C41; color: white !important; padding: 8px 20px; border-radius: 20px; transition: background-color 0.2s; }
.button-login:hover { background-color: #0d6334; }

/* === DROPDOWN DESKTOP === */
.nav-dropdown { position: relative; cursor: pointer; padding-bottom: 10px; margin-bottom: -10px; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.nav-dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}
.user-menu .dropdown-menu { left: auto; right: 0; transform: translateX(0); }
.dropdown-menu li { padding: 0; }
.dropdown-menu a { display: block; padding: 10px 20px; font-weight: normal; white-space: nowrap; }

/* === MENU MOBILE (BURGER) === */
.mobile-menu-toggle { display: none; font-size: 24px; background: none; border: none; cursor: pointer; z-index: 1002; }

/* Main Content Area */
.main-content { padding: 30px 0; }

/* Dinding Aktivitas & Form Styles */
.post-form-container, .activity-item, .public-welcome { background-color: #fff; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.post-form-container textarea { width: 100%; min-height: 80px; border: 1px solid #ddd; border-radius: 8px; padding: 10px; font-family: 'Poppins', sans-serif; resize: vertical; }
.post-form-container button { background-color: #107C41; color: white; border: none; padding: 10px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; margin-top: 10px; float: right; }
.post-form-container button:hover { background-color: #0d6334; }
.activity-item { display: flex; border-bottom: 1px solid #eee; padding: 15px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; object-fit: cover; }
.actions button { background: #eef; border: 1px solid #cce; color: #557; padding: 5px 10px; border-radius: 20px; cursor: pointer; margin-right: 10px;}
.actions button.liked { background: #107C41; color: white; border-color: #107C41; }
.comment-form { margin-top: 10px; display: flex; }
.comment-form input { flex-grow: 1; border: 1px solid #ddd; padding: 8px; border-radius: 20px;}
.comment-form button { margin-left: 5px; }
.comments-container .comment { font-size: 0.9em; background: #f9f9f9; padding: 8px; border-radius: 8px; margin-top: 5px;}
.activity-link { font-weight: 600; color: #0d6334; text-decoration: none; background-color: #e8f5e9; padding: 2px 6px; border-radius: 4px; transition: background-color 0.2s, color 0.2s; }
.activity-link:hover { background-color: #c8e6c9; color: #0d6334; text-decoration: underline; }

/* === PERBAIKAN UKURAN GAMBAR LAMPIRAN === */
.post-attachment {
    margin-top: 15px;
}
.attachment-image {
    max-width: 100%;
    max-height: 400px; /* Batasi tinggi maksimal gambar */
    width: 100%; /* Buat lebar gambar memenuhi kontainer */
    object-fit: cover; /* Potong gambar agar pas tanpa distorsi */
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
}
.attachment-video {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.attachment-pdf {
    display: inline-block;
    padding: 10px 15px;
    background-color: #e8f5e9;
    color: #107C41;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
}

/* === STYLE UNTUK HALAMAN PROFIL === */
.profile-header {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    border: 4px solid #107C41; /* Warna Hijau Kemenag */
    object-fit: cover;
}

.profile-info h1 {
    margin: 0;
    font-size: 2em;
}

.profile-info .profile-role {
    margin: 5px 0 0 0;
    font-size: 1.1em;
    color: #666;
    background-color: #e8f5e9;
    padding: 3px 10px;
    border-radius: 15px;
    display: inline-block;
}

.timeline-title {
    font-size: 1.5em;
    color: #107C41;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 10px;
}

a.profile-link {
    text-decoration: none;
    color: inherit;
}
a.profile-link:hover {
    text-decoration: underline;
    color: #107C41;
}

/* === STYLE UNTUK FITUR EDIT PROFIL === */
.button-edit-profile {
    background-color: transparent;
    border: 1px solid #107C41;
    color: #107C41;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}
.button-edit-profile:hover {
    background-color: #107C41;
    color: white;
}

.edit-form-container {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.edit-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.edit-form .button-save {
    background-color: #107C41;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}
.edit-form .button-cancel {
    background-color: #ccc;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

/* === STYLE UNTUK MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-content h2 { margin-top: 0; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }

/* === RESPONSIVE STYLES UNTUK MOBILE === */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }
    .main-nav li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    .main-nav li:last-child {
        border-bottom: none;
    }
    .main-nav a, .nav-dropdown > span {
        display: block;
        padding: 15px;
    }
    .nav-dropdown .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        width: 100%;
        border-radius: 0;
        background-color: #f9f9f9;
        opacity: 1;
        visibility: visible;
        transition: none;
    }
    .nav-dropdown .dropdown-menu.open {
        display: block;
    }
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

.album-narrative {
    background-color: #e8f5e9; /* Warna aksen hijau muda */
    border-left: 4px solid #107C41; /* Warna hijau Kemenag */
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}
.album-narrative p {
    margin: 0;
    line-height: 1.6;
}

/* === STYLE UNTUK POSTER PENGUMUMAN === */
.poster-item {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #ddd;
    overflow: hidden;
}
.poster-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
}
.poster-author {
    margin-left: 10px;
}
.poster-badge {
    font-size: 0.7em;
    font-weight: bold;
    color: white;
    background-color: #107C41;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}
.poster-body {
    padding: 0 15px 15px 15px;
}
.poster-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 10px 0;
}
.poster-image {
    width: 100%;
    border-radius: 8px;
}
/* Style untuk Grup Checkbox Kategori */
.category-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.checkbox-item {
    display: flex;
    align-items: center;
}
.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
}

/* ... (kode CSS galeri yang sudah ada) ... */

/* === PERBAIKAN TAMPILAN FILTER KATEGORI === */
.gallery-controls {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-bar {
    display: flex;
    margin-bottom: 20px; /* Beri jarak lebih */
}

.search-bar input {
    flex-grow: 1;
    border: 2px solid #ddd;
    padding: 10px 15px; /* Sedikit lebih tebal */
    border-radius: 20px 0 0 20px;
    outline: none;
    transition: border-color 0.2s;
}
.search-bar input:focus {
    border-color: #107C41; /* Warna hijau saat aktif */
}

.search-bar button {
    border: none;
    background-color: #107C41;
    color: white;
    padding: 0 25px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}
.search-bar button:hover {
    background-color: #0d6334;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.filter-tags a {
    text-decoration: none;
    background-color: #e9ecef; /* Warna abu-abu muda */
    color: #495057; /* Warna teks lebih gelap */
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.filter-tags a:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
}

.filter-tags a.active {
    background-color: #107C41;
    color: white;
    border-color: #107C41;
    transform: scale(1.05); /* Sedikit membesar saat aktif */
    box-shadow: 0 2px 8px rgba(16, 124, 65, 0.3);
}

/* === Tags on Album Cards === */
.album-tags {
    margin-bottom: 10px;
}

.album-tags .tag {
    display: inline-block;
    background-color: #e8f5e9;
    color: #107C41;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Style untuk Daftar Peserta di Halaman Admin */
.participant-list {
    list-style: none;
    padding: 0;
}
.participant-list li {
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 3px solid #007bff;
}
.participant-list li strong {
    display: block;
    color: #333;
}
.participant-list li span {
    color: #555;
    font-size: 0.9em;
}
/* === STYLE UNTUK HALAMAN ARSIP POSTER === */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}
.page-header h1 {
    color: #107C41;
}

.poster-archive-grid {
    display: grid;
    /* Membuat 1 kolom di HP, 2 di tablet, dan 3 di desktop */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Memastikan kartu poster di dalam grid ini tidak memiliki border bawah */
.poster-archive-grid .poster-item {
    margin-bottom: 0;
}
/* Style untuk Halaman Lomba Guru */
/* === STYLE BARU UNTUK FOOTER === */
.main-footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 40px 0 20px 0;
    margin-top: 40px;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.footer-column h4 {
    color: #ffffff;
    margin-bottom: 15px;
    border-bottom: 2px solid #107C41;
    padding-bottom: 10px;
    display: inline-block;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: 10px;
}
.footer-column a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-column a:hover {
    color: #ffffff;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
    font-size: 0.9em;
}


/* === MAN 2 BALANGAN UI OVERRIDES === */
:root{
  --primary: var(--primary, #0F6B3A);
  --accent: var(--accent, #D4AF37);
}

.main-header{
  position: fixed;
  top:0; left:0; right:0;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  z-index: 999;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit;}
.brand-logo{ width:44px; height:44px; object-fit:contain; }
.brand-name{ font-weight:700; line-height:1.1; }
.brand-tagline{ font-size:12px; opacity:.7; margin-top:2px; }

.main-nav{ display:flex; align-items:center; flex-wrap:wrap; gap: 10px; }
.main-nav a{
  text-decoration:none;
  padding:8px 10px;
  border-radius: 10px;
  color:#222;
  font-weight:600;
  font-size: 14px;
}
.main-nav a:hover{ background: rgba(15,107,58,.08); }
.main-nav a.active{ background: rgba(15,107,58,.12); color: #0F6B3A; }

.btn-primary, button.primary{
  background: var(--primary);
  color:#fff;
  border:none;
}
.btn-primary:hover, button.primary:hover{ filter: brightness(.95); }

.badge-accent{ background: var(--accent); color:#111; padding:4px 8px; border-radius: 999px; font-size:12px; font-weight:700; }

.main-footer{ margin-top: 40px; background: #0b0f0d; color: rgba(255,255,255,.85); padding: 28px 0; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 22px; }
.footer-title{ font-weight:700; color:#fff; margin-bottom: 10px; }
.footer-sub{ opacity:.85; margin-bottom: 10px; }
.footer-meta{ font-size: 13px; opacity: .85; display:flex; flex-direction:column; gap:6px; }
.footer-links{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.footer-links a{ color: rgba(255,255,255,.85); text-decoration:none; }
.footer-links a:hover{ color: #fff; text-decoration: underline; }
.footer-bottom{ margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); opacity:.85; }

@media (max-width: 860px){
  .footer-grid{ grid-template-columns: 1fr; }
  .main-nav{ justify-content:flex-end; }
  body{ padding-top: 110px; }
}
