/* ===================================================================
   Global Variables
   =================================================================== */
:root {
            --primary-color: #0d6efd;
            --secondary-color: #6c757d;
            --dark-color: #212529;
            --light-color: #f8f9fa;
        }

        /* ===================================================================
           Global Base Styles
           =================================================================== */
        body {
            font-family: 'Poppins', sans-serif;
            scroll-behavior: smooth;
        }

        /* ===================================================================
           Navbar
           =================================================================== */
        .navbar {
            transition: all 0.3s;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        /* ===================================================================
           Hero / Jumbotron
           =================================================================== */
        .hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('../foto-ponpes.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
        section {
            padding: 80px 0;
        }

        /* ===================================================================
           Section Titles
           =================================================================== */
        .section-title {
            margin-bottom: 50px;
            position: relative;
            font-weight: 700;
        }

        .section-title::after {
            content: '';
            width: 60px;
            height: 3px;
            background: var(--primary-color);
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
        }

        .card {
            border: none;
            transition: transform 0.3s;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }

        .card:hover {
            transform: translateY(-10px);
        }

        .program-card {
            border: none;
            transition: all 0.4s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            position: relative;
            overflow: hidden;
        }

        .program-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
            transition: left 0.5s;
        }

        .program-card:hover {
            transform: translateY(-15px) scale(1.02);
            box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
        }

        .program-card:hover::before {
            left: 100%;
        }

        .program-icon {
            transition: all 0.4s ease;
            filter: drop-shadow(0 0 0 rgba(13, 110, 253, 0));
        }

        .program-card:hover .program-icon {
            transform: scale(1.1);
            filter: drop-shadow(0 0 20px rgba(13, 110, 253, 0.6));
            color: #0056b3 !important;
        }

        /* ===================================================================
           Gallery Image Styling
           =================================================================== */
        .gallery-img {
            height: 250px;
            object-fit: cover;
            border-radius: 10px;
            cursor: pointer;
        }

        /* ===================================================================
           Facility Icon Styling
           =================================================================== */
        .facility-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 20px;
        }

        footer {
            background-color: var(--dark-color);
            color: white;
            padding: 50px 0 20px;
        }

        .back-to-top {
            position: fixed;
            bottom: 25px;
            right: 25px;
            display: none;
            z-index: 1000;
        }

        /* About Section Slideshow */
        /* ===================================================================
           About Section Slideshow
           =================================================================== */
        .about-slideshow {
            position: relative;
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
        }

        .slideshow-container {
            position: relative;
            width: 100%;
            height: 400px;
            overflow: hidden;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.6s ease-in-out;
        }

        .slide.active {
            opacity: 1;
        }

        .slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 15px;
        }

        .slide-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            color: white;
            padding: 20px;
            font-size: 18px;
            font-weight: 600;
            text-align: center;
            border-radius: 0 0 15px 15px;
        }

        .slide-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(13, 110, 253, 0.9);
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            transition: all 0.3s ease;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .slide-btn:hover {
            background: rgba(13, 110, 253, 1);
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
        }

        .prev-btn {
            left: 20px;
        }

        .next-btn {
            right: 20px;
        }

        .slide-dots {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
        }

        .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .dot.active {
            background: #ffffff;
            transform: scale(1.2);
        }

        .dot:hover {
            background: rgba(255, 255, 255, 0.8);
        }

        /* Vision Mission Cards */
        /* ===================================================================
           Vision & Mission Cards
           =================================================================== */
        .vision-mission-container {
            position: relative;
        }

        .vision-card, .mission-card {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            border: 1px solid rgba(13, 110, 253, 0.1);
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        .vision-card::before, .mission-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(to bottom, #0d6efd, #0056b3);
            transition: width 0.3s ease;
        }

        .vision-card:hover, .mission-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        }

        .vision-card:hover::before, .mission-card:hover::before {
            width: 6px;
        }

        .vision-header, .mission-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .vision-icon, .mission-icon {
            font-size: 24px;
            margin-right: 15px;
            color: #0d6efd;
            transition: all 0.3s ease;
        }

        .vision-card:hover .vision-icon, .mission-card:hover .mission-icon {
            transform: scale(1.2);
            color: #0056b3;
        }

        .vision-content, .mission-content {
            padding-left: 39px;
        }

        .mission-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .mission-list li {
            margin-bottom: 12px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(13, 110, 253, 0.1);
            transition: all 0.3s ease;
        }

        .mission-list li:last-child {
            border-bottom: none;
        }

        .mission-list li:hover {
            padding-left: 10px;
            color: #0056b3;
        }

        .mission-list li i {
            color: #28a745;
            margin-right: 10px;
            transition: all 0.3s ease;
        }

        .mission-list li:hover i {
            transform: scale(1.1);
        }

        /* Gallery Cards - Same style as Program Cards */
        .gallery-card {
            border: none;
            transition: all 0.4s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            position: relative;
            overflow: hidden;
            border-radius: 15px;
        }

        .gallery-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
            transition: left 0.5s;
            z-index: 2;
        }

        .gallery-card:hover {
            transform: translateY(-15px) scale(1.02);
            box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
        }

        .gallery-card:hover::before {
            left: 100%;
        }

        .gallery-img-container {
            position: relative;
            width: 100%;
            height: 250px;
            overflow: hidden;
            border-radius: 15px;
        }

        .gallery-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
        }

        .gallery-card:hover .gallery-img {
            transform: scale(1.1);
        }

        .gallery-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(0, 86, 179, 0.9) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.4s ease;
            z-index: 3;
            padding: 20px;
        }

        .gallery-card:hover .gallery-overlay {
            opacity: 1;
        }

        .gallery-content {
            text-align: center;
            color: white;
            transform: translateY(30px);
            transition: transform 0.4s ease;
        }

        .gallery-card:hover .gallery-content {
            transform: translateY(0);
        }

        .gallery-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .gallery-description {
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
            opacity: 0.9;
            text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }

        /* Facility Cards - Same style as Program Cards */
        .facility-card {
            border: none;
            transition: all 0.4s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            position: relative;
            overflow: hidden;
            border-radius: 15px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        }

        .facility-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
            transition: left 0.5s;
        }

        .facility-card:hover {
            transform: translateY(-15px) scale(1.02);
            box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
        }

        .facility-card:hover::before {
            left: 100%;
        }

        .facility-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 20px;
            transition: all 0.4s ease;
            filter: drop-shadow(0 0 0 rgba(13, 110, 253, 0));
        }

        .facility-card:hover .facility-icon {
            transform: scale(1.1);
            filter: drop-shadow(0 0 20px rgba(13, 110, 253, 0.6));
            color: #0056b3 !important;
        }

