/* ==========================================================================
   EXCELLOR ACADEMY - OFFICIAL WEBSITE STYLESHEET
   Brand Colors from LOGO.png:
   - Royal Blue: #1b73ba
   - Vibrant Red: #e52427
   - Deep Navy Accent: #0b1329
   Typography: Tajawal (Google Font) + Outfit (Numbers/English)
   ========================================================================== */

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

:root {
    --primary-blue: #1b73ba;
    --primary-blue-hover: #16619e;
    --primary-blue-light: #eef6fc;
    --primary-blue-glow: rgba(27, 115, 186, 0.25);

    --accent-red: #e52427;
    --accent-red-hover: #c4191c;
    --accent-red-light: #fdf2f2;
    --accent-red-glow: rgba(229, 36, 39, 0.25);

    --dark-navy: #0b1329;
    --dark-navy-card: #131f3d;
    --dark-navy-border: rgba(255, 255, 255, 0.1);

    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;

    --border-light: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(11, 19, 41, 0.04);
    --shadow-md: 0 8px 24px rgba(11, 19, 41, 0.08);
    --shadow-lg: 0 16px 32px rgba(11, 19, 41, 0.12);
    --shadow-blue: 0 12px 28px rgba(27, 115, 186, 0.28);
    --shadow-red: 0 12px 28px rgba(229, 36, 39, 0.28);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-body);
    direction: rtl;
    text-align: right;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

.font-en {
    font-family: 'Outfit', sans-serif;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-heading);
    font-weight: 800;
}

/* Custom Selection */
::selection {
    background-color: var(--primary-blue);
    color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* Brand Colors Utilities */
.text-brand-blue { color: var(--primary-blue) !important; }
.text-brand-red { color: var(--accent-red) !important; }

.bg-brand-blue { background-color: var(--primary-blue) !important; }
.bg-brand-red { background-color: var(--accent-red) !important; }
.bg-dark-navy { background-color: var(--dark-navy) !important; }

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gradient Buttons */
.btn-brand-blue {
    background: linear-gradient(135deg, #1b73ba 0%, #16619e 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-brand-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(27, 115, 186, 0.4);
    color: #ffffff;
}

.btn-brand-red {
    background: linear-gradient(135deg, #e52427 0%, #c4191c 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-brand-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(229, 36, 39, 0.4);
    color: #ffffff;
}

.btn-outline-blue {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline-blue:hover {
    background: var(--primary-blue);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline-white:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Glassmorphic Elements */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.glass-card-dark {
    background: rgba(19, 31, 61, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: #ffffff;
}

/* Badge Component */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    border: 1px solid rgba(27, 115, 186, 0.2);
}

.section-badge-red {
    background-color: var(--accent-red-light);
    color: var(--accent-red);
    border: 1px solid rgba(229, 36, 39, 0.2);
}

/* Navigation bar blur */
.navbar-blur {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(11, 19, 41, 0.06);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.7;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Hero Ring Animation */
.hero-ring {
    animation: spin 30s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Filter Tab Active State */
.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--text-body);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-blue);
}

/* Formation Card Styling */
.course-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue-glow);
}

.course-flyer-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background-color: var(--dark-navy);
}

.course-flyer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.course-card:hover .course-flyer-img {
    transform: scale(1.06);
}

.flyer-overlay-btn {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 41, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.course-card:hover .flyer-overlay-btn {
    opacity: 1;
}

/* Lightbox Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 19, 41, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-container {
    transform: scale(1);
}

/* Lightbox Flyer Container */
.flyer-modal-content {
    background: var(--dark-navy);
    border-radius: var(--radius-lg);
    max-width: 750px;
    width: 100%;
    padding: 1rem;
    position: relative;
}

.flyer-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin: 0 auto;
    display: block;
}

/* FAQ Accordion Styling */
.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-header {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-heading);
}

.faq-header:hover {
    color: var(--primary-blue);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
    color: var(--text-body);
}

.faq-item.active {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.faq-item.active .faq-body {
    max-height: 300px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent-red);
}

/* Gallery Hover Grid */
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 19, 41, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.75rem;
        bottom: 16px;
        left: 16px;
    }

    .modal-container {
        padding: 1rem;
    }
}
