/* ═══════════════════════════════════════════════════════════
   CILT Central Asia — Shared Styles (header + footer + base)
   Used by: auth.html, events.html, event.html,
            dashboard.html, event-form.html
═══════════════════════════════════════════════════════════ */

/* ── RESET + BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', Arial, sans-serif; /* 2026-09-18: sitewide premium upgrade, Arial fallback */
  font-size: 15px;
  line-height: 1.5;
  color: #505050;
  background: #ffffff;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --cilt-purple: #361163;
  --cilt-gold:   #C0A582;
  --cilt-yellow: #ffd204;
  --cilt-green:  #b7d432;
  --cilt-blue:   #00a8e5;
  --cilt-red:    #b72049;
  --cilt-steel:  #505050;
  --cilt-pale:   #ebebeb;
  --header-h:    122px; /* top-bar 48px + nav 74px */
}

/* ── UTILITY ────────────────────────────────────────────── */
.hidden-xs { display: inline; }
@media (max-width: 479px) { .hidden-xs { display: none; } }

.page-body { padding-top: var(--header-h); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════ */
#top-bar {
  background: var(--cilt-purple);
  overflow: hidden;
  max-height: 48px;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 1;
}
#top-bar.collapsed { max-height: 0; opacity: 0; }
@media (min-width: 1024px) {
  #top-bar.collapsed { max-height: 48px; opacity: 1; }
}
#site-header { transition: transform 0.35s ease; }
#site-header.header-hidden { transform: translateY(-100%); }

.topbar-link {
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.topbar-link:hover { text-decoration: underline; opacity: 0.9; }

.topbar-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cilt-gold);
  color: var(--cilt-purple);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 5px;
  transition: background 0.2s;
  white-space: nowrap;
}
.topbar-join:hover { background: #AC916B; }

/* Distinct from .topbar-join on purpose — a second premium CTA right next to
   "Вступить" would compete for attention if it were another solid gold pill,
   so this one is a gold outline instead (same brand color, different weight),
   filling solid gold only on hover. */
.topbar-moodle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--cilt-gold);
  border: 1.5px solid var(--cilt-gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 3.5px 12px;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.topbar-moodle:hover { background: var(--cilt-gold); color: var(--cilt-purple); }

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 3px;
  transition: color 0.2s;
  line-height: 1;
}
.lang-btn:hover, .lang-btn.active { color: #ffffff; }
.lang-btn.active { text-decoration: underline; }
.lang-sep { color: rgba(255,255,255,0.25); font-size: 12px; user-select: none; }

/* Top-bar has no wrap and packs everything to the right (justify-content:
   flex-end) with overflow:hidden — below ~767px the full row (search +
   Главная + О нас + Войти + Вступить + MOODLE + lang switcher) doesn't fit,
   so the left-most items get silently clipped off-screen rather than
   overflowing visibly. "Главная"/"О нас" are the safest to drop here: the
   logo already links home, and both are already in the burger menu at this
   width. Opt-in via .topbar-link-collapse on the <a>/<span> pair per page
   (not a bare element selector) so pages that haven't added the class yet
   are unaffected. */
@media (max-width: 767px) {
  .topbar-link-collapse { display: none !important; }
}

/* ══════════════════════════════════════════════════════════
   MAIN NAV
══════════════════════════════════════════════════════════ */
#main-nav {
  background: #ffffff;
  border-bottom: none;
  transition: box-shadow 0.3s ease;
}
#main-nav.scrolled {
  box-shadow: 0 2px 24px rgba(54,17,99,0.13);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.logo-desktop { display: block; width: 170px; height: auto; }
.logo-mobile  { display: none;  width: 60px;  height: auto; }
@media (max-width: 479px) {
  .logo-desktop { display: none; }
  .logo-mobile  { display: block; }
  .nav-inner    { height: 72px; }
}

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--cilt-steel);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0 4px;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--cilt-gold);
  transition: width 0.25s ease;
}
.nav-link:hover            { color: var(--cilt-purple); }
.nav-link:hover::after     { width: 100%; }
.nav-link.active           { color: var(--cilt-purple); }
.nav-link.active::after    { width: 100%; }

