/* Course-player catalogue — Fluencia / gmp Academy student UI */
:root {
  --chrome: #1b2838;
  --page: linear-gradient(135deg, #2b3546 0%, #222937 100%);
  --card: #0f172a;
  --card-head: #1e293b;
  --row-line: #1e293b;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-dim: #b8c4d4;
  --border: #334155;
  --border-strong: #64748b;
  --green: #22c55e;
  --green-bg: #15803d;
  --green-line: #4ade80;
  --orange: #f59e0b;
  --yellow: #ffcc00;
  --blue: #1890ff;
  --hover: rgba(255, 255, 255, .055);
  --input: #162033;
  color-scheme: dark;
}
html[data-theme="light"] {
  --page: linear-gradient(135deg, #e7edf4 0%, #d7e1ec 100%);
  --card: #ffffff;
  --card-head: #f1f5f9;
  --row-line: #e2e8f0;
  --text: #172235;
  --text-soft: #435268;
  --text-dim: #5f6f84;
  --border: #cbd5e1;
  --border-strong: #9aaabd;
  --hover: rgba(15, 23, 42, .05);
  --input: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 14px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0 0 .8rem; }
.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;
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--yellow); color: #172134; padding: .5rem 1rem; border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* ---------- Top bar (site chrome) ---------- */
.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--chrome); color: #e2e8f0;
  position: sticky; top: 0; z-index: 60;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; color: #e2e8f0;
  font-size: 18px; line-height: 1; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-left: 4px; }
