/* ---------------------------------------------------------------------
   Design tokens — a premium, editorial system: warm near-black + a
   single gold accent (no dual amber/violet, no gradients), Cormorant
   for display type paired with Montserrat for body text. Deliberately
   not the generic dark-navy/purple "AI product" look.
--------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Cormorant", Georgia, "Times New Roman", serif;

  --color-bg: #fafaf9;
  --color-bg-alt: #f2f1ee;
  --color-surface: #ffffff;
  --color-surface-2: #f5f4f2;
  --color-border: #d9d5d0;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-text-faint: #78716c;

  --color-primary: #a16207;
  --color-primary-strong: #78460a;
  --color-primary-ink: #ffffff;
  --color-accent: #a16207;
  --color-accent-strong: #78460a;
  --color-accent-ink: #ffffff;

  --color-success-bg: #dcfce7;
  --color-success-text: #15803d;
  --color-error-bg: #fee2e2;
  --color-error-text: #b91c1c;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-md: 0 16px 40px -20px rgba(28, 25, 23, 0.28);
  --shadow-sm: 0 4px 16px -10px rgba(28, 25, 23, 0.18);

  --container-width: 1120px;
  --transition-fast: 180ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #16130f;
    --color-bg-alt: #1c1815;
    --color-surface: #221d19;
    --color-surface-2: #2b241f;
    --color-border: #453b33;
    --color-text: #f5f0ea;
    --color-text-muted: #cbbfb2;
    --color-text-faint: #9c8f81;
    --color-primary: #d6a531;
    --color-primary-strong: #e8bd56;
    --color-primary-ink: #16130f;
    --color-accent: #d6a531;
    --color-accent-strong: #e8bd56;
    --color-accent-ink: #16130f;
    --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 4px 16px -8px rgba(0, 0, 0, 0.45);
  }
}

/* Explicit theme override (from the header toggle), takes precedence over
   the OS-preference media query above regardless of which way it goes. */
:root[data-theme="dark"] {
  --color-bg: #16130f;
  --color-bg-alt: #1c1815;
  --color-surface: #221d19;
  --color-surface-2: #2b241f;
  --color-border: #453b33;
  --color-text: #f5f0ea;
  --color-text-muted: #cbbfb2;
  --color-text-faint: #9c8f81;
  --color-primary: #d6a531;
  --color-primary-strong: #e8bd56;
  --color-primary-ink: #16130f;
  --color-accent: #d6a531;
  --color-accent-strong: #e8bd56;
  --color-accent-ink: #16130f;
  --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 4px 16px -8px rgba(0, 0, 0, 0.45);
}
:root[data-theme="light"] {
  --color-bg: #fafaf9;
  --color-bg-alt: #f2f1ee;
  --color-surface: #ffffff;
  --color-surface-2: #f5f4f2;
  --color-border: #d9d5d0;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-text-faint: #78716c;
  --color-primary: #a16207;
  --color-primary-strong: #78460a;
  --color-primary-ink: #ffffff;
  --color-accent: #a16207;
  --color-accent-strong: #78460a;
  --color-accent-ink: #ffffff;
  --shadow-md: 0 16px 40px -20px rgba(28, 25, 23, 0.28);
  --shadow-sm: 0 4px 16px -10px rgba(28, 25, 23, 0.18);
}

/* ---------------------------------------------------------------------
   Reset & base
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }
a, button, .slot-btn, .faq-item summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-primary-ink);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------
   Page transitions + loaders
--------------------------------------------------------------------- */
.page-enter { animation: page-fade-in 420ms cubic-bezier(.16,1,.3,1) both; }
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* First-visit splash: a branded "VB" mark, shown once per browser tab
   while the very first page of a session loads. */
