/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@400;500;600;700&family=Roboto:wght@300;400;500&family=Amiri:wght@400;700&display=swap');

/* Modern Color Variables */
:root {
    --primary: #428945;
    /* Deep Green - Trust & Stability */
    --primary-light: #66BB6A;
    /* Light Green - Positivity & Growth */
    --primary-dark: #37883c;
    /* Dark Green - Accent */
    --bg-soft: #F5F7F6;
    /* Soft Gray Background */
    --secondary: #1f2937;
    /* Gray 800 */
    --text-dark: #1f2937;
    --text-light: #f9fafb;
    --light: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--bg-soft);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar */
.sidebar {
    background: #1f2937;
    /* Dark Gray */
    min-height: 100vh;
    color: #fff;
    padding-top: 20px;
}

.sidebar .brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 2rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
    line-height: 1.4;
}

.sidebar .brand img {
    border-radius: 8px;
    height: 80px !important;
    /* Override inline 30px */
    width: auto;
    margin-bottom: 10px;
    margin-right: 0 !important;
    /* Override me-2 class */
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    margin-bottom: 5px;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--primary);
}

.sidebar-link i {
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.brand-font {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Navbar Modernization */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    color: var(--primary) !important;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 100px;
    width: auto;
    border-radius: 15px;
}

.nav-link {
    font-weight: 600;
    margin: 0 10px;
    color: var(--primary) !important;
    transition: all 0.3s ease;
    padding: 8px 15px !important;
    border-radius: 20px;
}

/* Pop-up effect like Forget Password button */
.nav-link:hover {
    background-color: #fff;
    color: var(--primary-dark) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-link::after {
    display: none;
    /* Remove the underline effect */
}

/* Buttons */
.btn-success {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-outline-light {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}

.btn-secondary-custom {
    background-color: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Global Button Hover Effect */
.btn,
button {
    transition: all 0.3s ease !important;
}

.btn:hover,
button:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    z-index: 10;
}

.btn-secondary-custom:hover {
    background-color: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 120px 0 100px;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    color: #fff;
}

/* Cards & Glassmorphism */
.card,
.login-card,
.counter-box {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover,
.counter-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-card {
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--primary-light);
}

/* Badges */
.badge-verified {
    background-color: var(--primary);
    color: white;
    padding: 0.5em 0.8em;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pending {
    background-color: #fd7e14;
    /* Orange */
    color: white;
    padding: 0.5em 0.8em;
    border-radius: 20px;
    font-size: 0.85rem;
}

.badge-rejected {
    background-color: #dc3545;
    /* Red */
    color: white;
    padding: 0.5em 0.8em;
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn-light-green {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-light-green:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.4);
}

/* Section specific */
.bg-soft {
    background-color: var(--bg-soft);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: #e0e0e0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

footer h5 {
    color: #fff;
    margin-bottom: 1.5rem;
}

footer a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-light);
}

/* Inputs */
.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1,
.hero p,
.hero .btn {
    animation: fadeIn 0.8s ease-out forwards;
}

.hero p {
    animation-delay: 0.2s;
}

.hero .btn {
    animation-delay: 0.4s;
}

/* Hadith Carousel Custom Styles */
.hadith-bg-pattern {
    background-color: var(--bg-soft);
    padding: 3rem 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(var(--secondary) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.95;
}

.hadith-card-final {
    background: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 750px;
    width: 100%;
    text-align: center;
    position: relative;
    border-top: 6px solid var(--primary);
}

.hadith-top {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.arabic {
    font-family: 'Amiri', serif;
    font-size: 2.4rem;
    line-height: 1.8;
    color: #1f2937;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.hadith-text {
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
    font-style: italic;
    font-family: 'Poppins', sans-serif;
}

.explanation {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.hadith-ref {
    font-size: 0.95rem;
    color: #777;
    font-weight: 600;
    margin-top: 1rem;
}

.hadith-footer-alt {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

/* Adjust carousel controls for visibility */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    background-size: 50%;
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 768px) {

    /* Layout & Spacing */
    .col-md-10.p-4 {
        padding: 1.5rem !important;
        /* Reduce main content padding */
    }

    /* Sidebar Mobile Adjustment */
    .sidebar {
        /* Mobile Off-Canvas Styles */
        position: fixed !important;
        left: -280px !important;
        /* Hide by default */
        top: 0;
        bottom: 0;
        width: 250px !important;
        z-index: 1050;
        transition: left 0.3s ease;
        padding-bottom: 20px;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
        height: 100vh;
        overflow-y: auto;
        display: block !important;
        /* Force display if bootstrap hides it */
        background: #1f2937 !important;
    }

    .sidebar.active {
        left: 0 !important;
        /* Show on active */
    }

    /* Overlay Backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .sidebar .brand {
        margin-bottom: 1rem;
        flex-direction: row;
        justify-content: center;
        text-align: left;
    }

    .sidebar .brand img {
        height: 40px !important;
        margin-bottom: 0;
        margin-right: 10px !important;
    }

    /* Navbar Mobile Fixes */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Fix for Dashboard Menu Overlap */
    .dashboard-content {
        padding-top: 80px !important;
    }

    .navbar-brand {
        font-size: 0.8rem;
        /* Further reduce font size */
        white-space: normal;
        /* Allow wrapping */
        line-height: 1.1;
        max-width: 70%;
        /* Give more space to toggler */
        margin-right: 0;
    }

    .navbar-brand img {
        height: 30px;
        /* Smaller logo */
        margin-right: 8px !important;
    }

    .navbar-toggler {
        padding: 4px 8px;
        /* Smaller toggler */
        font-size: 0.9rem;
    }

    /* Hero Section Mobile Fix */
    .hero {
        padding: 80px 0 20px;
        /* Adjust padding */
    }

    .hero-content h1 {
        font-size: 1.4rem;
        /* Much smaller heading */
        margin-bottom: 0.5rem;
    }

    .hero-content .lead {
        font-size: 0.9rem;
        margin-top: 0.5rem !important;
    }

    .hero .btn {
        padding: 0.4rem 1rem;
        /* Smaller buttons */
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* Counter Box Mobile Fix */
    .counter-box {
        padding: 0.5rem !important;
        /* Minimal padding */
        margin-bottom: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    .counter-val {
        font-size: 0.85rem;
        /* Small enough to fit large numbers */
        word-break: break-all;
        /* Ensure long numbers break if absolutely necessary */
    }

    .col-4 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .counter-label {
        font-size: 0.65rem;
        /* Smaller label */
        line-height: 1;
        margin-top: 2px;
    }

    .counter-box i {
        font-size: 1.2rem !important;
        /* Smaller icon */
        margin-bottom: 0.2rem !important;
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    /* Hadith Card */
    .hadith-card-final {
        padding: 1.5rem;
    }

    .arabic {
        font-size: 1.8rem;
    }

    .hadith-text {
        font-size: 1.1rem;
    }
}

/* General Utilities for Mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {

    .table td,
    .table th {
        font-size: 0.85rem;
        /* Smaller font for tables */
        padding: 0.4rem 0.5rem;
        /* Reduced padding */
        white-space: nowrap;
        /* Prevent wrapping to keep rows compact, rely on scroll */
    }

    /* Ensure transparency table columns don't take too much width */
}

/* =========================================
   Redesigned Stats Section (IndiaZakat Style)
========================================= */
.stats-section {
    background-color: #6a6a6a !important;
    /* Slightly darker grey, forced */
    /* Grey/Taupe background */
    padding: 60px 0;
    color: #fff;
    text-align: center;
}

.stat-item {
    padding: 10px;
    position: relative;
}

/* Vertical Separator for Desktop */
@media (min-width: 769px) {
    .stat-item:not(:last-child)::after {
        content: "";
        position: absolute;
        right: 0;
        top: 10%;
        height: 80%;
        width: 1px;
        background-color: rgba(255, 255, 255, 0.3);
    }
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    color: #ffc107;
    /* Gold/Yellow */
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Mobile Adjustments for Stats */
@media (max-width: 768px) {
    .stats-section {
        padding: 40px 0;
    }

    .stat-number {
        font-size: 1.8rem;
        /* Smaller on mobile */
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .stat-item {
        margin-bottom: 20px;
    }
}