/* ============================================================
   Ziya Foundation — Custom Styles
   (Tailwind handles utility classes; this file covers
    custom animations, Islamic motifs, and overrides)
   ============================================================ */

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background-color: #FBF8F1;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* Arabic text blocks */
.font-arabic,
[lang="ar"] {
    font-family: 'Cairo', 'Amiri', serif;
}

/* ── NAVBAR ──────────────────────────────────────────────── */
#site-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 2px 20px rgba(11, 46, 51, 0.12);
    background-color: rgba(255, 255, 255, 0.98);
}

.bismillah-bar {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ── HERO SLIDER ─────────────────────────────────────────── */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 520px;
    max-height: 860px;
    overflow: hidden;
}

.hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hero-slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 6s ease-in-out;
}

.hero-slide.active img {
    transform: scale(1.05);
}

/* Islamic-toned gradient overlay (cream → transparent) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(251, 248, 241, 0.97) 0%,
        rgba(251, 248, 241, 0.75) 38%,
        rgba(251, 248, 241, 0.20) 60%,
        transparent 75%
    );
    z-index: 1;
}

/* Mobile: full overlay for readability */
@media (max-width: 768px) {
    .hero-overlay {
        background: rgba(251, 248, 241, 0.88);
    }
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .hero-content { padding: 0 4rem; }
}

.hero-text-block {
    max-width: 560px;
}

.hero-heading-line1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-primary);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

.hero-heading-line2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-secondary);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

.hero-subheading {
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    color: #4b5563;
    max-width: 480px;
    line-height: 1.7;
    margin: 1.25rem 0 2rem;
}

/* CTA Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 110, 81, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background-color: var(--color-secondary);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-1px);
}

/* Slide dot indicators */
.hero-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    width: 28px;
    border-radius: 9999px;
}

.hero-dot:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Prev/Next arrow buttons */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.hero-arrow:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}

.hero-arrow-prev { left: 1rem; }
.hero-arrow-next { right: 4rem; } /* offset for ribbon */

@media (max-width: 768px) {
    .hero-arrow { display: none; }
}

/* ── RIBBON BADGE ────────────────────────────────────────── */
.ribbon-badge {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    background-color: var(--color-accent);
    color: var(--color-secondary);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateY(-50%) rotate(180deg);
    padding: 1.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0 0 0 0.5rem;
    box-shadow: -3px 0 12px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, padding 0.2s ease;
    max-height: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ribbon-badge:hover {
    background-color: var(--color-primary);
    color: #fff;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .ribbon-badge { display: none; }
}

/* ── MOSQUE ARCH DIVIDER ─────────────────────────────────── */
.arch-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}

.arch-divider svg {
    display: block;
    width: 100%;
}

/* ── ISLAMIC GEOMETRIC PATTERN (section BG) ─────────────── */
.islamic-pattern-bg {
    position: relative;
    overflow: hidden;
}

.islamic-pattern-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpolygon points='30,3 34,18 49,13 39,25 54,28 39,31 49,43 34,38 30,53 26,38 11,43 21,31 6,28 21,25 11,13 26,18' fill='%230F6E51' opacity='0.07'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.islamic-pattern-bg > * { position: relative; z-index: 1; }

/* ── IMPACT STATS ────────────────────────────────────────── */
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 2px 16px rgba(15, 110, 81, 0.08);
    border-bottom: 3px solid var(--color-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(15, 110, 81, 0.14);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

/* ── PROGRAM CARDS ───────────────────────────────────────── */
.program-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(15, 110, 81, 0.15);
}

.program-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.program-card:hover img {
    transform: scale(1.04);
}

/* ── TESTIMONIALS ────────────────────────────────────────── */
.testimonial-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-left: 4px solid var(--color-accent);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 5rem;
    line-height: 0;
    position: absolute;
    top: 2.5rem;
    left: 1.5rem;
    color: var(--color-accent);
    opacity: 0.25;
    font-family: Georgia, serif;
}

/* ── COUNT-UP ANIMATION ──────────────────────────────────── */
.count-up-value {
    display: inline-block;
}

