@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #1B6B3A;
    --primary-dark: #0D3D22;
    --primary-light: #2A9D55;
    --secondary: #C9A84C;
    --secondary-light: #DFCD90;
    --dark: #212529;
    --light: #F8F9FA;
    --white: #ffffff;
    --gray: #6c757d;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(27, 107, 58, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #b39543;
    border-color: #b39543;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(201, 168, 76, 0.2);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Navbar */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark);
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary);
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
}
.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background-color: rgba(27, 107, 58, 0.05);
    color: var(--primary);
}

@media all and (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeDropdown 0.3s ease forwards;
    }
}

@keyframes fadeDropdown {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23c9a84c" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.5;
}
.hero-content {
    position: relative;
    z-index: 1;
}

/* Islamic Pattern Background */
.bg-pattern {
    position: relative;
}
.bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%231b6b3a" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    z-index: 0;
    pointer-events: none;
}
.bg-pattern > * {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.card-hover-lift {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-hover-lift:hover {
    transform: translateY(-10px);
}

/* Section Headings */
.section-title {
    position: relative;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    color: var(--primary-dark);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 3px;
}
.section-title.text-start::after {
    left: 0;
    transform: none;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}
.badge.bg-success { background-color: #2A9D55 !important; }
.badge.bg-warning { background-color: #C9A84C !important; color: #fff; }
.badge.bg-danger { background-color: #dc3545 !important; }

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px;
}
.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}
.footer a:hover {
    color: var(--secondary);
    padding-left: 5px;
}
.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0 40px;
    color: white;
    text-align: center;
    position: relative;
}

/* Stats Counter */
.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.stat-card .icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}
.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 700;
}

/* Utilities */
.shadow-sm { box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important; }
.shadow { box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important; }
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important; }

/* SPALoader */
#spa-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--secondary);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}
}
#back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

/* Modern Utilities & Overhaul */
.card-modern {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
}
.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0 10px;
    width: 100%;
}
.table-modern thead th {
    border: none;
    background: transparent;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 0 1rem;
}
.table-modern tbody tr {
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s;
}
.table-modern tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.table-modern tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}
.table-modern tbody td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.table-modern tbody td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.btn-modern {
    border-radius: 50rem;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.form-modern .form-control, .form-modern .form-select {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    transition: all 0.3s;
}
.form-modern .form-control:focus, .form-modern .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(27, 107, 58, 0.1);
}

.hero-modern {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, rgba(27,107,58,0.95) 0%, rgba(13,61,34,0.98) 100%), url('../img/images.jpg') center/cover no-repeat;
    color: var(--white);
}

/* Feature Icon Box */
.feature-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: rgba(27, 107, 58, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}
.card-modern:hover .feature-icon-box {
    background: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

/* Testimonial */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    color: rgba(201, 168, 76, 0.15);
}

/* Navbar Backdrop for Mobile */
.navbar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1020;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.navbar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Ping Animation */
@keyframes ping {
    75%, 100% {
        transform: scale(2.5);
        opacity: 0;
    }
}
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] {
    --light: #121212;
    --dark: #F8F9FA;
    --white: #1e1e1e;
}
[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}
[data-bs-theme="dark"] .navbar {
    background: rgba(30, 30, 30, 0.95) !important;
}
[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #e0e0e0;
}
[data-bs-theme="dark"] .card-modern,
[data-bs-theme="dark"] .testimonial-card {
    background: #1e1e1e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
[data-bs-theme="dark"] .bg-light {
    background-color: #1e1e1e !important;
}
[data-bs-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}
[data-bs-theme="dark"] .navbar-brand .text-primary {
    color: var(--primary-light) !important;
}
