/* =========================================================================
   VARIABLES & DESIGN TOKENS
   Theme: Blue, White, Light Gold
   ========================================================================= */
:root {
    --primary-color: #002D62; /* Navy Blue */
    --primary-light: #003F87;
    --primary-dark: #001A3A;
    --secondary-color: #D4AF37; /* Light Gold */
    --secondary-hover: #B8962F;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-main: #1C1E21;
    --text-muted: #5F6670;
    --border-color: #E2E8F0;
    
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 20px 32px rgba(0, 0, 0, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* =========================================================================
   RESET & BASE STYLES
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: #f3f4f6;
}

.bg-white {
    background-color: var(--bg-white);
}

.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.w-100 { width: 100%; }

/* Typography */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Components Utilities */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-main); /* Gold typically uses dark text */
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* =========================================================================
   HEADER & NAVBAR
   ========================================================================= */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

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

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a.btn-register-nav {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.nav-links a.btn-register-nav::after {
    display: none;
}

.nav-links a.btn-register-nav:hover {
    background-color: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* =========================================================================
   PAGE SECTIONS & SPA ROUTING
   ========================================================================= */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.page-section.active-section {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   HOME PAGE: HERO
   ========================================================================= */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
    padding: 80px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Decorative element */
.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 1;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -50px;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.05;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    text-align: center;
}

.hero .text-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--primary-color);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--secondary-color);
    border-radius: 3px;
    opacity: 0.6;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Home Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--secondary-color);
    box-shadow: var(--shadow-hover);
}

.feature-card .icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .icon {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Home Announcements Snippet */
.announcement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.announce-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    background-color: #fee2e2;
    color: var(--danger);
}
.announce-badge.info { background: #e0e7ff; color: var(--primary-color); }
.announce-badge.success { background: #d1fae5; color: var(--success); }

/* =========================================================================
   SHARED: HEADER BANNER
   ========================================================================= */
.header-banner {
    background: var(--primary-dark);
    color: var(--bg-white);
    padding: 60px 0;
    text-align: center;
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="2" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
}

.header-banner h1 {
    color: var(--bg-white);
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.header-banner p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* =========================================================================
   MO3ADLA SECTION
   ========================================================================= */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.subject-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.subject-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.suject-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.subject-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

/* Subject Detailed View */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active-tab {
    display: block;
}

/* Resources Lists */
.resource-list {
    display: grid;
    gap: 15px;
}

.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.resource-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.resource-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.resource-icon {
    font-size: 1.5rem;
    color: #ef4444; /* PDF red */
}
.video-icon { color: #3b82f6; } /* Video blue */

.resource-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px;
}
.video-info h4 { margin-bottom: 5px; }

/* Quizzes Options */
.quiz-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}


/* =========================================================================
   QUIZZES & EXAMS
   ========================================================================= */
.quiz-container {
    background-color: var(--bg-light);
    min-height: 60vh;
    padding: 40px 0;
}

.quiz-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.quiz-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 10px 20px;
    border-radius: 30px;
}

.question-block {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.options-wrapper {
    display: grid;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-white);
}

.option-label:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
}

.option-label input {
    margin-left: 15px;
    transform: scale(1.2);
}

.option-label.correct {
    background-color: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.option-label.wrong {
    background-color: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

/* =========================================================================
   LIBRARY / MATERIALS (GLOBAL SEARCH)
   ========================================================================= */
.search-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* =========================================================================
   COURSES
   ========================================================================= */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.course-img {
    height: 200px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--bg-white);
}

.course-content {
    padding: 25px;
}

.course-content h3 { margin-bottom: 10px;}
.course-content p { color: var(--text-muted); margin-bottom: 20px;}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* =========================================================================
   FORMS & CONTACT
   ========================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
    background-color: var(--text-main);
    color: var(--bg-light);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    color: var(--bg-white);
    margin-bottom: 15px;
}

.footer-col p {
    color: #9ca3af;
}

.footer-col h3 {
    color: var(--bg-white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #9ca3af;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #9ca3af;
}

.contact-info i {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: #030712;
    text-align: center;
    padding: 20px 0;
    color: #6b7280;
}

/* =========================================================================
   RESPONSIVE (Mobile specific adjustments)
   ========================================================================= */
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--shadow-md);
        display: none; /* hidden by default on mobile */
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links a.btn-register-nav {
        text-align: center;
        margin-top: 10px;
    }
    
    .hero-buttons { flex-direction: column; }
    
    .tabs { overflow-x: scroll; }
}

/* =========================================================================
   TESTIMONIALS SECTION
   ========================================================================= */
.testimonials-section {
    background-color: var(--bg-white);
    position: relative;
}

.testi-subheading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.testi-subheading i {
    color: var(--secondary-color);
}

.video-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testi-video {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.testi-video video {
    display: block;
    border-bottom: 3px solid var(--secondary-color);
}

.testi-video .video-info {
    padding: 20px;
}

.testi-video .video-info h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.review-card {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.review-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.review-card::after {
    content: '\f10e'; /* fa-quote-right icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 5rem;
    color: var(--border-color);
    opacity: 0.3;
    z-index: 0;
}

.review-header, .review-body {
    position: relative;
    z-index: 1;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.student-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.review-header h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.review-body {
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    color: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
}

/* =========================================================================
   SCHEDULE TABLE
   ========================================================================= */
.schedule-container {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.schedule-table th, .schedule-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap; /* Prevent awkward breaks on small screens for texts that shouldn't wrap */
}
.schedule-table td:last-child {
    white-space: normal; /* The details can wrap */
}

.schedule-table th {
    background-color: var(--primary-light);
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

.schedule-table th:first-child {
    border-top-right-radius: var(--radius-lg);
}

.schedule-table th:last-child {
    border-top-left-radius: var(--radius-lg);
}

.schedule-table tbody tr {
    transition: var(--transition);
}

.schedule-table tbody tr:hover {
    background-color: var(--bg-light);
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

.day-cell {
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.schedule-icon {
    color: var(--secondary-color);
    margin-left: 5px;
}

.schedule-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.badge-review {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-main {
    background-color: #d1fae5;
    color: #059669;
}

/* =========================================================================
   APPLICATION FORM (MO3ADLA)
   ========================================================================= */
.app-form-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    width: 100%;
    background: var(--border-color);
    z-index: 1;
}

.step-item {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    transition: var(--transition);
}

.step-item.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 5px rgba(0, 45, 98, 0.1);
}

.step-item.completed {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: var(--primary-color);
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 15px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.file-upload-box {
    border: 2px dashed var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: #f8fafc;
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.file-upload-box input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-preview {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.payment-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }

.disclaimer-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    color: #92400e;
    font-weight: 600;
}

.declaration-box {
    background: #f1f5f9;
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

/* =========================================================================
   AI ASSISTANT CHAT
   ========================================================================= */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1010;
}

.ai-chat-btn {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.ai-chat-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.ai-chat-window.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.ai-chat-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header .header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.ai-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.msg-ai {
    background: white;
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.msg-user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-left-radius: 5px;
}

.ai-chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.ai-chat-footer input {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
}

.ai-chat-footer button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 5px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* =========================================================================
   FREE COURSE BOOKING STYLES
   ========================================================================= */
.field-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.field-card i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.field-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.field-card.selected {
    background-color: #f0fdf4;
    border-color: var(--success);
    color: #065f46;
}

.field-card.selected i {
    color: var(--success);
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}