/*
Theme Name: Haqqaniyyah
Author: Xyphla Solutions
Author URI: https://www.xyphla.app
Description: A premium, modern WordPress theme for Al Haqqaniyyah Arabic College.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
*/

:root {
    --madrasah-teal: #0f766e;
    --madrasah-teal-light: #14b8a6;
    --madrasah-teal-dark: #0d9488;
    --madrasah-gold: #fbbf24;
    --madrasah-gold-light: #fde68a;
    --madrasah-gold-dark: #d97706;
    --madrasah-dark: #0f172a;
    --madrasah-darker: #020617;
    
    /* Teal Palette (matches Tailwind teal) */
    --teal-50:  #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    /* Slate Palette */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Gold Palette */
    --gold-400: #d4a853;
    --gold-500: #c9952e;

    --shadow-premium: 0 20px 50px -12px rgba(15, 118, 110, 0.12);
    --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--slate-50);
    color: var(--slate-800);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.font-arabic {
    font-family: 'Amiri', serif;
}

.font-display {
    font-family: 'Outfit', sans-serif;
}

/* Premium Gradients */
.gtext-gold {
    background: linear-gradient(135deg, var(--madrasah-gold-light), var(--madrasah-gold), var(--madrasah-gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gtext-teal {
    background: linear-gradient(135deg, var(--madrasah-teal-light), var(--madrasah-teal), var(--madrasah-teal-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Advanced Glassmorphism */
.glass-elegant {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-glass);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

/* Premium Cards & Interaction */
.premium-card-3d {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.premium-card-3d:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 20px 40px -15px rgba(15, 118, 110, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
}

.premium-card-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(251, 191, 36, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card-3d:hover::after {
    opacity: 1;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Bento Grid Helpers */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bento-item-large {
    grid-row: span 2;
    grid-column: span 2;
}

@media (max-width: 1024px) {
    .bento-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Islamic Pattern */
.islamic-pattern-bg {
    background-image: 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='%23fbbf24' fill-opacity='0.05'%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");
}

/* Buttons */
.btn-brand {
    background: linear-gradient(135deg, var(--madrasah-teal), var(--madrasah-teal-dark));
    background-size: 200% 200%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.btn-brand:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 118, 110, 0.5);
    color: #ffffff;
    text-decoration: none;
}

.btn-outline {
    border: 1px solid rgba(15, 118, 110, 0.4);
    color: var(--madrasah-teal);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--madrasah-teal);
    background: rgba(15, 118, 110, 0.05);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-gold-solid {
    background: linear-gradient(135deg, var(--madrasah-gold), var(--madrasah-gold-dark));
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-gold-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    color: #fff;
}

/* Links */
.ul-link {
    position: relative;
    text-decoration: none;
}

.ul-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal-400);
    transition: width 0.3s ease;
}

.ul-link:hover::after {
    width: 100%;
}

/* Reveal animations — initial state set by GSAP on front-page,
   CSS fallback for other pages without GSAP */
.reveal {
    /* opacity controlled by JS; keep visible as fallback */
}

.reveal.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.reveal-l {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 1s cubic-bezier(.22, 1, .36, 1);
}

.reveal-r {
    opacity: 0;
    transform: translateX(40px);
    transition: all 1s cubic-bezier(.22, 1, .36, 1);
}

.reveal-l.visible,
.reveal-r.visible {
    opacity: 1;
    transform: translateX(0);
}

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }
.d6 { transition-delay: 0.6s; }

/* ── Hero Carousel Animations ── */
/* NOTE: .hero-slide visibility/display is controlled entirely by GSAP.
   Slides live in normal document flow (not absolute stacked)
   inside .hero-slides-grid, so we do NOT use position:absolute here. */
.hero-slide {
    width: 100%;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.hero-slide.inactive {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    transition: transform 9s ease-out;
    z-index: 0;
}

.hero-slide.active .hero-slide-bg {
    animation: heroZoom 10s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0%, 100% { transform: scale(1.08); }
    50% { transform: scale(1.25); }
}

.mandala-spin {
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    100% { transform: rotate(360deg); }
}

.gold-divider-line {
    height: 2px;
    width: 40px;
    background: var(--madrasah-gold);
    border-radius: 2px;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.40) 0%,
            rgba(15, 23, 42, 0.55) 50%,
            rgba(15, 23, 42, 0.80) 100%);
    z-index: 1;
}

.slide-content {
    opacity: 0;
    transform: translateY(28px);
    transition: all 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s;
    position: relative;
    z-index: 2;
    text-align: center;
    padding-top: clamp(8rem, 14vh, 11rem);
    padding-bottom: clamp(9rem, 16vh, 12rem);
}

@media (min-width: 768px) {
    .slide-content {
        text-align: left;
    }
}

.hero-slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* ── Carousel Dots ── */
#carousel-dots {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

/* ── Marquee ── */
.marquee-outer {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px dashed rgba(37, 99, 235, 0.15);
    border-bottom: 1px dashed rgba(37, 99, 235, 0.15);
    background: var(--slate-50);
}

.marquee-inner {
    display: inline-flex;
    align-items: center;
    animation: marquee-scroll 40s linear infinite;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-logo {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--slate-400);
    padding: 0 4rem;
    text-transform: uppercase;
}

.marquee-logo:hover {
    color: var(--teal-500);
}

/* Main Container */
.max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    margin: 1.5rem 0;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    margin: 1.5rem 0;
    line-height: 1.1;
}

h3 {
    font-size: 2rem;
    margin: 1.2rem 0;
    line-height: 1.1;
}

h4 {
    font-size: 1.5rem;
    margin: 1rem 0;
}

p {
    margin-bottom: 30px;
}

/* ══════════════════════════════════════════
   MOBILE CARDS TABLE (RESPONSIVE DIV-LIKE TABLES)
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .overflow-x-auto:has(.mobile-cards-table) {
        border: none !important;
        background: transparent !important;
    }
    .mobile-table-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        backdrop-filter: none !important;
    }
    .mobile-cards-table, .mobile-cards-table tbody {
        display: block !important;
        width: 100% !important;
    }
    .mobile-cards-table thead {
        display: none !important;
    }
    .mobile-cards-table tr {
        display: flex !important;
        flex-direction: column;
        border-radius: 1rem;
        padding: 1.25rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    }
    .mobile-cards-table td {
        display: flex !important;
        flex-direction: column;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }
    .mobile-cards-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        text-transform: uppercase;
        font-weight: 700;
        opacity: 0.6;
        margin-bottom: 0.25rem;
        color: inherit;
    }
    .mobile-cards-table .mobile-hide-cell {
        display: none !important;
    }
}
/* Adjustments for light theme tables */
@media (max-width: 768px) {
    .bg-white .mobile-cards-table tr {
        background: #fff;
        border: 1px solid #f1f5f9;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
        color: #475569; /* Ensure text is dark on white cards */
    }
    .bg-white .mobile-cards-table td::before {
        color: #64748b;
    }
}

p {
    margin-bottom: 1rem;
    color: var(--slate-600);
    font-weight: 300;
}

a {
    color: var(--teal-500);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--teal-600);
}

/* WordPress defaults */
.wp-caption { max-width: 100%; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Posts & Content */
article {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--slate-200);
}

article:last-child {
    border-bottom: none;
}

/* ── Navbar ── */
#navbar {
    background: rgba(15, 23, 42, 0.9); /* Dark by default for inner pages */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.home #navbar:not(.is-scrolled) {
    background: transparent; /* Totally transparent on home page until scrolled */
    border-bottom-color: transparent;
}

#navbar.is-scrolled {
    background: rgba(15, 23, 42, 0.95); /* dark slate 900 with opacity */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Service Cards — Light ── */
.service-card {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--teal-300) !important;
}

/* ── Service Chips — Light ── */
.service-chip-light {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid var(--slate-200);
    background: var(--slate-50);
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    cursor: default;
}

.service-chip-light:hover {
    border-color: var(--teal-300);
    background: var(--teal-50);
    color: var(--teal-700);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

/* ── Gold Accent Divider ── */
.gold-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #c9952e, #d4a853, #c9952e);
    border-radius: 2px;
}

/* ── Bismillah Banner ── */
.bismillah-text {
    font-family: 'Amiri', serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--gold-400);
    text-align: center;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

/* Footer */
footer {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0;
}



/* Custom logo WordPress class fix */
.custom-logo-link img {
    max-height: 48px;
    width: auto;
}

/* ── Hamburger Animation ── */
.nav-open span:first-child {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-open span:nth-child(2) {
    opacity: 0;
}

.nav-open span:last-child {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

/* ── Animate slow-spin ── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Float animation ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ── Animate ping ── */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ── Program tabs ── */
.program-tab {
    padding: 12px 24px;
    border: 1px solid var(--slate-200);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.3s ease;
}

.program-tab:hover,
.program-tab.active {
    background: var(--teal-500);
    color: white;
    border-color: var(--teal-500);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ── Timeline ── */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--teal-200), var(--teal-500), var(--teal-200));
}

/* ── Testimonial Card ── */
.testimonial-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    border-color: var(--teal-300);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

/* ══════════════════════════════════════════
   FLOATING GEOMETRIC SHAPES
══════════════════════════════════════════ */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: shapeFloat 8s ease-in-out infinite, shapeFadeIn 1s ease forwards;
}