.splash-loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 420ms ease, visibility 420ms ease;
}
.splash-loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #1c1917;
  border: 1.5px solid #a16207;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.9rem;
  color: #e8bd56;
  letter-spacing: 0.02em;
  animation: splash-pulse 1.3s ease-in-out infinite;
  box-shadow: 0 20px 60px -20px rgba(161, 98, 7, 0.5);
}
@keyframes splash-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Between-page loader: a small route indicator (not a full-screen
   blocker) for navigations slower than an instant cache hit. */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 3px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.page-loader.active { opacity: 1; }
.page-loader span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  animation: route-sweep 1.1s ease-in-out infinite;
}
@keyframes route-sweep {
  0% { transform: translateX(-100%); width: 20%; }
  50% { width: 55%; }
  100% { transform: translateX(250%); width: 20%; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.preview-banner {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 51;
}
.preview-banner a { color: var(--color-accent-ink); text-decoration: underline; margin-left: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(15, 23, 42, 0.88); }
}
:root[data-theme="dark"] .site-header { background: rgba(15, 23, 42, 0.88); }
:root[data-theme="light"] .site-header { background: rgba(248, 250, 252, 0.88); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
}
.primary-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}
.nav-toggle:hover { border-color: var(--color-accent); }

/* Brand: full site name on wider screens, a compact monogram once the tab
   strip needs the room — avoids showing the same name twice in the first
   screenful on mobile (header brand + hero heading). */
.brand-mark { display: none; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.header-logout-form { display: inline; }

@media (max-width: 860px) {
  .brand-full { display: none; }
  .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
  }
  .header-inner { height: auto; flex-wrap: wrap; row-gap: 0; column-gap: 16px; padding: 18px 0 0; }
  .primary-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 12px;
    padding: 10px 0 12px;
    border-top: 1px solid var(--color-border);
  }
}

/* The tab strip is the only nav on every breakpoint — no separate
   hamburger/drawer duplicating the same links. On narrow screens it
   scrolls horizontally instead of collapsing. */
.primary-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav a { flex-shrink: 0; }

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  margin-top: 80px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-faint);
  font-size: 0.9rem;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--color-text-faint); }
.footer-nav a:hover { color: var(--color-text); }

/* ---------------------------------------------------------------------
   Sections & typography
--------------------------------------------------------------------- */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 28px; letter-spacing: -0.01em; }
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.section-header-row .section-title { margin-bottom: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-strong);
  margin-bottom: 12px;
}
.link-arrow { color: var(--color-accent); font-weight: 600; font-size: 0.94rem; }
.link-arrow:hover { color: var(--color-accent-strong); }

.empty-state { color: var(--color-text-muted); padding: 32px 0; }

/* ---------------------------------------------------------------------
   Hero
--------------------------------------------------------------------- */
.hero { padding: 96px 0 72px; }
.hero-simple { padding: 108px 0 56px; }
@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero-simple { padding: 40px 0 32px; }
  .section { padding: 40px 0; }
}
.hero-inner { max-width: 720px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 8px; }
.hero-title { font-size: 1.15rem; color: var(--color-primary-strong); font-weight: 600; margin-bottom: 18px; }
.hero-tagline { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.hero-subtitle { font-size: 1.05rem; color: var(--color-text-muted); max-width: 640px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-meta { color: var(--color-text-faint); font-size: 0.9rem; }

.page-hero { padding-top: 72px; padding-bottom: 40px; }
.page-hero-narrow .container { max-width: 720px; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }

/* ---------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn-primary:hover { background: var(--color-accent-strong); }
.btn-secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

.link-button {
  background: none;
  border: none;
  color: var(--color-accent);
  font-weight: 600;
  padding: 0;
}
.link-button.danger { color: #dc2626; }
.link-button:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------
   Feature / course cards
--------------------------------------------------------------------- */
.feature-grid, .course-grid, .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card, .course-card, .skill-card, .stat-card, .contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--color-text-muted); font-size: 0.94rem; }

