/* ========================================
   GALERI & BERITA STYLES (Isolated)
   File: assets/css/galeri.css
   ======================================== */

/* 1. UTILS & CONTAINER */
.gal-container {
    max-width: var(--portal-container, 1200px);
    margin: 0 auto;
    padding: 0 24px;
}

.gal-heading {
    text-align: center;
    font-size: 1.8rem;
    color: var(--portal-secondary);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.gal-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--portal-primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.gal-section-desc {
    text-align: center;
    color: var(--portal-text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1rem;
}

/* Placeholder Image Styling (Pengganti gambar sementara) */
.gal-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}
.gal-img-placeholder.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.gal-img-placeholder.green { background: linear-gradient(135deg, #10b981, #059669); }
.gal-img-placeholder.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.gal-img-placeholder.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.gal-img-placeholder.red { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* 2. HERO SECTION */
.gal-hero {
    background: linear-gradient(135deg, var(--portal-primary) 0%, #1e3a8a 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gal-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.gal-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

.gal-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.gal-subtitle {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* 3. ARTIKEL & BERITA */
.gal-articles {
    padding: 60px 0;
    background-color: var(--portal-bg);
}

.gal-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.gal-article-card {
    background: var(--portal-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gal-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.gal-article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gal-category-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--portal-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.gal-article-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gal-article-meta {
    font-size: 0.8rem;
    color: var(--portal-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gal-article-body h3 {
    font-size: 1.15rem;
    color: var(--portal-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.gal-article-body p {
    font-size: 0.9rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Properti standar untuk menghilangkan warning */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gal-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--portal-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
    text-decoration: none;
}

.gal-read-more:hover {
    gap: 10px;
}

/* 4. GALERI FOTO */
.gal-photos {
    padding: 60px 0;
    background-color: var(--portal-surface);
}

.gal-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.gal-photo-card {
    background: var(--portal-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    transition: all 0.3s ease;
}

.gal-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.gal-photo-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* Efek zoom pada gambar saat hover */
.gal-photo-img .gal-img-placeholder {
    transition: transform 0.5s ease;
}
.gal-photo-card:hover .gal-photo-img .gal-img-placeholder {
    transform: scale(1.1);
}

.gal-photo-info {
    padding: 16px;
}

.gal-photo-info h4 {
    font-size: 1rem;
    color: var(--portal-secondary);
    margin-bottom: 6px;
    font-weight: 700;
}

.gal-photo-info span {
    font-size: 0.85rem;
    color: var(--portal-text-muted);
    line-height: 1.4;
    display: block;
}

/* 5. RESPONSIVE MOBILE (App-Like) */
@media (max-width: 768px) {
    .gal-container { padding: 0 16px; }
    
    .gal-hero { padding: 50px 0 40px; }
    .gal-title { font-size: 1.8rem; }
    .gal-subtitle { font-size: 0.95rem; }
    
    .gal-heading { font-size: 1.5rem; margin-bottom: 12px; }
    .gal-section-desc { font-size: 0.9rem; margin-bottom: 30px; }

    /* Artikel: 1 Kolom di HP */
    .gal-articles { padding: 40px 0; }
    .gal-article-grid { grid-template-columns: 1fr; gap: 20px; }
    .gal-article-image { height: 180px; }
    .gal-article-body { padding: 20px; }
    .gal-article-body h3 { font-size: 1.05rem; }

    /* Galeri Foto: 2 Kolom di HP agar mirip aplikasi galeri */
    .gal-photos { padding: 40px 0; }
    .gal-photo-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 12px; 
    }
    .gal-photo-img { height: 140px; }
    .gal-photo-info { padding: 12px; }
    .gal-photo-info h4 { font-size: 0.85rem; margin-bottom: 4px; }
    .gal-photo-info span { 
        font-size: 0.75rem; 
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        line-clamp: 2; 
        -webkit-box-orient: vertical; 
        overflow: hidden; 
    }
}

@media (max-width: 380px) {
    .gal-photo-grid { grid-template-columns: 1fr; } /* 1 Kolom di HP sangat kecil */
    .gal-photo-img { height: 180px; }
    .gal-photo-info span { display: block; }
}