.floating-shape.diamond {
    border-radius: 4px;
    transform: rotate(45deg);
}

.floating-shape.ring {
    background: transparent !important;
    border: 2px solid currentColor;
}

@keyframes shapeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-25px) rotate(270deg); }
}

@keyframes shapeFadeIn {
    to { opacity: 1; }
}

/* ══════════════════════════════════════════
   GRADIENT BORDER GLOW
══════════════════════════════════════════ */
.glow-border {
    position: relative;
    overflow: hidden;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(37, 99, 235, 0) 40%,
        rgba(37, 99, 235, 0.6) 50%,
        rgba(37, 99, 235, 0) 60%,
        transparent 100%);
    background-size: 400% 400%;
    animation: glowSweep 4s ease-in-out infinite;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes glowSweep {
    0%, 100% { background-position: 200% 200%; }
    50% { background-position: 0% 0%; }
}

/* ══════════════════════════════════════════
   TEXT SHIMMER / SHINE EFFECT
══════════════════════════════════════════ */
.text-shimmer {
    background: linear-gradient(
        110deg,
        var(--teal-400) 0%,
        var(--teal-300) 20%,
        #ffffff 35%,
        var(--teal-300) 50%,
        var(--teal-400) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s ease-in-out infinite;
}

@keyframes textShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

/* ══════════════════════════════════════════
   PARALLAX DEPTH LAYERS
══════════════════════════════════════════ */
.parallax-layer {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.parallax-slow { --parallax-speed: 0.03; }
.parallax-medium { --parallax-speed: 0.06; }
.parallax-fast { --parallax-speed: 0.1; }

/* ══════════════════════════════════════════
   ANIMATED PARTICLE DOTS
══════════════════════════════════════════ */
.particle-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.25);
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-800px) translateX(100px); opacity: 0; }
}

