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

:root {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fdba74;
    --secondary-color: #0f172a;
    --accent-color: #1e293b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;

    /* Semantic status tokens (bg + foreground text) — adapt in dark mode.
       Use these for chips/badges/alerts instead of hardcoded tints. */
    --success-bg: #f0fdf4;
    --success-fg: #166534;
    --danger-bg: #fef2f2;
    --danger-fg: #991b1b;
    --warning-bg: #fffbeb;
    --warning-fg: #b45309;
    --info-bg: #eff6ff;
    --info-fg: #1e40af;
    --accent-bg: #faf5ff;
    --accent-fg: #6d28d9;
    --neutral-bg: #f3f4f6;
    --neutral-fg: #4b5563;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--text-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Tajawal', sans-serif;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

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

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

.btn-whatsapp {
    background: #22c55e;
    color: white;
}

.btn-whatsapp:hover {
    background: #16a34a;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.top-bar {
    background: var(--secondary-color);
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.contact-info a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    color: var(--secondary-color);
}

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

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 10px 18px;
    font-weight: 600;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(249, 115, 22, 0.12);
    color: var(--primary-dark);
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.btn-login {
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
}

.btn-login:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 16px 6px 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
}

.profile-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(249, 115, 22, 0.05);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-arrow {
    font-size: 11px;
    color: var(--text-light);
    transition: var(--transition);
}

.profile-dropdown.open .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    min-width: 220px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    overflow: hidden;
}

.profile-dropdown.open .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    text-align: right;
}

.profile-menu-item:hover {
    background: rgba(249, 115, 22, 0.08);
    color: var(--primary-color);
}

.profile-menu-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.profile-menu-item:hover i {
    color: var(--primary-color);
}

.profile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.logout-item {
    color: var(--danger-color);
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
}

.logout-item i {
    color: var(--danger-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 50%, #fff 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero p {
    font-size: 17px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.features-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: var(--bg-white);
    padding: 35px 25px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 50%;
    font-size: 28px;
    color: var(--primary-color);
}

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

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
}

.courses-section,
.teachers-section,
.testimonials-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-header p {
    font-size: 17px;
    color: var(--text-light);
    margin-top: 15px;
}

.courses-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 28px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    color: var(--text-dark);
}

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

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

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

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

.course-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.course-badge.bestseller {
    background: var(--danger-color);
    color: white;
}

.course-badge.new {
    background: var(--success-color);
    color: white;
}

.course-info {
    padding: 22px;
}

.course-category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.course-category.thanawiya {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.course-category.azhar {
    background: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

.course-category.mid {
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
}

.course-info h3 {
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--secondary-color);
}

.course-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

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

.instructor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructor img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.instructor span {
    font-size: 13px;
    color: var(--text-light);
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 600;
}

.course-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1;
}

.stat-chip i {
    font-size: 12px;
    color: var(--primary-color);
}

.stat-chip.is-remaining {
    background: var(--success-bg);
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--success-fg);
}

.stat-chip.is-remaining i {
    color: var(--success-fg);
}

.stat-chip.is-urgent {
    background: var(--warning-bg);
    border-color: rgba(249, 115, 22, 0.3);
    color: var(--warning-fg);
}

.stat-chip.is-urgent i {
    color: #f97316;
}

.course-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 14px;
}

.new-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--danger-color);
}

.course-card .btn-primary,
.course-card .btn-secondary {
    width: 100%;
}

.course-card .btn-secondary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.course-card .btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.course-progress {
    margin-bottom: 18px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-detail {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    text-align: left;
}

.section-footer {
    text-align: center;
    margin-top: 45px;
}

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

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

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

.teacher-img {
    height: 200px;
    overflow: hidden;
}

.teacher-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.teacher-card:hover .teacher-img img {
    transform: scale(1.05);
}

.teacher-info {
    padding: 25px;
}

.teacher-info h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.teacher-title {
    display: block;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.teacher-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 18px;
}

.teacher-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 13px;
    color: var(--text-light);
}

.teacher-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.testimonial-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.quote-icon {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.testimonial-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    font-style: italic;
    margin-bottom: 25px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 16px;
    margin-bottom: 3px;
    color: var(--secondary-color);
}

