*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 40px -8px rgba(0,0,0,0.12);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.2);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    text-align: right;
    line-height: 1.7;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
    transition: all 0.4s ease;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    top: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}
.logo img { height: 40px; width: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo-arabic { font-size: 18px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.logo-arabic .highlight { color: var(--primary); }
.logo-subtitle { font-size: 11px; color: var(--gray-500); }

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    transition: all 0.25s;
}
.nav-back:hover { color: var(--primary); border-color: var(--primary); background: rgba(13,148,136,0.04); }
.nav-back i { font-size: 12px; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: white;
    padding: 80px 24px 24px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    gap: 4px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}
.mobile-nav a i { color: var(--primary); width: 20px; text-align: center; }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* ========== PAGE HERO ========== */
.page-hero {
    padding: 120px 0 50px;
    background: linear-gradient(160deg, #f0fdfa 0%, #f9fafb 40%, #fffbeb 100%);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(13,148,136,0.1) 0%, transparent 70%);
    top: -150px; right: -200px;
    border-radius: 50%;
}
.page-hero-content {
    position: relative;
    z-index: 2;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb i { font-size: 10px; }

.course-hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
}
.course-hero-icon {
    width: 100px; height: 100px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 12px 30px rgba(13,148,136,0.3);
}
.course-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 100px;
    background: rgba(13,148,136,0.08);
    color: var(--primary);
    margin-bottom: 14px;
    border: 1px solid rgba(13,148,136,0.15);
}
.course-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
}
.course-hero-desc {
    font-size: 16px;
    color: var(--gray-500);
    max-width: 600px;
    line-height: 1.9;
}
.course-hero-meta {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.hero-meta-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--white);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.hero-meta-chip i { color: var(--primary); font-size: 15px; }

/* ========== MAIN LAYOUT ========== */
.course-layout { padding: 40px 0 80px; }
.course-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* ========== CONTENT CARDS ========== */
.content-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    transition: all 0.3s;
}
.content-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--gray-100);
    position: relative;
}
.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
}
.card-header-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    background: rgba(13,148,136,0.08);
    flex-shrink: 0;
}
.card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.description-text {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 2;
}

/* ========== OBJECTIVES ========== */
.objectives-list { list-style: none; padding: 0; }
.objectives-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.7;
}
.objectives-list li:last-child { border-bottom: none; }
.objectives-list li .obj-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========== TOPICS ========== */
.topic-group { margin-bottom: 24px; }
.topic-group:last-child { margin-bottom: 0; }
.topic-main {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    padding: 14px 18px;
    background: var(--gray-50);
    border-radius: 12px;
    border-right: 4px solid var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.topic-main .topic-num {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: var(--primary);
    flex-shrink: 0;
}
.topic-sub-list { list-style: none; padding: 0 18px 0 0; }
.topic-sub-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
}
.topic-sub-list li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    flex-shrink: 0;
    margin-top: 9px;
}
.topic-sub-sub-list {
    list-style: none;
    padding: 0 24px 0 0;
}
.topic-sub-sub-list li {
    font-size: 13px;
    color: var(--gray-500);
    padding: 5px 0;
}
.topic-sub-sub-list li::before {
    background: var(--gray-300);
    width: 5px; height: 5px;
    margin-top: 8px;
}

/* ========== TARGET AUDIENCE ========== */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.audience-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.25s;
}
.audience-chip:hover { border-color: rgba(13,148,136,0.3); background: rgba(13,148,136,0.04); }
.audience-chip i { color: var(--primary); font-size: 15px; }

/* ========== SIDEBAR ========== */
.sidebar { position: sticky; top: 100px; }

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 20px;
}

.sidebar-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
}
.sidebar-card-header h3 { font-size: 18px; font-weight: 700; }
.sidebar-card-header p { font-size: 13px; opacity: 0.8; margin-top: 4px; }

.sidebar-card-body { padding: 24px; }

.info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}
.info-row:last-child { border-bottom: none; }
.info-row-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--primary);
    background: rgba(13,148,136,0.08);
    flex-shrink: 0;
}
.info-row-text { flex: 1; }
.info-row-text .label { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.info-row-text .value { font-size: 14px; color: var(--dark); font-weight: 600; margin-top: 2px; }

.sidebar-cta {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(13,148,136,0.3);
}
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13,148,136,0.4);
}
.btn-register i { font-size: 18px; }

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: #25d366;
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,0.4); }

.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-600);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.25s;
}
.btn-share:hover { border-color: var(--primary); color: var(--primary); }

/* Share dropdown */
.share-dropdown-wrap { position: relative; }
.share-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    display: none;
    z-index: 10;
}
.share-dropdown.open { display: block; animation: fadeSlideUp 0.25s ease; }
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--gray-100);
}
.share-option:last-child { border-bottom: none; }
.share-option:hover { background: var(--gray-50); color: var(--primary); }
.share-option i { width: 20px; text-align: center; font-size: 16px; }

/* Sidebar CTA card */
.sidebar-cta-card {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.sidebar-cta-card::before {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(13,148,136,0.2), transparent 70%);
    top: -80px; right: -60px;
    border-radius: 50%;
}
.sidebar-cta-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; position: relative; }
.sidebar-cta-card p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.7; position: relative; margin-bottom: 18px; }
.sidebar-cta-card .cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s;
    position: relative;
}
.sidebar-cta-card .cta-link:hover { background: rgba(255,255,255,0.15); }

/* ========== FOOTER ========== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 40px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.25s;
}
.footer-links a:hover { color: var(--primary-light); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    transition: all 0.3s;
}
.footer-social a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* ========== FLOATING ========== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary); color: white; border-color: var(--primary); }

.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 54px; height: 54px;
    border-radius: 16px;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
    z-index: 900;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float img { width: 30px; height: 30px; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dark);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    white-space: nowrap;
    font-family: 'Tajawal', sans-serif;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ========== REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .course-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .sidebar-card { margin-bottom: 0; }
}

@media (max-width: 768px) {
    .navbar { width: calc(100% - 32px); padding: 8px 16px; }
    .nav-back { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav { display: flex; }

    .page-hero { padding: 100px 0 30px; }
    .course-hero-grid { grid-template-columns: 1fr; gap: 20px; }
    .course-hero-icon { width: 72px; height: 72px; font-size: 30px; border-radius: 18px; }
    .course-hero-title { font-size: 26px; }
    .course-hero-meta { gap: 10px; }
    .hero-meta-chip { padding: 8px 14px; font-size: 12px; }

    .content-card { padding: 24px; }
    .audience-grid { grid-template-columns: 1fr; }

    .sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 480px) {
    .course-hero-title { font-size: 22px; }
    .course-hero-meta { flex-direction: column; }
}