/* ============================================
   TourGuide Speakers - Main Stylesheet
   File: assets/css/styles.css
   Mobile-first responsive design (Light Theme)
   ============================================ */

/* ----- CSS Custom Properties (Design Tokens) ----- */
:root {
  /* Colors - Light Theme */
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-contrast: #ffffff;
  --secondary: #e2e8f0;
  --secondary-hover: #cbd5e1;
  --secondary-text: #334155;
  --accent: #8b5cf6;
  --success: #10b981;
  --border: #e2e8f0;
  --warning-bg: #fef3c7;
  --warning-border: #fcd34d;
  --warning-text: #92400e;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  
  /* Borders & Shadows */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ----- Reset & Base Styles ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* Focus states for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ----- Layout Utilities ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  line-height: var(--line-height-tight);
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-xl);
}

.text-muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  height: 52px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-contrast);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--secondary {
  background-color: var(--secondary);
  color: var(--secondary-text);
}

.btn--secondary:hover,
.btn--secondary:focus {
  background-color: var(--secondary-hover);
  color: var(--secondary-text);
}

.btn--secondary:active {
  background-color: var(--border);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
}

.btn--block {
  width: 100%;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ----- Button Role Labels ----- */
.btn-group--roles {
  gap: var(--space-lg);
}

.btn-group--cta {
  gap: var(--space-xl);
}

.btn-with-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.role-label {
  font-size: var(--font-size-xs);
  color: var(--muted);
  font-weight: 500;
}

.role-label--light {
  color: rgba(255, 255, 255, 0.7);
}

/* ----- Ghost Button ----- */
.btn--ghost {
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover,
.btn--ghost:focus {
  background-color: var(--secondary);
  color: var(--text);
  border-color: var(--muted);
}

/* ----- CTA Section Buttons ----- */
.btn--xl {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.btn--cta-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.btn--cta-primary:hover,
.btn--cta-primary:focus {
  background: var(--primary-contrast);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
  color: var(--primary);
}

.btn--cta-secondary {
  background-color: transparent;
  color: var(--primary-contrast);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--cta-secondary:hover,
.btn--cta-secondary:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--primary-contrast);
}

/* ----- Compact Callout ----- */
.callout--compact {
  margin-bottom: var(--space-lg);
  background-color: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.15);
  color: var(--text);
}

/* ----- Header ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  gap: var(--space-xs);
}

@media (min-width: 640px) {
  .header__inner {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header__brand {
    gap: var(--space-sm);
    font-size: var(--font-size-lg);
  }
}

.header__brand:hover {
  color: var(--text);
}

.header__brand-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header__brand-icon {
    width: 32px;
    height: 32px;
  }
}

.header__brand-text {
  white-space: nowrap;
}

.header__brand-text--desktop {
  display: none;
}

@media (min-width: 480px) {
  .header__brand-text--desktop {
    display: inline;
  }
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

@media (min-width: 640px) {
  .header__nav {
    gap: var(--space-md);
  }
}

.header__link {
  display: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition-fast);
}

@media (min-width: 640px) {
  .header__link {
    display: block;
  }
}

.header__link:hover {
  color: var(--text);
}

/* Desktop navigation - hidden on mobile */
.header__nav--desktop {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .header__nav--desktop {
    display: flex;
  }
}

/* Mobile navigation controls */
.header__mobile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .header__mobile {
    display: none;
  }
}

.header__mobile .btn--primary {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-xs);
}

/* Hamburger Menu Button */
.header__menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
}

.header__menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.header__menu-icon::before,
.header__menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.header__menu-icon::before {
  top: -7px;
}

.header__menu-icon::after {
  top: 7px;
}

/* Hamburger to X animation */
.header__menu-btn[aria-expanded="true"] .header__menu-icon {
  background-color: transparent;
}

.header__menu-btn[aria-expanded="true"] .header__menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.header__menu-btn[aria-expanded="true"] .header__menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ----- Mobile Menu Overlay ----- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__overlay {
  opacity: 1;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 340px;
  height: 100%;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

/* Menu Header */
.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.mobile-menu__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text);
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.mobile-menu__close:hover {
  background: var(--secondary);
  color: var(--text);
  border-color: var(--muted);
}

