/*
Theme Name: Portal Belajar TJKT Theme
Theme URI: http://localhost/belajar/
Author: Wens Putra
Author URI: http://localhost/belajar/
Description: Premium, lightweight custom theme for Portal Belajar TJKT - SMKS Bina Karya Larantuka.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: belajar-theme
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 
 * Belajar Core Stylesheet
 * Estetika Modern & Premium (Plus Jakarta Sans, Outfit, Glassmorphism, HSL Palette)
 */

:root {
    --primary: #3b82f6;
    --primary-rgb: 59, 130, 246;
    --primary-hover: #2563eb;
    --emerald: #10b981;
    --emerald-hover: #059669;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-card: #ffffff;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px -10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
}

.belajar-wrapper {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    margin: 20px 0 50px 0;
}

.belajar-wrapper h1, 
.belajar-wrapper h2, 
.belajar-wrapper h3, 
.belajar-wrapper h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Common Buttons */
.belajar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-decoration: none !important;
}

.belajar-btn.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.belajar-btn.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.belajar-btn.btn-secondary {
    background-color: var(--light);
    color: var(--dark) !important;
    border: 1px solid var(--border);
}

.belajar-btn.btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--dark) !important;
    transform: translateY(-2px);
}

.belajar-btn.btn-block {
    display: flex;
    width: 100%;
}

.belajar-btn.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

/* ==========================================
   1. HERO SECTION
   ========================================== */
.belajar-hero {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 50%), 
                linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.belajar-hero-content {
    max-width: 60%;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.belajar-hero h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.belajar-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 90%;
}

.hero-search {
    margin-bottom: 24px;
    max-width: 85%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-input-wrapper input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 10px 10px 10px 42px !important;
    font-size: 0.95rem;
    color: var(--dark);
    outline: none !important;
    box-shadow: none !important;
}

.btn-search {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 24px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-search:hover {
    background-color: var(--primary-hover);
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Floating visuals */
.hero-visual {
    position: relative;
    width: 35%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    font-weight: 700;
    color: var(--dark);
    animation: float 5s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.4rem;
}

.floating-card.c-1 {
    top: 20px;
    left: 10px;
    color: var(--primary);
    animation-delay: 0s;
}

.floating-card.c-2 {
    bottom: 30px;
    right: 10px;
    color: var(--warning);
    animation-delay: 1.5s;
}

.floating-card.c-3 {
    top: 130px;
    left: 80px;
    color: var(--emerald);
    animation-delay: 3s;
}

/* ==========================================
   2. STATS SECTION
   ========================================== */
.belajar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background-color: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin: 0;
}

.stat-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================
   3. CLASSES GRID
   ========================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    margin: 0 0 6px 0;
}

.section-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.05rem;
}

.view-all {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.view-all:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.class-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--border);
    transition: background-color 0.3s ease;
}

.class-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.class-card:hover::before {
    background-color: var(--primary);
}

.class-card:nth-child(2):hover::before {
    background-color: var(--emerald);
}

.class-card:nth-child(3):hover::before {
    background-color: var(--warning);
}

.class-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.class-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.class-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    min-height: 48px;
}

.class-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none !important;
    transition: gap 0.2s ease;
}

.class-card:hover .class-link {
    gap: 12px;
}

/* ==========================================
   4. SPLIT / COLUMNS LATEST SECTION
   ========================================== */
.belajar-split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.latest-materials-list,
.latest-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.material-list-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.material-list-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.item-badge-kelas {
    background-color: #f1f5f9;
    color: var(--dark);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 72px;
    text-align: center;
}

.item-content {
    flex-grow: 1;
}

.item-content h4 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
}