/* FAQ Section Styling */
#faq {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.accordion-item {
    border-radius: 15px !important;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none !important;
}

.accordion-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.accordion-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none !important;
    font-weight: 600;
    font-size: 18px;
    color: #495057;
    padding: 20px 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 15px 15px 0 0 !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border: none !important;
}

.accordion-button::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Override Bootstrap default accordion icons */
.accordion-button::before,
.accordion-button::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Ensure no icons appear */
.accordion-button {
    background-image: none !important;
}

.accordion-button:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d6efd;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.4);
    transform: scale(1.01);
}

.accordion-collapse {
    transition: all 0.3s ease !important;
}

.accordion-body {
    background: #ffffff;
    padding: 25px 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

.accordion-body p {
    margin-bottom: 0;
}

/* Ensure single click functionality */
.accordion-button {
    -webkit-tap-highlight-color: transparent;
}

.accordion-button:active {
    transform: scale(0.99);
}

/* Contact Section - WhatsApp Link Styling */
.whatsapp-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.whatsapp-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) translateX(5px);
    color: #25D366;
    text-shadow: 0 0 10px rgba(37, 211, 102, 0.6);
}

.whatsapp-link i {
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.whatsapp-link:hover i {
    transform: rotate(10deg) scale(1.15);
    animation: whatsapp-pulse 0.6s ease;
}

@keyframes whatsapp-pulse {
    0% {
        transform: rotate(10deg) scale(1.15);
        filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0.8));
    }
    50% {
        transform: rotate(10deg) scale(1.2);
        filter: drop-shadow(0 0 10px rgba(37, 211, 102, 0.8));
    }
}

/* ===================================================================
   Tentang Ponpes - Layout Gambar Kiri | Visi Misi Kanan
   =================================================================== */