.author-info span {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.about-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.about-features li i {
    color: var(--success-color);
    font-size: 20px;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #334155 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 40px;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer {
    background: var(--secondary-color);
    color: white;
    padding: 70px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col .logo {
    color: white;
    margin-bottom: 18px;
}

.footer-col > p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 22px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    color: white;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-col h4 {
    font-size: 19px;
    margin-bottom: 22px;
    position: relative;
    color: white;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

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

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

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

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
}

.contact-list li i {
    color: var(--primary-color);
    margin-top: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    background: #16a34a;
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: white;
    padding: 45px;
    border-radius: var(--radius-md);
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-content h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.auth-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 15px;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 700;
}

/* Values Section */
.values-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.value-card {
    text-align: center;
    padding: 35px 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    transition: var(--transition);
}

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

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 50%;
    font-size: 28px;
    color: var(--primary-color);
    transition: var(--transition);
}

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

.value-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.value-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Profile Page */
.profile-page {
    padding: 40px 0 80px;
    background: var(--bg-light);
    min-height: 70vh;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 30px 35px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.profile-header-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-header-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
}

.profile-header-details h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.profile-header-details p {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.profile-header-details p i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.profile-stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.profile-stat-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.profile-stat-info {
    display: flex;
    flex-direction: column;
}

.profile-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
}

.profile-stat-value small {
    font-size: 14px;
    font-weight: 600;
}

.profile-stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.profile-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
}

.profile-tab:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.profile-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Tab Content */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease;
}

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

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

.profile-card-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.profile-card-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card-header h3 i {
    color: var(--primary-color);
}

/* Profile Form */
.profile-form {
    padding: 30px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
}

.profile-form .form-group:last-child {
    grid-column: 1 / -1;
}

.profile-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.profile-form input {
    padding: 13px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    background: var(--bg-white);
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-error {
    font-size: 13px;
    color: var(--danger-color);
    margin-top: 6px;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
}

.alert-success {
    margin: 0 30px 20px;
    padding: 14px 20px;
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    color: var(--success-fg);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Empty State */
.profile-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
}

.profile-empty-state i {
    font-size: 50px;
    color: var(--border-color);
    margin-bottom: 18px;
}

.profile-empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.profile-empty-state p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 22px;
}

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 500px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-form .form-group:last-child {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-stats {
        gap: 25px;
    }

    .stat-number {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .courses-grid,
    .teachers-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .about-text h2,
    .cta-content h2 {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .profile-header-info {
        flex-direction: column;
    }

    .profile-header-details p {
        justify-content: center;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-tabs {
        flex-direction: column;
    }

    .profile-form {
        padding: 20px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-form .form-group:last-child {
        grid-column: auto;
    }
}

/* ==========================================================================
   Dark Mode
   Toggled by setting `data-theme="dark"` on <html>. Almost every surface
   already reads from CSS variables, so we mostly remap the palette here.
   A few hardcoded light surfaces are patched explicitly.
   ========================================================================== */
[data-theme="dark"] {
    --primary-light: #c2410c;
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --bg-light: #1e293b;
    --bg-white: #1e293b;
    --border-color: #334155;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.55);
    color-scheme: dark;

    /* status tokens: translucent tint + lighter foreground for dark surfaces */
    --success-bg: rgba(34, 197, 94, 0.15);
    --success-fg: #4ade80;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-fg: #f87171;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-fg: #fbbf24;
    --info-bg: rgba(59, 130, 246, 0.15);
    --info-fg: #60a5fa;
    --accent-bg: rgba(139, 92, 246, 0.15);
    --accent-fg: #a78bfa;
    --neutral-bg: rgba(148, 163, 184, 0.15);
    --neutral-fg: #cbd5e1;
}

/* body background uses --text-white (kept white for on-color text), so patch it */
[data-theme="dark"] body {
    background-color: #0f172a;
    color: var(--text-dark);
}

/* explicit patches for the handful of hardcoded light surfaces */
[data-theme="dark"] .modal-content {
    background: var(--bg-white);
    color: var(--text-dark);
}

/* form fields render too bright on dark; soften them */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: #0f172a;
    color: var(--text-dark);
    border-color: var(--border-color);
}

/* the theme toggle button in the navbar */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-dark);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* show sun in dark mode, moon in light mode */
.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
