/* Custom CSS stylesheet for Charity Donation System (Wijdan Charity Kfalat Theme) */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6d2435; /* Wijdan Burgundy */
    --primary-light: #8b3447;
    --primary-gradient: linear-gradient(135deg, #6d2435, #4a121d);
    --secondary: #b2946b; /* Wijdan Gold */
    --secondary-gradient: linear-gradient(135deg, #b2946b, #937853);
    --bg-light: #f3f4f6; /* Soft warm grey background */
    --bg-card: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success: #25D366; /* WhatsApp Green */
    --danger: #dc3545;
    --warning: #ffc107;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* Typography Overrides for Arabic (applied when lang=ar) */
html[lang="ar"] body, body[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

/* Header & Navbar */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand i {
    color: var(--secondary) !important;
}

.nav-link {
    color: #1f2937 !important;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}

/* Custom Header Controls Overrides */
.navbar #global-search-input {
    background-color: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    color: #1f2937 !important;
}

.navbar #global-search-input::placeholder {
    color: #9ca3af !important;
}

.navbar #global-search-input:focus {
    background-color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 8px rgba(109, 36, 53, 0.15) !important;
}

.navbar .input-group-text {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #4b5563 !important;
}

.navbar .input-group-text i {
    color: #4b5563 !important;
}

.navbar .btn-outline-secondary {
    border-color: #d1d5db !important;
    color: #4b5563 !important;
}

.navbar .btn-outline-secondary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.navbar #cart-toggle-btn {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.navbar #cart-toggle-btn:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.navbar .btn-primary {
    background: var(--primary-gradient) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.navbar .btn-primary:hover {
    background: var(--primary-light) !important;
    box-shadow: 0 0 10px rgba(109, 36, 53, 0.4);
}

/* Hero Section matching sponsorships-section-hero */
.sponsorships-section-hero {
    position: relative;
    height: 380px;
    background: var(--primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.sponsorships-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(109, 36, 53, 0.95), rgba(109, 36, 53, 0.45));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    text-align: center;
}

.sponsorships-container {
    max-width: 800px;
    padding: 0 20px;
}

.sponsorships-hero-badge {
    display: inline-block;
    background-color: rgba(178, 148, 107, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.sponsorships-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
    line-height: 1.2;
}

.sponsorships-hero-divider {
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
    margin: 15px auto;
}

.sponsorships-hero-text {
    font-size: 1.15rem;
    color: #f3f4f6;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Category Cards */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(109, 36, 53, 0.1);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Project Cards matching Wijdan style */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(109, 36, 53, 0.12);
}

.project-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 ratio */
    overflow: hidden;
    background-color: #eaeaea;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: 1;
}

.project-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.project-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
    line-height: 1.3;
}

.project-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Meta Section */
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.project-beneficiaries {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-beneficiaries i {
    color: var(--secondary);
}

.project-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

/* Progress & Donors Section */
.project-progress-container {
    margin-bottom: 20px;
}

.progress-header, .progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-footer {
    margin-top: 6px;
    margin-bottom: 0;
}

.donors-count, .progress-percentage {
    font-weight: 700;
    color: var(--text-dark);
}

.project-location {
    font-weight: 700;
    color: var(--primary);
}

.project-progress {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-gradient);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Project Card Footer Buttons */
.project-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.whatsapp-btn {
    background-color: #25D366;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

/* Custom Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: 1px solid var(--primary);
    color: #fff !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-light);
    border-color: var(--secondary);
    box-shadow: 0 4px 15px rgba(109, 36, 53, 0.3);
}

.btn-gold {
    background: var(--primary-gradient);
    border: 1px solid var(--primary);
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-gold:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 15px rgba(109, 36, 53, 0.3);
}

.btn-outline-warning {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-warning:hover, .btn-outline-warning.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Sliding Cart Drawer */
.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    color: var(--text-dark);
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary);
    color: #ffffff;
}

.cart-sidebar-header .btn-close {
    filter: invert(1);
}

.cart-sidebar-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #f9fafb;
}

.cart-item-row {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-qty-input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    width: 80px;
    text-align: center;
    border-radius: 4px;
}

