/* === KSMI Frontend Styles === */

:root {
    --ksmi-primary: #0d6efd;
    --ksmi-dark: #1a1a2e;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
}

/* Hover cards */
.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.15) !important;
}

/* Hero */
.hero-section {
    background-attachment: fixed;
}
.min-vh-50 { min-height: 50vh; }

/* Navbar */
.navbar-brand img { height: 40px; width: auto; }

/* Berita */
.berita-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Galeri grid */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.galeri-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 1;
    cursor: pointer;
}
.galeri-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.galeri-item:hover img { transform: scale(1.05); }
.galeri-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}
.galeri-item:hover .overlay { opacity: 1; }

/* Anggota card */
.anggota-card {
    text-align: center;
}
.anggota-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--ksmi-primary);
}

/* Kartu anggota (print) */
.kartu-anggota {
    width: 85.6mm;
    height: 54mm;
    border-radius: 8px;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: white;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

/* Breadcrumb */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* Pagination */
.pagination .page-link {
    color: var(--ksmi-primary);
}
.pagination .page-item.active .page-link {
    background-color: var(--ksmi-primary);
    border-color: var(--ksmi-primary);
}

/* Footer */
footer a:hover { color: white !important; }

/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90%; max-height: 90vh; border-radius: 4px; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

@media (max-width: 768px) {
    .hero-section { min-height: 400px; }
    .galeri-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media print {
    nav, footer, .btn, .breadcrumb-section { display: none !important; }
}