/* Navigation Items */
.mobile-menu__nav {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mobile-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.mobile-menu__item:hover {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mobile-menu__item:hover .mobile-menu__icon {
  background: var(--primary);
  color: var(--primary-contrast);
}

.mobile-menu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #dbeafe;
  border-radius: var(--radius-md);
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

/* CTA Button */
.mobile-menu__cta {
  padding: 0 var(--space-xl) var(--space-lg);
}

.mobile-menu__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--primary-contrast);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  transition: all var(--transition-base);
}

.mobile-menu__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.45);
  color: var(--primary-contrast);
}

.mobile-menu__btn svg {
  width: 20px;
  height: 20px;
}

/* Footer / Language Selector */
.mobile-menu__footer {
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.mobile-menu__footer-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.mobile-menu__langs {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.mobile-menu__lang {
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu__lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-menu__lang.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}

/* ----- Language Switcher ----- */
.lang-switcher {
  position: relative;
}

.lang-switcher__toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-sm);
  font-family: inherit;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--muted);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

@media (min-width: 640px) {
  .lang-switcher__toggle {
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
  }
}

.lang-switcher__toggle:hover {
  color: var(--text);
  border-color: var(--muted);
  background-color: var(--bg);
}

.lang-switcher__toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lang-switcher__icon {
  display: none;
  flex-shrink: 0;
  color: inherit;
}

@media (min-width: 640px) {
  .lang-switcher__icon {
    display: block;
  }
}

.lang-switcher__current {
  font-weight: 600;
  color: var(--text);
}

.lang-switcher__arrow {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  width: 10px;
  height: 10px;
}

@media (min-width: 640px) {
  .lang-switcher__arrow {
    width: 12px;
    height: 12px;
  }
}

.lang-switcher.is-open .lang-switcher__arrow {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + var(--space-xs));
  right: 0;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--space-xs) 0;
  margin: 0;
  list-style: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.lang-switcher__item:hover,
.lang-switcher__item:focus {
  background-color: var(--bg);
  color: var(--primary);
}

.lang-switcher__item:focus-visible {
  outline: none;
  background-color: var(--bg);
}

.lang-switcher__item.is-active {
  background-color: #dbeafe;
  color: var(--primary);
  font-weight: 600;
}

.lang-switcher__item.is-active::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.lang-flag {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* RTL support for Arabic */
[dir="rtl"] .lang-switcher__menu {
  right: auto;
  left: 0;
}

/* ----- Hero Section ----- */
.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.hero__content {
  text-align: center;
}

.hero__title {
  margin-bottom: var(--space-lg);
  color: var(--text);
}

@media (min-width: 768px) {
  .hero__title br {
    display: none;
  }
}

.hero__subtitle {
  max-width: 540px;
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-lg);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 768px) {
  .hero__subtitle {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Hero Grid Layout */
.hero__grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__content {
  order: 2;
  text-align: center;
}

.hero__image {
  order: 1;
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  height: auto;
  max-height: 240px; /* Smaller on mobile */
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.15));
  animation: heroFloat 6s ease-in-out infinite;
}

/* Tablet+ hero image size */
@media (min-width: 640px) {
  .hero__img {
    max-height: 320px;
  }
}

@media (min-width: 1024px) {
  .hero__img {
    max-height: 400px;
  }
}

.hero__image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; /* Smaller on mobile */
  height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

@media (min-width: 640px) {
  .hero__image-glow {
    width: 280px;
    height: 280px;
  }
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Hero actions layout */
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Hero callout position adjustment */
.hero .callout {
  margin-bottom: var(--space-md);
}

/* Responsive Hero */
@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
  
  .hero__content {
    order: 1;
    text-align: left;
  }
  
  .hero__image {
    order: 2;
  }
  
  .hero__img {
    max-height: 400px;
  }
  
  .hero__image-glow {
    width: 350px;
    height: 350px;
  }
  
  .hero__actions.btn-group {
    justify-content: flex-start;
  }
  
  .hero .callout {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  .hero__img {
    max-height: 480px;
  }
  
  .hero__image-glow {
    width: 420px;
    height: 420px;
  }
}

/* ----- Callout Badge ----- */
.callout {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--warning-text);
}

.callout__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* ----- How It Works Section ----- */
.how-it-works {
  background-color: var(--surface);
}