#tentang {
    background-color: #ffffff;
    font-family: 'Poppins', sans-serif;
}

/* ---- Wrapper Gambar Kiri ---- */
.tentang-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.18);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: block;
    width: 100%;
    isolation: isolate;
    z-index: 1;
}

.tentang-img-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(102, 126, 234, 0.28);
}

.tentang-img-main {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.tentang-img-wrapper:hover .tentang-img-main {
    transform: scale(1.05);
}

.tentang-img-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.tentang-img-caption {
    background: linear-gradient(transparent, rgba(30, 20, 60, 0.82));
    color: rgba(255, 255, 255, 0.9);
    padding: 30px 20px 18px;
    font-size: 0.88rem;
    line-height: 1.55;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ---- Wrapper Visi Misi Kanan ---- */
.tentang-vm-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
    z-index: 2;
}

/* ---- Card Visi & Misi Bersama ---- */
.tentang-vm-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 22px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tentang-vm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-radius: 10px 0 0 10px;
    transition: width 0.3s ease;
}

.tentang-vm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.tentang-vm-card:hover::before {
    width: 7px;
}

/* Visi - warna biru-ungu */
.tentang-vm-visi::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

/* Misi - warna ungu lebih tua */
.tentang-vm-misi::before {
    background: linear-gradient(to bottom, #764ba2, #667eea);
}

/* ---- Ikon Bulat ---- */
.tentang-vm-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-top: 2px;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
}

.tentang-vm-visi .tentang-vm-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tentang-vm-misi .tentang-vm-icon {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ---- Konten Teks ---- */
.tentang-vm-body {
    flex: 1;
}

.tentang-vm-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tentang-vm-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0;
}

/* ---- List Misi ---- */
.tentang-misi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tentang-misi-item {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: #495057;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tentang-misi-item:hover {
    color: #667eea;
}

.tentang-misi-item::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: #51cf66;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.tentang-misi-item:hover::before {
    transform: scale(1.2);
}

.tentang-misi-item:last-child {
    margin-bottom: 0;
}

/* ---- Nilai-Nilai Utama ---- */
.tentang-nilai-wrap {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px dashed rgba(102, 126, 234, 0.25);
}

.tentang-nilai-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #764ba2;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.tentang-nilai-badge {
    display: inline-block;
    background: #fff;
    color: #667eea;
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.tentang-nilai-badge:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ---- Sejarah Card (di luar gambar, di atas Visi Misi) ---- */
.tentang-sejarah-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);
    border-radius: 12px;
    padding: 22px 22px 18px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    box-shadow: 0 4px 18px rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tentang-sejarah-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.tentang-sejarah-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.16);
}

.tentang-sejarah-card:hover::before {
    width: 7px;
}

.tentang-sejarah-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.tentang-sejarah-text {
    font-size: 0.92rem;
    line-height: 1.72;
    color: #495057;
    margin-bottom: 0;
    padding-left: 4px;
}

/* ---- Responsif Mobile ---- */
@media (max-width: 991.98px) {
    .tentang-img-main {
        height: 280px;
    }

    .tentang-vm-card {
        padding: 18px 16px;
    }

    .tentang-vm-title {
        font-size: 0.98rem;
    }
}



/* ===================================================================
   Wave Dividers
   =================================================================== */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}
.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.custom-shape-divider-bottom .shape-fill {
    fill: #ffffff; /* Sesuaikan dengan background section di bawahnya (sekarang putih karena #tentang is #ffffff) */
}
.hero-section {
    position: relative; /* ensure absolute child works */
}

/* ===================================================================
   Floating WhatsApp Button (Pulse)
   =================================================================== */
.fab-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    text-decoration: none;
    animation: pulse-wa 2s infinite;
    transition: transform 0.3s ease;
}
.fab-whatsapp:hover {
    color: white;
    transform: scale(1.1);
    animation: none;
}
@keyframes pulse-wa {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===================================================================
   Gallery Card — Link & Footer Strip
   =================================================================== */

/* Wrapper anchor — removes default link styling */
.gallery-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    outline: none;
}

/* Footer strip below each gallery photo */
.gallery-card-footer {
    padding: 12px 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: none;
}

.gallery-card-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
}

.gallery-card-title-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Smooth lift on card hover (also covers the footer) */
.gallery-card-link:hover .gallery-card {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
}

