:root {
    --emerald: #064e3b;
    --emerald-light: #0a6b51;
    --gold: #d4af37;
    --gold-bright: #f1c40f;
    --dark: #1a1a1a;
    --white: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    margin: 0;
}

/* --- Header & Navigation --- */
.navbar {
    background: var(--emerald);
    padding: 0.8rem 0;
    border-bottom: 4px solid var(--gold);
}

.brand-text span {
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--white);
}

.reg-no {
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85) !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--gold) !important;
    transform: translateY(-2px);
}

/* --- Butang E-Penyata Beranimasi --- */
.btn-animated-epenyata {
    background: linear-gradient(-45deg, #d4af37, #f1c40f, #b8860b, #ffd700);
    background-size: 400% 400%;
    animation: gradient-flow 3s ease infinite;
    color: #064e3b !important; /* Emerald Green */
    font-weight: 800;
    padding: 15px 35px; /* Lebih besar */
    border-radius: 50px;
    border: 2px solid #000; /* Outer line hitam untuk butang */
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: transform 0.3s ease;
}

.btn-animated-epenyata:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Hero Section --- */
.hero-modern {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    animation: heroSlider 15s infinite;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 1s ease-in-out;
}

/* Definisi Animasi Tukar Gambar */
@keyframes heroSlider {
    0%, 33% {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('img/home1.png');
    }
    34%, 66% {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('img/home2.png');
    }
    67%, 100% {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('img/home3.png');
    }
}

.hero-modern .overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* Gradient Emerald ke Hitam untuk imej korporat yang serius */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero-modern .content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 20px;
}

/* --- Tipografi Hero (Penyelesaian Warna) --- */
.hero-modern h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

/* --- Tambahan untuk mobile sahaja --- */
@media (max-width: 768px) {
    .hero-modern {
        min-height: 55vh;
        background-attachment: scroll;
        padding: 20px 0;
    }
    
    .hero-modern h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-modern .lead {
        font-size: 0.8rem !important;
        margin-bottom: 20px !important;
        padding: 0 10px;
    }
    
    .hero-modern .content {
        padding: 10px !important;
        width: 100%;
    }
    
    .hero-modern .d-flex {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px !important;
    }
    
    .btn-gold {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
        white-space: nowrap;
    }
    
    .hero-modern .btn-outline-light {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
        white-space: nowrap;
    }
    
    .badge-oval {
        font-size: 0.65rem !important;
        padding: 2px 8px !important;
        margin-bottom: 8px;
    }
    
    /* Pastikan teks KOPERASI KOMUNITI ISLAM tidak pecah teruk */
    .hero-modern h1 br {
        display: none;
    }
    
    .hero-modern h1 {
        display: flex;
        flex-direction: column;
    }
}

/* Baris 1: KOPERASI KOMUNITI ISLAM (GOLD) */
.text-gold-shiny {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-text 5s linear infinite;
    display: inline-block;
}

/* Baris 2: BANDAR LAGUNA MERBOK (PUTIH) */
.text-white-solid {
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important; /* Batalkan kesan transparent h1 */
    background: none !important;
    display: inline-block;
    margin-top: 10px;
}

@keyframes shine-text {
    to { background-position: 200% center; }
}

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* --- Butang Utama --- */
.btn-gold {
    background-color: var(--gold);
    color: var(--emerald);
    font-weight: 700;
    border: none;
    transition: 0.3s;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
}

.btn-gold:hover {
    background-color: white;
    transform: translateY(-3px);
}

.btn-animated-epenyata {
    white-space: nowrap; /* Menghalang teks E-Penyata daripada pecah baris */
    margin-left: 15px;    /* Memberi sedikit ruang dari menu terakhir */
}

/* --- WhatsApp Floating --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* --- Footer --- */
.footer-section {
    background-color: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 20px 0;
    border-top: 5px solid var(--gold);
}

.copyright-text {
    font-size: 0.8rem;
}

