/* CSS for Zohra MBAREK Premium Website */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --accent-color: #38b2ac;
    --text-dark: #2d3748;
    --text-light: #4a5568;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #319795;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 1rem;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
    padding: 0 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto;
    border-radius: 2px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Cards */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.course-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* CV Content Styles */
.profile-info {
    max-width: 800px;
    margin: 0 auto;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.info-item .date {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Skills */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skill-tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* Course Layout */
.course-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 40px;
}

/* Sidebar Styling (Matching Reference) */
.sidebar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: none;
}

.sidebar h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.sidebar-group {
    margin-bottom: 2rem;
}

.group-title {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.group-title::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.sidebar-group.collapsed .group-title::after {
    transform: rotate(-90deg);
}

.group-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 1;
}

.sidebar-group.collapsed .group-content {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.chapter-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.4rem;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
}

.chapter-link .num {
    font-weight: 700;
    margin-right: 0.75rem;
}

.chapter-link:hover {
    background: #f1f5f9;
}

.chapter-link.active {
    background: #3b82f6;
    color: var(--white);
}

.chapter-link.active .num {
    color: var(--white);
}

.quiz-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.quiz-link:hover {
    color: var(--primary-color);
}

.quiz-link::before {
    content: '📝';
    margin-right: 0.75rem;
}

.course-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-width: 0;
    /* Prevents overflow in flex/grid */
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    margin: 1.5rem 0;
    overflow-x: auto;
}

/* Quiz Styles */
.quiz-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed #e2e8f0;
}

.question {
    margin-bottom: 2rem;
}

.options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.option {
    padding: 1rem;
    background: var(--bg-light);
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    border-color: var(--accent-color);
}

.option.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

footer p {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 992px) {
    .course-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 85%;
        max-width: 300px;
        z-index: 2000;
        max-height: 80vh;
        overflow-y: auto;
        transform: translateX(120%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        padding: 2rem 1.5rem;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        bottom: 25px;
        right: 25px;
        background: var(--primary-color);
        color: var(--white);
        width: 55px;
        height: 55px;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 2001;
        cursor: pointer;
        font-size: 1.2rem;
    }

    .course-content {
        padding: 1.5rem;
    }

    .sidebar h2 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.22rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    nav {
        height: 70px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Initially hidden elements for desktop */
.sidebar-toggle {
    display: none;
}
.justified-text {
    text-align: justify;
  }
  .img-center {
    display: block;
    margin: auto;
  }