/* ===========================
   CLASSES × LOCATIONS PAGE
   Terminal Confessional style
   =========================== */

:root {
  --accent: #00ffcc;
  --accent2: #ff6b6b;
  --gold: #f0c040;
  --bg: #0a0b0d;
  --surface: #111316;
  --surface2: #1a1d22;
  --border: #2a2d35;
  --text: #e8eaf0;
  --text-muted: #8891a5;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;

  /* Class colors */
  --sovereign: #f0c040;
  --builder:   #00ffcc;
  --steward:   #7ec8e3;
  --trader:    #a8ff78;
  --seeker:    #c77dff;
  --sentinel:  #ff6b6b;
  --healer:    #56d9a4;
}

body.dark { background: var(--bg); color: var(--text); }
body:not(.dark) {
  --bg: #f5f6fa; --surface: #ffffff; --surface2: #f0f1f5;
  --border: #d0d3df; --text: #1a1d22; --text-muted: #6b7180;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); line-height: 1.6; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* NAV (reuse from style.css but override active) */
.nav-link-active {
  color: var(--accent) !important;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.nav-link-special2 {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 6px;
  font-weight: 600;
}
.nav-link-special2:hover { opacity: 0.85; }

/* TICKER (shared) */
.ticker-bar {
  background: #0d1117;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  overflow: hidden;
}
.ticker-label { color: var(--gold); font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.ticker-track { display: flex; animation: ticker-scroll 60s linear infinite; white-space: nowrap; }
.ticker-track span { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* HERO */
.cl-hero {
  padding: 80px 24px 60px;
  max-width: 1280px;
  margin: 0 auto;
}
.cl-hero-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 20px;
  opacity: 0.8;
}
.cl-hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}
.cl-hero-title .accent { color: var(--accent); }
.cl-hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.cl-hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* SELECTOR SECTION */
.cl-selector-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  position: sticky;
  top: 60px;
  z-index: 50;
}
.cl-selector-header {
  text-align: center;
  margin-bottom: 24px;
}
.cl-selector-header h2 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.cl-class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cl-class-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  font-family: var(--font-body);
  color: var(--text-muted);
}
.cl-class-tab:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.cl-class-tab.active {
  border-color: var(--accent);
  background: rgba(0,255,204,0.08);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(0,255,204,0.1);
}
.cl-tab-icon { font-size: 1.5rem; }
.cl-tab-name { font-weight: 600; font-size: 0.85rem; }
.cl-tab-sub { font-size: 0.7rem; opacity: 0.6; text-align: center; }

