:root {
  --red: #c0392b;
  --black: #111111;
  --white: #ffffff;
  --gold: #d4a94c;
  --dark-card: #1a1a1a;
  --gray: #555555;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--black);
  background: var(--white);
}

.topbar { background: var(--red); height: 6px; }

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  flex-wrap: wrap;
}
.site-nav .brand { font-weight: 800; font-size: 1.25rem; color: var(--black); text-decoration: none; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--black); text-decoration: none; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em; }
.site-nav a:hover { color: var(--red); }

.hero {
  background: linear-gradient(rgba(10,10,10,0.6), rgba(10,10,10,0.75)), url('/img/hero-cover.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
}
.hero h1 { margin: 0; font-size: 2.5rem; }

.site-nav .brand { display: flex; align-items: center; gap: 0.6rem; }
.site-nav .brand img { height: 44px; width: 44px; border-radius: 50%; object-fit: cover; }

main { max-width: 960px; margin: 0 auto; padding: 3rem 2rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.price-card {
  background: var(--dark-card);
  color: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
}
.price-card .plan-name { color: var(--gold); text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.price-card .price { font-size: 1.75rem; font-weight: 800; margin: 0.5rem 0; }
.price-card ul { padding-left: 1.1rem; }

table.schedule-table { width: 100%; border-collapse: collapse; }
table.schedule-table th, table.schedule-table td { text-align: left; padding: 0.6rem; border-bottom: 1px solid #ddd; }

.instructor-card { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2rem; }
.instructor-card img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; background: #eee; }

.site-footer { background: var(--black); color: var(--white); text-align: center; padding: 2rem; margin-top: 3rem; }
.site-footer a { color: #888; font-size: 0.8rem; text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* Admin */
body.admin { background: #f4f4f4; }
.admin-login, .admin-dashboard, .admin-form { max-width: 480px; margin: 4rem auto; background: var(--white); padding: 2rem; border-radius: 8px; }
.admin-form.wide { max-width: 720px; }
.admin-login label, .admin-form label { display: block; margin-bottom: 1rem; font-weight: 600; }
.admin-login input, .admin-form input, .admin-form textarea {
  display: block; width: 100%; padding: 0.5rem; margin-top: 0.25rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px;
}
.admin-login button, .admin-form button {
  background: var(--red); color: var(--white); border: none; padding: 0.7rem 1.2rem;
  border-radius: 4px; font-weight: 700; cursor: pointer;
}
.admin-nav { list-style: none; padding: 0; }
.admin-nav li { margin-bottom: 0.75rem; }
.error { color: var(--red); font-weight: 600; }
.success { color: #1e7a3c; font-weight: 600; }
.admin-row { border: 1px solid #ddd; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }

/* Google's own widget (the raw <select> with 100+ options and its
   "Powered by Google Translate" chrome) is kept in the DOM so it still
   drives the actual translation, but it's never shown — the visible
   control is the custom .lang-switcher built in translate-widget.ejs,
   which reads Google's options and renders a compact, site-styled
   dropdown instead of the browser's full-height native <select> list. */
.translate-widget-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lang-switcher {
  position: relative;
  margin-left: auto;
}
.lang-switcher-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.lang-switcher-button:hover {
  border-color: var(--red);
}
.lang-switcher-caret {
  font-size: 0.7rem;
  color: #888;
}
/* Specificity note: .site-nav ul {display:flex; flex-wrap:wrap;} (used for
   the main nav links) would otherwise win over a plain .lang-switcher-list
   rule since it has higher specificity — scope this selector under
   .lang-switcher so it wins instead. Visibility is driven by the .is-open
   class (toggled in JS) rather than the `hidden` attribute, since an
   explicit `display` value here would otherwise override the browser's
   default `[hidden] { display: none }` UA rule. */
.lang-switcher .lang-switcher-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 260px;
  width: 220px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 20;
}
.lang-switcher .lang-switcher-list.is-open {
  display: block;
}
.lang-switcher-list li {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.lang-switcher-list li:hover {
  background: #f4f4f4;
  color: var(--red);
}

/* Reposition Google's translate banner to a fixed bar at the bottom of the
   viewport instead of the default top placement, which pushes page content
   down. Google sets `body { top: <N>px }` via an inline style with high
   specificity from its own JS, so !important is required to override it. */
body {
  top: 0 !important;
}
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate {
  top: auto !important;
  bottom: 0 !important;
  position: fixed !important;
}
