/* ============================================
   GOOGLE FONTS
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES (ROOT)
============================================ */
:root {
    --primary-color: #2E8B57;
    --primary-dark: #1a5a3a;
    --accent-color: #D4AF37;
    --background-light: #f5f5f5;
    --text-dark: #333;
    --text-light: #fff;
    --transition: all 0.3s ease;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================
   GLOBAL RESET & BASE
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY & UTILITIES
============================================ */
.rtl-book {
    transform: scaleX(-1);
    display: inline-block;
}

.urdu-text {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.5rem;
    line-height: 1.8;
}

/* ============================================
   RTL SUPPORT (for Urdu/Arabic)
============================================ */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

body.rtl .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ============================================
   TOP BAR (Contact, Ad, Social Icons)
============================================ */
.top-bar {
    font-size: 0.85rem;
    background-color: var(--primary-color) !important;
}

.top-bar a {
    transition: transform 0.2s;
    display: inline-block;
    text-decoration: none;
}

.top-bar a:hover {
    transform: scale(1.1);
    color: #FFD700 !important;
}

.blinking-text {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.language-switcher {
    background: transparent;
    border: 1px solid #fff;
    color: white;
    border-radius: 5px;
    padding: 2px 6px;
    cursor: pointer;
}

.language-switcher option {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   NAVBAR
============================================ */
.navbar-brand {
    font-size: 1.5rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 45%;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-brand i {
    color: var(--accent-color);
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--accent-color);
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../images/madrasa-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* ============================================
   CARDS
============================================ */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* ============================================
   BUTTONS
============================================ */
.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   COUNTER SECTION (Stats)
============================================ */
.counter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 60px 0;
}

.counter-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ============================================
   GALLERY
============================================ */
.gallery-img {
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   DONATION CARDS (Preset amounts)
============================================ */
.donation-card {
    border: 2px solid #eee;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.donation-card:hover,
.donation-card.selected {
    border-color: var(--primary-color);
    background-color: #f0f9f4;
}

.donation-amount {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

/* ============================================
   FORMS
============================================ */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 139, 86, 0.25);
}

/* ============================================
   COMMITTEE SECTION
============================================ */
.committee-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
}

.committee-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

.committee-img {
    position: relative;
    display: inline-block;
}

.committee-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(46, 139, 86, 0.3), transparent);
    border-radius: 50%;
}

/* ============================================
   ACHIEVEMENT CARDS
============================================ */
.achievement-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.achievement-card:hover {
    border-bottom-color: var(--primary-color);
    background: linear-gradient(to bottom, white, #f0f9f4);
}

/* ============================================
   TESTIMONIALS
============================================ */
.testimonial-card {
    background: var(--background-light);
    border-radius: 15px;
    padding: 30px;
    margin: 20px;
    position: relative;
}

.testimonial-card i.fa-quote-left {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 40px;
    color: var(--primary-color);
    opacity: 0.3;
}

/* ============================================
   CAROUSEL CONTROLS
============================================ */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 1.5rem;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
        max-width: 75%;
    }

    .navbar-brand img {
        max-height: 35px;
    }

    .hero-section {
        padding: 60px 0;
    }

    .counter-number {
        font-size: 32px;
    }

    h1 {
        font-size: 28px;
    }

    .urdu-text {
        font-size: 1.2rem;
    }
}

/* ============================================
   OWL CAROUSEL CUSTOMISATION
============================================ */
.gallery-carousel .item {
    text-align: center;
    padding: 10px;
}

.gallery-carousel .gallery-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-carousel .gallery-img:hover {
    transform: scale(1.02);
}

.owl-prev,
.owl-next {
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 24px !important;
}

.owl-prev:hover,
.owl-next:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

.gallery-carousel {
    position: relative;
    padding: 0 10px;
}

.gallery-carousel .owl-nav {
    position: absolute;
    top: calc(50% - 50px);
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.gallery-carousel .owl-nav button {
    position: absolute;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 24px !important;
    border: none;
}

.gallery-carousel .owl-nav button:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

.gallery-carousel .owl-prev {
    left: -20px;
}

.gallery-carousel .owl-next {
    right: -20px;
}

.gallery-carousel .owl-dots {
    margin-top: 20px;
    text-align: center;
}

/* ============================================
   FLOATING ACTION BUTTON
============================================ */
.fab-container {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.fab-button:hover {
    transform: scale(1.05);
    background-color: var(--primary-dark);
}

.fab-text {
    display: none;
}

.fab-options {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.fab-options.show {
    display: flex;
}

.fab-option {
    background-color: white;
    color: var(--primary-color);
    border-radius: 40px;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.fab-option i {
    font-size: 18px;
}

.fab-option:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-4px);
}

@media (min-width: 768px) {
    .fab-button {
        width: auto;
        height: auto;
        border-radius: 40px;
        padding: 12px 20px;
        gap: 8px;
        font-size: 16px;
    }

    .fab-button i {
        font-size: 20px;
    }

    .fab-text {
        display: inline;
    }

    .fab-options {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .fab-container {
        bottom: 15px;
        right: 15px;
    }

    .fab-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}