.how-it-works__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ----- Section Headers (Professional Style) ----- */
.section-badge {
  display: block;
  width: fit-content;
  margin: 0 auto var(--space-md);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text);
}

.section-subtitle {
  color: var(--muted);
  font-size: var(--font-size-base);
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .section-subtitle {
    font-size: var(--font-size-lg);
  }
}

/* ----- Video Showcase ----- */
.video-showcase {
  max-width: 360px;
  margin: 0 auto var(--space-2xl);
}

.video-container {
  text-align: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 9:16 aspect ratio (portrait) */
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.video-thumbnail:hover {
  transform: scale(1.02);
}

.video-thumbnail__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
}

.video-play-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: var(--surface);
  border: none;
  border-radius: var(--radius-full);
  color: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.video-play-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.video-play-btn:focus-visible {
  outline: 3px solid var(--surface);
  outline-offset: 3px;
}

.video-play-btn svg {
  margin-left: 4px; /* Visual centering for play icon */
}

.video-duration {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--primary-contrast);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
  border-radius: var(--radius-xl);
}

.video-wrapper.is-playing .video-thumbnail {
  opacity: 0;
  pointer-events: none;
}

.video-wrapper.is-playing .video-iframe,
.video-wrapper.is-playing .video-player {
  opacity: 1;
  pointer-events: auto;
}

.video-caption {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--muted);
}

/* Video responsive adjustments */
@media (min-width: 480px) {
  .video-showcase {
    max-width: 320px;
  }
}

@media (min-width: 768px) {
  .video-showcase {
    max-width: 300px;
  }
  
  .video-play-btn {
    width: 72px;
    height: 72px;
  }
  
  .video-play-btn svg {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 1024px) {
  .video-showcase {
    max-width: 320px;
  }
}

.steps {
  display: grid;
  gap: var(--space-lg);
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  background-color: var(--bg);
  border-radius: var(--radius-xl);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step__number {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--primary);
  color: var(--primary-contrast);
  font-size: var(--font-size-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
}

.step__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.step__icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.step__title {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.step__desc {
  font-size: var(--font-size-sm);
  color: var(--muted);
}

/* ----- Benefits Section ----- */
.benefits {
  background-color: var(--bg);
}

.benefits__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.benefits__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.benefit {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.benefit:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Smart 5-item layout - Tablet */
@media (min-width: 640px) {
  .benefits__grid {
    gap: var(--space-lg);
  }
  
  .benefit {
    flex: 0 1 calc(50% - var(--space-lg) / 2);
  }

  .footer {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-lg);
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl) var(--space-lg);
    padding-bottom: var(--space-xl);
  }

  .footer__col--brand {
    grid-column: span 3;
  }
  
  .footer__col--contact {
    grid-column: span 1;
  }

  .footer__bottom {
    padding-top: var(--space-lg);
  }

  .footer__copy {
    font-size: var(--font-size-sm);
  }
}

/* Smart 5-item layout - Desktop: 3 top + 2 centered */
@media (min-width: 1024px) {
  .benefit {
    flex: 0 1 calc(33.333% - var(--space-lg) * 2 / 3);
  }
}

.benefit__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #dbeafe;
  border-radius: var(--radius-md);
  color: var(--primary);
}

.benefit__icon svg {
  width: 20px;
  height: 20px;
}

.benefit__content {
  flex: 1;
}

.benefit__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.benefit__desc {
  font-size: var(--font-size-sm);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
}

/* ----- CTA Section ----- */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--primary-contrast);
}

.cta__content {
  text-align: center;
}

.cta__title {
  margin-bottom: var(--space-md);
  color: inherit;
}

.cta__subtitle {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

.cta .btn--primary {
  background-color: var(--surface);
  color: var(--primary);
}

.cta .btn--primary:hover {
  background-color: var(--bg);
  color: var(--primary-hover);
}

.cta .btn--secondary {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--primary-contrast);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta .btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
  color: var(--primary-contrast);
}

/* ----- Footer ----- */
.footer {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-md);
  background-color: var(--text);
  color: rgba(255, 255, 255, 0.7);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__col {
  display: flex;
  flex-direction: column;
}

/* Mobile footer layout optimization */
.footer__col--brand {
  grid-column: span 2;
  gap: var(--space-sm);
}

