/* ===================================
   Web Foundations: HTML & CSS Mastery
   Course Page Styles
   Extends the main site's design system
   =================================== */

/* Course Hero Section */
.course-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: var(--spacing-3xl);
}

.course-hero .hero-content {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.course-hero .hero-text {
    text-align: center;
    position: relative;
}

.course-hero .hero-text::before {
    content: '';
    position: absolute;
    inset: -2rem;
    background: radial-gradient(ellipse at center,
        rgba(10, 10, 10, 0.75) 0%,
        rgba(10, 10, 10, 0.5) 50%,
        transparent 100%);
    z-index: -1;
    border-radius: 2rem;
}

[data-theme="light"] .course-hero .hero-text::before {
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%);
}

.course-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    padding-bottom: 0.3em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .course-title {
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, #e34c26, #264de4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #c43d1e, #1e3db8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .course-subtitle {
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.6);
}

.course-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .course-description {
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
}

.course-description strong {
    color: var(--text-primary);
}

.course-hero .hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.course-meta {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.course-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.course-meta .meta-item svg {
    color: var(--accent-primary);
}

/* ===================================
   Section Shared Styles
   =================================== */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.section-icon {
    font-size: 1.5em;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================================
   Learning Pillars (What You'll Learn)
   =================================== */
.learning-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.pillar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    text-align: center;
}

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

.pillar-html:hover {
    border-color: #e34c26;
}

.pillar-css:hover {
    border-color: #264de4;
}

.pillar-responsive:hover {
    border-color: #10b981;
}

.pillar-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.pillar-html .pillar-icon {
    background: rgba(227, 76, 38, 0.1);
    color: #e34c26;
}

.pillar-html:hover .pillar-icon {
    background: rgba(227, 76, 38, 0.2);
    transform: scale(1.1);
}

.pillar-css .pillar-icon {
    background: rgba(38, 77, 228, 0.1);
    color: #264de4;
}

.pillar-css:hover .pillar-icon {
    background: rgba(38, 77, 228, 0.2);
    transform: scale(1.1);
}

.pillar-responsive .pillar-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.pillar-responsive:hover .pillar-icon {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.1);
}

.pillar-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-display);
}

.pillar-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.pillar-list li {
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pillar-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 600;
}

/* ===================================
   Course Flow Visualization
   =================================== */
.course-flow {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    text-align: center;
}

.flow-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.flow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.flow-step {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.flow-step:hover {
    transform: translateY(-2px);
}

.flow-step-web {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-primary);
}

.flow-step-html {
    background: rgba(227, 76, 38, 0.1);
    border: 1px solid rgba(227, 76, 38, 0.3);
    color: #e34c26;
}

.flow-step-css {
    background: rgba(38, 77, 228, 0.1);
    border: 1px solid rgba(38, 77, 228, 0.3);
    color: #264de4;
}

.flow-step-layout {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.flow-step-responsive {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.flow-step-project {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.flow-arrow {
    color: var(--text-tertiary);
    font-size: 1.2rem;
    font-weight: 700;
}

/* ===================================
   Prerequisites Section
   =================================== */
.prereq-content {
    max-width: 800px;
    margin: 0 auto;
}

.prereq-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    border: 1px solid var(--border-color);
}

.prereq-list {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-xl);
}

.prereq-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(16, 185, 129, 0.05);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.prereq-list li:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateX(5px);
}

.prereq-list li svg {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
}

.prereq-list li span {
    color: var(--text-secondary);
    line-height: 1.7;
}

.prereq-list li span strong {
    color: var(--text-primary);
}

.playground-cta {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-sm);
}

.playground-cta svg {
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.playground-cta p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.playground-cta a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.playground-cta a:hover {
    color: var(--accent-secondary);
}

/* ===================================
   Modules Grid
   =================================== */
.modules-section {
    background: var(--bg-secondary);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-xl);
}

.module-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card-available {
    border-color: rgba(227, 76, 38, 0.25);
    position: relative;
}

.module-card-available::after {
    content: '→';
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 1.2rem;
    color: #e34c26;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.module-card-available:hover::after {
    opacity: 1;
    transform: translateX(4px);
}

.module-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}

.module-card-capstone {
    background: linear-gradient(135deg,
        rgba(245, 158, 11, 0.05) 0%,
        rgba(245, 158, 11, 0.02) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.module-card-capstone:hover {
    border-color: #f59e0b;
}

/* Module Header */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.module-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #e34c26, #264de4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.module-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.module-badge-web {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.module-badge-html {
    background: rgba(227, 76, 38, 0.1);
    border: 1px solid rgba(227, 76, 38, 0.3);
    color: #e34c26;
}

.module-badge-css {
    background: rgba(38, 77, 228, 0.1);
    border: 1px solid rgba(38, 77, 228, 0.3);
    color: #264de4;
}

.module-badge-layout {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.module-badge-responsive {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.module-badge-project {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Module Content */
.module-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-display);
    line-height: 1.3;
}

.module-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    text-align: justify;
}

.module-topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.topic {
    padding: 0.4rem 0.9rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2rem;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Module Meta (time + status) */
.module-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.module-time {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.module-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
}

.module-status-available {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.module-status-soon {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* ===================================
   Tools Section
   =================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    max-width: 600px;
    margin: 0 auto;
}

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    text-decoration: none;
    text-align: center;
    display: block;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--spacing-md);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: all var(--transition-base);
}

.tool-card:hover .tool-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-display);
}

