/* ===================================
   Modern Premium Design System
   =================================== */
/* Using link tag in HTML for fonts with display=swap to avoid @import blocking */

:root {
    /* Sophisticated Color Palette */
    --primary-deep: #064E3B;
    /* Majestic Emerald */
    --primary-main: #0B6E4F;
    /* Forest Green */
    --primary-light: #F0FDF4;
    /* Mint Whisper */
    --accent-gold: #C5A059;
    /* Luminous Gold */
    --text-rich: #1A2E26;
    /* Deep Onyx Green */
    --text-muted: #5C6F68;
    /* Slate Green */
    --bg-white: #FDFBF7;
    /* Warm Cream Background */

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-arabic: 'Amiri', serif;

    /* Aesthetics */
    --shadow-soft: 0 10px 40px -10px rgba(6, 78, 59, 0.1);
    --shadow-card: 0 20px 60px -15px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 30px rgba(197, 160, 89, 0.3);
    --radius-lg: 32px;
    --radius-md: 16px;
    --transition-smooth: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================
   Global Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-rich);
    line-height: 1.8;
    background-color: var(--bg-white);
    overflow-x: hidden;
}
body.menu-open{overflow:hidden}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: var(--transition-smooth);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar.scrolled {
    padding: 15px 0;
}

.navbar.scrolled .container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 40px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.mosque-icon {
    font-size: 2.2rem;
    color: var(--primary-deep);
}

.nav-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-deep);
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-rich);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 8px 0;
    position: relative;
    transition: var(--transition-smooth);
}

.navbar .nav-link,
.navbar .nav-title {
    color: var(--primary-deep);
    /* Default dark for visibility on light cream bg */
}

/* Top state over hero: if background is dark, we'd need white. But current hero is light patterned */

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-donate-btn {
    background: var(--accent-gold);
    color: white !important;
    padding: 10px 28px !important;
    border-radius: 50px;
    font-weight: 700 !important;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

.nav-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
}

/* ===================================
   Enhanced Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: linear-gradient(135deg, #FDFBF7 0%, #F5F1E9 100%);
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L60 40 L100 50 L60 60 L50 100 L40 60 L0 50 L40 40 Z' fill='%23064E3B' fill-opacity='0.02'/%3E%3C/svg%3E");
    z-index: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text-side {
    padding-right: 20px;
}

.decorative-line {
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 10px;
    margin-bottom: 30px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--primary-deep);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.hero-urdu-calligraphy {
    font-family: var(--font-arabic);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--accent-gold);
    margin-bottom: 30px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-deep);
}

.meta-item span {
    font-size: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 16px 40px;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--primary-deep);
    color: white;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(6, 78, 59, 0.3);
}

.btn-secondary {
    border: 2px solid var(--primary-deep);
    color: var(--primary-deep);
}

.btn-secondary:hover {
    background: var(--primary-deep);
    color: white;
}

/* The Arch Visual */
.hero-visual-side {
    position: relative;
    padding: 20px;
}

.arch-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 200px 200px 20px 20px;
    /* Arch Shape */
    overflow: hidden;
    box-shadow: 0 30px 100px -20px rgba(0, 0, 0, 0.2);
    border: 8px solid white;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s ease;
}

.arch-frame:hover .hero-image {
    transform: scale(1.1);
}

.arch-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(6, 78, 59, 0.4));
}

.arch-border {
    position: absolute;
    inset: -15px;
    border: 2px solid var(--accent-gold);
    border-radius: calc(200px + 15px) calc(200px + 15px) 35px 35px;
    z-index: -1;
    opacity: 0.5;
}

/* Scroll Mouse Animation */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    opacity: 0.6;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--primary-deep);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent-gold);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    border-radius: 2px;
    animation: mouseScroll 2s infinite;
}

@keyframes mouseScroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* ===================================
   Contact Section
   =================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

/* ===================================
   About Section
   =================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.about-img img {
    width: 100%;
    transition: transform 0.5s ease;
}

.about-img:hover img {
    transform: scale(1.05);
}

/* ===================================
   Sections Shared
   =================================== */
section {
    padding: 140px 0;
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--primary-deep);
    margin-bottom: 20px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--accent-gold);
    margin: 0 auto 30px;
    border-radius: 10px;
}

/* ===================================
   Content Components
   =================================== */
.content-card,
.feature-card,
.info-card,
.cta-card {
    background: white;
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-15px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 30px;
    display: block;
}

/* ===================================
   Donation Section (Redesigned)
   =================================== */
.donation-section {
    background: linear-gradient(rgba(253, 251, 247, 0.9), rgba(253, 251, 247, 0.9)),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L45 35 L80 40 L45 45 L40 80 L35 45 L0 40 L35 35 Z' fill='%23064E3B' fill-opacity='0.03'/%3E%3C/svg%3E");
    padding: 120px 0;
}

