/* ── Shared base styles (fonts, layout shell, sidebar, logo) ──
   Used by index.html, tirgul.html, and any future pages. */

:root {
  --accent: #2F6FED;
  --accent-dark: #1E4FCB;
  --blue-bg: #EAF1FF;
  --blue-fg: #2F6FED;
  --purple-bg: #F3ECFF;
  --purple-fg: #8B5CF6;
  --green-bg: #E8FAF0;
  --green-fg: #16A34A;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  -webkit-user-select: none;
  user-select: none;
  font-family: 'Google Sans', Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
  direction: rtl;
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
}

input, textarea, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

/* ── Sliding nav panels (shared) ── */
.nav-slider {
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}
.nav-panels,
.nav-panels-3 {
  display: flex;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-panels   { width: 200%; }
.nav-panels-3 { width: 300%; }
.nav-panel {
  flex-shrink: 0;
}
.nav-panels   > .nav-panel { width: 50%; }
.nav-panels-3 > .nav-panel { width: calc(100% / 3); }
.nav-panels.drilled { transform: translateX(50%); }

/* ── Sidebar shell ── */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #eee;
  padding: 2.4rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: static;
  height: auto;
  overflow-y: visible;
  align-self: flex-start;
  transition: width 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
}

.sidebar.collapsed {
  width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-left-color: transparent !important;
  min-width: 0;
}

.sidebar-toggle-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 320px;
  width: 20px;
  height: 48px;
  background: #fff;
  border: 1px solid #eee;
  border-right: none;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #bbb;
  z-index: 999;
  padding: 0;
  line-height: 1;
  transition: right 0.25s ease, background 0.12s, color 0.12s;
}

.sidebar-toggle-btn:hover {
  background: #f5f5f3;
  color: #555;
}

.sidebar-daily {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.sidebar-daily-label,
.sidebar-daily-btn {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.20em;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-daily-label:hover,
.sidebar-daily-btn:hover { color: #555; }

.sidebar-daily-sep {
  color: #ccc;
  font-weight: 300;
  letter-spacing: 0;
  user-select: none;
}

.logo {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-decoration: none;
  color: #1a1a1a;
  white-space: nowrap;
  padding-right: 0.7rem;
}

.back-link {
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
  margin-top: -1.6rem;
}

.back-link:hover { color: #888; }

.nav-breadcrumb { color: #ccc !important; font-size: 0.88rem !important; font-weight: 400 !important; }
.nav-breadcrumb:hover { color: #aaa !important; background: none !important; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  letter-spacing: 0.20em
}

.nav a,
.nav button {
  display: block;
  width: 100%;
  text-align: right;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 1.05rem;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
  letter-spacing: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover {
  background: #f5f5f3;
}

.nav a.active,
.nav button.active {
  color: #1a1a1a;
  font-weight: 700;
  background: #f0efeb;
}

.nav-label {
  font-size: 1rem;
  color: #bbb;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  padding: 0 0.7rem;
}

/* ── Main content shell ── */
.main {
  flex: 1;
  padding: 4rem 4.5rem;
  max-width: 760px;
}

.section-title {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

/* ── Footer ── */
.site-footer {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  border-top: 1px solid #eee;
  padding: 3rem 4.5rem;
  font-size: 0.95rem;
}

.footer-col {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-heading {
  font-size: 0.85rem;
  color: #aaa;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-promo .footer-title {
  font-weight: 400;
}
.footer-brand-logo {
  font-size: 1.8rem;
}

.footer-brand-logo span,
.logo span {
  display: inline-block;
  padding-right: 1.2em;
}

.footer-brand-logo .footer-tagline {
  font-size: 0.9rem;
  color: #888;
  font-weight: 400;
  letter-spacing: 0.02em;
  vertical-align: middle;
  padding-right: 0.5rem;
}

.footer-subtitle {
  font-size: 0.9rem;
  color: #888;
}

.footer-text {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

.footer-promo {
  border-right: 1px solid #eee;
  padding-right: 2rem;
}

.footer-powered-by {
  flex: 0 0 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
  margin-top: -2rem;
}
.footer-powered-by img {
  height: 135px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.footer-powered-by img:hover { opacity: 0.85; }

/* ── Auth widget in sidebar ── */
#auth-widget { margin-top: auto; }

.auth-signin-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  white-space: nowrap;
}
.auth-signin-btn:hover { border-color: #888; background: #f5f5f3; }

.auth-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}
.auth-name {
  font-size: 0.9rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-signout {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.auth-signout:hover { color: #555; }

/* ── Login button in sidebar (legacy) ── */
.nav-login {
  display: inline-block;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.4rem 1.1rem;
  border: 1.5px solid #1a1a1a;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
  align-self: flex-start;
}
.nav-login:hover {
  background: #1a1a1a;
  color: #fff;
}

/* ── Dev login form (?devlogin=1) ── */
.dev-login {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0;
}
.dev-login input {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  width: 100%;
}
.dev-login button {
  font-family: inherit;
  font-size: 0.78rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.35rem;
  cursor: pointer;
}

/* ── Course-gate visibility ─────────────────────────────────────────────────── */
/* english courseType: hide quant + verbal subject buttons */
body.ct-english [data-cg="quant"],
body.ct-english [data-cg="verbal"] { display: none !important; }

/* no_english courseType: english button visible but locked */
body.ct-no-english [data-cg="english"] {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
