/* ============================================================
   base.css — EMSConferences.com shared styles
   Used by: all pages
   ============================================================ */

/* ── RESET + ROOT ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --red:  #D85A30; --rdl: #FAECE7; --rdk: #712B13;
  --nvy:  #042C53; --nm:  #185FA5; --nl:  #E6F1FB; --n2: #85B7EB; --n3: #0C447C;
  --amb:  #EF9F27; --aml: #FAEEDA; --amk: #633806;
  --tel:  #1D9E75; --tll: #E1F5EE; --tlk: #085041;
  --pur:  #7F77DD; --prl: #EEEDFE; --prk: #3C3489;
  --grn:  #639922; --grl: #EAF3DE; --grk: #3B6D11;
  /* Neutral */
  --g50: #F1EFE8; --g10: #D3D1C7; --g40: #888;
  --tx:  #1a1a1a; --tm:  #666;    --tf:  #999;
  --br:  #e5e3dc; --bm:  #ccc;
  /* Radius */
  --ra: 10px; --rs: 6px; --rl: 14px;
  /* Edit mode */
  --edit: #185FA5;
}

/* ── BASE ─────────────────────────────────────────────────── */
body {
  font-family: 'Karla', sans-serif;
  color: var(--tx);
  background: #f8f7f3;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main, .page-content { flex: 1; }
a, button { font-family: 'Karla', sans-serif; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  background: var(--nvy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nvi {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #fff;
  display: flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}
.logo span { color: var(--red); }
.logo-s {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.36);
  font-weight: 700;
}
.nvl { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; }
.nva-right { display: flex; align-items: center; gap: 6px; }
.nlb {
  color: rgba(255,255,255,0.68);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: var(--rs);
  border: none;
  background: none;
  transition: all .15s;
}
.nlb:hover, .nlb.act { color: #fff; background: rgba(255,255,255,0.1); }
.ncta {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--rs);
  border: none;
  margin-left: 6px;
  transition: background .15s;
}
.ncta:hover { background: var(--rdk); }
.hmb {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 6px;
}
.hmb span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all .2s; }
.mob-nav {
  display: none;
  flex-direction: column;
  background: var(--nvy);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px 16px 12px;
}
.mob-nav .nlb { display: block; width: 100%; text-align: left; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mob-nav .ncta { display: block; width: 100%; margin: 8px 0 0; text-align: center; padding: 10px; }
.mob-nav.open { display: flex; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--nvy);
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 20px;
  font-size: 11px;
  margin-top: auto;
}
footer a { color: rgba(255,255,255,0.5); }
footer a:hover { color: #fff; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--rs);
  border: none;
  cursor: pointer;
  transition: all .15s;
  font-family: 'Karla', sans-serif;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--rdk); }
.btn-secondary { background: var(--nvy); color: #fff; }
.btn-secondary:hover { background: var(--nm); }
.btn-outline { background: #fff; color: var(--nvy); border: 1px solid var(--br); }
.btn-outline:hover { border-color: var(--n2); box-shadow: 0 2px 8px rgba(4,44,83,0.08); }
.btn-ghost { background: transparent; color: var(--nm); border: 1px solid var(--n2); }
.btn-ghost:hover { background: var(--nl); }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.fin {
  width: 100%;
  border: 1px solid var(--bm);
  border-radius: var(--rs);
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Karla', sans-serif;
  outline: none;
  transition: border .15s;
  background: #fff;
  color: var(--tx);
}
.fin:focus { border-color: var(--nm); box-shadow: 0 0 0 2px rgba(24,95,165,0.08); }

.ef-row { margin-bottom: 14px; }
.ef-row label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--tf);
  margin-bottom: 4px;
}
.ef-row input, .ef-row textarea, .ef-row select {
  width: 100%;
  border: 1px solid var(--bm);
  border-radius: var(--rs);
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Karla', sans-serif;
  outline: none;
  transition: border .15s;
  color: var(--tx);
}
.ef-row input:focus, .ef-row textarea:focus { border-color: var(--nm); }
.ef-err {
  background: #FFF0EB;
  border: 1px solid #F4A58A;
  border-radius: var(--rs);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--rdk);
  margin-bottom: 10px;
  display: none;
}
.ef-msg { font-size: 12px; padding: 6px 0; display: none; }
.ef-actions { display: flex; gap: 8px; margin-top: 12px; }
.ef-save {
  background: var(--nm);
  color: #fff;
  border: none;
  border-radius: var(--rs);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
}
.ef-cancel {
  background: #fff;
  color: var(--tm);
  border: 1px solid var(--bm);
  border-radius: var(--rs);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
}