.tool-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.tool-cta {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.tool-card:hover .tool-cta {
    color: var(--accent-secondary);
}

/* ===================================
   What's Next Section
   =================================== */
.next-courses {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    max-width: 700px;
    margin: 0 auto;
}

.next-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.next-card:hover {
    transform: translateX(8px);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}

.next-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.next-info {
    flex: 1;
}

.next-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.next-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

.next-arrow {
    font-size: 1.5rem;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.next-card:hover .next-arrow {
    transform: translateX(6px);
}

/* ===================================
   Footer Course-specific
   =================================== */
.footer-course-subtitle {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===================================
   Fixed Controls (Theme & Language)
   =================================== */
.fixed-controls .theme-toggle {
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

[data-theme="light"] .fixed-controls .theme-toggle {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(255, 193, 7, 0.3);
}

.fixed-controls .theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 0;
}

.fixed-controls .theme-toggle:hover::before {
    opacity: 0.1;
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(139, 92, 246, 0.5),
        0 0 20px rgba(139, 92, 246, 0.3);
    z-index: 2;
}

[data-theme="light"] .theme-toggle-slider {
    left: calc(100% - 35px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow:
        0 4px 12px rgba(251, 191, 36, 0.5),
        0 0 20px rgba(251, 191, 36, 0.3);
}

.theme-toggle-slider .moon-icon {
    display: block;
    position: relative;
    color: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    width: 16px;
    height: 16px;
    padding-bottom: 1px;
}

.theme-toggle-slider .sun-icon-slider {
    display: none;
    position: relative;
    color: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    width: 16px;
    height: 16px;
    padding-bottom: 1px;
}

[data-theme="dark"] .theme-toggle-slider .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle-slider .sun-icon-slider {
    display: none;
}

[data-theme="light"] .theme-toggle-slider .moon-icon {
    display: none;
}

[data-theme="light"] .theme-toggle-slider .sun-icon-slider {
    display: block;
}

.fixed-controls .theme-toggle:hover .theme-toggle-slider {
    transform: scale(1.1);
}

.fixed-controls .theme-toggle:active .theme-toggle-slider {
    transform: scale(0.95);
}

/* Language toggle button */
.language-toggle-btn {
    display: flex;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.65rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-sans);
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.language-toggle-btn:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-card-hover);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.language-toggle-btn:active {
    transform: scale(0.95);
}

.language-toggle-btn .lang-flag {
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.language-toggle-btn .lang-flag svg {
    display: block;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.language-toggle-btn .lang-code {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Active navigation link highlighting */
.nav-link.active {
    color: var(--accent-pink) !important;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100% !important;
    background: var(--accent-gradient) !important;
}

/* ===================================
   Animations & Transitions
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-stagger > * {
    animation: fadeInUp 0.6s ease-out backwards;
}

.reveal-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.reveal-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.reveal-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.reveal-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.reveal-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.reveal-stagger > *:nth-child(8) { animation-delay: 0.4s; }
.reveal-stagger > *:nth-child(9) { animation-delay: 0.45s; }
.reveal-stagger > *:nth-child(10) { animation-delay: 0.5s; }
.reveal-stagger > *:nth-child(11) { animation-delay: 0.55s; }
.reveal-stagger > *:nth-child(12) { animation-delay: 0.6s; }
.reveal-stagger > *:nth-child(13) { animation-delay: 0.65s; }

html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.module-card:focus-within,
.tool-card:focus,
.next-card:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .course-hero {
        padding-top: 80px;
    }

    .course-title {
        font-size: 2.25rem;
    }

    .course-subtitle {
        font-size: 1.15rem;
    }

    .course-description {
        font-size: 1rem;
    }

    .course-hero .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .course-hero .hero-cta .btn {
        width: 100%;
    }

    .course-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .learning-pillars {
        grid-template-columns: 1fr;
    }

    .flow-steps {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    .flow-step {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
    }

    .flow-arrow {
        font-size: 1rem;
        transform: rotate(90deg);
    }

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

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .prereq-card {
        padding: var(--spacing-lg);
    }

    .prereq-list li {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .next-card {
        flex-direction: column;
        text-align: center;
    }

    .next-arrow {
        display: none;
    }

    .section-title {
        flex-direction: column;
        gap: 0.25rem;
    }

    .language-toggle-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
        min-width: 80px;
    }

    .language-toggle-btn .lang-flag {
        font-size: 1.3rem;
    }

    .language-toggle-btn .lang-flag svg {
        width: 18px;
        height: 13px;
    }

    .language-toggle-btn .lang-code {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .course-title {
        font-size: 1.75rem;
    }

    .module-card {
        padding: var(--spacing-lg);
    }

    .module-number {
        font-size: 2rem;
    }

    .module-title {
        font-size: 1.15rem;
    }

    .pillar-card {
        padding: var(--spacing-lg);
    }

    .pillar-icon {
        width: 60px;
        height: 60px;
    }

    .language-toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 75px;
    }

    .language-toggle-btn .lang-flag {
        font-size: 1.2rem;
    }

    .language-toggle-btn .lang-flag svg {
        width: 18px;
        height: 13px;
    }

    .language-toggle-btn .lang-code {
        font-size: 0.8rem;
    }
}

/* ===================================
   Performance: Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
