/* ----------------------------------------- 
   NeuroMara – Unified Style Sheet (MERGED CLEAN VERSION)
   ----------------------------------------- */

/* --- Root Palette --- */
:root {
  /* Logo blues */
  --blue:  #91CBE3;   /* light logo blue */
  --navy:  #283166;   /* dark logo blue */

  /* Soft supporting tones */
  --mint:  #E4F4FF;   /* very light blue */
  --mist:  #F7FBFF;   /* soft white/blue background */

  /* Accent colors (used sparingly) */
  --violet: #6C7AD9;  /* subtle periwinkle accent */
  --coral:  #FF8B7B;  /* warm accent for “no / cancel” */

  --text:  #283166;   /* main body text */
  --green: #2f9e44;   /* Create Account buttons */
}

/* ---------------------------------------
   GLOBAL HEADINGS – MATCH "NEURODIVERGENT?"
   --------------------------------------- */

/* All main headings + the big question share the same font + gradient */
.question,
h1,
h2,
h3 {
  font-family: "Quicksand", sans-serif;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-align: center;

  /* SAME gradient + glow as "Neurodivergent?" */
  color: transparent;
  background: linear-gradient(135deg, var(--navy), var(--blue), var(--mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 8px rgba(145, 203, 227, 0.35);
}

/* Default heading sizing */
h1 {
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(22px, 3.4vw, 28px);
  margin: 0 0 18px;
}
h3 {
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 0 0 14px;
}

/* Hero question just overrides size + layout, but keeps same gradient rules above */
.question {
  display: inline-block;
  font-size: clamp(22px, 5vw, 46px);
  line-height: 1.1;
  margin: 30px auto 20px;
}

/* --- Reset & Basics --- */
*, *::before, *::after { 
  box-sizing: border-box; 
  transition: all 0.25s ease; 
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  /* soft blue background behind the white card */
  background: linear-gradient(
    145deg,
    var(--mint) 0%,
    var(--mist) 40%,
    #ffffff 100%
  );
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  text-align: center;
  overflow-x: hidden;
}

/* Baloo for whimsical bits */
.whimsy {
  font-family: "Baloo 2", cursive;
  letter-spacing: 0.2px;
}

/* --- Page Shell --- */
main {
  background: #fff;
  width: 96%;
  max-width: 1100px;
  margin: 40px auto;
  border-radius: 24px;
  padding: 60px;
  box-shadow: 0 10px 40px rgba(40, 49, 102, 0.12);
}

section[data-route] {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding-left: 60px;
  padding-right: 60px;
}
@media (max-width: 640px){
  section[data-route]{
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ---------------------------------------
   GLOBAL HEADER / TOP NAV
   --------------------------------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid rgba(40, 49, 102, 0.08);
}

.app-header .row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
}

/* Logo / brand block */
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header .brand img {
  width: 36px;
  height: auto;
}
.app-header .brand .name {
  font-weight: 800;
  color: var(--navy);
  font-family: "Quicksand", sans-serif;
}

/* Top status area (now right-aligned) */
.top-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: 12px;
}

/* Little chip that contains the signed-in text + nav buttons */
.status-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F5F7FF;
  border: 1px solid #dde4f5;
}

.status-text {
  font-size: 11px;
  color: #6b7280;
}

/* Header nav buttons: right-aligned row, smaller */
.header-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

/* Compact buttons in header – smaller + lighter */
.btn-compact {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #EEF2FF;
  color: var(--navy);
  box-shadow: none;
  font-weight: 700;
}

.btn-compact:hover {
  background: var(--mint);
  color: var(--navy);
  opacity: 0.9;
}

