/* Design Tokens & CSS Variables for CLD SkillHub - การดูแลระบบคลาวด์ */
:root {
  /* Colors */
  --bg-primary: #070913;
  --bg-secondary: #0e1322;
  --bg-card: rgba(19, 27, 46, 0.65);
  --bg-card-hover: rgba(28, 39, 66, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --neon-cyan: #00f2fe;
  --electric-blue: #4facfe;
  --vibrant-purple: #7928ca;
  --neon-pink: #ff007f;
  --gold: #fbbf24;
  --success: #10b981;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Gradients */
  --grad-main: linear-gradient(135deg, var(--neon-cyan) 0%, var(--electric-blue) 50%, var(--vibrant-purple) 100%);
  --grad-purple-pink: linear-gradient(135deg, var(--vibrant-purple) 0%, var(--neon-pink) 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, var(--gold) 100%);
  --grad-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Borders */
  --border-std: 1px solid rgba(255, 255, 255, 0.08);
  --border-glow-cyan: 1px solid rgba(0, 242, 254, 0.4);
  --border-glow-purple: 1px solid rgba(121, 40, 202, 0.4);
  
  /* Shadows & Glows */
  --shadow-cyan-glow: 0 0 25px rgba(0, 242, 254, 0.25);
  --shadow-purple-glow: 0 0 25px rgba(121, 40, 202, 0.30);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-text-glow: 0 0 10px rgba(0, 242, 254, 0.5);
  
  /* Fonts */
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Orbitron', sans-serif;
}

/* Base Reset & Layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 50% -20%, rgba(121, 40, 202, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 10% 40%, rgba(0, 242, 254, 0.05) 0%, transparent 40%);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
header {
  border-bottom: var(--border-std);
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

nav a.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

nav a.nav-item:hover, nav a.nav-item.active {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
}

/* Header Right Actions */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  border: var(--border-std);
  font-size: 0.85rem;
}

.quota-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.quota-count {
  color: var(--neon-cyan);
  font-weight: 700;
}

.user-role-label {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
}

.role-free { background: rgba(148, 163, 184, 0.2); color: var(--text-secondary); }
.role-pro { background: rgba(251, 191, 36, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.role-admin { background: rgba(255, 0, 127, 0.2); color: var(--neon-pink); border: 1px solid var(--neon-pink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--grad-main);
  color: #050811;
  box-shadow: var(--shadow-cyan-glow);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: var(--border-std);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-gold {
  background: var(--grad-gold);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Screens */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Filters & Search */
.academy-filters {
  margin-bottom: 2rem;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: var(--border-std);
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.category-tab {
  background: var(--bg-glass);
  border: var(--border-std);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-tab:hover, .category-tab.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Blogger News Grid */
.news-section {
  margin-bottom: 2.5rem;
  background: rgba(14, 19, 34, 0.7);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.news-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.news-card {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon-cyan);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.15);
}

.news-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #1e293b;
}

.news-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-card-excerpt {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--neon-cyan);
  display: flex;
  justify-content: space-between;
}

/* Course Grid (3 columns on desktop) */
.course-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.course-card {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.1);
}

.course-cover-wrap {
  position: relative;
  width: 100%;
  height: 170px;
  background: #111827;
  overflow: hidden;
}

.course-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.course-card:hover .course-cover {
  transform: scale(1.05);
}

.course-code-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.course-badge-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.badge-free { background: rgba(16, 185, 129, 0.85); color: #fff; }
.badge-unlocked { background: rgba(0, 242, 254, 0.85); color: #000; }
.badge-locked { background: rgba(0, 0, 0, 0.75); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.2); }

.course-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.course-card-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.course-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: var(--border-std);
}

.course-price-wrap {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-weight: 800;
  color: var(--neon-cyan);
  font-size: 1.1rem;
}

.price-old {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* COURSE VIEWER (DUAL-MODE) */
.viewer-header {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.viewer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.viewer-tabs {
  display: flex;
  gap: 0.75rem;
  border-bottom: var(--border-std);
  padding-bottom: 0.75rem;
}

.viewer-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.viewer-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.viewer-tab-btn.active-video {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--neon-cyan);
  box-shadow: var(--shadow-cyan-glow);
}

.viewer-tab-btn.active-ebook {
  color: var(--gold);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid var(--gold);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
}

/* 16:9 Video Player */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: var(--border-std);
  margin-bottom: 2rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Ebook Reader Dual-Pane */
.ebook-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .ebook-container {
    grid-template-columns: 280px 1fr;
  }
}

.ebook-sidebar {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  height: fit-content;
}

.ebook-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ebook-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ebook-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.88rem;
}

.ebook-step-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ebook-step-item.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  font-weight: 700;
}

.ebook-content-pane {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 2rem;
  line-height: 1.8;
  font-size: 1rem;
  color: #e2e8f0;
}

.ebook-content-pane h1, .ebook-content-pane h2, .ebook-content-pane h3 {
  color: #fff;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.ebook-content-pane h1 { font-size: 1.5rem; color: var(--neon-cyan); border-bottom: 1px solid rgba(0, 242, 254, 0.2); padding-bottom: 0.5rem; }
.ebook-content-pane h2 { font-size: 1.25rem; color: var(--gold); }
.ebook-content-pane ul, .ebook-content-pane ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.ebook-content-pane code { background: rgba(0, 242, 254, 0.1); color: var(--neon-cyan); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: monospace; }
.ebook-prompt-box { background: rgba(14, 19, 34, 0.85); border-left: 4px solid var(--neon-cyan); padding: 1rem; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 1.25rem 0; font-family: monospace; font-size: 0.9rem; }

/* AI PLAYGROUND */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .playground-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgba(7, 9, 19, 0.8);
  border: var(--border-std);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--neon-cyan);
}

.prompt-preview-box {
  background: rgba(7, 9, 19, 0.9);
  border: 1px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--neon-cyan);
  font-family: monospace;
  font-size: 0.88rem;
  min-height: 80px;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-box {
  background: rgba(7, 9, 19, 0.95);
  border: var(--border-std);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.7;
  white-space: pre-wrap;
  flex: 1;
}

/* USER DASHBOARD */
.dash-user-card {
  background: var(--bg-card);
  border: var(--border-std);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.notebook-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(121, 40, 202, 0.1) 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--shadow-cyan-glow);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.plan-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.plan-tab {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-std);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.plan-tab.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.qr-image-wrap {
  text-align: center;
  margin: 1.25rem 0;
}

.qr-img {
  max-width: 220px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 2px solid var(--neon-cyan);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.qr-img:hover {
  transform: scale(1.03);
}

/* Lightbox Modal */
#qr-enlarge-modal .modal-dialog {
  max-width: 440px;
  text-align: center;
  padding: 1.5rem;
}

#qr-enlarge-img {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0f172a;
  border-left: 4px solid var(--neon-cyan);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
  animation: slideUp 0.3s ease;
}

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

/* Mobile & Tablet Responsive Enhancements */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  
  .logo {
    justify-content: center;
    font-size: 1.25rem;
  }

  nav ul.nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  nav a.nav-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .header-right-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  .viewer-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