.footer__col--contact {
  grid-column: span 2;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--primary-contrast);
}

.footer__brand svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.footer__description {
  font-size: var(--font-size-xs);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
  /* Limit lines on mobile */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Show full description on tablet+ */
@media (min-width: 640px) {
  .footer__description {
    font-size: var(--font-size-sm);
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
  }
}

.footer__social {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  background-color: var(--primary);
  color: var(--primary-contrast);
  transform: translateY(-2px);
}

.footer__heading {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--primary-contrast);
  margin-bottom: var(--space-sm);
}

@media (min-width: 640px) {
  .footer__heading {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
  }
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

@media (min-width: 640px) {
  .footer__nav {
    gap: var(--space-sm);
  }
}

.footer__link {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

@media (min-width: 640px) {
  .footer__link {
    font-size: var(--font-size-sm);
  }
}

.footer__link:hover {
  color: var(--primary-contrast);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

@media (min-width: 640px) {
  .footer__contact {
    gap: var(--space-sm);
  }
}

.footer__email {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  word-break: break-all;
}

/* Hide email icon on mobile */
.footer__email svg {
  display: none;
  flex-shrink: 0;
  opacity: 0.7;
}

@media (min-width: 640px) {
  .footer__email svg {
    display: block;
  }
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding-top: var(--space-md);
  text-align: center;
}

.footer__copy {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
}

.footer__tagline {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* ----- Cards (Reusable) ----- */
.card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
}

.card--bordered {
  border: 1px solid var(--border);
  box-shadow: none;
}

/* ----- Forms (Reusable) ----- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

/* ============================================
   RESPONSIVE STYLES (Mobile First)
   ============================================ */

/* Extra small devices (360px - default) */
/* Base styles apply */

/* Small devices (480px and up) */
@media (min-width: 480px) {
  .btn-group {
    flex-direction: row;
    justify-content: center;
  }
  
  .btn-group--roles,
  .btn-group--cta {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  :root {
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;
  }
  
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
  
  .section {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }
  
  h1 {
    font-size: var(--font-size-4xl);
  }
  
  .hero {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }
  
  .hero__subtitle {
    font-size: var(--font-size-xl);
  }
  
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }
  
  .step {
    padding: var(--space-xl) var(--space-md);
  }
  
  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__col--brand {
    grid-column: span 3;
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Large devices (1024px and up) */
@media (min-width: 1024px) {
  .step__icon {
    width: 72px;
    height: 72px;
  }
  
  .step__icon svg {
    width: 36px;
    height: 36px;
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }

  .footer__col--brand,
  .footer__col--contact {
    grid-column: span 1;
  }
}

/* ============================================
   UTILITIES & ANIMATIONS
   ============================================ */

/* Visibility utilities */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* Spacing utilities */
.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* Fade up animation for scroll reveal */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion for users who prefer it */
@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;
  }
  
  .fade-up {
    opacity: 1;
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
  }
  
  .btn--primary {
    border: 2px solid var(--text);
  }
  
  .btn--secondary {
    border: 2px solid var(--text);
  }
}

/* ============================================
   Trial/Speaker Page Styles
   ============================================ */

/* ----- Trial Page Layout ----- */
.trial-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(165deg, #f8fafc 0%, #e8f4fc 40%, #eef2ff 100%);
}

.trial-page .header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.trial-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--space-md);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.trial-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* ----- Role Badge ----- */
.trial-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: var(--primary-contrast);
  font-weight: 600;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px -2px rgba(37, 99, 235, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ----- Step Indicator ----- */
.trial-step-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--font-size-xs);
  color: var(--muted);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.trial-step-current {
  font-weight: 700;
  color: var(--primary);
}

.trial-step-total {
  font-weight: 500;
}

/* ----- QR Code Card ----- */
.trial-qr-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-md);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 30px -5px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.trial-qr-wrapper {
  position: relative;
  padding: var(--space-md);
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px dashed #cbd5e1;
  transition: border-color 0.2s ease;
}

.trial-qr-wrapper:hover {
  border-color: var(--primary);
}

.trial-qr-image {
  width: 200px;
  height: 200px;
  max-width: 100%;
  display: block;
}

@media (min-width: 380px) {
  .trial-qr-image {
    width: 220px;
    height: 220px;
  }
}

/* Primary Instruction */
.trial-instruction-primary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #92400e;
}