/* ══════════════════════════════════════════
   MAGNETIC TILT CARD (CSS base, JS enhances)
══════════════════════════════════════════ */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.tilt-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

.tilt-card .tilt-inner {
    transform: translateZ(30px);
    transition: transform 0.3s ease;
}

/* ══════════════════════════════════════════
   PULSING RING EFFECT (CTA buttons)
══════════════════════════════════════════ */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid;
    border-color: inherit;
    opacity: 0;
    animation: pulseRing 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* ══════════════════════════════════════════
   STAGGERED CASCADE ENTRANCE
══════════════════════════════════════════ */
.cascade-enter > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.cascade-enter.visible > *:nth-child(1) { transition-delay: 0.05s; }
.cascade-enter.visible > *:nth-child(2) { transition-delay: 0.1s; }
.cascade-enter.visible > *:nth-child(3) { transition-delay: 0.15s; }
.cascade-enter.visible > *:nth-child(4) { transition-delay: 0.2s; }
.cascade-enter.visible > *:nth-child(5) { transition-delay: 0.25s; }
.cascade-enter.visible > *:nth-child(6) { transition-delay: 0.3s; }
.cascade-enter.visible > *:nth-child(7) { transition-delay: 0.35s; }
.cascade-enter.visible > *:nth-child(8) { transition-delay: 0.4s; }
.cascade-enter.visible > *:nth-child(9) { transition-delay: 0.45s; }
.cascade-enter.visible > *:nth-child(10) { transition-delay: 0.5s; }
.cascade-enter.visible > *:nth-child(11) { transition-delay: 0.55s; }
.cascade-enter.visible > *:nth-child(12) { transition-delay: 0.6s; }