.course-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.course-card:hover { transform: translateY(-3px); border-color: var(--color-accent); }
.course-card h3 { font-size: 1.15rem; }
.course-card p { color: var(--color-text-muted); font-size: 0.94rem; flex-grow: 1; }
.course-level {
  align-self: flex-start;
  background: var(--color-surface-2);
  color: var(--color-primary-strong);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.course-price { font-weight: 700; }
.course-duration { color: var(--color-text-faint); font-weight: 400; }
.course-detail-meta { display: flex; gap: 10px; color: var(--color-text-muted); margin: 14px 0 22px; font-weight: 600; }
.course-description { max-width: 760px; }
.course-description p { color: var(--color-text-muted); margin-bottom: 16px; }

/* ---------------------------------------------------------------------
   About page
--------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-summary p { color: var(--color-text-muted); margin-bottom: 16px; }
.about-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.about-facts {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.about-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.about-facts dt { color: var(--color-text-faint); font-size: 0.85rem; }
.about-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.skill-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.skill-card h3 { font-size: 1rem; }
.skill-achievement { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 12px; }
.skill-level {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-text-faint);
}
.skill-level-Expert { color: var(--color-primary-strong); background: rgba(161, 98, 7, 0.14); }
.skill-level-Advanced { color: var(--color-text-muted); background: var(--color-surface-2); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 32px; }
.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}
.timeline-item:last-child { border-bottom: none; padding-bottom: 0; }
.timeline-dates { color: var(--color-text-faint); font-size: 0.88rem; font-weight: 600; }
.timeline-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.timeline-company { color: var(--color-primary-strong); font-weight: 600; font-size: 0.92rem; margin-bottom: 12px; }
.timeline-body ul { display: flex; flex-direction: column; gap: 8px; }
.timeline-body li {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  padding-left: 18px;
  position: relative;
}
.timeline-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
@media (max-width: 640px) { .timeline-item { grid-template-columns: 1fr; gap: 6px; } }

.education-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.education-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px; }
.education-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.education-item p { color: var(--color-text-muted); font-size: 0.92rem; }
.education-years { color: var(--color-text-faint); margin-top: 4px; }

/* ---------------------------------------------------------------------
   Consultancy / Contact
--------------------------------------------------------------------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.article-card:hover { transform: translateY(-3px); border-color: var(--color-accent); }
.article-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.article-card-body p { color: var(--color-text-muted); font-size: 0.92rem; }
.article-card-meta { color: var(--color-primary-strong); font-size: 0.82rem; font-weight: 600; }

/* Articles listing: search/filter/sort bar, a vertical list (not a grid),
   pagination, and per-article tags + thumbs-up count. */
.article-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
}
.article-search {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.92rem;
}
.article-select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.article-result-count { color: var(--color-text-faint); font-size: 0.86rem; margin-bottom: 16px; }

.article-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.article-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: border-color var(--transition-fast);
}
.article-row:hover { border-color: var(--color-accent); }
.article-row h3 { font-size: 1.08rem; margin-bottom: 8px; }
.article-row-body p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 10px; }
.article-row-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.82rem; color: var(--color-text-faint); }
.tag-chip {
  background: var(--color-surface-2);
  color: var(--color-primary-strong);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.76rem;
}
.article-row-votes { flex-shrink: 0; }
.thumbs-count { font-size: 0.9rem; color: var(--color-text-faint); white-space: nowrap; }

.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--color-border); }
.pagination a { color: var(--color-accent); font-weight: 600; font-size: 0.92rem; }
.pagination a:hover { color: var(--color-accent-strong); }
.pagination-disabled { color: var(--color-text-faint); font-size: 0.92rem; }
.pagination-status { color: var(--color-text-faint); font-size: 0.86rem; }

.article-detail-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 24px 0; }
#thumbs-up-btn:disabled { opacity: 0.7; cursor: default; }

.admin-form-divider { border: none; border-top: 1px solid var(--color-border); margin: 8px 0 4px; }
.admin-form-subhead { font-size: 1.05rem; margin: 0 0 4px; }
.admin-form-note { color: var(--color-text-muted); font-size: 0.88rem; margin: -8px 0 4px; }

