:root {
    --primary-color: #15499A;
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.section-title-custom {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.card-custom {
    border: 1px solid #e9ecef;
    transition: .3s;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

body {
    background: #edf6f6;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)),
        url('assets/img/slider/slider.png');
    background-size: cover;
    background-position: center;
    min-height: 650px;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.section-title {
    font-weight: 700;
    margin-bottom: 20px;
}

.program-card {
    transition: .3s;
    border: none;
}

.program-card:hover {
    transform: translateY(-8px);
}

.stats {
    background: #f8f9fa;
}

.stats h2 {
    color: #15499A;
    font-weight: 700;
}

.testimonial {
    background: #f8f9fa;
}

footer {
    background: #212529;
    color: #fff;
}

.btn-success {
    --bs-btn-bg: #15499A;
}

.navbar-transparent {
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.navbar {
    transition: all 0.3s ease;
}

.navbar-scroll {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    transition: .3s;
}

.navbar-nav .nav-link:hover {
    color: #15499A;
}

.navbar-nav .nav-link.active {
    color: #15499A !important;
    font-weight: 700;
}

/* Slider */

.hero-section {
    padding: 40px 20px;
}

.heroSwiper {
    overflow: visible;
    padding-bottom: 60px;
}

.heroSwiper .swiper-slide {
    width: 100%;
    opacity: .15;
    transition: .4s;
    transform: scale(.85);
}

.heroSwiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.heroSwiper .swiper-slide img {
    width: 100%;
    border-radius: 22px;
    display: block;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

.swiper-button-prev,
.swiper-button-next {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 18px;
    color: #15499A;
    font-weight: 700;
}

.swiper-pagination {
    bottom: 10px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #c6d6d6;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    width: 32px;
    border-radius: 20px;
    background: #15499A;
}

.hero-content {
    text-align: center;
    margin-top: 20px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 700;
    color: #0e2535;
}

.hero-content p {
    max-width: 750px;
    margin: auto;
    color: #667085;
    font-size: 18px;
    line-height: 1.8;
}

.btn-donasi {
    display: inline-block;
    margin-top: 25px;
    background: #15499A;
    color: #fff;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    transition: .3s;
}

.btn-donasi:hover {
    background: #1068f4;
    color: #fff;
}

/* Modal */

.modal-content {
    border-radius: 20px;
}

.btn-check:checked+.btn-outline-success {
    background: #15499A;
    border-color: #15499A;
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 12px;
}

.btn-success {
    background: #15499A;
    border: none;
    border-radius: 12px;
}

.btn-success:hover {
    background: #1068f4;
    border: none;
    border-radius: 12px;
}

.btn-outline-success {
    --bs-btn-color: #15499A;
    --bs-btn-border-color: #15499A;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #115499A;
    --bs-btn-hover-border-color: #15499A;
    --bs-btn-focus-shadow-rgb: 25, 135, 84;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #15499A;
    --bs-btn-active-border-color: #15499A;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #15499A;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #15499A;
    --bs-gradient: none;
}

/* Floating WA */
.float-wa {
    position: fixed;
    bottom: 60px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 12px 20px 12px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, .4);
    z-index: 999;
    transition: .3s;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.float-wa i {
    font-size: 28px;
}
.float-wa:hover {
    background: #128C7E;
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(37, 211, 102, .5);
}
@media (max-width:575px) {
    .float-wa {
        bottom: 40px;
        right: 16px;
        padding: 10px 16px 10px 12px;
        font-size: 13px;
    }
    .float-wa i {
        font-size: 22px;
    }
}
@media (max-width:380px) {
    .float-wa span {
        display: none;
    }
    .float-wa {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .float-wa i {
        font-size: 24px;
    }
}

@media(min-width:1400px) {
    .heroSwiper .swiper-slide {
        width: 1080px;
    }
}

/* ===== TABLET (max-width:991px) ===== */

@media (max-width:991px) {
    .navbar-brand img {
        height: 50px !important;
    }
    .navbar-nav .nav-item.ms-3 {
        margin-left: 0 !important;
        margin-top: 10px;
    }
    .navbar-nav .nav-item.ms-3 .btn {
        width: 100%;
    }
    .hero-content h1 {
        font-size: 42px;
    }
    .heroSwiper {
        overflow: hidden;
    }
    .heroSwiper .swiper-slide {
        transform: scale(1);
        opacity: 1;
    }
    .hero-content h1 {
        font-size: 36px;
    }
}

/* ===== HANDPHONE BESAR (max-width:767px) ===== */

@media (max-width:767px) {
    .display-5 {
        font-size: 1.75rem !important;
    }
    .lead {
        font-size: .95rem !important;
    }
    .hero-content h1 {
        font-size: 28px !important;
    }
    .hero-content p {
        font-size: 15px !important;
    }
    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    .stats h2 {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .btn-donasi {
        padding: 12px 28px;
        font-size: .9rem;
    }
    .breadcrumb {
        font-size: .8rem;
    }
    section[style*="min-height:320px"] {
        min-height: 220px !important;
    }
    #galleryGrid a {
        height: 160px !important;
    }
    .card-img-top[style*="height:200px"] {
        height: 150px !important;
    }
    .card .row.g-0 .col-md-6:first-child img {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }
    footer .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .program-card .card-img-top {
        height: 180px !important;
    }
    .d-flex.justify-content-center.gap-2.flex-wrap {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start !important;
        padding-bottom: 8px;
    }
    .d-flex.justify-content-center.gap-2.flex-wrap::-webkit-scrollbar {
        display: none;
    }
    .stats .col-md-3 {
        margin-bottom: 16px;
    }
    .col-6 img.card-img-top {
        height: 140px;
        object-fit: cover;
    }
    .program-card:hover {
        transform: none;
    }
    .card-custom:hover {
        transform: none;
    }

    /* Program page - kategori cards stack 2 per row */
    .program-page .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Tentang page - visi/misi section */
    .visi-card .card-body.p-5 {
        padding: 1.5rem !important;
    }

    /* Donasi sukses page */
    .donasi-sukses .detail-box {
        padding: 16px;
    }
    .donasi-sukses .detail-item {
        flex-direction: column;
        gap: 4px;
    }

    /* Kontak page - map & sosmed */
    .kontak-maps {
        max-height: 300px;
    }

    /* Galeri filter horizontal scroll */
    #filterButtons {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        gap: 8px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    #filterButtons::-webkit-scrollbar {
        display: none;
    }
    #filterButtons .btn {
        font-size: .75rem;
        padding: 4px 12px !important;
        white-space: nowrap;
    }
}

/* ===== HANDPHONE KECIL (max-width:575px) ===== */

@media (max-width:575px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .display-5 {
        font-size: 1.5rem !important;
    }
    section[style*="min-height:320px"] {
        min-height: 200px !important;
        padding: 40px 0 !important;
    }
    #galleryGrid a {
        height: 140px !important;
    }
    .program-card .card-img-top {
        height: 140px !important;
    }
    .card-body.p-5 {
        padding: 1.5rem !important;
    }
    .card-body.p-4 {
        padding: 1.2rem !important;
    }
    .navbar-brand img {
        height: 40px !important;
    }
    .navbar .btn-success {
        font-size: .8rem;
        padding: 6px 16px;
    }
    .hero-section {
        padding: 16px 12px;
    }
    footer .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .ratio-16x9 {
        max-height: 200px;
    }
    .btn-outline-success,
    .btn-success {
        font-size: .85rem;
    }
    footer .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    .col-lg-4 .card .d-flex.gap-3 a {
        gap: 10px !important;
    }
    .col-lg-4 .card .d-flex.gap-3 a img {
        width: 50px !important;
        height: 50px !important;
    }

    /* Hero di halaman home */
    .hero-content h1 {
        font-size: 22px !important;
    }
    .hero-content p {
        font-size: 14px !important;
    }
    .heroSwiper .swiper-slide img {
        border-radius: 12px;
    }
    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
    }
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 14px;
    }

    /* Stats di mobile: 2 kolom */
    .stats .row .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .stats h2 {
        font-size: 1.3rem;
    }
    .stats p {
        font-size: .85rem;
    }

    /* Galeri: 2 kolom */
    #galleryGrid .col-md-4.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Kartu program di home: full width */
    .beranda-program .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Artikel grid: full width */
    .artikel-grid .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Artikel sidebar: hide sidebar images */
    .artikel-sidebar .d-flex.gap-3 a img {
        width: 50px !important;
        height: 50px !important;
    }

    /* Tentang page */
    .tentang-misi .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .tentang-nilai .col-md-6.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Program page */
    .program-header .col-lg-7 {
        order: 2;
    }
    .program-header .col-lg-5 {
        order: 1;
        margin-bottom: 20px;
    }
    .program-kategori .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .program-list .col-md-6.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Featured article */
    .featured-artikel .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Video grid */
    .video-grid .col-md-6.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Kontak page - info cards */
    .kontak-info .col-md-6.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Team cards: stack 2 per row */
    .team-grid .col-6.col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .team-grid img.card-img-top {
        height: 140px;
        object-fit: cover;
    }

    /* Testimoni cards */
    .testimonial .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* CTA section program page */
    .program-cta .col-lg-8 {
        padding: 0 12px;
    }

    /* Kartu donasi sukses */
    .donasi-sukses .col-md-6 {
        padding: 0 12px;
    }
    .donasi-sukses .detail-box {
        padding: 14px;
    }

    /* Modal donasi di mobile */
    .modal-dialog {
        margin: 10px;
    }
    .modal-dialog.modal-lg {
        max-width: calc(100% - 20px);
    }
    .modal-body {
        padding: 16px;
    }
    .modal-footer {
        padding: 12px;
    }
    .modal-body .row.g-2 .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .modal-body .row.g-2 .col-6 .btn {
        font-size: .8rem;
        padding: 8px 4px;
    }
    .modal-header h5 {
        font-size: 1rem;
    }

    /* Breadcrumb di hero */
    section[style*="min-height"] .breadcrumb {
        font-size: .75rem;
    }
    section[style*="min-height"] h1.display-5 {
        font-size: 1.3rem !important;
    }
    section[style*="min-height"] p.lead {
        font-size: .85rem !important;
    }

    /* Program page header stats section */
    .program-header-section .col-lg-7 h1 {
        font-size: 1.5rem;
    }
    .program-header-section .col-lg-7 h6 {
        font-size: .85rem;
    }
    .program-header-section .col-lg-7 p {
        font-size: .9rem;
    }

    /* Maps embed */
    .ratio.ratio-16x9 iframe {
        max-height: 250px;
    }

    /* Pagination & load more buttons */
    .btn-outline-success.px-4 {
        padding: 10px 20px;
        font-size: .85rem;
    }
}