.item-content h4 a {
    color: var(--dark);
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.item-content h4 a:hover {
    color: var(--primary);
}

.item-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-download-icon {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-download-icon:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.post-list-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.post-list-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.post-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff;
    color: var(--primary);
    border-radius: var(--radius-sm);
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.post-date .day {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.post-date .month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

.item-badge-pub {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.pub-berita { background-color: rgba(59, 130, 246, 0.1); color: var(--primary); }
.pub-pengumuman { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }
.pub-artikel { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.pub-artikel-renungan { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.empty-text {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
}

/* ==========================================
   5. DIRECTORY LAYOUT (MATERI)
   ========================================== */
.materi-directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.directory-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 20px;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.sidebar-search-input {
    position: relative;
}

.sidebar-search-input input {
    width: 100%;
    padding: 10px 36px 10px 12px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    outline: none !important;
    font-size: 0.9rem;
    color: var(--dark);
    box-shadow: none !important;
    background-color: #fafafa !important;
}

.sidebar-search-input input:focus {
    border-color: var(--primary) !important;
    background-color: #ffffff !important;
}

.sidebar-search-input i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Radio Styling */
.filter-radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-main);
    font-weight: 500;
}

.filter-radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f1f5f9;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-radio-container:hover input ~ .radio-checkmark {
    background-color: #e2e8f0;
}

.filter-radio-container input:checked ~ .radio-checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 4px;
    left: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
}

.filter-radio-container input:checked ~ .radio-checkmark:after {
    display: block;
}

/* Checkbox Styling */
.filter-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-main);
    font-weight: 500;
}

.filter-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f1f5f9;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-checkbox-container:hover input ~ .checkbox-checkmark {
    background-color: #e2e8f0;
}

.filter-checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

/* Toolbar & Loader */
.directory-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.result-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-count span {
    color: var(--primary);
    font-weight: 700;
}

.loader-spinner {
    font-size: 1.2rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.loader-spinner.show {
    opacity: 1;
}

/* Materi Grid Layout */
.materi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.materi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.materi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.materi-card-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.materi-badge-kelas {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.materi-badge-kelas.class-kelas-x { background-color: rgba(59, 130, 246, 0.1); color: var(--primary); }
.materi-badge-kelas.class-kelas-xi { background-color: rgba(16, 185, 129, 0.1); color: var(--emerald); }
.materi-badge-kelas.class-kelas-xii { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.materi-badge-kelas.class-umum { background-color: #f1f5f9; color: var(--text-muted); }

.materi-badge-semester {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.materi-badge-semester.sem-semester-1 { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.materi-badge-semester.sem-semester-2 { background-color: rgba(236, 72, 153, 0.1); color: #ec4899; }
.materi-badge-semester.sem-umum { background-color: #f1f5f9; color: var(--text-muted); }

.materi-file-icon {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.materi-card:hover .materi-file-icon {
    color: var(--primary);
}

.materi-card-body {
    padding: 20px;
    flex-grow: 1;
}

.materi-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.materi-card-body h3 a {
    color: var(--dark);
    text-decoration: none !important;
}

.materi-card-body h3 a:hover {
    color: var(--primary);
}

.materi-card-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.materi-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.materi-tag {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.materi-card-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.materi-card:hover .materi-card-footer {
    border-color: #f1f5f9;
}

.btn-card-read {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.materi-card:hover .btn-card-read {
    color: var(--primary);
}

.btn-card-read:hover {
    gap: 8px;
}

.btn-card-download {
    background-color: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-card-download:hover {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================
   6. ARCHIVE PAGE HEADER (Category pages)
   ========================================== */
.archive-page-header {
    margin-bottom: 40px;
    padding: 32px 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.archive-page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 8px 0;
}

.archive-page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* ==========================================
   7. PUBLIKASI TABS & GRID
   ========================================== */
.publikasi-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
}

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

.tab-btn.active {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.2);
}

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

.publikasi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.publikasi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pub-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.pub-card-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 3rem;
}

.pub-card-gradient.gradient-1 { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.pub-card-gradient.gradient-2 { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.pub-card-gradient.gradient-3 { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.pub-card-gradient.gradient-4 { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }

.pub-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pub-badge.pub-berita { background-color: var(--primary); }
.pub-badge.pub-pengumuman { background-color: #ef4444; }
.pub-badge.pub-artikel { background-color: var(--warning); }
.pub-badge.pub-artikel-renungan { background-color: #8b5cf6; }

.pub-card-body {
    padding: 24px;
    flex-grow: 1;
}

.pub-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pub-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pub-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.pub-card-body h3 a {
    color: var(--dark);
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.pub-card-body h3 a:hover {
    color: var(--primary);
}

.pub-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.pub-card-footer {
    padding: 0 24px 24px 24px;
}

.btn-pub-read {
    color: var(--dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease, color 0.2s ease;
}

.btn-pub-read:hover {
    color: var(--primary);
    gap: 10px;
}

/* ==========================================
   7. PUSAT UNDUHAN
   ========================================== */
.download-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.download-header-tools {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background-color: #fafafa;
}

.download-search-wrapper {
    position: relative;
    max-width: 480px;
}

.download-search-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    outline: none !important;
    font-size: 0.95rem;
    box-shadow: none !important;
    background-color: #ffffff !important;
}

.download-search-wrapper input:focus {
    border-color: var(--primary) !important;
}

.download-search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.05rem;
}

.download-table-wrapper {
    overflow-x: auto;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.download-table th {
    background-color: #f1f5f9;
    color: var(--dark);
    font-weight: 700;
    padding: 16px 24px;
    border-bottom: 2px solid var(--border);
}

.download-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.download-row {
    transition: background-color 0.2s ease;
}

.download-row:hover {
    background-color: #f8fafc;
}

.file-info-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-table-icon {
    font-size: 1.8rem;
}

.icon-pdf { color: #ef4444; }
.icon-ppt { color: #f97316; }
.icon-doc { color: #3b82f6; }
.icon-zip { color: #8b5cf6; }

.file-title {
    font-weight: 600;
    color: var(--dark);
    display: block;
}

.file-meta-mobile {
    display: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.badge-table-kelas {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-table-kelas.class-kelas-x { background-color: rgba(59, 130, 246, 0.1); color: var(--primary); }
.badge-table-kelas.class-kelas-xi { background-color: rgba(16, 185, 129, 0.1); color: var(--emerald); }
.badge-table-kelas.class-kelas-xii { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-table-kelas.class-umum { background-color: #f1f5f9; color: var(--text-muted); }

.badge-type-file {
    background-color: #f1f5f9;
    color: var(--dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-download-table {
    white-space: nowrap;
}

.table-empty-message {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================
   8. KONTAK
   ========================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: stretch;
}

.contact-info {
    background-color: var(--dark);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info h3 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info p {
    color: #94a3b8;
    margin-bottom: 40px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 32px;
    text-align: center;
    margin-top: 4px;
}

.detail-item h4 {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0 0 6px 0;
}

.detail-item p {
    color: #cbd5e1;
    margin: 0;
    font-size: 0.95rem;
}

.contact-form-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.contact-form-container h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    padding: 12px 14px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    outline: none !important;
    font-size: 0.95rem;
    color: var(--dark) !important;
    background-color: #fafafa !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary) !important;
    background-color: #ffffff !important;
}

.contact-success-banner {
    text-align: center;
    padding: 30px;
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    color: var(--dark);
}

.contact-success-banner i {
    font-size: 3rem;
    color: var(--emerald);
    margin-bottom: 16px;
}

.contact-success-banner h3 {
    margin: 0 0 10px 0;
    color: var(--emerald);
}

.contact-success-banner p {
    margin: 0;
    color: var(--text-main);
}

.contact-error-banner {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 992px) {
    .belajar-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    
    .belajar-hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .hero-search {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        width: 100%;
        height: 200px;
    }
    
    .belajar-split-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .materi-directory-layout {
        grid-template-columns: 1fr;
    }
    
    .directory-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .download-table th.col-type,
    .download-table td.col-type {
        display: none;
    }
    
    .download-table th,
    .download-table td {
        padding: 12px 16px;
    }
    
    .file-meta-mobile {
        display: block;
    }
    
    .download-table th:not(:first-child):not(:last-child),
    .download-table td:not(:first-child):not(:last-child) {
        display: none;
    }
}

/* ==========================================
   10. STICKY FIXED HEADER (FRONTEND)
   ========================================== */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

body {
    padding-top: 100px !important;
}

/* Admin Bar Compatibility */
.admin-bar header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar header {
        top: 46px !important;
    }
    body {
        padding-top: 140px !important;
    }
}

/* ==========================================
   11. ANIMATED FRONTEND SLIDER
   ========================================== */
.belajar-slider-container {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 45px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.belajar-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.belajar-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    z-index: 1;
    display: flex;
    align-items: center;
}

.belajar-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 6s cubic-bezier(0.1, 0.8, 0.3, 1);
    z-index: -2;
}

.belajar-slide.active .slide-bg {
    transform: scale(1.06); /* Premium Ken Burns panning/zoom */
}

.slide-bg-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
}
.slide-bg-fallback.gradient-1 { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.slide-bg-fallback.gradient-2 { background: linear-gradient(135deg, #064e3b 0%, #10b981 100%); }
.slide-bg-fallback.gradient-3 { background: linear-gradient(135deg, #78350f 0%, #f59e0b 100%); }
.slide-bg-fallback.gradient-4 { background: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%); }

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.3) 100%);
    z-index: -1;
}

.slide-content-container {
    width: 100%;
    padding: 0 60px;
    z-index: 3;
}

.slide-content {
    max-width: 620px;
    color: #ffffff;
    text-align: left;
}

.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.1s;
}

.belajar-slide.active .slide-badge {
    transform: translateY(0);
    opacity: 1;
}

.slide-content h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #ffffff !important;
    font-weight: 800;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.3s;
}

.belajar-slide.active h2 {
    transform: translateY(0);
    opacity: 1;
}

.slide-desc {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.5s;
}

.slide-desc p {
    margin: 0;
    color: #cbd5e1 !important;
}

.belajar-slide.active .slide-desc {
    transform: translateY(0);
    opacity: 1;
}

.slide-content .belajar-btn {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.7s;
}

.belajar-slide.active .belajar-btn {
    transform: translateY(0);
    opacity: 1;
}

/* Slider Navigation Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.slider-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }

.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.slider-dot.active {
    background: #ffffff;
    width: 26px;
    border-radius: 100px;
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.6);
}

/* ==========================================
   12. RESPONSIVE MOBILE LAYOUT OVERRIDES
   ========================================== */
@media (max-width: 992px) {
    /* Fixed mobile header container */
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: #0f172a !important; /* Premium dark slate blue background */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        height: 60px !important; /* Solid fixed height to prevent collapse */
        padding: 0 !important;
    }
    
    .header-two {
        background: #0f172a !important;
        height: 100% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .header-two .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 20px !important;
    }

    .header-two .row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin: 0 !important;
        position: relative !important;
    }

    /* Target columns to align horizontally instead of stacking vertically */
    .header-two .col-lg-3, 
    .header-two .col-md-3,
    .header-two .col-lg-7,
    .header-two .col-md-7 {
        flex: 0 0 auto !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        position: static !important;
    }

    .header-two .logo {
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        height: 60px !important;
    }
    
    .header-two .logo h1.site-title {
        font-size: 1.3rem !important;
        margin: 0 !important;
        font-family: 'Outfit', sans-serif !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }

    .header-two .logo h1.site-title a {
        color: #ffffff !important; /* Ensure white color for visibility */
        text-decoration: none !important;
    }
    
    .header-two .logo p.site-description {
        display: none !important; /* Hide description on mobile */
    }
    
    /* Hide the phone block completely on mobile */
    .header-two .phone-wrap {
        display: none !important;
    }

    .header-two .col-lg-2, 
    .header-two .col-md-2 {
        display: none !important;
    }
    
    /* Reposition mobile hamburger menu to top right */
    .main-mobile-nav {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        right: 15px !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 10000 !important;
    }

    .main-mobile-menu {
        position: static !important;
        margin: 0 !important;
    }
    
    .menu-collapse-wrap {
        padding: 0 !important;
    }
    
    .hamburger-menu button.menu-collapsed {
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        display: block !important;
    }
    
    .hamburger-menu button.menu-collapsed div {
        background-color: #ffffff !important; /* White lines to match dark background */
        height: 3px !important;
        width: 24px !important;
        margin-bottom: 4px !important;
    }
    
    .hamburger-menu button.menu-collapsed div:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Push content down exactly below the 60px header */
    body {
        padding-top: 60px !important;
    }
    
    .admin-bar header {
        top: 46px !important; /* Push header down when logged in with mobile admin bar */
    }
    
    .admin-bar body {
        padding-top: 106px !important;
    }
}

@media (max-width: 768px) {
    /* Responsive Slider Tweaks */
    .belajar-slider-container {
        height: 380px !important;
        margin-bottom: 25px !important;
    }
    
    .slide-content-container {
        padding: 0 50px !important;
    }
    
    .slide-content {
        max-width: 100% !important;
    }
    
    .slide-badge {
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
        margin-bottom: 12px !important;
    }
    
    .slide-content h2 {
        font-size: 1.4rem !important;
        margin-bottom: 8px !important;
        line-height: 1.25 !important;
    }
    
    .slide-desc {
        font-size: 0.88rem !important;
        margin-bottom: 18px !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5 !important;
    }
    
    .slide-content .belajar-btn {
        padding: 8px 16px !important;
        font-size: 0.8rem !important;
    }
    
    .slider-arrow {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        background: rgba(15, 23, 42, 0.4) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }
    
    .slider-arrow.prev {
        left: 10px !important;
    }
    
    .slider-arrow.next {
        right: 10px !important;
    }
    
    .slider-dots {
        bottom: 12px !important;
    }
    
    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }
    
    .slider-dot.active {
        width: 18px !important;
    }
}








/* Custom Theme Structural Layout */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: var(--light);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--dark) !important;
    box-shadow: var(--shadow-sm);
    z-index: 9999;
    display: flex;
    align-items: center;
}

/* Keep space for the fixed header */
body.admin-bar .site-header {
    top: 32px;
}
body {
    padding-top: 60px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title-link {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo-text {
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.site-header-logo {
    max-height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
}

.site-header-logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Menu */
.site-navigation {
    display: flex;
    align-items: center;
    overflow: visible;
}

.nav-menu-wrapper {
    visibility: visible;
}

.nav-menu-wrapper ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav-menu-wrapper ul li {
    position: relative;
}

.nav-menu-wrapper ul li a {
    color: #e2e8f0;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-menu-wrapper ul li a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Dropdown Menus */
.nav-menu-wrapper ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px 0;
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
}

.nav-menu-wrapper ul li:hover > ul {
    display: flex;
}

.nav-menu-wrapper ul li ul li a {
    display: block;
    padding: 8px 20px;
    border-radius: 0;
    color: #cbd5e1;
}

.nav-menu-wrapper ul li ul li a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hamburger menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.menu-toggle .hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Main site layout wrapper */
.site-main-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 40px 0 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h3 {
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin: 0 0 10px 0;
}

.footer-info p {
    margin: 4px 0;
    font-size: 0.95rem;
}

.footer-address {
    color: var(--text-muted);
}

.footer-copyright {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Single Post Styles */
.single-post-article {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.post-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.post-title {
    font-size: 2.25rem;
    margin: 0 0 10px 0;
    color: var(--dark);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 20px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu-wrapper {
        position: fixed;
        top: 60px;
        right: -280px;
        width: 280px;
        height: calc(100vh - 60px);
        background-color: var(--dark);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        padding: 30px 20px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
        box-shadow: var(--shadow-lg);
        z-index: 9998;
        visibility: hidden;
        overflow-y: auto;
    }

    body.admin-bar .nav-menu-wrapper {
        top: 106px;
        height: calc(100vh - 106px);
    }

    .nav-menu-wrapper.active {
        right: 0;
        visibility: visible;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
    }

    .nav-menu-wrapper ul {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu-wrapper ul li ul {
        position: static;
        display: none;
        background-color: rgba(0, 0, 0, 0.15);
        border: none;
        box-shadow: none;
        padding: 5px 0 5px 15px;
        min-width: 0;
        margin-top: 5px;
    }

    .nav-menu-wrapper ul li.menu-item-has-children:hover > ul,
    .nav-menu-wrapper ul li.menu-item-has-children.active > ul {
        display: flex;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .site-branding {
        max-width: calc(100% - 50px);
    }
    
    .site-logo-text {
        font-size: 0.9rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-width: 100%;
        line-height: 1.2;
    }

    .site-header-logo {
        max-height: 30px !important;
    }

    .site-header-logo-icon {
        font-size: 1.35rem !important;
    }

    .menu-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
/* Gallery Styles */
.galeri-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.galeri-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.galeri-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}
.galeri-filter-btn:hover, .galeri-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.galeri-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.galeri-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.galeri-img-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio */
}
.galeri-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.galeri-item:hover .galeri-img-wrapper img {
    transform: scale(1.05);
}
.galeri-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    padding: 20px;
    text-align: center;
}
.galeri-item:hover .galeri-overlay {
    opacity: 1;
}
.galeri-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.galeri-overlay h4 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
}

/* Lightbox Styles */
.belajar-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.belajar-lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100000;
}
.lightbox-content-wrapper {
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox-content-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-content-wrapper iframe {
    width: 800px;
    max-width: 100vw;
    height: 450px;
    max-height: 80vh;
    border-radius: 8px;
    border: none;
}
.lightbox-title {
    color: white;
    margin-top: 15px;
    font-size: 1.2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9990;
    text-decoration: none !important;
}

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

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    color: #ffffff !important;
}

/* ============================================================
   MATERI CARD — FEATURED THUMBNAIL
   ============================================================ */
.materi-card-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.materi-card-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}
.materi-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.materi-card:hover .materi-card-thumbnail img {
    transform: scale(1.06);
}
.materi-card-thumbnail .materi-badge-kelas {
    position: absolute;
    top: 12px;
    left: 12px;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.materi-card-thumbnail .materi-badge-semester {
    position: absolute;
    bottom: 12px;
    left: 12px;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.materi-file-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    backdrop-filter: blur(4px);
}

/* ============================================================
   SINGLE MATERI — NEWS ARTICLE LAYOUT
   ============================================================ */
.sm-news-main {
    padding: 0 0 60px 0;
}

/* --- Hero with image --- */
.sm-news-hero {
    position: relative;
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
}
.sm-news-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15,23,42,0.2) 0%,
        rgba(15,23,42,0.75) 60%,
        rgba(15,23,42,0.92) 100%
    );
    z-index: 1;
}
.sm-news-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 40px;
}
.sm-news-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- No-image header --- */
.sm-news-header-noimg {
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a8a 100%);
    padding: 50px 0 40px;
    margin-bottom: 0;
}

/* --- Breadcrumb --- */
.sm-news-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 0.85rem;
}
.sm-news-breadcrumb a {
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}
.sm-news-breadcrumb a:hover { color: #ffffff !important; }
.sm-news-breadcrumb span { color: rgba(255,255,255,0.55); }
.sm-news-breadcrumb .bc-icon { color: rgba(255,255,255,0.4); font-size: 0.7rem; }
.sm-news-breadcrumb--dark a { color: rgba(255,255,255,0.7) !important; }
.sm-news-breadcrumb--dark span { color: rgba(255,255,255,0.45); }

/* --- Category badge --- */
.sm-news-kelas-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    backdrop-filter: blur(6px);
}
.sm-news-kelas-badge.class-kelas-x  { background: rgba(59,130,246,0.25); color: #93c5fd; border: 1px solid rgba(59,130,246,0.4); }
.sm-news-kelas-badge.class-kelas-xi { background: rgba(16,185,129,0.25); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.sm-news-kelas-badge.class-kelas-xii{ background: rgba(245,158,11,0.25); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); }
.sm-news-kelas-badge.class-umum     { background: rgba(255,255,255,0.15); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.2); }

/* --- Title --- */
.sm-news-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 16px rgba(0,0,0,0.3);
    max-width: 850px;
}
.sm-news-title--dark {
    color: #ffffff !important;
}

/* --- Hero meta --- */
.sm-news-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}
.sm-news-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sm-news-hero-meta i { color: rgba(255,255,255,0.5); }
.sm-news-hero-meta--dark { color: rgba(255,255,255,0.7); }

/* --- Two-column layout --- */
.sm-news-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    margin-top: 36px;
    align-items: start;
}

/* --- Article --- */
.sm-news-article {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Tags strip */
.sm-news-tags-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 36px 0;
}
.sm-news-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #f1f5f9;
    color: var(--primary) !important;
    text-decoration: none !important;
    border: 1px solid rgba(59,130,246,0.15);
    transition: all 0.2s;
}
.sm-news-tag:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
}

/* Article content */
.sm-news-content {
    padding: 30px 36px 36px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main);
}
.sm-news-content h2,
.sm-news-content h3,
.sm-news-content h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.sm-news-content h2 { font-size: 1.6rem; }
.sm-news-content h3 { font-size: 1.3rem; }
.sm-news-content p { margin-bottom: 1.3em; }
.sm-news-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin: 1em 0;
}
.sm-news-content ul,
.sm-news-content ol {
    padding-left: 1.6em;
    margin-bottom: 1.3em;
}
.sm-news-content li { margin-bottom: 0.4em; }
.sm-news-content a {
    color: var(--primary);
    text-decoration: underline;
}
.sm-news-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 1.5em 0;
    background: #eff6ff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #1e3a8a;
    font-style: italic;
}
.sm-news-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.95rem;
}
.sm-news-content table th,
.sm-news-content table td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}
.sm-news-content table th {
    background: #f1f5f9;
    font-weight: 700;
}

/* Article footer */
.sm-news-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 36px 28px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

/* Share buttons */
.sm-news-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}
.sm-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sm-share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.sm-share-fb { background: #1877f2; }
.sm-share-tw { background: #1da1f2; }
.sm-share-wa { background: #25d366; }

/* --- Sidebar --- */
.sm-news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}
.sm-sidebar-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Download card */
.sm-download-card {
    border-top: 4px solid var(--primary);
}
.sm-sidebar-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.sm-dl-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.sm-sidebar-card-header h3 {
    font-size: 1.1rem;
    margin: 0 0 2px;
}
.sm-dl-type {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}
.sm-dl-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sm-dl-meta-sep { color: #cbd5e1; }

/* Info card */
.sm-info-card .sm-sidebar-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sm-info-card .sm-sidebar-card-title i { color: var(--primary); }
.sm-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sm-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.sm-info-list li:last-child { border-bottom: none; }
.sm-info-label { color: var(--text-muted); }
.sm-info-list strong { color: var(--dark); font-weight: 700; }

/* Class link card */
.sm-class-link-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* ============================================================
   RESPONSIVE — Single Materi News
   ============================================================ */
@media (max-width: 1024px) {
    .sm-news-layout {
        grid-template-columns: 1fr;
    }
    .sm-news-sidebar {
        position: static;
    }
    .sm-news-hero {
        height: 360px;
    }
    .sm-news-title {
        font-size: 2rem;
    }
}
@media (max-width: 768px) {
    .sm-news-hero {
        height: 280px;
    }
    .sm-news-title {
        font-size: 1.5rem;
    }
    .sm-news-content {
        padding: 20px;
    }
    .sm-news-tags-strip {
        padding: 14px 20px 0;
    }
    .sm-news-article-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }
    .sm-news-hero-meta {
        gap: 12px;
        font-size: 0.8rem;
    }
    .sm-news-layout {
        margin-top: 24px;
    }
}

/* ============================================================
   UPDATE-SAFE POLISH: MATERI NEWS, CARDS, AND GALLERY
   ============================================================ */
.materi-card {
    min-height: 100%;
}

.materi-card-thumbnail {
    height: 190px;
    background: #e2e8f0;
}

.materi-card-body h3 {
    line-height: 1.35;
}

.materi-card-body p {
    line-height: 1.65;
}

.materi-card-footer {
    gap: 12px;
    flex-wrap: wrap;
}

.btn-card-download {
    max-width: 100%;
    white-space: nowrap;
}

.sm-news-hero {
    min-height: 460px;
}

.sm-news-hero-overlay {
    background:
        linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.72) 55%, rgba(15,23,42,0.94) 100%),
        linear-gradient(90deg, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.16) 70%) !important;
}

.sm-news-title {
    max-width: 980px;
    line-height: 1.08;
    letter-spacing: 0;
}

.sm-news-hero-meta {
    gap: 10px 18px;
    flex-wrap: wrap;
}

.sm-news-hero-meta span {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 7px 11px;
}

.sm-news-layout {
    align-items: start;
}

.sm-news-article,
.sm-sidebar-card {
    border-radius: 12px;
}

.sm-news-content {
    font-size: 1.02rem;
}

.sm-news-content p {
    line-height: 1.85;
}

.sm-info-list li {
    gap: 12px;
}

.galeri-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
}

.galeri-header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.galeri-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.galeri-filter-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 700;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.galeri-filter-btn:hover,
.galeri-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.galeri-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.galeri-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.galeri-img-wrapper {
    aspect-ratio: 4 / 3;
    position: relative;
}

.galeri-img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.galeri-item:hover .galeri-img-wrapper img {
    transform: scale(1.06);
}

.galeri-overlay {
    align-items: center;
    background: linear-gradient(180deg, rgba(15,23,42,0.02), rgba(15,23,42,0.82));
    color: #ffffff;
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: flex-end;
    opacity: 1;
    padding: 18px;
    position: absolute;
    text-align: center;
}

.galeri-icon {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.4rem;
    height: 46px;
    margin-bottom: 10px;
    width: 46px;
    align-items: center;
    justify-content: center;
}

.galeri-overlay h4 {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

@media (max-width: 768px) {
    .sm-news-hero {
        min-height: 390px;
    }

    .sm-news-hero-meta span {
        border-radius: 8px;
    }

    .galeri-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SINGLE MATERI FINAL TIDY PASS
   ============================================================ */
body.single-materi .site-main-content.sm-news-main {
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 52%, #f8fafc 100%);
    padding-bottom: 72px;
}

body.single-materi .sm-news-hero {
    height: clamp(360px, 42vw, 520px);
    min-height: 360px;
    background-color: #0f172a;
    background-position: center;
}

body.single-materi .sm-news-hero-content {
    padding: 0 0 52px;
}

body.single-materi .sm-news-breadcrumb {
    margin-bottom: 14px;
}

body.single-materi .sm-news-kelas-badge {
    margin-bottom: 12px;
}

body.single-materi .sm-news-title {
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    max-width: 980px;
    margin-bottom: 18px;
}

body.single-materi .sm-news-hero-meta span {
    min-height: 34px;
}

body.single-materi .sm-news-layout {
    grid-template-columns: minmax(0, 1fr) 424px;
    gap: 46px;
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

body.single-materi .sm-news-article,
body.single-materi .sm-sidebar-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body.single-materi .sm-news-tags-strip {
    padding: 24px 36px 0;
}

body.single-materi .sm-news-content {
    padding: 28px 44px 46px;
}

body.single-materi .sm-news-content > :first-child {
    margin-top: 0;
}

body.single-materi .sm-news-content h2,
body.single-materi .sm-news-content h3,
body.single-materi .sm-news-content h4 {
    line-height: 1.25;
}

body.single-materi .sm-news-content h3:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
}

body.single-materi .sm-news-content h3:first-child:before {
    background: linear-gradient(135deg, var(--primary), #0f766e);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 12px;
    width: 12px;
}

body.single-materi .sm-news-content p {
    color: #1e293b;
    font-size: 1.04rem;
    line-height: 1.9;
}

body.single-materi .sm-news-article-footer {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 22px 44px 30px;
}

body.single-materi .belajar-btn,
body.single-materi .btn-block {
    box-sizing: border-box;
}

body.single-materi .btn-block {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

body.single-materi .sm-news-sidebar {
    min-width: 0;
    top: 96px;
}

body.single-materi .sm-sidebar-card {
    overflow: hidden;
    padding: 28px 30px;
}

body.single-materi .sm-download-card {
    border-top-width: 5px;
}

body.single-materi .sm-sidebar-card-header {
    align-items: center;
    margin-bottom: 18px;
}

body.single-materi .sm-sidebar-card-header h3 {
    font-size: 1.28rem;
    line-height: 1.2;
}

body.single-materi .sm-dl-icon {
    border-radius: 14px;
    height: 64px;
    width: 64px;
}

body.single-materi .sm-dl-meta {
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.5;
    margin-bottom: 20px;
}

body.single-materi #btn-download-materi {
    min-height: 54px;
    padding-left: 18px;
    padding-right: 18px;
    white-space: normal;
}

body.single-materi .sm-info-list li {
    gap: 18px;
    line-height: 1.4;
    padding: 12px 0;
}

body.single-materi .sm-info-list strong {
    max-width: 52%;
    text-align: right;
}

body.single-materi .related-materi-section {
    margin-top: 46px;
}

@media (max-width: 1180px) {
    body.single-materi .sm-news-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    body.single-materi .sm-news-layout {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    body.single-materi .sm-news-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    body.single-materi .sm-news-hero {
        height: auto;
        min-height: 390px;
    }

    body.single-materi .sm-news-hero-content {
        padding-bottom: 34px;
        padding-top: 80px;
    }

    body.single-materi .sm-news-layout {
        margin-top: 24px;
    }

    body.single-materi .sm-news-tags-strip,
    body.single-materi .sm-news-content,
    body.single-materi .sm-news-article-footer {
        padding-left: 22px;
        padding-right: 22px;
    }

    body.single-materi .sm-sidebar-card {
        padding: 24px 22px;
    }
}

/* ============================================================
   SINGLE POST NEWS LAYOUT
   ============================================================ */
body.single-post .site-main-content.sm-news-main {
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 52%, #f8fafc 100%);
    padding-bottom: 72px;
}

body.single-post .sm-news-hero {
    height: clamp(360px, 42vw, 520px);
    min-height: 360px;
    background-color: #0f172a;
    background-position: center;
}

body.single-post .sm-news-hero-content {
    padding: 0 0 52px;
}

body.single-post .sm-post-badge {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e0f2fe;
    margin-bottom: 12px;
}

body.single-post .sm-news-title {
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    max-width: 980px;
    margin-bottom: 18px;
}

body.single-post .sm-news-hero-meta span {
    min-height: 34px;
}

body.single-post .sm-news-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 46px;
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

body.single-post .sm-news-article,
body.single-post .sm-sidebar-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body.single-post .sm-news-tags-strip {
    padding: 24px 36px 0;
}

body.single-post .sm-news-content {
    padding: 34px 44px 46px;
}

body.single-post .sm-news-content > :first-child {
    margin-top: 0;
}

body.single-post .sm-news-content p {
    color: #1e293b;
    font-size: 1.04rem;
    line-height: 1.9;
}

body.single-post .sm-news-content h2,
body.single-post .sm-news-content h3,
body.single-post .sm-news-content h4 {
    line-height: 1.25;
}

body.single-post .sm-news-article-footer {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 22px 44px 30px;
}

body.single-post .belajar-btn,
body.single-post .btn-block {
    box-sizing: border-box;
}

body.single-post .btn-block {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

body.single-post .sm-news-sidebar {
    min-width: 0;
    top: 96px;
}

body.single-post .sm-sidebar-card {
    overflow: hidden;
    padding: 28px 30px;
}

body.single-post .sm-info-list li {
    gap: 18px;
    line-height: 1.4;
    padding: 12px 0;
}

body.single-post .sm-info-list strong {
    max-width: 54%;
    text-align: right;
}

.sm-related-posts-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sm-related-post-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sm-related-post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.sm-related-post-image {
    background: #e2e8f0;
    display: block;
    height: 172px;
    overflow: hidden;
}

.sm-related-post-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    width: 100%;
}

.sm-related-post-card:hover .sm-related-post-image img {
    transform: scale(1.05);
}

.sm-related-post-body {
    padding: 18px;
}

.sm-related-post-body span {
    color: var(--text-muted);
    display: inline-flex;
    font-size: 0.82rem;
    gap: 6px;
    margin-bottom: 10px;
}

.sm-related-post-body h4 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 8px;
}

.sm-related-post-body h4 a {
    color: var(--dark);
    text-decoration: none !important;
}

.sm-related-post-body h4 a:hover {
    color: var(--primary);
}

.sm-related-post-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1024px) {
    body.single-post .sm-news-layout {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    body.single-post .sm-news-sidebar {
        position: static;
    }

    .sm-related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.single-post .sm-news-hero {
        height: auto;
        min-height: 390px;
    }

    body.single-post .sm-news-hero-content {
        padding-bottom: 34px;
        padding-top: 80px;
    }

    body.single-post .sm-news-layout {
        margin-top: 24px;
    }

    body.single-post .sm-news-tags-strip,
    body.single-post .sm-news-content,
    body.single-post .sm-news-article-footer {
        padding-left: 22px;
        padding-right: 22px;
    }

    body.single-post .sm-sidebar-card {
        padding: 24px 22px;
    }
}

/* ==========================================
   6. ARCHIVE & CATEGORY PAGE STYLES (PREMIUM)
   ========================================== */
.archive-page-wrapper {
    margin-bottom: 70px;
}

.archive-page-header {
    background: radial-gradient(circle at 95% 0%, rgba(59, 130, 246, 0.12) 0%, rgba(16, 185, 129, 0.05) 50%, rgba(255, 255, 255, 0) 100%), 
                linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.05), var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.archive-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--emerald) 100%);
}

.archive-page-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, var(--dark) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.archive-page-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    max-width: 720px;
}

/* Post list grid with premium spacing */
.archive-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Card item with smooth transition */
.archive-post-item {
    background-color: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease;
}

.archive-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 40px -10px rgba(15, 23, 42, 0.08), 0 10px 20px -15px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.25);
}