/* Keep the overlay behaviour on link hover */
.gallery-card-link:hover .gallery-overlay {
    opacity: 1;
}
.gallery-card-link:hover .gallery-content {
    transform: translateY(0);
}
.gallery-card-link:hover .gallery-img {
    transform: scale(1.1);
}

/* ===================================================================
   Gallery Lightbox Modal
   =================================================================== */

/* --- Backdrop --- */
.gallery-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1080;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.gallery-lightbox-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* --- Panel (slide in from right, ~55% wide) --- */
.gallery-lightbox-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translate(100%, -50%);
    width: min(780px, 90vw);
    height: min(540px, 90vh);
    background: #ffffff;
    border-radius: 20px 0 0 20px;
    box-shadow: -10px 0 60px rgba(13, 110, 253, 0.18), 0 0 80px rgba(0,0,0,0.25);
    z-index: 1090;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.42s cubic-bezier(0.34, 1.26, 0.64, 1);
}
.gallery-lightbox-panel.active {
    transform: translate(0, -50%);
}

/* --- Inner Layout (two columns) --- */
.gallery-lb-inner {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* --- Image Side --- */
.gallery-lb-img-side {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #0a0f1e;
    overflow: hidden;
}
.gallery-lb-img-wrap {
    position: relative;
    flex: 1;
    overflow: hidden;
}
.gallery-lb-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.22s ease, transform 0.5s ease;
    transform-origin: center;
}
.gallery-lb-photo:hover {
    transform: scale(1.03);
}
/* Subtle shine overlay */
.gallery-lb-img-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.04) 0%,
        transparent 60%
    );
    pointer-events: none;
}

/* Dots row below image */
.gallery-lb-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    background: rgba(0,0,0,0.45);
    flex-shrink: 0;
}
.gallery-lb-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}
.gallery-lb-dot.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 6px rgba(13,110,253,0.7);
}
.gallery-lb-dot:hover:not(.active) {
    background: rgba(255,255,255,0.65);
    transform: scale(1.1);
}

/* --- Info Side --- */
.gallery-lb-info-side {
    flex: 1;
    padding: 36px 30px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    overflow-y: auto;
    background: #ffffff;
}

/* Category Badge */
.gallery-lb-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}

/* Title */
.gallery-lb-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Meta row */
.gallery-lb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.gallery-lb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    color: #6c757d;
    font-weight: 500;
}
.gallery-lb-meta-item i {
    color: #0d6efd;
    font-size: 0.9rem;
}

/* Divider */
.gallery-lb-divider {
    height: 2px;
    background: linear-gradient(90deg, #0d6efd 0%, rgba(13,110,253,0.08) 100%);
    border-radius: 2px;
    margin-bottom: 16px;
}

/* Description */
.gallery-lb-desc {
    font-size: 0.93rem;
    line-height: 1.75;
    color: #495057;
    margin-bottom: 20px;
    flex: 1;
}

/* Counter */
.gallery-lb-counter {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #adb5bd;
    letter-spacing: 0.5px;
}

/* --- Close Button --- */
.gallery-lb-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(33, 37, 41, 0.85);
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.gallery-lb-close:hover {
    background: #dc3545;
    transform: rotate(90deg) scale(1.1);
}

/* --- Nav Arrows --- */
.gallery-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(13, 110, 253, 0.88);
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(13,110,253,0.4);
}
.gallery-lb-nav:hover {
    background: #0056b3;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 20px rgba(13,110,253,0.55);
}
.gallery-lb-prev { left: 12px; }
.gallery-lb-next { left: calc(55% - 50px); }

/* --- Responsive: stack vertically on small screens --- */
@media (max-width: 640px) {
    .gallery-lightbox-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100vw;
        height: 88vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }
    .gallery-lightbox-panel.active {
        transform: translateY(0);
    }
    .gallery-lb-inner {
        flex-direction: column;
    }
    .gallery-lb-img-side {
        flex: 0 0 48%;
    }
    .gallery-lb-info-side {
        padding: 20px 20px 16px;
    }
    .gallery-lb-title {
        font-size: 1.15rem;
    }
    .gallery-lb-prev { left: 10px; }
    .gallery-lb-next { left: auto; right: 10px; }
}