:root {
    --primary-green: #0a5c36;
    --light-green: #e8f5e9;
    --gold: #d4af37;
    --light-gold: #f4e9c9;
    --white: #ffffff;
    --off-white: #f9f9f9;
    --dark: #1a1a1a;
    --light-dark: #2d2d2d;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

[data-theme="dark"] {
    --primary-green: #1a7d4a;
    --light-green: #1a2a1f;
    --white: #121212;
    --off-white: #1e1e1e;
    --dark: #f0f0f0;
    --light-dark: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--off-white);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
.urdu-font {
    font-family: 'Noto Nastaliq Urdu', 'Amiri', serif;
    font-weight: 600;
    color: var(--primary-green);
}

.arabic-text {
    font-family: 'Amiri', serif;
    direction: rtl;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px var(--shadow);
    transition: var(--transition);
    padding: 1rem 0;
}

[data-theme="dark"] .navbar {
    background-color: rgba(30, 30, 30, 0.95) !important;
}

.navbar-brand {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--primary-green) !important;
}

.navbar-brand i {
    color: var(--gold);
    margin-right: 10px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    transition: var(--transition);
    position: relative;
    margin: 0 10px;
}

.nav-link.active {
    color: var(--primary-green) !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-green);
    bottom: 0;
    left: 0;
}

[data-theme="dark"] .nav-link {
    color: var(--light-dark) !important;
}

.nav-link:hover {
    color: var(--primary-green) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn-custom {
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 12px 28px;
    border: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--shadow);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-custom:hover {
    background-color: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

.btn-outline-custom {
    background-color: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

.btn-outline-custom:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    padding-bottom: 15px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--gold);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.islamic-pattern {
    width: 120px;
    height: 120px;
    background:
        radial-gradient(circle at 30% 30%, var(--primary-green) 2px, transparent 3px),
        radial-gradient(circle at 70% 70%, var(--gold) 2px, transparent 3px);
    background-size: 20px 20px;
    border-radius: 50%;
    animation: rotate 3s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

.islamic-pattern::before {
    content: '';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: var(--gold);
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================
   HERO SECTION
========================= */
.hero {
    position: relative;
    height: 100vh;
    /* Full screen */
    overflow: hidden;
}

/* =========================
   CAROUSEL BACKGROUND
========================= */
#heroCarousel,
#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
    height: 100%;
}

.hero-bg {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* =========================
   DARK TRANSPARENT OVERLAY
========================= */
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 92, 54, 0.4);
    z-index: 1;
}

/* =========================
   HERO CONTENT ON TOP
========================= */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

/* =========================
   RESPONSIVE FIXES
========================= */

/* Tablets */
@media (max-width: 991px) {
    .hero {
        height: 90vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content h2 {
        font-size: 1.6rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .hero {
        height: 85vh;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }
}


/* Optional: smooth fade */
.carousel-fade .carousel-item {
    transition: opacity 1.5s ease-in-out;
}

/* Counter Items */
.counter-item {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    background-color: var(--off-white);
    transition: var(--transition);
    height: 100%;
    margin-bottom: 1rem;
}

.counter-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--shadow);
}

.counter-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

/* Daily Quote */
.quote-section {
    margin-top: 0;
}

.daily-quote {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.quote-text {
    font-style: italic;
    color: #0a5c36;
    font-size: 1.1rem;
}

.quote-source {
    color: #d4af37;
    font-weight: 600;
}


/* Event Cards */
.event-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-10px);
}

.event-date {
    background-color: var(--primary-green);
}

.event-date .day {
    font-size: 2rem;
    font-weight: 700;
}

.event-date .month {
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* About Image */
.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 2rem;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-logo {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--gold);
    bottom: 0;
    left: 0;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}


.footer-links {
    text-align: center;
}

.footer-links h3::after {
    left: 50%;
    transform: translateX(-50%);
}

.footer-links a {
    display: inline-block;
}



.footer-contact {
    text-align: right;
}

.footer-contact h3::after {
    left: auto;
    right: 0;
}

.footer-contact p {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}


@media (max-width: 768px) {
    .footer-links,
    .footer-contact {
        text-align: center;
    }

    .footer-links h3::after,
    .footer-contact h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
    }
}






.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.social-icon:hover {
    background-color: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

/* Utility Components */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--shadow);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--gold);
    color: var(--dark);
}

.tasbeeh-counter {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px var(--shadow);
    z-index: 99;
    cursor: pointer;
    transition: var(--transition);
}

.tasbeeh-counter:hover {
    background-color: var(--gold);
    color: var(--dark);
}

.tasbeeh-count {
    font-size: 1.0rem;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .hero {
        min-height: 80vh;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .counter-number {
        font-size: 2rem;
    }

    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .tasbeeh-counter {
        bottom: 5rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .counter-item {
        padding: 1.5rem 1rem;
    }

    .counter-number {
        font-size: 1.8rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }
}



/* === NAVBAR–HERO GAP FIX (SAFE PATCH) === */

/* 1. Fixed navbar ki wajah se jo extra space aa raha tha */
body {
    padding-top: 0 !important;
}

/* 2. Hero ko full height do, koi calculation nahi */
.hero {
    height: 100vh !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 3. Navbar ka extra vertical space control */
.navbar {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0 !important;
}



.asma-table td,
.asma-table th {
    vertical-align: middle;
}

.asma-table tbody tr:hover {
    background-color: #eaf6ef;
}