/* Hero Section */
.hero { text-align: center; padding: 6rem 1rem 4rem; max-width: 900px; margin: 0 auto; animation: fadeIn 1s ease-out; }
.hero h1 { font-size: 4rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.1; color: var(--text-heading); letter-spacing: -1px; }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2.5rem; font-weight: 400; max-width: 700px; margin-inline: auto; line-height: 1.7; }
.hero-btn { display: inline-block; background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); color: white; text-decoration: none; padding: 1rem 2.5rem; border-radius: 50px; font-size: 1.1rem; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3); position: relative; z-index: 10; border: none; cursor: pointer; }
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(14, 165, 233, 0.5); }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* LIVELY 3D CARDS */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; position: relative; z-index: 10;}
.categories { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 2rem; }

.category-card { 
    width: 100%; max-width: 360px; height: 420px; perspective: 1200px; 
    cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.category-card:hover { transform: translateY(-12px); }
.category-card::before {
    content: ''; position: absolute; top: 10%; left: 10%; width: 80%; height: 80%;
    background: var(--glow-color); filter: blur(50px); opacity: 0.15; z-index: -1;
    transition: opacity 0.4s ease, transform 0.4s ease; border-radius: 50%;
}
.category-card:hover::before { opacity: 0.45; transform: scale(1.1); }

.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; will-change: transform; }
.category-card.is-flipped .card-inner { transform: rotateY(180deg); }

.card-front, .card-back {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; 
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    border: 2px solid rgba(14, 165, 233, 0.2); border-radius: 24px; padding: 2.5rem 2rem; box-shadow: 0 15px 35px rgba(14, 165, 233, 0.1);
    display: flex; flex-direction: column; overflow: hidden;
}

.card-front { justify-content: center; align-items: center; text-align: center; }
.card-icon { font-size: 4rem; margin-bottom: 1rem; filter: grayscale(100%) opacity(0.7); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.category-card:hover .card-front .card-icon { filter: grayscale(0%) opacity(1); transform: scale(1.15) translateY(-5px); } 

.card-front h3 { font-size: 1.6rem; margin-bottom: 0.8rem; font-weight: 600; color: var(--text-heading); }
.card-front p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

@keyframes pulseText { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.click-hint { margin-top: 1.5rem; font-size: 0.8rem; color: var(--accent-blue); font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 0.5rem; animation: pulseText 2.5s infinite ease-in-out; }
.category-card:hover .click-hint { animation: none; opacity: 1; }

.card-back { transform: rotateY(180deg); background: rgba(255, 255, 255, 0.98); border-color: rgba(14, 165, 233, 0.3); justify-content: flex-start; padding: 2rem; overflow-y: auto; }
.card-back::-webkit-scrollbar { width: 4px; }
.card-back::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 10px; }

.back-title { font-size: 1.3rem; color: var(--accent-blue); margin-bottom: 1.5rem; font-weight: 600; text-align: center; }
.back-link { width: 100%; padding: 0.9rem; margin-bottom: 0.8rem; background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(14, 165, 233, 0.2); border-radius: 10px; color: var(--text-main); text-decoration: none; font-size: 1rem; font-weight: 500; transition: all 0.2s ease; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.back-link:hover { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); border-color: transparent; color: white; transform: scale(1.02); box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3); }

.card-menu-view { display: none; width: 100%; animation: fadeIn 0.3s ease; }
.back-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-family: 'Poppins'; font-size: 0.9rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.back-btn:hover { color: var(--accent-blue); }
details.accordion { width: 100%; margin-bottom: 0.5rem; background: rgba(14, 165, 233, 0.05); border: 1px solid rgba(14, 165, 233, 0.15); border-radius: 8px; }
details.accordion summary { padding: 0.8rem; cursor: pointer; font-weight: 500; color: var(--text-main); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: '▾'; color: var(--accent-blue); }
details.accordion[open] summary::after { content: '▴'; }
.accordion-content { padding: 0 0.8rem 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; }
.accordion-link { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; padding: 0.5rem; border-radius: 6px; transition: 0.2s; display: block; }
.accordion-link:hover { background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); }

/* Moving Gallery & About */
.section-header { text-align: center; margin: 4rem 0 2rem; position: relative; z-index: 10;}
.section-header h2 { font-size: 2.2rem; font-weight: 600; color: var(--text-heading); }
.section-header p { color: var(--accent-teal); font-size: 1rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.about-box { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px); border: 1px solid rgba(14, 165, 233, 0.2); border-radius: 20px; padding: 3rem; text-align: center; max-width: 800px; margin: 0 auto 5rem; line-height: 1.8; color: var(--text-main); position: relative; z-index: 10;}