/* ── Thumbnail: aspect-ratio 16:9 box (bulletproof) ── */
.archive-post-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;   /* creates the 16:9 height */
    overflow: hidden;
    background-color: #e2e8f0;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
    display: block;
}

.archive-post-thumbnail a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    overflow: hidden !important;
}

.archive-post-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: transform 0.5s ease !important;
}

.archive-post-item:hover .archive-post-thumbnail img {
    transform: scale(1.06) !important;
}

.archive-post-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.3), transparent);
    pointer-events: none;
    z-index: 2;
}

/* Floating overlay badge on thumbnail if present */
.archive-post-item.has-post-thumbnail .archive-post-meta .item-badge-pub {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Solid background colors for floating badges on thumbnails to ensure high contrast */
.archive-post-item.has-post-thumbnail .pub-berita,
.archive-post-item.has-post-thumbnail .pub-berita-kegiatan {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}
.archive-post-item.has-post-thumbnail .pub-pengumuman {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}
.archive-post-item.has-post-thumbnail .pub-artikel {
    background-color: var(--warning) !important;
    color: #ffffff !important;
}
.archive-post-item.has-post-thumbnail .pub-artikel-renungan {
    background-color: #8b5cf6 !important;
    color: #ffffff !important;
}

/* Global category color for berita-kegiatan */
.pub-berita-kegiatan {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Post body */
.archive-post-body {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta styling */
.archive-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.archive-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.archive-post-meta span i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Post Title */
.archive-post-body h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.archive-post-body h2 a {
    color: var(--dark);
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.archive-post-body h2 a:hover {
    color: var(--primary);
}

/* Excerpt text style */
.archive-post-body p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 24px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Premium dynamic CTA button */
.archive-post-body .belajar-btn.btn-secondary {
    align-self: flex-start;
    margin-top: auto;
    background-color: #f8fafc;
    border: 1px solid var(--border);
    color: var(--dark) !important;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.archive-post-body .belajar-btn.btn-secondary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(var(--primary-rgb), 0.4);
}

.archive-post-body .belajar-btn.btn-secondary i {
    transition: transform 0.3s ease;
}

.archive-post-body .belajar-btn.btn-secondary:hover i {
    transform: translateX(4px);
}

/* Pill-shaped modern pagination */
.archive-pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.archive-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 6px;
    margin: 0;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
}

.archive-pagination ul.page-numbers li {
    margin: 0;
}

.archive-pagination ul.page-numbers a,
.archive-pagination ul.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.archive-pagination ul.page-numbers a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.archive-pagination ul.page-numbers span.current {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 16px -4px rgba(var(--primary-rgb), 0.3);
}

/* No Results styling */
.no-results {
    text-align: center;
    padding: 70px 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .archive-page-header {
        padding: 35px 24px;
        margin-bottom: 30px;
        border-radius: 20px;
    }
    
    .archive-page-header h1 {
        font-size: 2.2rem;
    }
    
    .archive-posts-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .archive-post-item.has-post-thumbnail .archive-post-meta .item-badge-pub {
        position: static;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        margin-bottom: 0;
    }
}
