/* ==========================================================================
   Custom Styles for DKM Masjid Dhuyufurrahman (Template Integration)
   ========================================================================== */

/* --- Header & Dropdown Fix --- */
header, .top-bar, .bottom-bar, .two-bar, .navbar, .navbar-links {
    overflow: visible !important;
}

header {
    position: absolute;
    width: 100%;
    z-index: 1000 !important;
}

.two-bar {
    position: relative;
    z-index: 1001 !important;
}

.navbar-links li.navbar-dropdown {
    position: relative;
}

/* Invisible hover bridge between menu and dropdown */
.navbar-links li.navbar-dropdown::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 25px;
    z-index: 9999;
}

.navbar-links li.navbar-dropdown .dropdown {
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 250px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
    border-radius: 0 0 8px 8px !important;
    border-top: 3px solid #fbc50b !important;
    z-index: 999999 !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
    transform: translateY(10px) !important;
    padding: 6px 0 !important;
    pointer-events: none !important;
}

.navbar-links li.navbar-dropdown:hover .dropdown,
.navbar-links li.navbar-dropdown .dropdown:hover {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.navbar-links li.navbar-dropdown .dropdown a {
    display: block !important;
    font-size: 15px !important;
    padding: 12px 22px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    background-color: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #f2f2f2 !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    line-height: 1.4 !important;
    position: relative !important;
}

.navbar-links li.navbar-dropdown .dropdown a:not(:last-child):before {
    display: none !important;
}

.navbar-links li.navbar-dropdown .dropdown a:last-child {
    border-bottom: none !important;
    border-radius: 0 0 8px 8px !important;
}

.navbar-links li.navbar-dropdown .dropdown a:hover {
    background-color: #007d3a !important;
    color: #ffffff !important;
    padding-left: 28px !important;
}

/* --- Sticky Navbar --- */
header.sticky-active {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999 !important;
}

header.sticky-active .top-bar {
    display: none !important;
}

header.sticky-active .bottom-bar {
    background-color: var(--common-colour);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    animation: stickySlideDown 0.35s ease forwards;
}

@keyframes stickySlideDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Banner Section on Subpages (Rich Emerald Green Islamic Theme) --- */
.bannr-section {
    padding-top: 220px !important;
    padding-bottom: 75px !important;
    background: linear-gradient(rgba(0, 50, 20, 0.75), rgba(0, 50, 20, 0.85)), url('../img/background-history.png') no-repeat center center / cover !important;
    position: relative;
    text-align: center;
}

.bannr-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 50, 20, 0.2), rgba(0, 50, 20, 0.4));
    z-index: 1;
}

.bannr-text {
    position: relative;
    z-index: 2;
}

.bannr-text h2 {
    color: #ffffff;
    font-size: 46px;
    font-family: var(--common-font);
    margin-top: 15px;
    margin-bottom: 12px;
    font-weight: 700;
}

.bannr-text ol.breadcrumb {
    justify-content: center;
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.bannr-text ol.breadcrumb a {
    color: #fbc50b !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.bannr-text ol.breadcrumb a:hover {
    text-decoration: underline;
}

.bannr-text ol.breadcrumb .breadcrumb-item.active {
    color: #ffffff !important;
    font-size: 16px;
}

.bannr-text .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7) !important;
    content: "/";
    padding: 0 10px;
}

/* --- Professional Informational Pillar Section (Clean Institutional Layout) --- */
.info-pillar-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #fafcfb 100%);
    border: 1px solid #e2ebe4;
    border-top: 4px solid #007d3a;
    border-radius: 16px;
    padding: 48px 36px;
    box-shadow: 0 12px 35px rgba(0, 50, 20, 0.05);
    position: relative;
}

.info-pillar-item {
    padding: 12px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.info-pillar-item:not(:last-child) {
    border-right: 1px solid #e8eee9;
}

@media (max-width: 991px) {
    .info-pillar-item {
        padding: 20px 10px;
    }
    .info-pillar-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid #e8eee9;
        padding-bottom: 30px;
        margin-bottom: 25px;
    }
}

.info-pillar-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.info-pillar-icon {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 125, 58, 0.08), rgba(251, 197, 11, 0.15));
    border: 1.5px solid #007d3a;
    color: #007d3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-pillar-item:hover .info-pillar-icon {
    background: #007d3a;
    color: #fbc50b;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 18px rgba(0, 125, 58, 0.25);
}