/* Menjadikan Dropdown terbuka apabila Hover (Desktop) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0; 
        animation: fadeIn 0.3s;
    }
}

/* Gaya Kotak Sub-Menu */
.dropdown-menu {
    background-color: var(--emerald); /* Warna Emerald KKIBLM */
    border: 2px solid var(--gold); /* Border Emas */
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.dropdown-item {
    color: white !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--gold) !important;
    color: var(--emerald) !important;
    padding-left: 25px; /* Kesan gerak sedikit ke kanan */
}

/* Animasi Fade In */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gaya Kad Sijil */
.cert-card {
    background: white;
    border-radius: 12px;
    border-bottom: 5px solid var(--gold);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cert-icon {
    font-size: 3rem;
    color: var(--emerald);
    margin-bottom: 15px;
}

.cert-body {
    padding: 30px;
    text-align: center;
}

.report-card {
    border-left: 5px solid var(--emerald) !important;
    transition: transform 0.3s ease;
}

.report-card:hover {
    transform: translateX(10px);
    background-color: #f8f9fa;
}

.icon-box i {
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1));
}

.btn-outline-success {
    border-color: var(--emerald);
    color: var(--emerald);
}

.btn-outline-success:hover {
    background-color: var(--emerald);
    color: white;
}

/* Gaya Butang Back to Top */
#btnBackToTop {
    display: none; /* Disembunyikan secara default */
    position: fixed;
    bottom: 110px; /* Kedudukan di atas butang WhatsApp */
    right: 40px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--gold);
    color: var(--emerald);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#btnBackToTop:hover {
    background-color: var(--emerald);
    color: var(--gold);
    transform: translateY(-5px);
}

/* Gaya Bicara Pengerusi */
.border-gold-frame {
    border: 8px solid white;
    outline: 2px solid var(--gold);
    z-index: 1; /* Memastikan gambar berada di atas bingkai */
    position: relative;
}

.pengerusi-img-wrapper {
    position: relative;
    display: inline-block;
}

.pengerusi-badge {
    /* Menukar daripada absolute kepada relative untuk susun di bawah */
    position: relative; 
    
    /* Margin negatif untuk bertindih sedikit di bawah gambar (adjust jika perlu) */
    margin-top: -10px; 
    
    /* Memusatkan badge di bawah gambar */
    margin-left: auto;
    margin-right: auto;
    
    /* Menetapkan lebar badge (seperti dalam imej dummy) */
    width: 80%; 
    max-width: 300px;
    
    background: var(--emerald); /* Hijau Gelap */
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    
    /* Border kiri emas yang unik */
    border-left: 5px solid var(--gold); 
    
    text-align: left; /* Teks kekal di kiri di dalam badge */
    
    /* Memastikan badge berada di atas imej dan shadow gambar */
    z-index: 10; 
}

.italic {
    font-style: italic;
}

.tracking-wider {
    letter-spacing: 2px;
}

.btn-outline-emerald {
    border: 2px solid var(--emerald);
    color: var(--emerald);
    font-weight: 700;
    transition: all 0.3s;
}

.btn-outline-emerald:hover {
    background: var(--emerald);
    color: white;
}

.speech-content p {
    font-size: 1.05rem;
    text-align: justify;
}

.text-gold {
    color: #d4af37; /* Warna emas KKIBLM */
}

.fw-semibold {
    font-weight: 600; /* Lebih nipis daripada bold biasa */
}

/* Memastikan susunan nama dan gelaran nampak harmoni */
.text-dark {
    color: #212529;
    line-height: 1.4;
}

.badge-oval {
    background-color: #FFD700; /* Warna kuning emas */
    color: #000;              /* Warna tulisan hitam supaya jelas */
    padding: 2px 15px;        /* Ruang atas-bawah dan kiri-kanan */
    border-radius: 50px;      /* Membuat bentuk bujur/oval */
    font-weight: bold;        /* Menebalkan tulisan */
    display: inline-block;    /* Memastikan padding berfungsi dengan baik */
    font-size: 0.85em;        /* Kecilkan sedikit supaya nampak kemas */
    margin-left: 5px;         /* Jarak dari perkataan sebelumnya */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1); /* Sedikit bayangan supaya nampak timbul */
}

.map-container iframe {
    filter: grayscale(10%) contrast(1.1); /* Menjadikan peta nampak lebih korporat */
}