/* ===========================================
   GLOBAL STYLES - FUAD
   =========================================== */

:root {
    --primary-blue: #2563eb;
    --secondary-teal: #0891b2;
    --accent-sky: #0284c7;
    --dark-blue: #1e40af;
    --light-blue: #eff6ff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    --gradient-secondary: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* Arabic Text */
.arabic-text {
    font-family: 'Amiri', serif;
    font-size: 1.1em;
    color: var(--secondary-teal);
}

/* Utility Classes */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn-primary-custom {
    background: var(--secondary-teal);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(15, 118, 110, 0.3);
    color: white;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background: #0d5553;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(15, 118, 110, 0.4);
    color: white;
}

.btn-outline-custom {
    border: 2px solid white;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: white;
    color: var(--dark-blue);
    transform: translateY(-3px);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: white;
}

/* Cards */
.card-custom {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--light-blue);
    padding: 20px 0;
    margin-top: 76px;
}

.breadcrumb {
    background: none;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary-teal);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Page Header */
.page-header {
    background: var(--gradient-primary);
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="islamic" patternUnits="userSpaceOnUse" width="50" height="50"><path d="M25 0L50 25L25 50L0 25Z" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23islamic)"/></svg>');
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.page-header .lead {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Loading Spinner */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-content i {
    font-size: 1.2rem;
}

.toast-content i.fa-check-circle {
    color: #10b981;
}

.toast-content i.fa-exclamation-circle {
    color: #ef4444;
}

.toast-content i.fa-info-circle {
    color: var(--primary-blue);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #374151;
}

/* Form Validation */
.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Search Functionality */
.search-input {
    border-radius: 25px;
    border: 2px solid #e2e8f0;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.searchable-item {
    transition: opacity 0.3s ease;
}

.searchable-item:not([style*="display: none"]) {
    opacity: 1;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .toast {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .page-header {
        background: none;
        color: black;
    }
    
    .page-header h1 {
        color: black;
    }
}

/* Islamic Pattern Background */
.islamic-pattern {
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%);
    opacity: 0.1;
    font-size: 300px;
    color: white;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 12px 25px;
        font-size: 1rem;
        margin-bottom: 10px;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 80px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Animation for menu items on page load */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: slideInFromTop 0.6s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }
.nav-item:nth-child(7) { animation-delay: 0.7s; }

/* Smooth transitions for all elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    /* outline: 2px solid var(--primary-blue);
    outline-offset: 2px; */
}

/* Text selection */
::selection {
    background: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background: var(--primary-blue);
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    /* background: var(--primary-blue); */
    /* color gray */
    background: #bbbbbb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    /* background: var(--dark-blue); */
    /* color gray but little dark */
    background: #9a9a9a;
}