.info-pillar-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fbc50b;
    background: rgba(251, 197, 11, 0.12);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.info-pillar-title {
    font-size: 22px;
    font-family: var(--common-font);
    font-weight: 700;
    color: #007d3a;
    margin: 0;
    line-height: 1.3;
}

.info-pillar-desc {
    font-size: 15px;
    color: #555555;
    line-height: 1.7;
    margin-bottom: 22px;
    flex-grow: 1;
}

.info-pillar-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.info-pillar-features li {
    font-size: 14px;
    color: #333333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.info-pillar-features li i {
    color: #007d3a;
    font-size: 14px;
}

.info-pillar-btn {
    font-size: 13px;
    font-weight: 800;
    color: #007d3a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: auto;
    padding-top: 10px;
}

.info-pillar-btn:hover {
    color: #fbc50b;
    gap: 12px;
}

.info-pillar-btn:hover {
    color: #fbc50b;
    gap: 12px;
}

/* --- Subpages Content Body & Cards --- */
.content-box-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.content-body p {
    color: #555555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 18px;
}

.content-body h3, .content-body h4 {
    color: #007d3a;
    font-family: var(--common-font);
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-body ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: #555555;
    line-height: 1.6;
}

.content-body ul li:before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: #007d3a;
    font-size: 14px;
}

/* --- Pengurus Org Chart & Cards --- */
.sk-badge-box {
    background: linear-gradient(135deg, #007d3a, #005025);
    color: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 125, 58, 0.2);
}

.sk-badge-box p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.org-level-title {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.org-level-title h3 {
    font-family: var(--common-font);
    font-size: 24px;
    color: #007d3a;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 3px solid #fbc50b;
}

.org-card-custom {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    height: 100%;
}

.org-card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 125, 58, 0.12);
    border-color: #007d3a;
}

.org-card-custom.highlight {
    background: linear-gradient(135deg, #f7faf7, #ffffff);
    border: 2px solid #007d3a;
}

.org-card-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(0, 125, 58, 0.1);
    color: #007d3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 15px;
}

.org-card-custom.highlight .org-card-icon {
    background: #007d3a;
    color: #fbc50b;
}

.org-card-jabatan {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #fbc50b;
    margin-bottom: 8px;
}

.org-card-custom.highlight .org-card-jabatan {
    color: #007d3a;
}

.org-card-nama {
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    line-height: 1.4;
}

.bidang-box-custom {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    height: 100%;
}

.bidang-box-custom h4 {
    color: #007d3a;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fbc50b;
}

.bidang-ketua-badge {
    background: #f7faf7;
    border-left: 4px solid #007d3a;
    padding: 10px 15px;
    font-weight: 700;
    color: #007d3a;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.bidang-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bidang-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #444;
}

.bidang-list li .num-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fbc50b;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

/* --- Donasi Subpage Cards --- */
.donasi-method-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.donasi-method-card .donasi-icon-box {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #f7faf7;
    color: #007d3a;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 2px solid #007d3a;
}

.donasi-method-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: #007d3a;
    margin-bottom: 10px;
}

.donasi-rekening-box {
    background: #fdfaf2;
    border: 2px dashed #fbc50b;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.donasi-rekening-box .acc-num {
    font-size: 22px;
    font-weight: 800;
    color: #007d3a;
    letter-spacing: 1px;
}

.donasi-rekening-box .acc-name {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* --- Gallery Grid & Lightbox --- */
.gallery-card-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.gallery-card-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

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

.gallery-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 50, 20, 0.9));
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card-item:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay h5 {
    color: #ffffff;
    font-size: 16px;
    margin: 0;
}

/* --- Detail Pages Meta & Image --- */
.detail-header-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.detail-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 12px 20px;
    background: #f7faf7;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #007d3a;
}

.detail-meta-bar span {
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
}

.detail-meta-bar span i {
    color: #007d3a;
    margin-right: 8px;
}

/* --- Contact Page Items --- */
.contact-item-box {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f7faf7;
    border: 2px solid #007d3a;
    color: #007d3a;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.contact-item-text h6 {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-item-text p, .contact-item-text a {
    font-size: 16px;
    color: #222;
    margin: 0;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .bannr-section {
        padding-top: 170px !important;
        padding-bottom: 50px !important;
    }
    .bannr-text h2 {
        font-size: 34px;
    }
}
