:root {
    --navy: #0c1f3d;
    --navy-soft: #1a3358;
    --emerald: #0e7a56;
    --emerald-light: #14b88a;
    --emerald-pale: #e8f5f0;
    --gold: #c9a227;
    --gold-light: #f5e6b8;
    --gold-hover: #dbb42e;
    --cream: #faf8f3;
    --mint: #eef8f4;
    --white: #ffffff;
    --text: #2d3748;
    --text-muted: #5c6b7a;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 4px 24px rgba(12, 31, 61, 0.06);
    --shadow-card: 0 8px 32px rgba(14, 122, 86, 0.1);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

/* —— Navbar —— */
.navbar-landing {
    background: linear-gradient(180deg, rgba(12, 31, 61, 0.97) 0%, rgba(14, 122, 86, 0.92) 100%);
    backdrop-filter: blur(12px);
    padding: 0.65rem 0;
    border-bottom: 2px solid rgba(201, 162, 39, 0.35);
    transition: box-shadow 0.3s;
}

.navbar-landing.scrolled {
    box-shadow: 0 6px 28px rgba(12, 31, 61, 0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: var(--navbar-brand-font, 1.35rem);
    color: #fff !important;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--gold-light) !important;
}

.navbar-logo {
    width: var(--navbar-logo-size, 58px);
    height: var(--navbar-logo-size, 58px);
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.navbar-brand-text {
    line-height: 1.2;
    white-space: nowrap;
    background: linear-gradient(90deg, #fff 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@supports not (background-clip: text) {
    .navbar-brand-text {
        -webkit-text-fill-color: #fff;
        color: #fff;
    }
}

@media (max-width: 400px) {
    .navbar-brand-text {
        font-size: calc(var(--navbar-brand-font, 1.35rem) * 0.85);
        white-space: normal;
        max-width: 160px;
    }
}

.nav-link-landing {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: var(--nav-link-font, 0.95rem);
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    transition: all 0.25s;
}

.nav-link-landing:hover,
.nav-link-landing.active {
    color: var(--gold-light) !important;
    background: rgba(255, 255, 255, 0.08);
}

.btn-portal {
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.25s;
}

.btn-portal:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: var(--gold-light);
}

.btn-cta-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
    color: var(--navy);
    font-weight: 600;
    border: none;
    padding: 0.5rem 1.35rem;
    border-radius: 50px;
    transition: all 0.25s;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
}

.btn-cta-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(201, 162, 39, 0.45);
    color: var(--navy);
}

/* —— Hero —— */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(12, 31, 61, 0.82) 0%,
        rgba(14, 122, 86, 0.65) 45%,
        rgba(12, 31, 61, 0.75) 100%
    );
}

.hero-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--cream), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 8rem 0 6rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(201, 162, 39, 0.2);
    border: 1px solid rgba(245, 230, 184, 0.5);
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.hero-tagline {
    font-size: clamp(1.5rem, 4vw, var(--hero-tagline-font, 2.75rem));
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    max-width: 900px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-tagline .accent {
    color: var(--gold-light);
}

.hero-sub {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.btn-hero-cta {
    background: linear-gradient(135deg, var(--gold) 0%, #e8c547 100%);
    color: var(--navy);
    font-weight: 700;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    border-radius: 50px;
    border: none;
    margin-top: 2rem;
    transition: all 0.3s;
    box-shadow: 0 6px 24px rgba(201, 162, 39, 0.4);
}

.btn-hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(201, 162, 39, 0.5);
    color: var(--navy);
}

/* —— Sections umum —— */
.section-padding {
    padding: 4.5rem 0;
    position: relative;
}

.section-bg-white {
    background: var(--white);
}

.section-bg-cream {
    background: var(--cream);
}

.section-bg-mint {
    background: linear-gradient(180deg, var(--mint) 0%, var(--white) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 4px;
    margin: 1rem auto 0;
}

.section-title {
    font-weight: 700;
    color: var(--navy);
    font-size: clamp(1.35rem, 3vw, var(--section-title-font, 2rem));
    margin-bottom: 0;
}

.section-subtitle {
    display: inline-block;
    color: var(--emerald);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.72rem;
    margin-bottom: 0.6rem;
    padding: 0.35rem 1rem;
    background: var(--emerald-pale);
    border-radius: 50px;
}

/* —— Muassis —— */
.muassis-photo-wrap {
    position: relative;
    padding: 14px;
    max-width: var(--muassis-photo-max-width, 100%);
    margin: 0 auto;
}

.muassis-photo-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 18px;
    bottom: 18px;
    border: 3px solid var(--gold);
    border-radius: var(--radius);
    z-index: 0;
    opacity: 0.85;
}

.muassis-photo {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    filter: sepia(15%) saturate(0.9);
    border-radius: var(--radius-sm);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-card);
}

.badge-muassis {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light)) !important;
    color: #fff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.muassis-name {
    color: var(--navy);
    font-weight: 700;
}

.muassis-info strong {
    color: var(--navy);
}

.muassis-info .bi-mortarboard {
    color: var(--emerald);
}