.trial-instruction-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: #d97706;
  width: 20px;
  height: 20px;
}

.trial-instruction-primary p {
  font-size: var(--font-size-xs);
  line-height: 1.5;
  margin: 0;
}

.trial-instruction-primary strong {
  font-weight: 700;
  color: #78350f;
}

/* ----- Trial Action Buttons ----- */
.trial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
}

.trial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  min-width: 130px;
  min-height: 48px;
}

.trial-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Start Button - Primary Green */
.trial-btn--start {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 
    0 4px 14px 0 rgba(16, 185, 129, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.trial-btn--start:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px 0 rgba(16, 185, 129, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.trial-btn--start:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(16, 185, 129, 0.3);
}

/* Stop Button - Danger Red */
.trial-btn--stop {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 
    0 4px 14px 0 rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.trial-btn--stop:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px 0 rgba(239, 68, 68, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.trial-btn--stop:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(239, 68, 68, 0.3);
}

/* Mute Button - Secondary */
.trial-btn--mute {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.trial-btn--mute:hover {
  background: var(--bg);
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.trial-btn--mute.is-muted {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.trial-btn--mute.is-muted:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* ----- Broadcast Status ----- */
.trial-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-full);
  color: #047857;
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.trial-status__dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
  }
}

/* ----- Helper Tips ----- */
.trial-tips {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.trial-tips__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.trial-tips__title svg {
  color: #f59e0b;
}

.trial-tips__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trial-tips__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: #475569;
  line-height: 1.5;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.trial-tips__list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--primary);
}

/* ----- Trial Page Responsive ----- */
@media (min-width: 480px) {
  .trial-main {
    padding: var(--space-lg);
    padding-bottom: var(--space-xl);
  }
  
  .trial-container {
    gap: var(--space-lg);
  }
  
  .trial-qr-card {
    padding: var(--space-xl);
    gap: var(--space-lg);
  }
  
  .trial-qr-wrapper {
    padding: var(--space-lg);
  }
  
  .trial-qr-image {
    width: 240px;
    height: 240px;
  }
  
  .trial-tips {
    padding: var(--space-xl);
  }
  
  .trial-tips__title {
    margin-bottom: var(--space-lg);
  }
}

@media (min-width: 768px) {
  .trial-main {
    padding: var(--space-xl);
    justify-content: center;
  }
  
  .trial-container {
    max-width: 480px;
    gap: var(--space-xl);
  }
  
  .trial-qr-card {
    padding: var(--space-xl) var(--space-2xl);
  }
  
  .trial-tips__list {
    gap: var(--space-sm);
  }
  
  .trial-tips__list li {
    padding: var(--space-sm) var(--space-md);
  }
}

@media (min-width: 1024px) {
  .trial-container {
    max-width: 540px;
  }
}

/* Trial Page Accessibility */
@media (prefers-reduced-motion: reduce) {
  .trial-status__dot {
    animation: none;
  }
  
  .trial-btn:hover {
    transform: none;
  }
}

@media (prefers-contrast: high) {
  .trial-role-badge {
    border: 2px solid #000;
  }
  
  .trial-btn {
    border: 2px solid #000;
  }
  
  .trial-qr-wrapper {
    border: 3px solid #000;
  }
}

/* ============================================
   Listener Page Styles
   ============================================ */

/* ----- Listener Page Layout ----- */
.listener-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 40%, #f0f9ff 100%);
}

.listener-page .header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.listener-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-md);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.listener-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* ----- Listener Role Badge ----- */
.listener-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ----- Listener Step Indicator ----- */
.listener-step-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--font-size-xs);
  color: var(--muted);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.listener-step-current {
  font-weight: 700;
  color: #059669;
}

.listener-step-total {
  font-weight: 500;
}

/* ----- Listener Status Card ----- */
.listener-status-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 30px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.listener-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: var(--radius-full);
  color: #059669;
}

.listener-card-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: var(--line-height-tight);
}

.listener-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--muted);
  margin: 0;
  line-height: var(--line-height-normal);
}

.listener-card-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

/* Status Message (backend hook) */
.listener-status-message {
  padding: var(--space-sm) var(--space-md);
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #92400e;
  font-size: var(--font-size-sm);
  display: none;
}

