/* Custom CSS untuk Yayasan Saunah Kaltim */

/* Font Face Declaration untuk DyeLine */
/* 
 * CATATAN: Pastikan file font DyeLine tersedia di folder assets/fonts/ sebelum mengaktifkan @font-face
 * Format yang didukung: DyeLine.woff2, DyeLine.woff, DyeLine.ttf, atau DyeLine.otf
 * 
 * Untuk mengaktifkan font, uncomment bagian @font-face di bawah ini
 * dan pastikan file font sudah diunggah ke server.
 */

/* Uncomment bagian ini setelah file font DyeLine sudah diunggah ke assets/fonts/ */
/*
@font-face {
    font-family: 'DyeLine';
    src: url('../fonts/DyeLine.woff2') format('woff2'),
         url('../fonts/DyeLine.woff') format('woff'),
         url('../fonts/DyeLine.ttf') format('truetype'),
         url('../fonts/DyeLine.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
*/

/* Root Variables */
:root {
    --primary-color: #1a5c34;
    --secondary-color: #2ecc71;
    --accent-color: #27ae60;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --mobile-bottom-nav-height: 80px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --accent-color: #1a5c34;
    --text-color: #e0e0e0;
    --light-bg: #1a1a1a;
    --white: #2d2d2d;
    --shadow: 0 2px 10px rgba(0,0,0,0.5);
    --dark-bg: #1a1a1a;
    --dark-card: #2d2d2d;
    --dark-text: #e0e0e0;
    --dark-border: #404040;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DyeLine', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Body */
[data-theme="dark"] body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #0a0404;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--dark-text);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: left;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.brand-section {
    padding: 10px 0;
    position: relative;
}

/* Gambar Junaidi di pojok kanan atas header */
.header-junaidi-image {
    position: absolute;
    top: 5px;
    right: 20px;
    z-index: 10;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid #1a5c34;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.junaidi-header-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-section .navbar-brand {
    margin: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.brand-text {
    margin-left: 10px;
    font-size: 1.2rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Navbar hijau tua dengan teks putih */
.navbar[style*="background-color: #1a5c34"] .nav-link {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.navbar[style*="background-color: #1a5c34"] .nav-link:hover {
    color: #2ecc71 !important;
    opacity: 0.9;
}

.navbar[style*="background-color: #1a5c34"] .nav-link.active {
    color: #2ecc71 !important;
    background-color: rgba(46, 204, 113, 0.2);
    border-radius: 5px;
}

.navbar[style*="background-color: #1a5c34"] .dropdown-toggle::after {
    border-top-color: #ffffff;
}

.navbar[style*="background-color: #1a5c34"] .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #1a5c34;
}

.navbar[style*="background-color: #1a5c34"] .dropdown-item:hover {
    background-color: #1a5c34;
    color: #ffffff;
}

/* Main Content */
.main-content {
    margin-top: 130px;
    min-height: calc(100vh - 130px);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: calc(100vh - 130px);
    min-height: 520px;
    overflow: hidden;
    border-radius: 0 0 22px 22px;
}

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

.hero-slide {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 700px at 15% 20%, rgba(46, 204, 113, 0.35), transparent 60%),
        radial-gradient(900px 500px at 85% 40%, rgba(26, 92, 52, 0.55), transparent 60%),
        linear-gradient(135deg, rgba(26, 92, 52, 0.72), rgba(46, 204, 113, 0.45));
    z-index: 2;
    animation: heroOverlayShift 10s ease-in-out infinite alternate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.08);
    filter: saturate(1.15) contrast(1.05);
    z-index: 1;
    animation: heroKenBurns 14s ease-in-out infinite alternate;
}

.hero-carousel .carousel-item:not(.active) .hero-bg {
    animation: none;
}

.hero-shapes {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    transform: rotate(18deg);
    animation: heroFloat 8s ease-in-out infinite;
}

.hero-shape-1 {
    top: -80px;
    left: -60px;
}
.hero-shape-2 {
    bottom: -110px;
    right: 8%;
    width: 320px;
    height: 320px;
    border-radius: 40px;
    animation-duration: 10s;
}
.hero-shape-3 {
    top: 18%;
    right: -120px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    animation-duration: 9s;
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 1.75rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 52ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(6px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 56px;
    opacity: 0.95;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.25));
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.55);
}

.hero-carousel .carousel-indicators .active {
    background-color: #2ecc71;
}

/* Hero entrance animations (triggered by JS via .hero-animate on active slide) */
.hero-carousel .carousel-item .hero-badge,
.hero-carousel .carousel-item .hero-title,
.hero-carousel .carousel-item .hero-subtitle,
.hero-carousel .carousel-item .hero-actions {
    opacity: 0;
    transform: translateY(14px);
}

/* Fallback: without JS, keep active slide visible */
.hero-carousel .carousel-item.active .hero-badge,
.hero-carousel .carousel-item.active .hero-title,
.hero-carousel .carousel-item.active .hero-subtitle,
.hero-carousel .carousel-item.active .hero-actions {
    opacity: 1;
    transform: none;
}