/* ── BURGER ─────────────────────────────────────────────── */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.burger-line {
  display: block;
  width: 24px; height: 2px;
  background: var(--cilt-purple);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
@media (max-width: 767px) {
  .nav-links  { display: none; }
  .burger-btn { display: flex; }
}

/* ── MOBILE MENU ────────────────────────────────────────── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: #ffffff;
  border-top: 1px solid var(--cilt-pale);
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
#mobile-menu.open { max-height: 520px; opacity: 1; }

.mobile-nav-link {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--cilt-steel);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 0;
  border-bottom: 1px solid var(--cilt-pale);
  transition: color 0.2s;
}
.mobile-nav-link:hover  { color: var(--cilt-purple); }
.mobile-nav-link.active { color: var(--cilt-purple); font-weight: 700; }
.mobile-nav-link:last-of-type { border-bottom: none; }

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
#site-footer {
  background: var(--cilt-purple);
  color: #ffffff;
  padding: 60px 24px 0;
}
.footer-inner  { max-width: 1200px; margin: 0 auto; }
.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  padding-bottom: 52px;
  align-items: start;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.footer-logo-icon   { width: 52px; height: auto; flex-shrink: 0; filter: brightness(0) invert(1) opacity(0.95); }
.footer-brand-name  { font-size: 17px; font-weight: 700; color: #ffffff; }
.footer-brand-sub   {
  font-size: 11px; font-weight: 400; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55); text-transform: uppercase; margin-top: 2px;
}
.footer-address {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.footer-contacts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.footer-contact-item { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.footer-contact-item svg { flex-shrink: 0; color: #C0A582; width: 16px; height: 16px; }
.footer-contact-item a { color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.2s; }
.footer-contact-item a:hover { color: #C0A582; }
.footer-wa-badge { font-size: 11px; font-weight: 700; color: #C0A582; background: rgba(192,165,130,0.12); border: 1px solid rgba(192,165,130,0.3); border-radius: 4px; padding: 1px 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-address-icon {
  flex-shrink: 0; margin-top: 2px; color: var(--cilt-gold);
  width: 18px; height: 18px;
}
.footer-address p   {
  font-size: 14px; line-height: 1.7;
  color: rgba(255,255,255,0.75); margin: 0;
}
.footer-address strong { color: #ffffff; font-weight: 600; }

.footer-socials { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(192,165,130,0.4) !important;
  color: #C0A582;
  text-decoration: none;
  position: relative; overflow: hidden; flex-shrink: 0;
  transition: border-color 0.3s ease, color 0.3s ease,
              transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}
.footer-social-link::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, #C0A582 0%, #E3C69B 60%, #D2B38A 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.footer-social-link svg { width: 18px; height: 18px; position: relative; z-index: 1; }
.footer-social-link:hover {
  border-color: #C0A582;
  color: #361163;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(192,165,130,0.45), 0 2px 8px rgba(0,0,0,0.2);
}
.footer-social-link:hover::before { opacity: 1; }

.footer-map-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  width: 100%; height: 300px; background: #220b45;
}
.footer-map-iframe {
  width: 100% !important; height: 100% !important; border: none !important; display: block !important;
  pointer-events: none;
  filter: grayscale(10%) brightness(0.92) hue-rotate(260deg);
  transition: filter 0.3s ease;
}
.footer-map-wrap:hover .footer-map-iframe { pointer-events: auto; filter: none; }
.footer-map-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(54,17,99,0.35); color: rgba(255,255,255,0.9);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  pointer-events: none; transition: opacity 0.3s ease;
}
.footer-map-hint svg { width: 16px; height: 16px; }
.footer-map-wrap:hover .footer-map-hint { opacity: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.45); margin: 0; }
.footer-copy a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.footer-copy a:hover { color: var(--cilt-gold); }

@media (max-width: 1023px) {
  .footer-main { grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
  .footer-map-wrap { height: 260px; }
}
@media (max-width: 767px) {
  .footer-map-iframe { pointer-events: auto; filter: none; }
  .footer-map-hint   { display: none; }
}
@media (max-width: 639px) {
  #site-footer    { padding: 44px 16px 0; }
  .footer-bottom  { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════
   PAGE HERO BANNER (for inner pages)
══════════════════════════════════════════════════════════ */
.page-banner {
  background: var(--cilt-purple);
  padding: 56px 24px 48px;
  text-align: left;
}
.page-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.page-banner h1 {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.25;
}
.page-banner p {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin: 0;
  max-width: 640px;
}

/* ══════════════════════════════════════════════════════════
   SHARED BUTTON STYLES
══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cilt-purple); color: #ffffff;
  font-size: 15px; font-weight: 700; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  padding: 13px 28px; border-radius: 6px; border: none;
  cursor: pointer; transition: background 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { background: #4a1a85; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--cilt-purple);
  font-size: 15px; font-weight: 700; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  padding: 11px 26px; border-radius: 6px;
  border: 2px solid var(--cilt-purple);
  cursor: pointer; transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--cilt-purple); color: #ffffff; }

.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cilt-gold); color: var(--cilt-purple);
  font-size: 15px; font-weight: 700; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  padding: 13px 28px; border-radius: 6px; border: none;
  cursor: pointer; transition: background 0.2s;
  white-space: nowrap;
}
.btn-gold:hover { background: #AC916B; color: #ffffff; }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: #b72049;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; text-transform: uppercase;
  padding: 8px 16px; border-radius: 6px;
  border: 2px solid #b72049;
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.btn-danger:hover { background: #b72049; color: #ffffff; }

.btn-sm {
  font-size: 12px;
  padding: 7px 16px;
}

/* ══════════════════════════════════════════════════════════
   EVENT CARD (shared between events.html and index #events)
══════════════════════════════════════════════════════════ */
.ev-card {
  background: #ffffff;
  border-radius: 12px;
  border-top: 4px solid var(--cilt-purple);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
}
.ev-card:hover {
  box-shadow: 0 10px 32px rgba(54,17,99,0.14);
  transform: translateY(-4px);
}
.ev-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--cilt-pale);
}
.ev-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #361163 0%, #4a1a85 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ev-card-img-placeholder svg { width: 48px; height: 48px; color: rgba(255,255,255,0.3); }
.ev-card-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ev-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cilt-purple);
  margin: 0 0 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-card-desc {
  font-size: 14px;
  color: var(--cilt-steel);
  line-height: 1.55;
  margin: 0 0 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-card-footer {
  margin-top: auto;
}
.ev-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cilt-purple); color: #ffffff;
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase;
  padding: 10px 20px; border-radius: 6px;
  transition: background 0.2s;
}
.ev-card-btn:hover { background: #4a1a85; }

/* ══════════════════════════════════════════════════════════
   STATUS BADGE
══════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
}
.status-badge--published { background: #edf7e6; color: #3a7d1e; }
.status-badge--draft      { background: #f5f5f5; color: #888888; }

/* ══════════════════════════════════════════════════════════
   FORM STYLES
══════════════════════════════════════════════════════════ */
/* Honeypot field for js/form-guard.js — hidden from sighted users and
   screen readers, but present in the DOM/tab order for naive bots to fill. */
.cilt-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.form-group {
  margin-bottom: 22px;
}
.form-label {
  display: block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--cilt-steel);
  margin-bottom: 7px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  color: var(--cilt-steel);
  background: #ffffff;
  border: 2px solid #d8d8d8;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--cilt-purple);
  box-shadow: 0 0 0 3px rgba(54,17,99,0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.form-hint {
  font-size: 12px;
  color: #aaa;
  margin-top: 5px;
}
.form-error {
  font-size: 13px;
  color: var(--cilt-red);
  margin-top: 6px;
}

/* Radio group */
.radio-group { display: flex; gap: 24px; flex-wrap: wrap; }
.radio-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; cursor: pointer;
}
.radio-label input { width: 18px; height: 18px; accent-color: var(--cilt-purple); cursor: pointer; }

/* File upload */
.file-upload-area {
  border: 2px dashed #d8d8d8;
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-upload-area:hover { border-color: var(--cilt-purple); background: #faf8ff; }
.file-upload-area input { display: none; }
.file-upload-area p { font-size: 14px; color: #888; margin: 8px 0 0; }
.file-upload-area.has-file { border-color: var(--cilt-gold); background: #fdfaf5; }
.file-preview {
  width: 100%; max-height: 200px;
  object-fit: cover; border-radius: 6px;
  display: none;
  margin-top: 12px;
}
.file-preview.visible { display: block; }

/* Alert */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-error   { background: #fdf0f3; border: 1px solid #f7c0cb; color: #b72049; line-height: 1.6; white-space: pre-wrap; }
.alert-success { background: #edf7e6; border: 1px solid #b8e0a0; color: #3a7d1e; }

/* ══════════════════════════════════════════════════════════
   AUTH CHOICE MODAL
══════════════════════════════════════════════════════════ */
#auth-choice-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#auth-choice-modal.open { display: flex; }

.acm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 4, 28, 0.60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.acm-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(54,17,99,0.24), 0 4px 16px rgba(0,0,0,0.12);
  padding: 44px 40px 40px;
  width: 100%;
  max-width: 460px;
  animation: acm-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes acm-enter {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.acm-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: var(--cilt-pale);
  color: var(--cilt-steel);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.acm-close:hover { background: #d0d0d0; color: #333; }
.acm-logo-wrap { margin-bottom: 24px; }
.acm-logo      { width: 120px; height: auto; display: block; }
.acm-title {
  font-size: 22px; font-weight: 700;
  color: var(--cilt-purple); margin: 0 0 6px;
}
.acm-subtitle { font-size: 14px; color: #999; margin: 0 0 28px; }

.acm-options { display: flex; flex-direction: column; gap: 12px; }
.acm-option {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.acm-option:hover {
  border-color: var(--cilt-purple);
  box-shadow: 0 4px 24px rgba(54,17,99,0.12);
  background: #faf8ff;
}
.acm-option-icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.acm-option--portal .acm-option-icon {
  background: rgba(54,17,99,0.07); color: var(--cilt-purple);
}
.acm-option--admin .acm-option-icon {
  background: rgba(192,165,130,0.14); color: #AC916B;
}
.acm-option:hover .acm-option-icon {
  background: var(--cilt-purple); color: #ffffff;
}
.acm-option-text {
  flex: 1;
  display: flex; flex-direction: column; gap: 3px;
}
.acm-option-title {
  font-size: 15px; font-weight: 700;
  color: var(--cilt-purple); display: block;
}
.acm-option-desc {
  font-size: 12px; color: #999; display: block; line-height: 1.4;
}
.acm-option-arrow {
  color: #ccc; flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.acm-option:hover .acm-option-arrow { transform: translateX(4px); color: var(--cilt-purple); }

/* Divider line inside modal */
.acm-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0;
  color: #ddd; font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.acm-divider::before,
.acm-divider::after {
  content: ''; flex: 1; height: 1px; background: #eee;
}

@media (max-width: 479px) {
  .acm-card { padding: 32px 24px 28px; }
  .acm-option { padding: 14px 16px; gap: 12px; }
  .acm-option-icon { width: 40px; height: 40px; }
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD TABS
══════════════════════════════════════════════════════════ */
.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cilt-pale);
  margin-bottom: 36px;
}
.dash-tab {
  padding: 12px 24px;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: #aaa;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.dash-tab.active { color: var(--cilt-purple); border-bottom-color: var(--cilt-purple); }
.dash-tab:hover:not(.active) { color: var(--cilt-steel); }

.dash-panel.hidden { display: none; }

/* Profile form */
.profile-form-wrap {
  max-width: 560px;
}
.profile-form-wrap h2 {
  font-size: 22px; font-weight: 700;
  color: var(--cilt-purple); margin: 0 0 6px;
}
.profile-form-wrap > p {
  font-size: 14px; color: #888; margin: 0 0 28px;
}

/* ══════════════════════════════════════════════════════════
   NAV DROPDOWNS  (Профессиональное развитие, База знаний, Партнерство)
══════════════════════════════════════════════════════════ */
.nav-dropdown { position: relative; }

.nav-link-has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
  padding-bottom: 4px; /* matches nav-link */
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.nav-dropdown.open .dropdown-chevron { transform: rotate(180deg); }

/* Transparent bridge covers the gap between trigger and menu.
   When the cursor crosses the gap it hovers over this ::before pseudo-element,
   which is a descendant of .nav-dropdown — so :hover never breaks mid-flight. */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;   /* covers the 8px gap + 4px safety margin */
  left: -16px;
  right: -16px;
  height: 12px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid var(--cilt-pale);
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 8px 28px rgba(54,17,99,0.12);
  min-width: 230px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 500;
}
/* JS-click: works on all devices */
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Hover: mouse only — prevents double-tap issue on touch screens */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown-menu {
    transition-delay: 200ms; /* extra buffer while cursor crosses the gap */
  }
  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0ms;
  }
  .nav-dropdown:hover .dropdown-chevron {
    transform: rotate(180deg);
  }
}

.nav-dropdown-link {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cilt-steel);
  text-decoration: none;
  border-bottom: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  background: #f5f0fd;
  color: var(--cilt-purple);
  border-left: none;
  padding-left: 18px;
}
