/* ==========================================================================
   IONOS Learn - Course Package Stylesheet
   Professional learning platform design with IONOS corporate branding
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* IONOS Brand Colors */
  --ionos-navy: #001b41;
  --ionos-blue: #1474c4;
  --ionos-blue-dark: #0f5a9d;
  --ionos-gold: #ffaa00;
  --ionos-cyan: #11c7e6;

  /* Text Colors */
  --text-primary: #001b41;
  --text-secondary: #465a75;
  --text-muted: #718095;
  --text-inverse: #ffffff;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f5f7fa;
  --bg-sidebar: #fafbfc;
  --bg-dark: #001b41;

  /* Border Colors */
  --border-color: #dfe2e7;
  --border-light: #e8ebef;

  /* Semantic Colors */
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-error: #dc3545;
  --color-info: #17a2b8;

  /* Typography */
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-heading: 'Overpass', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 60px;
  --content-max-width: 800px;
  --border-radius: 6px;
  --border-radius-lg: 8px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 27, 65, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 27, 65, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 27, 65, 0.1);
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-10);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-top: var(--space-6);
}

h5, h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-top: var(--space-5);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

a {
  color: var(--ionos-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--ionos-blue-dark);
  text-decoration: underline;
}

strong, b {
  font-weight: var(--font-semibold);
}

/* ==========================================================================
   4. Layout Structure
   ========================================================================== */

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-container {
  display: flex;
  flex: 1;
  padding-top: var(--header-height);
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  height: 32px;
}

.logo img {
  height: 100%;
  width: auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--text-inverse);
  text-decoration: none;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.5);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-link {
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.header-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

/* Language Switcher */
.language-switcher {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: none;
  color: var(--text-inverse);
  padding: var(--space-2);
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.lang-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-flag-small {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.lang-code {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  z-index: 1000;
  overflow: hidden;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: background-color var(--transition-fast);
}

.lang-option:hover {
  background-color: var(--bg-light);
  text-decoration: none;
}

.lang-option.current {
  background-color: var(--bg-light);
  font-weight: var(--font-semibold);
}

.lang-option .lang-flag-small {
  width: 20px;
  height: 15px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-inverse);
  padding: var(--space-2);
  cursor: pointer;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   6. Sidebar Navigation
   ========================================================================== */

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: var(--space-6) 0;
  z-index: 900;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: 0 var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-4);
}

.course-title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

/* Progress Bar */
.progress-container {
  margin-top: var(--space-3);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.progress-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ionos-blue), var(--ionos-cyan));
  border-radius: 3px;
  transition: width var(--transition-slow);
}

/* Navigation Modules */
.nav-modules {
  padding: 0 var(--space-3);
}

.nav-module {
  margin-bottom: var(--space-2);
}

.module-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.module-header:hover {
  background-color: var(--bg-light);
}

.module-header.expanded .module-icon {
  transform: rotate(90deg);
}

.module-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.module-title {
  flex: 1;
}

.unit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.unit-list.expanded {
  display: block;
}

.unit-item {
  margin: 0;
}

.unit-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.unit-link:hover {
  background-color: var(--bg-light);
  color: var(--text-primary);
  text-decoration: none;
}

.unit-link.active {
  background-color: rgba(20, 116, 196, 0.1);
  color: var(--ionos-blue);
  font-weight: var(--font-semibold);
}

.unit-link.completed {
  color: var(--text-muted);
}

.unit-status {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.unit-status.completed {
  color: var(--color-success);
}

.unit-status.current {
  color: var(--ionos-blue);
}

.unit-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--space-4) var(--space-5);
}

/* Product Reference Link */
.products-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.products-link:hover {
  color: var(--ionos-blue);
  text-decoration: none;
}

.products-link svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   7. Main Content Area
   ========================================================================== */

.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-8) var(--space-10);
  max-width: calc(var(--content-max-width) + var(--space-10) * 2 + var(--sidebar-width));
}

.content-inner {
  max-width: var(--content-max-width);
}

/* Unit Header */
.unit-header {
  margin-bottom: var(--space-8);
}

.unit-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.unit-meta svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: var(--space-1);
}

/* Learning Objectives */
.learning-objectives {
  background: linear-gradient(135deg, rgba(20, 116, 196, 0.05), rgba(17, 199, 230, 0.05));
  border-left: 4px solid var(--ionos-blue);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}