/* CONTENT SECTION */
.cl-content-section {
  padding: 60px 0;
}
.cl-panel { display: none; animation: panelIn 0.3s ease; }
.cl-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.cl-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-left: 4px solid var(--accent);
}
.cl-panel-icon { font-size: 2.5rem; flex-shrink: 0; line-height: 1; }
.cl-panel-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.cl-panel-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.6; }
.cl-panel-ability {
  margin-left: auto;
  background: rgba(0,255,204,0.08);
  border: 1px solid rgba(0,255,204,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.cl-panel-ability strong { color: var(--accent); display: block; font-family: var(--font-mono); }

/* LOCATION GRID */
.cl-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.cl-loc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cl-loc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.cl-loc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cl-loc-header.us { background: rgba(0,100,255,0.08); border-left: 4px solid #4a90d9; }
.cl-loc-header.pt { background: rgba(0,160,100,0.08); border-left: 4px solid #3da975; }
.cl-loc-header.cr { background: rgba(0,180,180,0.08); border-left: 4px solid #00b4b4; }
.cl-loc-header.ng { background: rgba(0,180,60,0.08); border-left: 4px solid #21bf73; }
.cl-loc-header.sg { background: rgba(232,131,42,0.08); border-left: 4px solid #e8832a; }
.cl-loc-header.tr { background: rgba(220,60,30,0.08); border-left: 4px solid #e04020; }
.cl-loc-header.ae { background: rgba(197,160,40,0.08); border-left: 4px solid #c5a028; }
.cl-loc-flag { font-size: 2rem; line-height: 1; }
.cl-loc-header h3 { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--text); }
.cl-loc-sub { font-size: 0.75rem; color: var(--text-muted); }

.cl-loc-persona {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  font-family: var(--font-mono);
}

.cl-feature-block { padding: 16px 20px; }
.cl-feature-block + .cl-feature-block {
  border-top: 1px solid var(--border);
}
.cl-feature-label {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.cl-feature-block.nice .cl-feature-label { color: var(--text-muted); }
.cl-feature-block.cant .cl-feature-label { color: var(--accent2); }
.cl-feature-block.cant { background: rgba(255,107,107,0.03); }

.cl-feature-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cl-feature-block ul li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.cl-feature-block.nice ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  opacity: 0.5;
}
.cl-feature-block.cant ul li {
  color: var(--text);
}
.cl-feature-block.cant ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent2);
  font-size: 0.75rem;
}

/* MULTICLASS */
.cl-multiclass {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.cl-multiclass-inner {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 36px;
}
.cl-multiclass-icon { font-size: 2.5rem; flex-shrink: 0; }
.cl-multiclass-inner h3 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 10px;
}
.cl-multiclass-inner p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.cl-multiclass-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cl-mc-pill {
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--gold);
  font-family: var(--font-mono);
}

/* FOOTER (reuse from style.css) */
.footer {
  background: #050608;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-logo { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.footer-tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.footer-ascii { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); white-space: pre; }
.footer-right { display: flex; gap: 20px; }
.footer-right a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-right a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .cl-location-grid { grid-template-columns: 1fr; }
  .cl-panel-header { flex-direction: column; gap: 16px; }
  .cl-panel-ability { margin-left: 0; white-space: normal; }
  .cl-class-tab { min-width: 100px; padding: 10px 12px; }
  .cl-multiclass-inner { flex-direction: column; }
}
@media (max-width: 600px) {
  .cl-hero-title { font-size: 2rem; }
  .cl-class-tabs { gap: 8px; }
  .cl-tab-name { font-size: 0.75rem; }
}

/* ======== NEW DATA-DRIVEN LAYOUT ======== */

/* Two-column selector row */
.cl-selectors-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .cl-selectors-row { grid-template-columns: 1fr; gap: 16px; }
}

.cl-selector-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Location tab pills (smaller than class tabs) */
.cl-location-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-loc-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  color: var(--text-muted);
  min-width: 88px;
}
.cl-loc-tab:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.cl-loc-tab.active {
  border-color: var(--accent);
  background: rgba(0,255,204,0.08);
  color: var(--text);
}
.cl-loc-tab-flag { font-size: 1.3rem; line-height: 1; }
.cl-loc-tab-name { font-weight: 600; font-size: 0.78rem; white-space: nowrap; }
.cl-loc-tab-city { font-size: 0.65rem; opacity: 0.6; text-align: center; }

/* Matrix wrapper: identity card + skills side by side */
.cl-matrix-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .cl-matrix-wrapper { grid-template-columns: 1fr; }
}

/* Location identity card */
.cl-loc-identity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cl-loc-identity-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cl-loc-big-flag {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.cl-loc-identity-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.cl-loc-cities {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cl-loc-persona {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 8px;
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* Skills stack */
.cl-skills-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Skill block (common / nice / cant) */
.cl-skill-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.common-block { border-left: 4px solid var(--accent); }
.nice-block   { border-left: 4px solid var(--gold); }
.cant-block   { border-left: 4px solid var(--accent2); background: rgba(255,107,107,0.03); }

.cl-skill-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.skill-block-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.skill-block-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
}

.skill-block-badge {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.common-badge { background: rgba(0,255,204,0.1);  color: var(--accent);  border: 1px solid rgba(0,255,204,0.2); }
.nice-badge   { background: rgba(240,192,64,0.1); color: var(--gold);    border: 1px solid rgba(240,192,64,0.2); }
.cant-badge   { background: rgba(255,107,107,0.12); color: var(--accent2); border: 1px solid rgba(255,107,107,0.25); }

/* Common skill items list */
.cl-skill-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cl-skill-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.cl-skill-item:last-child { border-bottom: none; }
.common-item:hover { background: rgba(0,255,204,0.03); }

.skill-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 22px;
}

.skill-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Feature block (nice / cant) */
.cl-skill-feature {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cant-feature { padding: 14px 16px; }

.cl-skill-feature-name {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-body);
}
.nice-block .cl-skill-feature-name { color: var(--gold); }
.cant-block .cl-skill-feature-name { color: var(--accent2); }

.cl-skill-feature-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* All-locations overview strip */
.cl-all-locations {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.cl-all-loc-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.cl-all-loc-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .cl-all-loc-strip { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .cl-all-loc-strip { grid-template-columns: repeat(3, 1fr); }
}

.cl-loc-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.cl-loc-mini:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.mini-active {
  background: rgba(0,255,204,0.06);
  border-color: var(--accent);
}

.mini-flag { font-size: 1.3rem; line-height: 1; }
.mini-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.mini-cant {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.65;
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ======== NAV DROPDOWN ======== */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: rgba(0,255,204,0.08); border: 1px solid rgba(0,255,204,0.25);
  color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem;
  font-weight: 700; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: background 0.2s ease; white-space: nowrap;
}
.nav-dropdown-btn:hover { background: rgba(0,255,204,0.15); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #111316; border: 1px solid #2a2d35; border-radius: 10px;
  padding: 6px; min-width: 220px; z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-drop-item {
  padding: 9px 14px; border-radius: 7px; text-decoration: none;
  font-size: 0.85rem; font-weight: 500; transition: background 0.15s ease; white-space: nowrap;
}
.nav-drop-item:hover { background: #1a1d22; }
.gold-item   { color: #f0c040; }
.green-item  { color: #00ffcc; }
.purple-item { color: #c77dff; }
.pro-item    { color: #a78bfa; font-weight: 700; }