.listener-status-message:has(strong:not([style*="display: none"])) {
  display: block;
}

/* Tour Duration Pill */
.listener-duration-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-full);
  color: #047857;
  font-size: var(--font-size-sm);
}

.listener-duration-pill span {
  font-weight: 500;
}

.listener-duration-pill strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ----- Listener CTA Buttons ----- */
.listener-cta-container,
.listener-mute-container {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
}

.listener-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  min-width: 200px;
  min-height: 56px;
}

.listener-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Primary Listen Button - Green */
.listener-btn--primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 
    0 4px 14px 0 rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.listener-btn--primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px 0 rgba(16, 185, 129, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.listener-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0 rgba(16, 185, 129, 0.3);
}

/* Mute Button - Secondary */
.listener-btn--mute {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  min-width: 160px;
  padding: 14px 28px;
}

.listener-btn--mute:hover {
  background: var(--bg);
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.listener-btn--mute.is-muted {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.listener-btn--mute.is-muted:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* ----- Having Trouble Toggle ----- */
.listener-trouble-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.listener-trouble-toggle:hover {
  color: var(--text);
}

.listener-trouble-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.listener-trouble-toggle .trouble-arrow {
  transition: transform var(--transition-fast);
}

.listener-trouble-toggle[aria-expanded="true"] .trouble-arrow {
  transform: rotate(180deg);
}

/* ----- Trouble Tips ----- */
.listener-trouble-tips {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  animation: slideDown 0.2s ease-out;
}

.listener-trouble-tips[hidden] {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.listener-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.listener-tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: #475569;
  line-height: 1.5;
}

.listener-tips-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

/* ----- Listener Page Responsive ----- */
@media (min-width: 480px) {
  .listener-main {
    padding: var(--space-lg);
    padding-bottom: var(--space-xl);
  }
  
  .listener-container {
    gap: var(--space-lg);
  }
  
  .listener-status-card {
    padding: var(--space-2xl);
  }
  
  .listener-icon-wrapper {
    width: 96px;
    height: 96px;
  }
  
  .listener-icon-wrapper svg {
    width: 56px;
    height: 56px;
  }
  
  .listener-card-title {
    font-size: var(--font-size-2xl);
  }
}

@media (min-width: 768px) {
  .listener-main {
    padding: var(--space-xl);
    justify-content: center;
  }
  
  .listener-container {
    max-width: 440px;
    gap: var(--space-xl);
  }
  
  .listener-status-card {
    padding: var(--space-2xl) var(--space-3xl);
  }
}

/* Listener Page Accessibility */
@media (prefers-reduced-motion: reduce) {
  .listener-btn:hover {
    transform: none;
  }
  
  .listener-trouble-tips {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .listener-role-badge {
    border: 2px solid #000;
  }
  
  .listener-btn {
    border: 2px solid #000;
  }
  
  .listener-status-card {
    border: 2px solid #000;
  }
}
@media (max-width: 767px){
    .footer__col--brand{
        align-items: center;
        margin-bottom: var(--space-md);
    }
    .footer__description{
        text-align: center;
    }
    .footer__grid{
            text-align: center;
    }
    .footer__email{
        justify-content: center;
    }
}

/* =============================================
   END PAGE (Step 4 – Tour Ended)
   ============================================= */

.end-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 40%, #f0f9ff 100%);
}

.end-page .header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.end-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-md);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.end-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* ----- End Role Badge ----- */
.end-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ----- End Step Indicator ----- */
.end-step-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--font-size-xs);
  color: var(--muted);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.end-step-current {
  font-weight: 700;
  color: #059669;
}

.end-step-total {
  font-weight: 500;
}

/* ----- End Card ----- */
.end-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 30px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.end-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: var(--radius-full);
  color: #059669;
}

.end-card-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: var(--line-height-tight);
}