.learning-objectives h2 {
  font-size: var(--text-lg);
  margin-top: 0;
  margin-bottom: var(--space-3);
  padding-bottom: 0;
  border-bottom: none;
  color: var(--ionos-blue);
}

.learning-objectives ul {
  margin: 0;
  padding-left: var(--space-5);
}

.learning-objectives li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.learning-objectives li:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   8. Content Elements
   ========================================================================== */

/* Lists */
ul, ol {
  margin-top: 0;
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

li > ul,
li > ol {
  margin-top: var(--space-2);
  margin-bottom: 0;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: var(--space-6) 0;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

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

tbody tr:nth-child(even) {
  background-color: var(--bg-light);
}

tbody tr:hover {
  background-color: rgba(20, 116, 196, 0.03);
}

/* Code Blocks */
pre {
  background-color: #1e2127;
  color: #abb2bf;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--border-radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin: var(--space-5) 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: rgba(20, 116, 196, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Blockquotes / Callouts */
blockquote {
  border-left: 4px solid var(--ionos-gold);
  background-color: rgba(255, 170, 0, 0.08);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

blockquote p:first-child {
  margin-top: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Product Reference Links */
a.product-ref {
  background: linear-gradient(135deg, rgba(20, 116, 196, 0.08), rgba(17, 199, 230, 0.08));
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ionos-blue);
  font-weight: var(--font-semibold);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

a.product-ref:hover {
  background: linear-gradient(135deg, rgba(20, 116, 196, 0.15), rgba(17, 199, 230, 0.15));
  text-decoration: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* Horizontal Rules */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-8) 0;
}

/* ==========================================================================
   9. Unit Navigation (Bottom)
   ========================================================================== */

.unit-navigation {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.nav-prev,
.nav-next {
  flex: 1;
  max-width: 45%;
}

.nav-prev a,
.nav-next a {
  display: block;
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-fast);
}

.nav-prev a:hover,
.nav-next a:hover {
  border-color: var(--ionos-blue);
  background-color: rgba(20, 116, 196, 0.03);
  text-decoration: none;
}

.nav-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-title {
  display: block;
  font-weight: var(--font-semibold);
  color: var(--ionos-blue);
}

.nav-next {
  text-align: right;
}

/* Mark Complete Button */
.mark-complete {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background-color: var(--ionos-gold);
  color: var(--bg-dark);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-complete:hover {
  background-color: #e69900;
  transform: translateY(-1px);
}

.btn-complete.completed {
  background-color: var(--color-success);
  color: var(--text-inverse);
}

.btn-complete svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */

.site-footer {
  margin-left: var(--sidebar-width);
  padding: var(--space-6) var(--space-10);
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   11. Index Page Styles
   ========================================================================== */

.course-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #003366 100%);
  color: var(--text-inverse);
  padding: var(--space-12) var(--space-8);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-8);
}

.course-hero h1 {
  color: var(--text-inverse);
  margin-bottom: var(--space-4);
}

.course-hero p {
  font-size: var(--text-lg);
  opacity: 0.9;
  max-width: 600px;
}

.course-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-6);
}

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

.stat-value {
  display: block;
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--ionos-gold);
}

.stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
}

/* Module Cards */
.module-cards {
  display: grid;
  gap: var(--space-6);
}

.module-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-fast);
}

.module-card:hover {
  border-color: var(--ionos-blue);
  box-shadow: var(--shadow-md);
}

.module-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.module-number {
  background-color: var(--ionos-blue);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: var(--space-1) var(--space-3);
  border-radius: 20px;
}

.module-duration {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.module-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
}

.module-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.unit-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   12. Product Page Styles
   ========================================================================== */

.product-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.product-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--ionos-blue);
  background-color: rgba(20, 116, 196, 0.1);
  padding: var(--space-1) var(--space-3);
  border-radius: 20px;
  margin-bottom: var(--space-2);
}

.cheatsheet {
  background-color: var(--bg-light);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-6);
}

.cheatsheet h3 {
  margin-top: 0;
  font-size: var(--text-lg);
  color: var(--ionos-blue);
}