.muassis-info .bi-stars {
    color: var(--gold);
}

/* —— Gaya card wasiat —— */
.card-wasiat {
    background: linear-gradient(135deg, var(--emerald-pale) 0%, var(--gold-light) 100%);
    border: none;
    border-left: 5px solid var(--emerald);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-wasiat:hover {
    box-shadow: var(--shadow-card);
}

.card-galeri-putih {
    background: #fff;
    border: none;
    border-left: 5px solid var(--emerald);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-galeri-putih:hover {
    box-shadow: var(--shadow-card);
}

/* Gaya seperti card testimoni: putih + garis hijau atas */
.card-galeri-testimoni {
    background: #fff;
    border: none;
    border-top: 4px solid var(--emerald);
    border-left: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-galeri-testimoni:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(10, 22, 40, 0.12);
}

.muassis-quote {
    padding: 2rem 2.5rem;
    margin-top: 3rem;
}

.muassis-quote p {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--navy-soft);
    line-height: 1.85;
    margin: 0;
}

.muassis-quote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--emerald);
    font-size: 0.9rem;
}

/* —— Testimoni (tampilan sederhana, tanpa panah) —— */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.08);
    height: 100%;
    border-top: 4px solid var(--emerald);
    border-left: none;
}

.testimonial-card .quote-icon {
    color: var(--gold);
    font-size: 2rem;
    line-height: 1;
}

.testimonial-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--cream);
}

.testimonial-name {
    color: var(--navy);
    font-weight: 600;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    display: none;
}

/* —— Galeri —— */
.gallery-box {
    padding: 1.25rem;
}

.gallery-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.gallery-mini-item {
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.gallery-mini-item:hover {
    transform: translateY(-3px);
}

.gallery-mini-item img {
    width: 100%;
    height: var(--gallery-thumb-height, 130px);
    object-fit: cover;
    display: block;
}

.gallery-mini-item figcaption,
.gallery-fasilitas-item figcaption {
    padding: 0.65rem 0.5rem;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--navy-soft);
    text-align: center;
    background: transparent;
    line-height: 1.3;
}

.gallery-fasilitas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.gallery-fasilitas-item {
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.gallery-fasilitas-item:hover {
    transform: translateY(-4px);
}

.gallery-fasilitas-item img {
    width: 100%;
    height: var(--gallery-fasilitas-height, 200px);
    object-fit: cover;
    display: block;
}

.gallery-fasilitas-item figcaption {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
}

.gallery-label {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-label i {
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* —— Program —— */
.program-card {
    padding: 2rem 1.75rem;
    height: 100%;
    text-align: center;
}

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

.program-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, var(--emerald) 0%, var(--emerald-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(14, 122, 86, 0.25);
}

.row.g-4 > .col-md-4:nth-child(3n+2) .program-icon {
    background: linear-gradient(145deg, var(--navy-soft) 0%, var(--navy) 100%);
    box-shadow: 0 8px 24px rgba(12, 31, 61, 0.2);
}

.row.g-4 > .col-md-4:nth-child(3n+3) .program-icon {
    background: linear-gradient(145deg, var(--gold) 0%, var(--gold-hover) 100%);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.3);
    color: var(--navy);
}

.program-card h5 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.program-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* —— Stats —— */
.stats-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--emerald) 55%, #0a5c42 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.stats-section .container {
    position: relative;
    z-index: 1;
}

.stats-section .section-title,
.stats-section h2.text-white {
    color: #fff !important;
}

.stats-section .section-subtitle {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-light);
}

.stats-section .section-header::after {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
}

.stat-item {
    padding: 0.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.stats-section .stat-item h3,
.stats-section .stat-item p {
    color: var(--gold-hover);
}

.stat-item h3 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* —— Blog —— */
.blog-card {
    overflow: hidden;
    height: 100%;
    padding: 0;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card img {
    height: var(--blog-image-height, 200px);
    object-fit: cover;
}

.blog-card .card-body {
    padding: 1.35rem;
    background: transparent;
}

.blog-badge {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
}

.badge-tausiyah {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light)) !important;
}

.badge-berita {
    background: linear-gradient(135deg, var(--navy-soft), var(--navy)) !important;
}

.blog-card .card-title {
    color: var(--navy);
    font-size: 1rem;
}

/* —— Footer —— */
.footer-landing {
    background: linear-gradient(180deg, var(--navy) 0%, #081528 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 4rem 0 2rem;
    border-top: 4px solid var(--gold);
}

.footer-landing h5 {
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.footer-landing a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-landing a:hover {
    color: var(--gold-light);
}

.footer-social a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-right: 0.5rem;
    font-size: 1rem;
    transition: all 0.25s;
}

.footer-social a:hover {
    background: var(--emerald);
    border-color: var(--emerald-light);
    color: #fff !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

[id] {
    scroll-margin-top: 90px;
}

@media (max-width: 991px) {
    .navbar-nav-center {
        text-align: center;
        padding: 1rem 0;
    }

    .hero-section {
        background-attachment: scroll;
    }

    .gallery-mini {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-mini-item figcaption {
        font-size: 0.72rem;
    }
}