.how-it-works { display: flex; flex-direction: column; gap: 14px; max-width: 640px; padding-left: 22px; list-style: decimal; color: var(--color-text-muted); }
.how-it-works li { padding-left: 6px; }
.how-it-works strong { color: var(--color-text); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--color-text-muted); margin-bottom: 14px; }
.booking-price-line { color: var(--color-text-muted); }

/* ---------------------------------------------------------------------
   CTA
--------------------------------------------------------------------- */
.cta-section { text-align: center; }
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-inner h2 { font-size: 1.7rem; margin-bottom: 12px; }
.cta-inner p { color: var(--color-text-muted); margin-bottom: 24px; }
.cta-inner .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------------
   Booking
--------------------------------------------------------------------- */
.days-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.day-column {
  flex: 0 0 160px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.day-column h3 { font-size: 0.88rem; margin-bottom: 12px; color: var(--color-text-muted); }
.slot-list { display: flex; flex-direction: column; gap: 8px; }
.slot-list form { display: contents; }
.slot-btn { width: 100%; }
.slot-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.slot-btn:hover:not(:disabled) { border-color: var(--color-accent); }
.slot-btn.selected { background: var(--color-accent); color: var(--color-accent-ink); border-color: var(--color-accent); }
.slot-btn.disabled, .slot-btn:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

.booking-contact {
  max-width: 460px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.booking-contact[hidden] { display: none; }

/* ---------------------------------------------------------------------
   Forms
--------------------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); }
.optional { font-weight: 400; color: var(--color-text-faint); }
input, textarea, select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
}
.checkbox-label { flex-direction: row; align-items: center; gap: 10px; }
.checkbox-label input { width: auto; }

.admin-form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-actions { display: flex; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-fieldset legend { padding: 0 6px; font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); }
.promo-course-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-top: 4px;
}

/* Login / signup */
.auth-container { max-width: 420px; }
.btn-google {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  gap: 10px;
  width: 100%;
}
.btn-google:hover { border-color: var(--color-accent); background: var(--color-surface-2); }
.auth-tabs { display: flex; gap: 4px; background: var(--color-surface-2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}
.auth-tab.active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form[hidden] { display: none; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: 0.92rem; }
.alert-success { background: var(--color-success-bg); color: var(--color-success-text); }
.alert-error { background: var(--color-error-bg); color: var(--color-error-text); }

.reschedule-notice {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.reschedule-notice p { margin: 0 0 12px; }
.reschedule-notice-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   Admin console — vertical sidebar shell
--------------------------------------------------------------------- */
.admin-body { background: var(--color-bg-alt); }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar-brand {
  display: flex;
  flex-direction: column;
  padding: 22px 20px 18px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.admin-sidebar-brand span {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary-strong);
  margin-top: 2px;
}
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; flex-grow: 1; overflow-y: auto; }
.admin-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.admin-sidebar-nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.admin-sidebar-nav a:hover { background: var(--color-surface-2); color: var(--color-text); }
.admin-sidebar-nav a.active { background: var(--color-surface-2); color: var(--color-primary-strong); font-weight: 600; }
.admin-sidebar-nav a.active svg { opacity: 1; }
.admin-sidebar-logout { padding: 14px 20px; border-top: 1px solid var(--color-border); }
.admin-sidebar-logout button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text-faint);
  font-size: 0.86rem;
  font-family: var(--font-sans);
  cursor: pointer;
}
.admin-sidebar-logout button:hover { color: var(--color-text); }
.admin-sidebar-backdrop { display: none; }

.admin-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.admin-topbar-title { font-weight: 600; font-size: 0.95rem; color: var(--color-text); }
.admin-topbar-preview { margin-left: auto; font-size: 0.85rem; color: var(--color-text-muted); }
.admin-topbar-preview:hover { color: var(--color-accent); }
.admin-topbar-view-site { font-size: 0.85rem; color: var(--color-text-muted); }
.admin-topbar-view-site:hover { color: var(--color-accent); }
.admin-sidebar-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 4px; cursor: pointer; }
.admin-sidebar-toggle span { width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; }