.brand:hover { text-decoration: none; }
.brand img { width: 118px; height: 52px; object-fit: contain; display: block; }
.brand-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .28); }
.brand-name { font-size: .9rem; font-weight: 400; white-space: nowrap; color: #fff; }
.student-icon {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: #e2e8f0;
}
.student-icon:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #48a600, #15803d); color: #fff;
  font-weight: 700; font-size: .85rem; cursor: pointer; user-select: none;
}
.avatar:hover { text-decoration: none; color: #fff; }
.back-link i, .btn-primary i, .btn-ghost i, .hero-info-toggle i, .acc-enroll i { margin-right: 6px; }
.hero-desc i.fa-rocket { color: var(--yellow); margin-right: 4px; }
.student-icon { font-size: 18px; }
.lesson-icon { font-size: 14px; }
.lesson-status { font-size: 15px; }
.acc-chevron { font-size: 14px; }

/* ---------- Layout ---------- */
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.player-main { min-width: 0; }

/* ---------- Video hero ---------- */
.video-hero { position: relative; background: #000; overflow: hidden; }
.hero-video { display: block; width: 100%; aspect-ratio: 16 / 8.2; object-fit: cover; background: #000; }
/* Portrait conversation clips (9:16) must not be cropped/zoomed into the wide hero. */
.video-hero.is-portrait { background: #000; }
.video-hero.is-portrait .hero-video {
  width: auto; height: min(72vh, 700px); max-width: 100%;
  aspect-ratio: 9 / 16; object-fit: contain; margin-inline: auto;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 13, 22, .92) 0%, rgba(8, 13, 22, .72) 52%, rgba(8, 13, 22, .25) 100%);
  display: flex; align-items: center;
}
.hero-content { width: min(660px, 88%); padding: 30px 0 30px 42px; }
.back-link { display: inline-block; color: #fff; font-size: 13px; margin-bottom: 18px; }
.back-link:hover { color: var(--yellow); text-decoration: none; }
.hero-content h1 { font-size: clamp(25px, 3vw, 38px); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 12px; font-weight: 750; color: #fff; }
.hero-desc {
  color: #e4ecf8; font-size: 14px; line-height: 1.5; max-width: 600px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-desc.is-open { display: block; }
.show-more {
  background: none; border: 0; padding: 4px 0; margin: 2px 0 18px; cursor: pointer;
  color: #fff; font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.show-more:hover { color: var(--yellow); }
.hero-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; max-width: 330px; margin-bottom: 20px; }
.hero-progress-label { font-size: 12px; color: #c8d5e9; }
.hero-progress-pct { font-size: 12px; color: #fff; font-weight: 700; }
.hero-progress-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: #4a5a72; overflow: hidden; }
.hero-progress-bar i { display: block; height: 100%; background: var(--green); }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; border: 0; border-radius: 8px; padding: 11px 20px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1b2838;
  font-weight: 750; cursor: pointer; text-decoration: none; font-size: 14px;
}
.btn-primary:hover { filter: brightness(1.07); text-decoration: none; color: #1b2838; }
.btn-ghost { color: #fff; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.btn-ghost:hover { color: var(--yellow); text-decoration: none; }
.hero-info-toggle {
  position: absolute; right: 18px; top: 18px; z-index: 3;
  background: rgba(10, 16, 26, .8); border: 1px solid var(--border); color: #fff;
  border-radius: 20px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}

/* ---------- Tabs ---------- */
.tabs-wrap { border-bottom: 1px solid var(--border); background: var(--chrome); }
.tabs { display: flex; gap: 26px; padding: 0 42px; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 14px 2px; color: var(--text-dim); font-size: 14px; font-weight: 600;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--yellow); }

/* ---------- Content list ---------- */
.tab-panel { padding: 30px 42px 60px; }
.content-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }
.content-head h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.content-legend { color: var(--text-dim); font-size: 12px; margin-bottom: 0; }
.search-field {
  display: flex; align-items: center; gap: 8px; width: 290px; max-width: 100%;
  background: var(--input); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text-dim);
}
.search-field span { font-size: 17px; line-height: 1; }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); outline: 0; }
.search-field input::placeholder { color: var(--text-dim); }
.result-count { color: var(--text-dim); font-size: 12px; margin: 10px 0 0; }
.no-results { text-align: center; color: var(--text-soft); padding: 40px 0; }

/* ---------- Module cards (from lesson.css) ---------- */
.accordion { border-top: 1px solid var(--border); margin-top: 10px; }
.acc-heading { margin: 0; font-size: inherit; }
.lesson-module {
  margin-bottom: 16px; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--card); transition: border-color .2s, box-shadow .2s;
}
.lesson-module:hover { border-color: var(--orange); box-shadow: 0 2px 8px rgba(245, 158, 11, .15); }
.lesson-module.is-current { border-color: var(--orange); }
.acc-head.module-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--card-head); border: 0; cursor: pointer; text-align: left;
}
.acc-head.module-header:hover { background: var(--border); }
.module-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.module-number {
  flex: 0 0 36px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 50%; background: #475569; color: #fff;
  font-size: 14px; font-weight: 800; line-height: 1; box-shadow: 0 2px 5px rgba(0, 0, 0, .22);
}
.lesson-module.is-free .module-number { border-color: var(--green-line); background: var(--green-bg); }
.module-text { min-width: 0; }
.module-title { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.module-title i { color: var(--text-dim); font-size: .82em; margin: 0 2px; }
.module-sub { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.module-sub em { font-style: normal; font-weight: 700; color: var(--green-line); }
.module-progress { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.pct { font-size: 12px; color: var(--text-dim); }
.progress-mini { width: 28px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-mini i { display: block; height: 100%; background: var(--green); border-radius: 2px; }
.acc-chevron { color: var(--border-strong); font-size: 18px; line-height: 1; transition: transform .3s ease; }
.acc-head:hover .acc-chevron { color: var(--orange); }
.acc-head[aria-expanded="true"] .acc-chevron { transform: rotate(180deg); }

/* ---------- Lesson items ---------- */
.lesson-items { background: var(--card); }
.lesson-row { border-bottom: 1px solid var(--row-line); }
.lesson-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; background: transparent; border: 0; border-left: 3px solid transparent;
  color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s;
}
.lesson-item:hover { background: var(--card-head); text-decoration: none; color: var(--text); }
.lesson-row.is-active .lesson-item { border-left-color: var(--orange); background: var(--hover); }
.lesson-row.is-active .lesson-title { color: var(--yellow); }
.lesson-icon { flex: 0 0 22px; text-align: center; font-size: 15px; }
.lesson-info { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lesson-title { font-size: 13px; font-weight: 600; color: var(--text); }
.lesson-duration { font-size: 12px; color: var(--text-dim); }
.lesson-status { flex: 0 0 auto; color: var(--green-line); font-size: 14px; font-weight: 800; }
.lesson-row.is-locked .lesson-status { color: var(--text-dim); font-size: 12px; }
.hero-audio {
  position: absolute; right: 18px; bottom: 18px; z-index: 3;
  width: min(320px, 40%); height: 34px; border-radius: 20px;
  background: rgba(10, 16, 26, .85); border: 1px solid var(--border);
}
.module-rule { border-top: 1px solid var(--row-line); padding: 2px 12px; }
.module-rule summary { cursor: pointer; padding: 9px 0; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.module-rule p { font-size: 12px; color: var(--text-soft); margin: 0 0 8px; }
.module-rule p[lang="en"] { color: var(--text); }
.rule-meta { color: var(--text-dim) !important; }
.acc-enroll { display: block; padding: 10px 12px; border-top: 1px solid var(--row-line); color: var(--yellow); font-size: 12px; font-weight: 700; }

/* ---------- Sobre ---------- */
.sobre-inner { max-width: 860px; }
.sobre-inner h2 { font-size: 20px; }
.sobre-inner > p { color: var(--text-soft); }
.sobre-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 34px; }
.sobre-steps article { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.sobre-steps b { color: var(--yellow); }
.sobre-steps h3 { font-size: 15px; margin: 6px 0; }
.sobre-steps p { color: var(--text-soft); font-size: 13px; margin: 0; }
.faq-list { display: grid; gap: 8px; margin-bottom: 28px; }
.faq-list details { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 2px 14px; }
.faq-list summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq-list p { color: var(--text-soft); font-size: 13px; margin: 0 0 12px; }
.sobre-cta { margin-top: 10px; }

/* ---------- Right sidebar ---------- */
.content-sidebar {
  background: var(--chrome); border-left: 1px solid rgba(255, 255, 255, .08);
  height: calc(100vh - 60px); position: sticky; top: 60px; overflow-y: auto; padding: 18px 18px 40px;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sidebar-head h2 { font-size: 13px; font-weight: 700; color: #e2e8f0; margin: 0; }
.sidebar-actions { display: flex; gap: 8px; }
.sidebar-actions button {
  background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 15px;
  min-width: 30px; min-height: 30px; padding: 6px; display: grid; place-items: center; border-radius: 6px;
}
.sidebar-actions button:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar-search { width: 100%; margin-bottom: 14px; }
.sidebar-promo {
  position: relative; background: linear-gradient(135deg, #173d70, #24583f);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px 46px;
  min-height: 150px; margin-bottom: 16px; overflow: hidden;
}
.sidebar-promo img { display: block; width: 130px; margin: 6px auto 0; }
.bubble { position: absolute; background: #fff; color: #162032; font-weight: 800; font-size: 11px; padding: 5px 10px; border-radius: 12px; z-index: 2; }
.bubble-left { top: 12px; left: 10px; }
.bubble-right { top: 34px; right: 10px; }
.promo-badge {
  position: absolute; bottom: 0; left: 0; right: 0; background: var(--chrome);
  color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em;
  text-align: center; padding: 6px; line-height: 1.3;
}
.sidebar-list { display: grid; }
.side-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 2px; cursor: pointer; color: #cbd5e1; min-height: 44px;
}
.side-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #475569; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.side-item.is-free .side-num { background: var(--green-bg); border: 1px solid var(--green-line); }
.side-title { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-chev { color: var(--text-dim); font-size: 12px; }
.side-item:hover .side-chev { color: var(--orange); }
.lesson-module.is-focused { box-shadow: 0 0 0 2px var(--yellow), 0 4px 16px rgba(255, 204, 0, .2); }

@media (max-width: 980px) {
  .player-layout { grid-template-columns: 1fr; }
  .content-sidebar { display: none; }
  .hero-video { aspect-ratio: 16/9; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 10px; }
  .brand img { width: 92px; }
  .brand-name, .brand-divider { display: none; }
  .hero-content { width: 92%; padding-left: 20px; }
  .tab-panel { padding: 24px 18px 50px; }
  .tabs { padding: 0 18px; }
  .search-field { width: 100%; }
  .sobre-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .acc-chevron { transition: none; } }
