/* =============================
   SPEMARGA News — Custom Styles
   ============================= */

* {
    scroll-behavior: smooth;
}

body {
    background-color: #f8f9fa;
}

a {
    transition: all 0.15s ease;
}

/* Card & shadow konsisten di seluruh situs */
.card {
    border-radius: 10px;
    overflow: hidden;
}

.img-thumbnail {
    border-radius: 8px;
}

/* Line-clamp buat judul biar rapi kalau kepanjangan (fallback selain overflow:hidden manual) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeleton loading placeholder (opsional, buat dipakai kalau nanti ada lazy load) */
.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Badge kategori variasi warna per kategori (opsional dipakai gantiin badge-kategori tunggal) */
.badge-prestasi { background-color: #C9A227; color: #00573F; }
.badge-kegiatan { background-color: #00573F; color: #ffffff; }
.badge-pengumuman { background-color: #B33951; color: #ffffff; }
.badge-akademik { background-color: #2E5EAA; color: #ffffff; }

/* Scrollbar tipis biar lebih modern (opsional, browser modern only) */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #00573F;
    border-radius: 10px;
}

/* Fokus aksesibilitas: outline jelas pas navigasi keyboard */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

/* Responsif: kecilin ukuran font judul artikel di HP biar gak numpuk sama bottom nav */
@media (max-width: 576px) {
    .section-title {
        font-size: 1.3rem;
    }
    .article-title {
        font-size: 1.1rem;
    }
}

.konten-artikel img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.konten-artikel p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.konten-artikel ul,
.konten-artikel ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

/* ===== Hero Slider Modern ===== */
.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    max-height: 480px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    background-color: #000;
}

@media (max-width: 576px) {
    .hero-slider {
        aspect-ratio: 4 / 5;
        max-height: 420px;
        border-radius: 0 0 14px 14px;
    }
}

.hero-item {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,0) 70%);
}

.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 40px;
    color: #fff;
    z-index: 2;
}

@media (max-width: 576px) {
    .hero-caption {
        padding: 18px 20px;
    }
}

.hero-caption a {
    color: #fff;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1.3;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.2rem;
    }
}

.hero-subtitle {
    font-size: .95rem;
    opacity: .9;
    margin-bottom: 10px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--nu-gold);
    color: var(--nu-green) !important;
    font-weight: 600;
    font-size: .85rem;
    padding: 6px 16px;
    border-radius: 20px;
}

/* Progress bar indicator (ganti dots default Bootstrap) */
.hero-progress {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.hero-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,.35);
    border: none;
    border-radius: 3px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-progress-bar.active {
    background: rgba(255,255,255,.35);
}

.hero-progress-bar.active::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 100%;
    background: var(--nu-gold);
}

@keyframes hero-progress-fill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Tombol navigasi custom (ganti default Bootstrap carousel-control) */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 3;
    transition: background .2s ease;
}

.hero-nav:hover {
    background: rgba(0,0,0,.6);
}

.hero-nav-prev { left: 16px; }
.hero-nav-next { right: 16px; }

@media (max-width: 576px) {
    .hero-nav {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

.hero-slider .carousel-inner,
.hero-slider .carousel-item,
.hero-slider .hero-item {
    height: 100%;
}

.hero-slider .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: block;
    opacity: 0;
    transition: opacity .6s ease-in-out;
    pointer-events: none;
}

.hero-slider .carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.btn-unmute {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    border: none;
    font-size: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-unmute:hover {
    background: rgba(0,0,0,.7);
}

/* Print-friendly: sembunyikan navbar & footer pas dicetak (misal buat print pengumuman) */
@media print {
    nav, footer, .bottom-nav {
        display: none !important;
    }
}