.admin-content { flex-grow: 1; padding: 32px 24px 56px; }
.admin-content .container { max-width: 1100px; margin: 0; padding: 0; }
.admin-content h1 { margin-bottom: 24px; }

@media (max-width: 860px) {
  .admin-sidebar-toggle { display: flex; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 25;
  }
  .admin-content { padding: 24px 16px 48px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 48px; }
.stat-card { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--color-primary-strong); }
.stat-label { color: var(--color-text-muted); font-size: 0.88rem; }

.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}
.admin-table th { color: var(--color-text-faint); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table-actions { display: flex; gap: 14px; align-items: center; }
.booking-message { max-width: 240px; color: var(--color-text-muted); }

.status-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-pending_payment { background: rgba(161, 98, 7, 0.16); color: var(--color-primary-strong); }
.status-confirmed { background: rgba(34, 197, 94, 0.16); color: #15803d; }
.status-cancelled { background: rgba(220, 38, 38, 0.14); color: #dc2626; }

/* ---------------------------------------------------------------------
   Theme toggle
--------------------------------------------------------------------- */
.theme-toggle {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--color-accent); }

/* ---------------------------------------------------------------------
   Search
--------------------------------------------------------------------- */
.search-form { display: flex; gap: 12px; max-width: 480px; margin-top: 20px; }
.search-form input { flex: 1; }
.search-results { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.search-results li { list-style: none; }
.search-results a { font-weight: 700; font-size: 1.05rem; color: var(--color-accent); }
.search-results p { color: var(--color-text-muted); margin-top: 4px; }

/* ---------------------------------------------------------------------
   Legal pages
--------------------------------------------------------------------- */
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.2rem; margin: 32px 0 10px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--color-text-muted); margin-bottom: 12px; line-height: 1.7; }
.legal-content ul { margin: 0 0 12px; padding-left: 20px; list-style: disc; }
.legal-content li { color: var(--color-text-muted); margin-bottom: 6px; line-height: 1.6; }
.legal-content a { color: var(--color-accent); }
.legal-content code {
  background: var(--color-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------------------------------------------------------------------
   Cookie banner
--------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 80;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); flex: 1; min-width: 220px; }
.cookie-banner a { color: var(--color-accent); }
.btn-sm { padding: 8px 16px; font-size: 0.86rem; }

/* ---------------------------------------------------------------------
   Scroll progress, back-to-top
--------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 100;
  transition: width 0.1s linear;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  z-index: 70;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { border-color: var(--color-accent); }

/* ---------------------------------------------------------------------
   FAQ
--------------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.faq-item summary {
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--color-accent);
  margin-left: 16px;
  transition: transform var(--transition-fast);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--color-text-muted); margin-top: 12px; }
.faq-item a { color: var(--color-accent); }

/* ---------------------------------------------------------------------
   Password visibility toggle, copy buttons, loading state
--------------------------------------------------------------------- */
.password-field { position: relative; display: flex; }
.password-field input { flex: 1; padding-right: 70px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 8px;
}

.copy-btn.copied { border-color: var(--color-accent); color: var(--color-accent); }

.btn[data-loading-text][aria-busy="true"] { opacity: 0.75; pointer-events: none; }

/* ---------------------------------------------------------------------
   Paid course purchase box
--------------------------------------------------------------------- */
.purchase-box {
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.purchase-box-title { font-weight: 700; font-size: 1.1rem; }
.purchase-box-sub { color: var(--color-text-muted); font-size: 0.88rem; margin-top: -8px; }

/* ---------------------------------------------------------------------
   Print
--------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cookie-banner,
  .back-to-top, .scroll-progress, .no-print, .theme-toggle, .nav-toggle,
  .side-panel, .side-panel-backdrop, .page-loader {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .section { padding: 16px 0; }
}