.cascade-enter.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════
   HOVER LIFT MICRO-INTERACTIONS
══════════════════════════════════════════ */
.hover-lift {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════
   TYPING CURSOR BLINK
══════════════════════════════════════════ */
.typing-cursor::after {
    content: '|';
    display: inline-block;
    color: var(--teal-400);
    animation: cursorBlink 0.8s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes cursorBlink {
    50% { opacity: 0; }
}

/* ══════════════════════════════════════════
   SCROLL-PROGRESS BAR
══════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal-500), var(--gold-400), var(--teal-500));
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════════
   MOUSE FOLLOW GLOW CURSOR
══════════════════════════════════════════ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

/* ══════════════════════════════════════════
   COUNTER FLIP STYLE
══════════════════════════════════════════ */
.num-animate {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.num-animate.counting {
    animation: numBounce 0.3s ease;
}

@keyframes numBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ══════════════════════════════════════════
   SECTION DIVIDER WAVE
══════════════════════════════════════════ */
.wave-divider {
    position: relative;
    overflow: hidden;
}

.wave-divider::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23f8fafc' d='M0,20 C480,60 960,0 1440,20 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

/* ══════════════════════════════════════════
   GOLD SHIMMER LINE
══════════════════════════════════════════ */
.gold-line-animated {
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a853, transparent);
    background-size: 200% 100%;
    animation: goldLineShift 3s ease-in-out infinite;
}

@keyframes goldLineShift {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

/* ══════════════════════════════════════════
   ARABIC TEXT FLOAT
══════════════════════════════════════════ */
.arabic-float {
    animation: arabicFloat 6s ease-in-out infinite;
}

@keyframes arabicFloat {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(-8px); opacity: 1; }
}

/* ══════════════════════════════════════════
   ICON SPIN ON HOVER
══════════════════════════════════════════ */
.icon-spin-hover {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .icon-spin-hover {
    transform: rotateY(180deg);
}

/* ══════════════════════════════════════════
   CARD SHINE SWEEP
══════════════════════════════════════════ */
.shine-sweep {
    position: relative;
    overflow: hidden;
}

.shine-sweep::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 60%,
        transparent 100%
    );
    transform: rotate(25deg) translateX(-100%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.shine-sweep:hover::after {
    transform: rotate(25deg) translateX(100%);
}
    /* Front Page Specific Styles */
    .front-page-body {
        background-color: #f8fafc;
    }

    /* Missing Tailwind Utilities */
    .leading-\[1\.08\] { line-height: 1.08; }
    .leading-\[1\.05\] { line-height: 1.05; }
    .text-\[11px\] { font-size: 11px; }
    .text-\[9px\] { font-size: 9px; }
    .tracking-\[0\.3em\] { letter-spacing: 0.3em; }
    .text-white\/55 { color: rgba(255, 255, 255, 0.55); }
    .text-white\/40 { color: rgba(255, 255, 255, 0.4); }
    .bg-slate-950 { background-color: #020617; }
    .aspect-\[3\/4\] { aspect-ratio: 3 / 4; }
    .max-w-\[380px\] { max-width: 380px; }
    .max-w-\[140px\] { max-width: 140px; }
    .border-white\/8 { border-color: rgba(255, 255, 255, 0.08); }
    .bg-white\/\[0\.04\] { background-color: rgba(255, 255, 255, 0.04); }
    .hover\:bg-white\/\[0\.07\]:hover { background-color: rgba(255, 255, 255, 0.07); }
    .hover\:border-amber-500\/25:hover { border-color: rgba(245, 158, 11, 0.25); }
    
    @media (min-width: 1024px) {
        .lg\:grid-cols-2 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    /* Hero Slide Grid */
    .hero-slides-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .hero-slides-grid>.hero-slide {
        grid-area: 1 / 1;
    }

    /* â”€â”€ Hero Mobile Responsiveness â”€â”€ */

    /* Mobile: compact hero using dynamic viewport height */
    #hero-root {
        min-height: 100svh;
    }

    /* Mobile navbar: logo h-16 (64px) + py-3 (24px) = 88px; desktop: logo 5.5rem (88px) + py-3 = 112px */
    .hero-content-wrapper {
        padding-top: 140px;
        padding-bottom: 72px;
        min-height: 100svh;
    }
    @media (min-width: 768px) {
        .hero-content-wrapper {
            padding-top: 160px;
            padding-bottom: 80px;
        }
    }

    .hero-dots-bar {
        padding-top: 88px;  /* just clears the fixed navbar on mobile */
    }
    @media (min-width: 768px) {
        .hero-dots-bar {
            padding-top: 108px;
        }
    }

    /* CTA buttons: stack vertically on mobile */
    .hero-cta-group {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    @media (max-width: 480px) {
        .hero-cta-group {
            flex-direction: column;
            width: 100%;
        }
        .hero-cta-group a {
            width: 100% !important;
            justify-content: center !important;
        }
    }

    /* Slide 2: hide marquee area on small screens, show compact list instead */
    .khutbah-marquee-section {
        display: none;
    }
    @media (min-width: 768px) {
        .khutbah-marquee-section {
            display: block;
        }
    }
    .khutbah-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 260px;
        overflow-y: auto;
        padding-right: 4px;
    }
    @media (min-width: 768px) {
        .khutbah-mobile-cards {
            display: none;
        }
    }
    .khutbah-mobile-cards::-webkit-scrollbar {
        width: 3px;
    }
    .khutbah-mobile-cards::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
        border-radius: 2px;
    }
    .khutbah-mobile-cards::-webkit-scrollbar-thumb {
        background: rgba(251,191,36,0.4);
        border-radius: 2px;
    }

    /* Slide 2: on mobile, single column layout */
    .khutbah-slide-grid {
        grid-template-columns: 1fr !important;
    }
    @media (min-width: 768px) {
        .khutbah-slide-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
    }

    /* Hero dots: make parent pointer-events work correctly */
    .hero-dots-bar {
        pointer-events: none;
    }
    .hero-dots-bar .hero-dots-inner {
        pointer-events: auto;
    }

    /* Swipe hint on mobile */
    .hero-swipe-hint {
        display: flex;
        align-items: center;
        gap: 6px;
        opacity: 0.4;
        font-size: 10px;
        color: white;
        font-weight: 600;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }
    @media (min-width: 768px) {
        .hero-swipe-hint {
            display: none;
        }
    }

    /* Progress bar: hidden on mobile to save space */
    .hero-progress-section {
        display: none;
    }
    @media (min-width: 768px) {
        .hero-progress-section {
            display: block;
            flex: 1;
            margin-right: 2rem;
        }
    }

    /* Section reveal â€” set by GSAP, visible as default fallback */
    .fp-reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    /* 3D Animations & Modern Effects */
    @keyframes float-3d {

        0%,
        100% {
            transform: translateY(0px) rotateX(0deg) rotateZ(0deg);
        }

        50% {
            transform: translateY(-20px) rotateX(5deg) rotateZ(2deg);
        }
    }

    @keyframes pulse-glow {

        0%,
        100% {
            box-shadow: 0 0 20px rgba(20, 184, 166, 0.5), 0 0 40px rgba(20, 184, 166, 0.2);
        }

        50% {
            box-shadow: 0 0 30px rgba(20, 184, 166, 0.8), 0 0 60px rgba(20, 184, 166, 0.4);
        }
    }

    @keyframes slide-in-3d {
        from {
            opacity: 0;
            transform: translate3d(-50px, 30px, -100px);
        }

        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    @keyframes card-lift {
        0% {
            transform: translateY(0) translateZ(0);
        }

        100% {
            transform: translateY(-12px) translateZ(30px);
        }
    }

    @keyframes shimmer-gradient {
        0% {
            background-position: -1000px 0;
        }

        100% {
            background-position: 1000px 0;
        }
    }

    @keyframes bounce-soft {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-8px);
        }
    }

    @keyframes gradient-shift {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    /* 3D Card Hover Effects */
    .card-3d {
        perspective: 1000px;
        transition: border-color 0.4s ease, box-shadow 0.4s ease;
        position: relative;
    }

    .card-3d.absolute {
        position: absolute;
    }

    .card-3d::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(20, 184, 166, 0.08), transparent 60%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 1;
    }

    .card-3d:hover::before {
        opacity: 1;
    }

    .card-3d:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    /* Modern Glass with Depth */
    .glass-modern {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .glass-modern:hover {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    }

    /* Animated Gradient Background */
    .gradient-animated {
        background: linear-gradient(-45deg,
                #14b8a6,
                #06b6d4,
                #0891b2,
                #14b8a6);
        background-size: 300% 300%;
        animation: gradient-shift 8s ease infinite;
    }

    /* Smooth Scroll Reveal */
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Modern Button Styles */
    .btn-modern-primary {
        background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
        position: relative;
        overflow: hidden;
        transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    }

    .btn-modern-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s ease;
    }

    .btn-modern-primary:hover::before {
        left: 100%;
    }

    .btn-modern-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(20, 184, 166, 0.4);
    }

    /* Stagger Animation */
    .stagger-item {
        animation: slide-in-3d 0.6s ease forwards;
    }

    .stagger-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .stagger-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .stagger-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .stagger-item:nth-child(4) {
        animation-delay: 0.4s;
    }

    .stagger-item:nth-child(5) {
        animation-delay: 0.5s;
    }

    .stagger-item:nth-child(6) {
        animation-delay: 0.6s;
    }

    /* Floating Animation */
    .float-animate {
        animation: float-3d 6s ease-in-out infinite;
    }

    .float-animate-slow {
        animation: float-3d 8s ease-in-out infinite;
    }

    /* Icon Bounce */
    .icon-bounce {
        animation: bounce-soft 2s ease-in-out infinite;
    }

    /* Khutbah Timeline Styles */
    .khutbah-timeline {
        padding-left: 4px;
    }
    .khutbah-timeline-item {
        position: relative;
    }
    .khutbah-timeline-item::after {
        content: '';
        clear: both;
        display: table;
    }
    .khutbah-timeline-item:hover .bg-amber-400 {
        box-shadow: 0 0 16px rgba(251,191,36,1);
        transform: scale(1.2);
        transition: all 0.3s ease;
    }
    .khutbah-timeline-item .bg-amber-400 {
        transition: all 0.3s ease;
    }

    /* Gradient Text */
    .gradient-text {
        background: linear-gradient(135deg, #14b8a6 0%, #fbbf24 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Hero Enhanced */
    .hero-enhanced {
        position: relative;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
    }

    .hero-enhanced::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
        pointer-events: none;
    }

    @media (prefers-reduced-motion: reduce) {
        .float-animate, .float-animate-slow, .icon-bounce, .animate-pulse, .animate-spin {
            animation: none !important;
            transform: none !important;
        }
        .reveal, .reveal-on-scroll, .stagger-item {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
            animation: none !important;
        }
    }
        /* Custom Logo Fix */
        .custom-logo {
            aspect-ratio: 741 / 234 !important;
            height: 4rem !important; /* h-16 on mobile */
            width: auto !important;
            max-width: 100% !important;
            object-fit: contain !important;
            transition: transform 0.5s ease !important;
        }
        @media (min-width: 768px) {
            .custom-logo {
                height: 5.5rem !important; /* h-22 on desktop */
            }
        }
        .footer-logo-wrapper .custom-logo {
            height: 6rem !important; /* h-24 on mobile */
        }
        @media (min-width: 768px) {
            .footer-logo-wrapper .custom-logo {
                height: 8rem !important; /* h-32 on desktop */
            }
        }
        .custom-logo-link:hover .custom-logo {
            transform: scale(1.05) !important;
        }

        /* Desktop Dropdown Styling */
        @media (min-width: 768px) {
            #navbar .menu-item-has-children {
                position: relative;
            }
            #navbar .menu-item-has-children > a {
                display: inline-flex;
                align-items: center;
                gap: 0.25rem;
            }
            #navbar .menu-item-has-children > a::after {
                content: "";
                display: inline-block;
                width: 0.4em;
                height: 0.4em;
                border-right: 1.5px solid currentColor;
                border-bottom: 1.5px solid currentColor;
                transform: rotate(45deg);
                margin-bottom: 2px;
                margin-left: 2px;
                transition: transform 0.2s;
            }
            #navbar .menu-item-has-children:hover > a::after {
                transform: rotate(-135deg);
                margin-bottom: -2px;
            }
            #navbar .sub-menu {
                position: absolute;
                top: 100%;
                left: 50%;
                transform: translateX(-50%) translateY(10px);
                min-width: 220px;
                background-color: rgba(255, 255, 255, 0.95);
                backdrop-filter: blur(12px);
                border: 1px solid rgba(226, 232, 240, 0.8);
                border-radius: 1rem;
                box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
                padding: 0.5rem;
                display: flex;
                flex-direction: column;
                gap: 0.25rem;
                opacity: 0;
                visibility: hidden;
                transition: all 0.2s ease-in-out;
                z-index: 90000;
            }
            #navbar .menu-item-has-children:hover > .sub-menu {
                opacity: 1;
                visibility: visible;
                transform: translateX(-50%) translateY(0);
            }
            #navbar .sub-menu li {
                width: 100%;
                list-style: none;
            }
            #navbar .sub-menu a {
                display: block;
                padding: 0.6rem 1rem;
                color: #334155;
                font-size: 0.875rem;
                font-weight: 600;
                border-radius: 0.5rem;
                transition: all 0.15s;
                text-align: left;
            }
            #navbar .sub-menu a:hover {
                background-color: #f0fdfa;
                color: #0f766e;
            }
        }
        
        /* Mobile Menu Dropdown Fix */
        @media (max-width: 767px) {
            #site-menu-panel {
                transform-origin: top;
                transition: opacity 0.3s ease, transform 0.3s ease;
            }
            #site-menu-panel.hidden-panel {
                opacity: 0;
                transform: scaleY(0.95);
                pointer-events: none;
                position: absolute;
                visibility: hidden;
            }
            #site-menu-panel .sub-menu {
                display: none;
                flex-direction: column;
                gap: 0.5rem;
                padding-left: 1rem;
                margin-top: 0.5rem;
                border-left: 2px solid #e2e8f0;
            }
            #site-menu-panel .menu-item-has-children.active-mobile > .sub-menu {
                display: flex;
            }
            #site-menu-panel .menu-item-has-children > a {
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            #site-menu-panel .menu-item-has-children > a::after {
                content: "â–¼";
                font-size: 0.6em;
                opacity: 0.5;
                transition: transform 0.2s;
            }
            #site-menu-panel .menu-item-has-children.active-mobile > a::after {
                transform: rotate(180deg);
            }
            
            /* Hamburger Animation */
            .hamburger-line {
                transition: all 0.3s ease-in-out;
            }
            .menu-active .line-1 {
                transform: translateY(7px) rotate(45deg);
            }
            .menu-active .line-2 {
                opacity: 0;
            }
            .menu-active .line-3 {
                transform: translateY(-7px) rotate(-45deg);
            }
        }

/* Fix GSAP animation conflicts */
.is-revealing { transition: none !important; }
.card-3d { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, filter, backdrop-filter !important; }