/* Scroll offset for fixed nav */
#about { scroll-margin-top: 120px; }
#explore { scroll-margin-top: 120px; }
#gallery { scroll-margin-top: 120px; }
#testimonials { scroll-margin-top: 120px; }
.about-hero { scroll-margin-top: 120px; }

.moving-gallery { width: 100%; overflow: hidden; padding: 2rem 0; margin-bottom: 2rem; position: relative; z-index: 10; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.moving-track { display: flex; gap: 2rem; width: max-content; animation: scrollGallery 35s linear infinite; will-change: transform; }
.moving-track:hover { animation-play-state: paused; }
.moving-item { width: 220px; height: 300px; background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(14, 165, 233, 0.2); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--text-muted); font-weight: 500; transition: all 0.3s ease; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.moving-item:hover { border-color: var(--accent-blue); transform: translateY(-5px) scale(1.02); background: rgba(14, 165, 233, 0.15); color: var(--accent-blue); box-shadow: 0 15px 30px rgba(14, 165, 233, 0.2); }
.moving-item::before { content: '📄'; font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.7; filter: grayscale(100%); transition: 0.3s; }
.moving-item:hover::before { filter: grayscale(0%); opacity: 1; }
.moving-item span { font-size: 1.1rem; color: var(--text-heading); margin-bottom: 0.5rem; display: block;}
.moving-item small { font-size: 0.8rem; font-weight: 400; }
@keyframes scrollGallery { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
/* =========================================
   INFINITE SCROLLING & GLOWING TESTIMONIALS
   ========================================= */
.testimonial-wrapper {
    width: 100%; overflow-x: auto; overflow-y: hidden; 
    padding: 2rem 0 4rem; position: relative; z-index: 10;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.testimonial-wrapper::-webkit-scrollbar { display: none; /* Hide scrollbar Chrome/Safari */ }

.testimonial-track {
    display: flex; gap: 2.5rem; width: max-content;
    padding: 0 50vw; /* Gives padding so the first card can sit dead center */
    will-change: transform;
    align-items: center; /* Aligns cards vertically */
}

.testimonial-card { 
    width: 400px; 
    background: var(--glass-bg); border: 1px solid var(--glass-border); 
    border-radius: 16px; padding: 2.5rem; white-space: normal;
    
    /* Default Dimmed State */
    opacity: 0.3;
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* THE ACTIVE GLOW STATE (Applied via JS) */
.testimonial-card.active-testimonial {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--accent-blue);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.25);
    background: rgba(255, 255, 255, 0.98);
    z-index: 2;
}

.stars { color: var(--accent-blue); margin-bottom: 1.2rem; font-size: 1.2rem; letter-spacing: 2px; } 
.quote { color: var(--text-main); margin-bottom: 2rem; line-height: 1.7; font-size: 1rem; font-weight: 300; font-style: italic;}
.author { font-weight: 600; color: var(--text-heading); font-size: 1rem; } 
.subject { font-size: 0.85rem; color: var(--accent-teal); margin-top: 0.2rem; font-weight: 500; }

/* Mobile Adjustment */
@media (max-width: 900px) {
    .testimonial-card { width: 320px; padding: 2rem; } 
}

/* ==========================================
   ABOUT SECTION STYLES
   ========================================== */
.about-hero {
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at top center, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
}

.about-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
    color: var(--text-heading);
}

.highlight-cyan { color: #00fff2; }
.highlight-pink { color: #ff0080; }

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

body:not(.dark-mode) .origin-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 3rem;
    background: white;
    border: 3px solid #0ea5e9;
    border-radius: 16px;
    box-shadow: 8px 8px 0 rgba(30, 52, 60, 0.1);
}

body.dark-mode .origin-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 3rem;
    background: rgba(13, 7, 58, 0.764);
    border: 1px solid rgba(37, 58, 67, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

body:not(.dark-mode) .origin-content h2 {
    color: black;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

body.dark-mode .origin-content h2 {
    color: var(--text-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

body:not(.dark-mode) .origin-content p {
    color: black;
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

body.dark-mode .origin-content p {
    color: var(--text-main);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

body:not(.dark-mode) .acronym-box {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    color: black;
}

body:not(.dark-mode) .acronym-box strong {
    color: black;
}

body:not(.dark-mode) .acronym-box p {
    color: black;
}

body.dark-mode .acronym-box {
    background: rgba(14, 165, 233, 0.08);
    border-left: 3px solid var(--accent-blue);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}

body:not(.dark-mode) .acronym-box span {
    color: #0ea5e9;
    font-weight: bold;
}

body.dark-mode .acronym-box span {
    color: var(--accent-blue);
    font-weight: bold;
}

.team-section {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

body:not(.dark-mode) .team-section h2 {
    color: black;
}

body.dark-mode .team-section h2 {
    color: var(--text-heading);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
}

body:not(.dark-mode) .archivist-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: black;
}

body.dark-mode .archivist-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-heading);
}

.blob-frame {
    width: 250px;
    height: 250px;
    position: relative;
    margin-bottom: 2rem;
}

.blob-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    position: relative;
    z-index: 2;
    animation: blobMorph 8s ease-in-out infinite alternate;
}

.blob-glow {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    z-index: 1;
    filter: blur(25px);
    opacity: 0.6;
    animation: blobMorph 8s ease-in-out infinite alternate-reverse, glow-pulse 4s ease-in-out infinite alternate;
}

.glow-cyan { background: var(--accent-blue); }
.glow-pink { background: #2563eb; }

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

body:not(.dark-mode) .badge-cyan {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

body.dark-mode .badge-cyan {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

body:not(.dark-mode) .badge-pink {
    background: rgba(255, 0, 128, 0.1);
    color: #ff0080;
    border: 1px solid rgba(255, 0, 128, 0.3);
}

body.dark-mode .badge-pink {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

body:not(.dark-mode) .archivist-bio {
    color: black;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 350px;
    text-align: center;
}

body.dark-mode .archivist-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 350px;
    text-align: center;
}

body:not(.dark-mode) .archivist-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: black;
}

body.dark-mode .archivist-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

@keyframes blobMorph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes glow-pulse {
    0% { opacity: 0.4; filter: blur(20px); transform: scale(0.95); }
    100% { opacity: 0.8; filter: blur(30px); transform: scale(1.05); }
}

/* ==========================================
   RAMADAN BANNER STYLES
   ========================================== */
#ramadan-banner {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid #fbbf24;
    color: #fbbf24;
    padding: 12px 20px;
    position: relative;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    z-index: 10000;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
    animation: pulseGlow 3s infinite alternate;
}

.ramadan-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.3;
    animation: twinkleStars 10s linear infinite;
    pointer-events: none;
}

.ramadan-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.moon-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px #fbbf24);
    animation: swingMoon 3s ease-in-out infinite;
}

.ramadan-text {
    font-size: 0.95rem;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.ramadan-text strong {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ramadan-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3;
    transition: color 0.3s ease;
    line-height: 1;
}

.ramadan-close:hover {
    color: #fbbf24;
    text-shadow: 0 0 8px #fbbf24;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 4px 10px rgba(251, 191, 36, 0.1); border-color: #d97706; }
    100% { box-shadow: 0 4px 25px rgba(251, 191, 36, 0.4); border-color: #fbbf24; }
}

@keyframes swingMoon {
    0% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    100% { transform: rotate(-10deg); }
}

@keyframes twinkleStars {
    from { background-position: 0 0, 40px 60px, 130px 270px; }
    to { background-position: 550px 550px, 590px 410px, 380px 520px; }
}

@media (max-width: 600px) {
    .ramadan-text { font-size: 0.8rem; }
    .ramadan-content { gap: 8px; flex-direction: column; }
    .moon-icon { font-size: 1.2rem; }
}

/* =========================================
   DARK MODE HOME PAGE STYLES
   ========================================= */

body.dark-mode .card-front,
body.dark-mode .card-back {
    background: rgba(17, 28, 55, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
}

body.dark-mode .card-back {
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .card-back::-webkit-scrollbar-thumb {
    background: rgba(17, 28, 55, 0.4);
}

body.dark-mode .card-front h3 {
    color: #fff;
}

body.dark-mode .card-front p {
    color: #cbd5e1;
}

body.dark-mode .click-hint {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .back-title {
    color: #fff;
}

body.dark-mode .back-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

body.dark-mode .back-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode .back-btn {
    color: #64748b;
}

body.dark-mode .back-btn:hover {
    color: #fff;
}

body.dark-mode details.accordion {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode details.accordion summary {
    color: #cbd5e1;
}

body.dark-mode details.accordion summary::after {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .accordion-link {
    color: #64748b;
}

body.dark-mode .accordion-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .about-box {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(45, 90, 150, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-mode .about-box h2,
body.dark-mode .about-box strong {
    color: #fff;
}

body.dark-mode .moving-item {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.25) 0%, rgba(45, 90, 150, 0.25) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .moving-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(45, 90, 150, 0.4) 100%);
    color: #fff;
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.5);
}

body.dark-mode .moving-item span {
    color: #cbd5e1;
}

body.dark-mode .hero-btn {
    background: rgba(17, 28, 55, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .hero-btn:hover {
    background: rgba(17, 28, 55, 0.4);
    box-shadow: 0 15px 25px rgba(255, 255, 255, 0.1);
}

body.dark-mode footer
{
    background: rgba(17, 28, 55, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}
/* Dark mode about section styles */
body.dark-mode .about-hero h1 {
    color: #f0f9ff;
}

body.dark-mode .subtitle {
    color: #cbd5e1;
}