/* Presets button selector */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-preset {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-preset.active, .btn-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(109, 36, 53, 0.05);
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
}

.custom-toast {
    background: #ffffff;
    border: 1px solid var(--primary);
    color: var(--text-dark);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.3s ease;
}

/* Animations */
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Form Styles */
.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 8px rgba(109, 36, 53, 0.15) !important;
}

/* Footer Section */
.footer {
    background-color: #262729 !important;
    color: #b3b9c1;
    border-top: 3px solid var(--secondary) !important;
}

.footer .block-title {
    color: var(--secondary) !important;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer .block-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

body[dir="rtl"] .footer .block-title::after {
    left: auto;
    right: 0;
}

.footer-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #ffffff;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.copyright {
    background-color: #111827;
    padding: 15px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .sponsorships-hero-title {
        font-size: 2rem;
    }
    .sponsorships-section-hero {
        height: 300px;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Hadith Quote Banner Custom Styles */
.hadith-quote-section {
    background-color: #ffffff !important;
    border-top: 1px solid var(--secondary) !important;
    border-bottom: 1px solid var(--secondary) !important;
}

.hadith-quote-title {
    color: var(--primary) !important;
    font-weight: 700;
}

.hadith-quote-footer {
    color: var(--secondary) !important;
    font-weight: 600;
}

/* Sponsorship Impact Calculator Styles */
.calculator-card {
    background: #ffffff;
    border: 2px solid var(--secondary);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(109, 36, 53, 0.05);
    padding: 35px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.calculator-title {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.calculator-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.calculator-type-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-dark);
}

.calculator-type-btn.active, .calculator-type-btn:hover {
    border-color: var(--primary);
    background-color: rgba(109, 36, 53, 0.04);
    color: var(--primary);
}

.calculator-type-btn i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
    color: var(--secondary);
}

.calculator-type-btn.active i {
    color: var(--primary);
}

.slider-container {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.calculator-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    margin: 15px 0;
}

.calculator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.1s;
}

.calculator-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calculator-result-box {
    background: var(--primary-gradient);
    color: #ffffff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    box-shadow: 0 8px 25px rgba(109, 36, 53, 0.2);
}

.calculator-result-price {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 10px 0;
}

.calculator-result-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    font-weight: 500;
}

/* Projects Section background */
#projects-section {
    background-color: #ffffff !important;
}

/* Custom stats strip borders */
.stats-strip {
    border-top: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
}

/* FAQ Accordion Styling */
.faq-accordion {
    background: #ffffff;
    border-radius: 16px;
}
.faq-item {
    transition: background-color 0.3s ease;
}
.faq-header {
    user-select: none;
    transition: background-color 0.2s ease;
}
.faq-header:hover {
    background-color: rgba(13, 120, 114, 0.02);
}
.faq-header.active {
    background-color: rgba(13, 120, 114, 0.04);
}
.faq-header.active i {
    transform: rotate(180deg);
    color: var(--primary) !important;
}
.faq-body {
    border-top: 0;
    line-height: 1.6;
    color: #4b5563;
}

/* Top Bar Strip */
#top {
    background-color: var(--primary) !important;
    border-bottom: 2px solid var(--secondary);
    padding: 8px 0;
    color: #ffffff;
    font-size: 0.85rem;
}
#top a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}
#top a:hover {
    color: #f0f7f6;
}
.headerList {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}
.headerList li i {
    color: #ffffff;
    margin-right: 5px;
}
body[dir="rtl"] .headerList li i {
    margin-right: 0;
    margin-left: 5px;
}
.fsocial {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    align-items: center;
}
.fsocial li a {
    color: #ffffff;
    font-size: 0.95rem;
}

/* Modals Custom Styles */
.modal-mine .modal-header {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}
.modal-mine .modal-header .btn-close {
    filter: invert(1);
}
.modal-mine .modal-title {
    font-weight: 700;
}
.modal-mine .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
}
.modal-mine .btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* Zakat Calculator Layout */
.zakat-calc-box {
    background: #f0f7f6;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}
.zakat-calc-result {
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}
.zakat-calc-result h4 {
    font-weight: 800;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Bank Accounts Layout */
.bank-account-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bank-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.bank-logo {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