/* ── SECTION HEADINGS ────────────────────────────────────── */
.section-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1.2;
}

.section-subheading {
    font-size: 1rem;
    color: #6b7280;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.section-accent-bar {
    display: inline-block;
    width: 56px;
    height: 4px;
    border-radius: 9999px;
    background-color: var(--color-accent);
    margin-bottom: 1rem;
}

/* ── SLIDE-IN ANIMATION ──────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-slide.active .hero-text-block > * {
    opacity: 0;
    animation: fadeInUp 0.7s ease forwards;
}

.hero-slide.active .hero-text-block > *:nth-child(1) { animation-delay: 0.1s; }
.hero-slide.active .hero-text-block > *:nth-child(2) { animation-delay: 0.2s; }
.hero-slide.active .hero-text-block > *:nth-child(3) { animation-delay: 0.3s; }
.hero-slide.active .hero-text-block > *:nth-child(4) { animation-delay: 0.45s; }

/* ── MOBILE DRAWER ───────────────────────────────────────── */
#mobile-drawer.open {
    display: block !important;
}

#mobile-drawer.open #drawer-panel {
    transform: translateX(0);
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── PARTNER LOGOS ───────────────────────────────────────── */
.partner-logo {
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-secondary); }

/* ── FOCUS STYLES (accessibility) ───────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── FOUNDER BANNER ──────────────────────────────────────── */
.founder-banner {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
}

/* Photo pinned to the right, bleeding to edge */
.founder-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 55%;
    height: 100%;
}

.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Gradient that fades the photo's left edge into the dark background */
.founder-photo-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--color-secondary) 0%,
        rgba(11, 46, 51, 0.75) 22%,
        rgba(11, 46, 51, 0.15) 48%,
        transparent 72%
    );
}

/* Text column */
.founder-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

@media (min-width: 640px) { .founder-inner { padding: 5rem 2rem; } }
@media (min-width: 1024px) { .founder-inner { padding: 6rem 4rem; } }

.founder-text {
    max-width: 560px;
}

/* Big quote heading */
.founder-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    line-height: 1;
}

.founder-quote-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.5rem;
    line-height: 0.7;
    color: var(--color-accent);
    font-weight: 700;
}

.founder-heading-text {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    padding-top: 0.35rem;
}

.founder-para {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.1rem;
}

.founder-name {
    margin-top: 1.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.founder-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* Mobile: stack photo on top, dark panel below */
@media (max-width: 1023px) {
    .founder-banner { display: block; min-height: 0; }
    .founder-photo {
        position: relative;
        width: 100%;
        height: 300px;
    }
    .founder-photo-fade {
        background: linear-gradient(
            to bottom,
            transparent 40%,
            rgba(11, 46, 51, 0.85) 85%,
            var(--color-secondary) 100%
        );
    }
    .founder-inner { padding-top: 2rem; }
    .founder-text { max-width: 100%; }
}

/* ── HERO VIDEO SLIDES ────────────────────────────────────── */
.hero-slide .hero-bg-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* YouTube iframe cover — scale so it fills like object-fit:cover */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none; /* let clicks pass to CTAs */
}
.hero-video-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    /* 16:9 cover trick */
    width: 100vw;
    height: 56.25vw;          /* 16:9 of viewport width */
    min-height: 100%;
    min-width: 177.77vh;      /* 16:9 of viewport height */
    transform: translate(-50%, -50%);
    border: 0;
}

/* ── SITE LOGO (counter built-in image whitespace) ────────── */
.site-logo {
    transform: scale(1.6);
    transform-origin: left center;
    margin-right: 0.75rem;   /* room for the scaled-up width */
}
@media (max-width: 640px) {
    .site-logo { transform: scale(1.4); }
}

/* ── LEGAL PAGES (Terms / Privacy / Refund) ───────────────── */
.legal-content { color: #4b5563; font-size: 0.95rem; line-height: 1.8; }
.legal-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 1.75rem 0 0.6rem;
}
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content ul li { margin-bottom: 0.4rem; }
.legal-content a { color: var(--color-primary); text-decoration: underline; }
.legal-content a:hover { opacity: 0.8; }