/* With JS, re-trigger animations per slide */
.hero-carousel .carousel-item.hero-animate .hero-badge {
    animation: heroFadeUp 900ms ease forwards;
}
.hero-carousel .carousel-item.hero-animate .hero-title {
    animation: heroFadeUp 900ms ease forwards;
    animation-delay: 120ms;
}
.hero-carousel .carousel-item.hero-animate .hero-subtitle {
    animation: heroFadeUp 900ms ease forwards;
    animation-delay: 240ms;
}
.hero-carousel .carousel-item.hero-animate .hero-actions {
    animation: heroFadeUp 900ms ease forwards;
    animation-delay: 360ms;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes heroKenBurns {
    from { transform: scale(1.05); }
    to { transform: scale(1.13); }
}

@keyframes heroOverlayShift {
    from { opacity: 0.92; filter: hue-rotate(0deg); }
    to { opacity: 1; filter: hue-rotate(8deg); }
}

@keyframes heroFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(18deg); }
    50% { transform: translate3d(0, 18px, 0) rotate(22deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero-slide::before,
    .hero-shape,
    .carousel-item.hero-animate .hero-badge,
    .carousel-item.hero-animate .hero-title,
    .carousel-item.hero-animate .hero-subtitle,
    .carousel-item.hero-animate .hero-actions {
        animation: none !important;
        transition: none !important;
    }
    .carousel-item .hero-badge,
    .carousel-item .hero-title,
    .carousel-item .hero-subtitle,
    .carousel-item .hero-actions {
        opacity: 1;
        transform: none;
    }
}

.btn-donasi {
    background: var(--secondary-color);
    border: none;
    color: var(--white);
    font-weight: 600;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-donasi:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
    background-color: var(--white);
}

[data-theme="dark"] .card {
    background-color: var(--dark-card);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.program-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

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

/* Galeri Styles */
.galeri-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.galeri-item:hover {
    transform: scale(1.05);
}

.galeri-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Footer Styles */
.footer {
    background: var(--primary-color) !important;
    margin-top: 50px;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-text {
    color: #ccc;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-info {
    color: #ccc;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.contact-item i {
    width: 20px;
    margin-right: 10px;
    color: var(--secondary-color);
}

.footer-divider {
    border-color: #444;
    margin: 2rem 0 1rem;
}

.footer-copyright {
    color: #999;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 92, 52, 0.25);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Badge Styles */
.badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 15px;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    border-radius: var(--border-radius);
    margin: 0 2px;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .brand-section {
        padding: 8px 0;
    }
    
    .brand-section .navbar-brand img {
        height: 50px;
    }
    
    /* Gambar Junaidi di header - ukuran lebih kecil untuk mobile */
    .header-junaidi-image {
        width: 50px;
        height: 50px;
        top: 3px;
        right: 10px;
        border-width: 2px;
    }
    
    .main-content {
        margin-top: 120px;
    }

    .hero-section {
        height: calc(100vh - 120px);
        min-height: 520px;
        border-radius: 0 0 18px 18px;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn-donasi {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .btn-hero-secondary {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Dark Mode Additional Styles */
[data-theme="dark"] section {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

[data-theme="dark"] .bg-light {
    background-color: var(--dark-bg) !important;
}

[data-theme="dark"] .all-news-section {
    background-color: var(--dark-bg) !important;
}

[data-theme="dark"] .all-news-title {
    color: var(--dark-text) !important;
}

[data-theme="dark"] .program-simple-block {
    background-color: transparent;
}

[data-theme="dark"] .program-simple-header {
    color: var(--primary-color);
}

[data-theme="dark"] .program-simple-text {
    color: var(--dark-text);
}

[data-theme="dark"] .berita-card {
    background-color: var(--dark-card);
    color: var(--dark-text);
}

[data-theme="dark"] .berita-card .card-title {
    color: var(--dark-text);
}

[data-theme="dark"] .berita-card .card-text {
    color: #b0b0b0;
}

[data-theme="dark"] .breadcrumb-section {
    background-color: var(--dark-bg) !important;
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color);
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--dark-text);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--mobile-bottom-nav-height);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: #1a5c34;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 2px;
    z-index: 999;
}

.mobile-bottom-nav a {
    flex: 1;
    min-width: 0;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.mobile-bottom-nav a i {
    font-size: 18px;
    line-height: 1;
}

.mobile-bottom-nav a span {
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.mobile-bottom-nav a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.mobile-bottom-nav a.active i {
    color: #2ecc71;
}

.mobile-bottom-nav a:active {
    background-color: rgba(255, 255, 255, 0.18);
}

/* Home Center Icon - Parent Icon */
.mobile-bottom-nav a.nav-home-center {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #2ecc71;
    color: #ffffff;
    transform: translateY(-15px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
    padding: 0;
    margin: 0 4px;
    max-width: none;
}

.mobile-bottom-nav a.nav-home-center i {
    font-size: 28px;
    margin-bottom: 2px;
}

.mobile-bottom-nav a.nav-home-center span {
    font-size: 10px;
    font-weight: 700;
}

.mobile-bottom-nav a.nav-home-center.active {
    background: #2ecc71;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.5);
}

.mobile-bottom-nav a.nav-home-center.active i {
    color: #ffffff;
}

.mobile-bottom-nav a.nav-home-center:active {
    transform: translateY(-13px) scale(0.95);
    background: #27ae60;
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }

    .footer {
        padding-bottom: calc(2.5rem + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

/* =========================================================
   Hero Covers Slider (4 cover per slide)
   ========================================================= */
.hero-covers {
    padding: 26px 0 10px;
    background: linear-gradient(180deg, rgba(26, 92, 52, 0.08), rgba(255,255,255,0) 55%);
}

/* Container untuk membatasi viewport agar hanya menampilkan 4 card */
.hero-covers-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.hero-covers-header {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

/* Marquee / teks berjalan */
.hero-covers-marquee {
    flex: 1;
    overflow: hidden;
    padding: 10px 14px;
}

.hero-covers-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    color: #1a5c34;
    font-weight: 800;
    letter-spacing: 0.02em;
    will-change: transform;
    animation: heroCoversMarquee 14s linear infinite;
}

.hero-covers-marquee-sep {
    opacity: 0.85;
}

@keyframes heroCoversMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-33.33%); }
}

.hero-covers-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 8px 0;
}

.hero-covers-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(26, 92, 52, 0.25);
    background: #ffffff;
    color: #1a5c34;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-covers-btn:hover {
    transform: translateY(-1px);
    background: rgba(26, 92, 52, 0.06);
}

.hero-covers-btn:active {
    transform: translateY(0);
}

/* Style untuk tombol play/pause */
.hero-covers-btn[data-hero-covers-play] i.fa-play {
    display: inline-block;
}

.hero-covers-btn[data-hero-covers-play] i.fa-pause {
    display: none;
}

.hero-covers-btn[data-hero-covers-play].playing i.fa-play {
    display: none;
}

.hero-covers-btn[data-hero-covers-play].playing i.fa-pause {
    display: inline-block;
}

.hero-covers-viewport {
    overflow: hidden;
    padding: 8px 0 18px;
    /* Membatasi viewport agar menampilkan 4 card per slide */
    /* Lebar 4 card: (270px * 4) + (18px gap * 3) = 1134px */
    width: 100%;
    max-width: 1134px;
    margin: 0 auto;
    position: relative;
}

.hero-covers-track {
    display: flex;
    gap: 18px;
    padding: 0;
    /* Width untuk menampilkan 4 card per slide: (270px * 4) + (18px gap * 3) = 1134px */
    width: max-content;
    transition: transform 0.6s ease;
    will-change: transform;
}

.cover-card {
    flex: 0 0 auto;
    width: 270px;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #111;
    box-shadow: 0 14px 30px rgba(0,0,0,0.16);
    text-decoration: none;
    color: #fff;
    transform: translateZ(0);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cover-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

/* Untuk desktop: pastikan viewport menampilkan tepat 4 card */
@media (min-width: 1200px) {
    .hero-covers-viewport {
        max-width: 1134px;
    }
}

/* Untuk tablet: tampilkan 3 card */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-covers-viewport {
        max-width: calc(270px * 3 + 18px * 2); /* 846px */
    }
}

.cover-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 500px at 50% 100%, rgba(0,0,0,0.55), transparent 55%);
    pointer-events: none;
    z-index: 2;
}

.cover-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.05) contrast(1.02);
    transition: transform 0.6s ease;
}

.cover-card:hover .cover-card-img {
    transform: scale(1.08);
}

.cover-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 12px 8px;
    z-index: 3;
    background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

.cover-card-brand {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 0.95;
    opacity: 0.82;
    -webkit-text-stroke: 1px rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.18);
    text-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.cover-card-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.9);
}

.cover-card-week {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 4px 8px;
}

.cover-card-date {
    opacity: 0.9;
}

.cover-card-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 14px 18px;
    z-index: 3;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.82));
}

.cover-card-headline {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-covers {
        padding-top: 18px;
    }

    .hero-covers-title {
        font-size: 1.6rem;
    }

    .hero-covers-controls {
        display: none;
    }

    .hero-covers-marquee-track {
        animation-duration: 12s;
    }

    .hero-covers-track {
        padding: 0 16px;
        gap: 14px;
    }

    .cover-card {
        width: 72vw;
        max-width: 320px;
        height: 440px;
    }

    .cover-card-brand {
        font-size: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-covers-viewport {
        scroll-behavior: auto;
    }
    .cover-card-img {
        transition: none;
    }
    .hero-covers-marquee-track {
        animation: none;
    }
}