.end-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--muted);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* ----- End CTA ----- */
.end-cta-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.end-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: var(--font-size-base);
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.end-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.end-btn--home {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.end-btn--home:hover {
  background: var(--bg);
  border-color: #059669;
  color: #059669;
  box-shadow: 0 4px 12px -2px rgba(5, 150, 105, 0.15);
}

.end-btn--home:active {
  transform: scale(0.98);
}

/* ----- Helper Text ----- */
.end-helper-text {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin: 0;
  opacity: 0.7;
}

/* End Page Accessibility */
@media (prefers-reduced-motion: reduce) {
  .end-btn:hover {
    transform: none;
  }
}

@media (prefers-contrast: high) {
  .end-role-badge {
    border: 2px solid #000;
  }

  .end-btn {
    border: 2px solid #000;
  }

  .end-card {
    border: 2px solid #000;
  }
}

/* ===== i18n Responsive Fix: prevent horizontal overflow ===== */

/* --- A) Global overflow-x prevention --- */
html,
body {
  overflow-x: hidden;
}

.trial-container,
.listener-container,
.end-container {
  overflow-x: hidden;
  box-sizing: border-box;
}

/* --- B) Defensive text rules for all interactive / label elements --- */
.btn,
.trial-btn,
.listener-btn,
.end-btn,
.mobile-menu__btn,
.section-badge,
.callout,
.trial-role-badge,
.listener-role-badge,
.end-role-badge,
.trial-step-indicator,
.listener-step-indicator,
.end-step-indicator,
.step__title,
.benefit__title,
.footer__link,
.footer__heading,
.header__link,
.lang-switcher__item,
.mobile-menu__item span,
.mobile-menu__lang,
.listener-trouble-toggle span,
.trial-status span,
.listener-duration-pill span,
.listener-duration-pill strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Allow buttons to wrap text when needed (override base nowrap) */
.btn,
.trial-btn,
.listener-btn,
.end-btn,
.mobile-menu__btn {
  white-space: normal;
  max-width: 100%;
  height: auto;
  min-height: 48px;
}

/* Keep button text on one line on desktop, allow truncation if extreme */
@media (min-width: 768px) {
  .header__nav--desktop .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
}

/* --- C) Header mobile wrapping --- */
@media (max-width: 767px) {
  .header__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    min-height: 0;
  }

  .header__brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header__brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: inline-block;
  }

  .header__mobile {
    flex-shrink: 0;
  }

  .header__mobile .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
}

/* --- D) CTA / Hero buttons: stack on mobile --- */
@media (max-width: 480px) {
  .btn-group,
  .btn-group--roles,
  .btn-group--cta {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
  }

  .btn-with-role {
    width: 100%;
  }

  .btn-with-role .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__actions {
    width: 100%;
  }

  /* Callout fits viewport */
  .callout {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Section badges */
  .section-badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  /* Trial page buttons full-width */
  .trial-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .trial-btn {
    width: 100%;
    min-width: 0;
  }

  /* Listener page buttons full-width */
  .listener-btn {
    width: 100%;
    min-width: 0;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .listener-cta-container,
  .listener-mute-container {
    flex-direction: column;
    align-items: stretch;
  }

  /* End page button */
  .end-btn {
    width: 100%;
    min-width: 0;
  }

  .end-cta-container {
    width: 100%;
  }

  /* Step cards: single column */
  .steps {
    grid-template-columns: 1fr;
  }
}

/* --- E) Footer overflow prevention --- */
.footer__grid {
  max-width: 100%;
}

.footer__col {
  min-width: 0;
}

.footer__email,
.footer__link,
.footer__description,
.footer__brand span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__col--brand,
  .footer__col--contact {
    grid-column: span 1;
  }

  .footer__social {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* --- F) Additional mobile safety at 480px --- */
@media (max-width: 480px) {
  /* Language switcher dropdown doesn't overflow viewport */
  .lang-switcher__menu {
    max-width: calc(100vw - 2rem);
    right: 0;
  }

  /* Mobile menu language buttons wrap */
  .mobile-menu__langs {
    flex-wrap: wrap;
  }

  /* Benefit cards full width */
  .benefit {
    flex: 1 1 100%;
  }

  /* Trial instruction text */
  .trial-instruction-primary {
    max-width: 100%;
  }

  .trial-instruction-primary p {
    overflow-wrap: anywhere;
  }

  /* Listener card text */
  .listener-card-title,
  .listener-card-subtitle,
  .end-card-title,
  .end-card-subtitle {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Trial tips */
  .trial-tips__list li span,
  .listener-tips-list li span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Tablet safety net */
@media (max-width: 768px) {
  .hero__subtitle,
  .cta__subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero__title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ===== End i18n Responsive Fix ===== */