/* ── TOAST ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--nvy); color: #fff; font-size: 13px; font-weight: 700;
  padding: 11px 22px; border-radius: 6px; z-index: 1200;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s ease;
}
.toast.on { opacity: 1; }

/* ── MODALS ───────────────────────────────────────────────── */
.mover {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.mover.open { display: flex; }
.modal-box, .modal {
  background: #fff;
  border-radius: var(--ra);
  padding: 28px;
  width: 90%;
  max-width: 440px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.mclose {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--tf);
  cursor: pointer;
}

/* ── FILTER / CHIP UTILITIES ──────────────────────────────── */
.chip {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid var(--bm);
  background: #fff;
  color: var(--tm);
  transition: all .12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.chip:hover:not(.act) { background: var(--g50); }
.chip.act { background: var(--nvy); border-color: var(--nvy); color: #fff; }

.fbtn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid var(--bm);
  background: #fff;
  color: var(--tm);
  transition: all .12s;
}
.fbtn:hover:not(.act) { background: var(--g50); }
.fbtn.act { background: var(--nvy); border-color: var(--nvy); color: #fff; }

.ssel {
  font-size: 12px;
  border: 1px solid var(--bm);
  border-radius: var(--rs);
  padding: 5px 9px;
  background: #fff;
  color: var(--tm);
  outline: none;
}

.hsbar {
  display: flex;
  border-radius: var(--ra);
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
}
.hsbar input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  font-family: 'Karla', sans-serif;
}
.hsbar input::placeholder { color: rgba(255,255,255,0.30); }
.hsbtn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

/* ── SECTION LABELS ───────────────────────────────────────── */
.seclbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--tm);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.seclbl::after { content: ''; flex: 1; height: 1px; background: var(--br); }

/* ── ASIDE / SIDEBAR CARDS ────────────────────────────────── */
.aside-card {
  background: #fff;
  border: 1px solid var(--br);
  border-radius: var(--ra);
  padding: 16px;
  margin-bottom: 16px;
}
.aside-card-t {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tm);
  margin-bottom: 12px;
}
.aside-banner {
  background: var(--nvy);
  border-radius: var(--ra);
  padding: 16px;
  margin-bottom: 16px;
}
.aside-banner-t { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.aside-banner-s { font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.55; margin-bottom: 12px; }
.aside-banner-btn {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--rs);
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .nvl,
  .nva-right { display: none; }
  .hmb { display: flex; }
  .nvi { padding: 0 16px; }
}

/* ── GLOBAL OVERFLOW PROTECTION ───────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }

/* ── MOBILE TOUCH TARGETS ─────────────────────────────────── */
@media (max-width: 680px) {
  .btn, .fbtn, .chip, .nlb, .ceng-btn, .ef-save, .ef-cancel,
  .aside-banner-btn, .hsbtn { min-height: 44px; }
  .ssel { min-height: 44px; }
  .mclose { min-width: 44px; min-height: 44px; }
  .fbtn, .chip, .ceng-btn { padding: 8px 14px; }
}

/* ── LEGAL PAGES (terms.html / privacy.html) ──────────────── */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.legal-wrap h1 { font-family: 'Bebas Neue', sans-serif; font-size: 40px; color: var(--nvy); letter-spacing: .5px; margin-bottom: 4px; }
.legal-updated { font-size: 12px; color: var(--tf); margin-bottom: 28px; }
.legal-wrap h2 { font-size: 17px; font-weight: 800; color: var(--nvy); margin: 26px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: 14px; color: var(--tx); line-height: 1.7; margin-bottom: 10px; }
.legal-wrap ul { padding-left: 22px; margin-bottom: 12px; }
.legal-wrap a { color: var(--nm); text-decoration: underline; }

/* ── CONFERENCE ENGAGEMENT (shared across pages) ─────────────────────────── */
.ceng-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all .15s;
  font-family: 'Karla', sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.ceng-btn:hover             { background: var(--nl); border-color: var(--nm); color: var(--nm); }
.ceng-btn.on-attending      { background: var(--tll); border-color: var(--tel); color: var(--tlk); }
.ceng-btn.on-maybe          { background: #FFF8E7; border-color: #F59E0B; color: #92400E; }
.ceng-btn.on-speaking       { background: var(--nl); border-color: var(--nm); color: var(--n3); }
.ceng-btn.on-favorite       { background: var(--aml); border-color: var(--amb); color: var(--amk); }
.ceng-btn.on-cfp            { background: var(--prl); border-color: var(--pur); color: var(--prk); }
.ccard-engage               { display: flex; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--br); flex-wrap: wrap; }

/* ── ENGAGEMENT DETAIL PANEL (conference detail view) ───────────────────── */
.eng-detail-grid            { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.eng-detail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--ra);
  border: 1.5px solid var(--br);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  font-family: 'Karla', sans-serif;
  text-align: center;
}
.eng-detail-btn:hover         { border-color: var(--nm); background: var(--nl); }
.eng-detail-btn.on-attending  { background: var(--tll); border-color: var(--tel); }
.eng-detail-btn.on-maybe      { background: #FFF8E7; border-color: #F59E0B; }
.eng-detail-btn.on-speaking   { background: var(--nl); border-color: var(--nm); }
.eng-detail-btn.on-favorite   { background: var(--aml); border-color: var(--amb); }
.eng-detail-btn.on-cfp        { background: var(--prl); border-color: var(--pur); }
.eng-detail-icon              { font-size: 20px; line-height: 1; }
.eng-detail-label             { font-size: 11px; font-weight: 700; color: var(--tx); line-height: 1.2; }
.eng-detail-desc              { font-size: 9px; color: var(--tf); line-height: 1.3; }