/* Make header stack nicely on narrow screens */
@media (max-width: 600px) {
  .app-header .row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- Logo --- */
.logo-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.logo {
  max-width: 280px;
  width: 60vw;
}
.logo-sub {
  font-size: 12px;
  color: #6b7280;
  user-select: none;
  margin-top: 2px;
}

/* --- Text --- */
p, .lead {
  font-size: 19px;
  line-height: 1.6;
  color: #4B5275;
  margin-bottom: 28px;
}

/* ---------------------------------------
   BUTTON SYSTEM (Unified)
   --------------------------------------- */
.btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(40, 49, 102, 0.25);
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.btn:hover { 
  transform: translateY(-2px); 
  opacity: 0.96; 
  box-shadow: 0 8px 18px rgba(40, 49, 102, 0.28);
}

/* Main buttons mapped to logo colors */
.btn-yes {
  background: linear-gradient(135deg, var(--blue), var(--navy));
}
.btn-no {
  background: linear-gradient(135deg, var(--coral), #F26D6D);
}
.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.btn-alt {
  background: linear-gradient(135deg, var(--coral), #F26D6D);
  color: #fff;
}

/* Secondary button – softer blue */
.btn-secondary {
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: #fff;
}

/* Auth buttons */
.btn-signin { 
  background: var(--navy) !important; 
  color: #fff !important; 
}
.btn-create { 
  background: var(--green) !important; 
  color: #fff !important; 
}

/* Small Buttons */
.btn-small {
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
}
.btn-small:hover { opacity: 0.9; }

/* ---------------------------------------
   FORMS & INPUTS
   --------------------------------------- */

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ccd4ea;
  border-radius: 12px;
  font-size: 16px;
  margin-top: 4px;
  font-family: "Nunito", sans-serif;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(145, 203, 227, 0.35);
  outline: none;
}

/* Center forms inside sections */
#signinForm, #createForm, #profileForm, #bizForm {
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------
   AVATARS
   --------------------------------------- */

.avatar,
.avatar-lg {
  border-radius: 50%;
  object-fit: cover;
}
.avatar {
  width: 120px;
  height: 120px;
}
.avatar-lg {
  width: 180px;
  height: 180px;
}

/* ---------------------------------------
   CHIPS / BADGES
   --------------------------------------- */

.badge-section { 
  text-align: center; 
  margin: 24px 0 12px; 
  border-top: 1px solid #e2e6f5; 
  padding-top: 16px; 
}
.badge-title { 
  font-family: "Quicksand", sans-serif; 
  font-weight: 800; 
  color: var(--navy); 
  margin-bottom: 8px; 
}
.badge-subtitle { 
  font-weight: 700; 
  color: #4B5275; 
  margin: 10px 0 6px; 
  font-size: 14px; 
}

.badges-wrap { 
  display: flex; 
  justify-content: center; 
  flex-wrap: wrap; 
  gap: 10px; 
}

.chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 18px;
  background: #EEF2FF;
  color: #283166;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.chip[data-active="true"],
.chip[data-active="true"]:hover {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
}

/* Profile-view badges */
.badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 18px;
  background: #EEF2FF;
  color: #283166;
  margin: 2px;
  font-size: 14px;
}
.badge:hover { 
  background: var(--mint); 
  color: var(--navy); 
}

/* ---------------------------------------
   BADGE CATEGORY BUTTONS (Badges page)
   --------------------------------------- */

.cat-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0 18px;
  justify-content: center;
}

.cat {
  background: #ffffff;
  color: var(--navy);
  padding: 14px 22px;
  border-radius: 18px;
  border: 2px solid #d9e4f2;
  font-size: 17px;
  font-weight: 700;
  font-family: "Quicksand", sans-serif;

  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition:
    background 0.22s ease,
    transform 0.18s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

/* Hover: soft lift */
.cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.10);
  border-color: var(--blue);
}

/* Active selection */
.cat[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(80,120,255,0.28);
  transform: translateY(-2px);
}

/* --- Badges page variant --- */

.badges-page .cat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
  justify-content: center;
}

.badges-page .cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 26px;
  border-radius: 999px;

  background: #ffffff;
  color: var(--navy);

  border: 2px solid #d9e4f2;
  font-size: 17px;
  font-weight: 800;
  font-family: "Quicksand", sans-serif;

  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);

  transition:
    background 0.22s ease,
    transform 0.18s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.badges-page .cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  border-color: var(--blue);
}

/* Selected state */
.badges-page .cat[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(80,120,255,0.32);
  transform: translateY(-2px);
}
.badges-about-heading {
  font-family: "Quicksand", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.8px;

  /* NeuroMara gradient text */
  background: linear-gradient(90deg, var(--blue), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* ---------------------------------------
   MAP
   --------------------------------------- */

#map { 
  height: 260px; 
  border-radius: 12px; 
  margin-top: 10px; 
  border: 1px solid #dde4f5;
}

/* ---------------------------------------
   POSTS
   --------------------------------------- */

.posts { 
  display: flex; 
  flex-direction: column; 
  gap: 14px; 
  text-align: left; 
}
.post  { 
  background: #F5F7FF; 
  border-radius: 14px; 
  padding: 14px 18px; 
  box-shadow: 0 2px 8px rgba(40, 49, 102, 0.12); 
}
.post .meta { 
  font-size: 13px; 
  color: #7C82A6; 
  margin-bottom: 4px; 
}

/* ---------------------------------------
   TABS
   --------------------------------------- */

.tab-row { 
  display: flex; 
  justify-content: center; 
  gap: 10px; 
  margin-bottom: 20px; 
}
.tab {
  border: none; 
  background: #E4E8FA; 
  padding: 10px 18px; 
  border-radius: 10px; 
  font-weight: 700; 
  cursor: pointer;
  color: #283166;
}
.tab[aria-selected="true"] { 
  background: var(--navy); 
  color: #fff; 
}

/* ---------------------------------------
   HELPERS
   --------------------------------------- */

.hint { 
  font-size: 13px; 
  color: #7C82A6; 
  margin-top: 6px; 
}

footer { 
  margin-top: 36px; 
  font-size: 14px; 
  color: #7C82A6; 
}

/* ---------------------------------------
   RESPONSIVE
   --------------------------------------- */

@media (max-width: 600px) {
  main {
    padding: 40px 25px;
  }
  .logo {
    max-width: 220px;
  }
  .question {
    font-size: clamp(26px, 7vw, 42px);
  }
}

@media (max-width: 400px) {
  main {
    width: 95%;
    padding: 35px 18px;
  }
  .btns {
    flex-direction: column;
  }
  .btns .btn {
    width: 100%;
  }
}

.map-avatar {
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid white;
}

.avatar-glow {
  box-shadow:
    0 0 8px rgba(120,150,255,0.9),
    0 0 16px rgba(120,150,255,0.6);
}