.spiritual-subtitle {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.donation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

/* Shariah Instruction Card */
.shariah-card {
    background: white;
    padding: 50px;
    border-radius: var(--radius-lg);
    border-left: 8px solid var(--accent-gold);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shariah-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.divider-gold {
    width: 50px;
    height: 3px;
    background: var(--accent-gold);
    margin: 20px 0;
    border-radius: 10px;
}

.shariah-main-text {
    font-size: 1.4rem;
    color: var(--primary-deep);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.shariah-sub-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.reward-quote {
    background: var(--primary-light);
    padding: 20px 30px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    color: var(--primary-deep);
    font-style: italic;
    border-right: 4px solid var(--primary-deep);
}

/* Payment Card */
.payment-card {
    background: var(--primary-deep);
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(6, 78, 59, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.payment-header h3 {
    color: var(--accent-gold);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.payment-header p {
    opacity: 0.8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.qr-wrapper {
    margin: 35px auto;
    width: fit-content;
    position: relative;
}

.qr-frame {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.qr-img {
    width: 220px;
    height: 220px;
    display: block;
    mix-blend-mode: multiply;
}

.qr-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-gold);
    animation: scanMove 3s infinite ease-in-out;
}

@keyframes scanMove {

    0%,
    100% {
        top: 0;
    }

    50% {
        top: 100%;
    }
}

.payment-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    margin-top: 30px;
}

.payment-steps .step {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 12px;
    transition: 0.3s;
}

.payment-steps .step:hover {
    background: rgba(255, 255, 255, 0.1);
}

.step-num {
    background: var(--accent-gold);
    color: var(--primary-deep);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.bank-details-toggle {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--primary-deep);
    color: white;
    padding: 100px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--accent-gold);
}

.footer-links li {
    list-style: none;
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* ===================================
   Animations
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Mobile Menu Toggle
   =================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-deep);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .hero-layout,
    .about-grid,
    .donation-grid,
    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }
    .hero-layout{gap:24px;}

    .hero-text-side {
        padding-right: 0;
        order: 2;
        text-align: center;
    }

    .hero-visual-side {
        order: 1;
        max-width: 500px;
        margin: 0 auto 24px;
    }

    .hero-actions,
    .hero-meta {
        justify-content: center;
    }

    .decorative-line {
        margin: 0 auto 30px;
    }
}

@media (max-width: 768px) {

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    .mosque-icon{font-size:1.8rem;}
    .nav-title{font-size:1.3rem;}
    .navbar .container{gap:12px}

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
    }
    .menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.25s;z-index:998}
    .menu-overlay.active{opacity:1;pointer-events:auto}

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 18px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    .nav-link{font-size:1rem}

    .nav-donate-btn {
        margin: 10px 20px;
        display: inline-block;
    }

    /* Hero Mobile */
    .hero {
        padding-top: 100px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom:10px;
    }

    .hero-urdu-calligraphy {
        font-size: 2rem;
        margin-bottom:12px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom:20px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-bottom:20px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap:12px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .arch-frame {
        aspect-ratio: 3/4;
    }

    /* Sections Mobile */
    section {
        padding: 80px 0;
    }
    .donation-section{padding:70px 0;}
    #contact{padding:70px 0;}

    .section-header {
        margin-bottom: 50px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .content-card,
    .feature-card,
    .info-card,
    .cta-card {
        padding: 30px;
    }

    .footer-content {
        gap: 40px;
    }

    /* Donation Mobile Refinement */
    .shariah-card {
        padding: 30px;
        border-left: none;
        border-top: 8px solid var(--accent-gold);
        text-align: center;
    }

    .shariah-main-text {
        font-size: 1.2rem;
    }

    .shariah-icon {
        font-size: 2.5rem;
    }

    .divider-gold {
        margin: 15px auto;
    }

    .payment-card {
        padding: 30px 20px;
    }

    .qr-img {
        width: 220px;
        height: 220px;
        mix-blend-mode: normal;
    }
}

@media (max-width: 480px) {
    /* Make navbar visible immediately on small screens */
    .navbar {
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 16px 0;
    }
    .container {
        padding: 0 16px;
    }
    .navbar.scrolled .container{
        padding:8px 16px;
        border-radius:12px;
    }
    .mosque-icon{font-size:1.6rem;}
    .nav-title{font-size:1.1rem;}

    .hero-title {
        font-size: 2rem;
    }

    .hero-urdu-calligraphy {
        font-size: 1.5rem;
    }

    .btn {
        padding: 14px 30px;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ===================================
   Accessibility Enhancements
   =================================== */
/* Prevent long strings (like emails) from causing horizontal scroll */
.contact-details p,
.footer-section p,
.footer-links a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: -9999px;
    background: var(--primary-deep);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 9999;
    font-weight: 600;
    transition: all 0.3s ease;
}

.skip-link:focus {
    top: 0;
    left: 0;
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Enhanced Focus Indicators for Keyboard Navigation */
a:focus,
button:focus,
.nav-link:focus,
.btn:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 3px;
}

.nav-link:focus {
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.4);
}

.mobile-menu-toggle:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
    border-radius: 4px;
}