/* ==========================================================================
   13. Overview & Completion Page Styles
   ========================================================================== */

/* Overview Header - Dark Hero Style
   Gradient background with gold statistics for visual impact.
   Maintains sidebar navigation for course structure visibility.
   -------------------------------------------------------------------------- */
.overview-header {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  margin-bottom: var(--space-6);
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--bg-dark) 0%, #003366 100%);
  color: var(--text-inverse);
}

.overview-header h1,
.overview-header .overview-title {
  color: var(--text-inverse);
  margin-bottom: var(--space-4);
  font-size: var(--text-3xl);
}

.course-tagline {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto var(--space-6);
}

.overview-header .course-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

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

.overview-header .stat-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--ionos-gold);
}

.overview-header .stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

.overview-content {
  max-width: 800px;
}

/* Completion Header */
.completion-header {
  text-align: center;
  padding: var(--space-6) 0;
  margin-bottom: var(--space-4);
}

.completion-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.completion-icon svg {
  width: 100%;
  height: 100%;
}

.completion-content {
  max-width: 800px;
}

.completion-content h1 {
  text-align: center;
  color: var(--ionos-navy);
  margin-bottom: var(--space-4);
}

/* Sidebar Special Navigation Items (Overview/Completion) */
.nav-special-item {
  margin: var(--space-2) 0;
}

.special-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.special-link:hover {
  background-color: var(--bg-light);
  color: var(--ionos-blue);
}

.special-link.active {
  background-color: rgba(20, 116, 196, 0.1);
  color: var(--ionos-blue);
  font-weight: var(--font-semibold);
}

.special-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--space-3) var(--space-4);
}

/* ==========================================================================
   14. Accessibility
   ========================================================================== */

/* Focus Styles */
:focus {
  outline: 2px solid var(--ionos-blue);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--ionos-blue);
  outline-offset: 2px;
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   14. Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }

  .content {
    padding: var(--space-6);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: var(--space-5);
  }

  .site-footer {
    margin-left: 0;
  }

  .breadcrumb {
    display: none;
  }

  .header-right {
    display: none;
  }

  .unit-navigation {
    flex-direction: column;
  }

  .nav-prev,
  .nav-next {
    max-width: 100%;
  }

  .course-stats {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .stat-item {
    flex: 1;
    min-width: 100px;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-xl);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .course-hero {
    padding: var(--space-6);
  }

  .stat-value {
    font-size: var(--text-2xl);
  }

  table {
    font-size: var(--text-xs);
  }

  th, td {
    padding: var(--space-2);
  }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 27, 65, 0.5);
  z-index: 850;
}

.sidebar-overlay.visible {
  display: block;
}

/* ==========================================================================
   15. Utility Classes
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--text-muted);
}

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

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

/* ==========================================================================
   16. Language Selector Page
   Standalone landing page for multi-language course selection.
   Uses consistent styling with course pages (header, footer).
   ========================================================================== */

.language-selector-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Selector Header - matches .site-header colors */
.selector-header {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: var(--space-6) var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.selector-header img {
  height: 32px;
  filter: brightness(0) invert(1);
}

.selector-header span {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
}

/* Selector Main Content */
.selector-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--border-light) 100%);
}

.selector-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.selector-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--ionos-navy);
  margin-bottom: var(--space-10);
}

/* .selector-subtitle removed - subtitle replaced with screen reader only text */

/* Language Cards Grid - Fixed 2x2 layout for 4 languages */
.language-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: 420px;
  margin: 0 auto var(--space-8);
}

.language-card {
  background-color: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-8) var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.language-card:hover {
  border-color: var(--ionos-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.language-flag {
  width: 48px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.language-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--ionos-navy);
}

/* .language-native removed - now showing native names only in .language-name */

/* Selector Footer - matches .site-footer styling */
.selector-footer {
  padding: var(--space-6) var(--space-8);
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.selector-footer p {
  margin: var(--space-1) 0;
}

/* Language Selector Responsive */
@media (max-width: 640px) {
  .selector-header {
    padding: var(--space-4) var(--space-6);
  }

  .selector-main {
    padding: var(--space-8) var(--space-5);
  }

  .selector-title {
    font-size: var(--text-2xl);
  }

  .language-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .language-card {
    padding: var(--space-6) var(--space-4);
  }
}
