/* =============================================
   THE STREET CHAPTER — thestreetchapter.org
   Design System & Global Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- TOKENS --- */
:root {
  --saffron:        #FF9933;
  --saffron-light:  #FFF3E0;
  --saffron-mid:    #FFB347;
  --saffron-dark:   #E65100;
  --saffron-deeper: #BF360C;
  --green:          #138808;
  --green-light:    #E8F5E9;
  --navy:           #0F1923;
  --navy-mid:       #1A2A38;
  --warm-white:     #FEFCF7;
  --cream:          #F9F4EC;
  --text:           #1E1610;
  --text-mid:       #3D2E1A;
  --text-muted:     #6B5B3E;
  --text-faint:     #A0907A;
  --border:         rgba(255,153,51,0.18);
  --border-dark:    rgba(255,153,51,0.35);
  --shadow-sm:      0 2px 12px rgba(30,22,16,0.06);
  --shadow-md:      0 6px 28px rgba(30,22,16,0.10);
  --shadow-lg:      0 16px 56px rgba(30,22,16,0.14);
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      32px;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'DM Sans', -apple-system, sans-serif;
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; }
input, select, textarea { font-family: var(--font-body); }

/* --- NAVIGATION --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(254,252,247,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin-right: auto;
}
.nav-logo span { color: var(--saffron); }
.nav-logo small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: -2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  border-radius: 100px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--cream);
}
.nav-links a.active { font-weight: 500; }
.btn-nav {
  background: var(--saffron);
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 100px;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: background var(--transition), transform var(--transition) !important;
  background: none !important;
  border: none;
}
.nav-cta {
  background: var(--saffron);
  color: #fff;
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  display: inline-block;
}
.nav-cta:hover { background: var(--saffron-dark); transform: translateY(-1px); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: all var(--transition); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--saffron);
  color: #fff;
}
.btn-primary:hover { background: var(--saffron-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,153,51,0.35); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(30,22,16,0.18);
}
.btn-outline:hover { border-color: var(--saffron); color: var(--saffron-dark); background: var(--saffron-light); }
.btn-white {
  background: #fff;
  color: var(--saffron-dark);
}
.btn-white:hover { background: var(--saffron-light); transform: translateY(-2px); }
.btn-sm { padding: 9px 20px; font-size: 0.875rem; }
.btn-icon { font-size: 1.1rem; line-height: 1; }

/* --- SECTION UTILITIES --- */
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--saffron-dark);
  margin-bottom: 1rem;
}
.section-tag.light { color: var(--saffron-mid); }
.section-tag.green { color: var(--green); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5.5rem 0; }
.section-sm { padding: 3.5rem 0; }

/* --- CARDS --- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--saffron-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--saffron-dark);
  font-size: 24px;
  margin-bottom: 1.5rem;
}

/* --- FOOTER --- */
.footer {
  background: var(--navy);
  padding: 4rem 2rem 2.5rem;
  color: rgba(255,255,255,0.55);
}
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-logo-wrap .logo { font-family: var(--font-display); font-size: 1.5rem; color: #fff; margin-bottom: 0.75rem; }
.footer-logo-wrap .logo span { color: var(--saffron); }
.footer-logo-wrap p { font-size: 0.875rem; line-height: 1.7; max-width: 260px; }
.footer-col h5 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.footer-col a { display: block; font-size: 0.875rem; color: rgba(255,255,255,0.55); margin-bottom: 0.5rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--saffron); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; font-size: 0.78rem; color: rgba(255,255,255,0.25); flex-wrap: wrap; gap: 1rem; }
.footer-bottom a { color: rgba(255,255,255,0.35); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--saffron); }

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid;
}
.badge-saffron { background: var(--saffron-light); color: var(--saffron-dark); border-color: rgba(255,153,51,0.3); }
.badge-green { background: var(--green-light); color: var(--green); border-color: rgba(19,136,8,0.25); }

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.anim-fadeup { animation: fadeUp 0.7s ease both; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.22s; }
.anim-delay-3 { animation-delay: 0.34s; }
.anim-delay-4 { animation-delay: 0.46s; }

/* --- DIVIDER --- */
.divider { border: none; border-top: 1px solid var(--border); }
.divider-dark { border-color: rgba(255,255,255,0.08); }

/* --- FORM ELEMENTS --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid rgba(30,22,16,0.12);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,153,51,0.12); }
.form-group textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- STAT CARDS --- */
.stat-card { text-align: center; }
.stat-card .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--saffron-dark); line-height: 1; }
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* =============================================
   HERO — index.html
   ============================================= */
.hero {
  min-height: 90vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 5rem 2rem 7rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(255,153,51,0.18) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='1.2' fill='%23FF9933' opacity='0.12'/%3E%3C/svg%3E");
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.02;
  color: var(--text);
  margin: 1.5rem 0;
  letter-spacing: -0.035em;
}
.hero h1 em { font-style: normal; color: var(--saffron); position: relative; }
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 3px;
  background: var(--saffron);
  border-radius: 2px;
  opacity: 0.4;
}
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 2.5rem; font-weight: 300; line-height: 1.75; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats-strip {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

/* =============================================
   WHAT SECTION
   ============================================= */
.what-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.what-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.25rem; }
.what-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(255,153,51,0.1); }
.what-card h3 { font-size: 1.2rem; font-weight: 700; margin: 1.25rem 0 0.75rem; }
.what-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* =============================================
   HOW IT WORKS — dark band
   ============================================= */
.how-band { background: var(--navy); padding: 5.5rem 2rem; }
.how-band .section-tag { color: var(--saffron-mid); }
.how-band h2 { color: #fff; font-size: clamp(2rem, 3.5vw, 2.8rem); margin-bottom: 0.5rem; }
.how-band .sub { color: rgba(255,255,255,0.5); font-size: 0.95rem; margin-bottom: 3.5rem; max-width: 480px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step { position: relative; }
.step-connector {
  position: absolute;
  top: 26px; left: calc(50% + 28px);
  width: calc(100% - 28px);
  height: 1px;
  background: rgba(255,153,51,0.25);
}
.step:last-child .step-connector { display: none; }
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--saffron);
  color: var(--saffron);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  background: var(--navy);
}
.step h4 { color: #fff; font-family: var(--font-body); font-weight: 500; font-size: 1rem; margin-bottom: 0.5rem; }
.step p { color: rgba(255,255,255,0.5); font-size: 0.85rem; line-height: 1.65; }

/* =============================================
   INSPIRE STRIP
   ============================================= */
.inspire-strip { background: var(--cream); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5rem 2rem; text-align: center; }
.inspire-strip h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); max-width: 620px; margin: 0.75rem auto 1.25rem; }
.inspire-strip p { color: var(--text-muted); max-width: 540px; margin: 0 auto 2.25rem; line-height: 1.75; }
.inspire-logos { display: flex; justify-content: center; gap: 2rem; align-items: center; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.inspire-logo { font-size: 0.8rem; color: var(--text-faint); font-weight: 500; }

/* =============================================
   FIND PAGE — find.html
   ============================================= */
.find-header {
  background: var(--navy);
  padding: 3.5rem 2rem;
  text-align: center;
}
.find-header h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.75rem; }
.find-header .sub { color: rgba(255,255,255,0.55); font-size: 0.95rem; margin-bottom: 2rem; }
.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 100px;
  padding: 6px 6px 6px 22px;
  box-shadow: var(--shadow-md);
}
.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-btn {
  background: var(--saffron);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 11px 26px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--saffron-dark); }

.find-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 68px - 200px);
  min-height: 520px;
}

/* Sidebar list */
.lib-sidebar { border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.sidebar-header .count { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.sidebar-header .filters { display: flex; gap: 0.4rem; }
.filter-btn { font-size: 0.72rem; padding: 4px 12px; border-radius: 100px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.filter-btn.active, .filter-btn:hover { background: var(--saffron-light); color: var(--saffron-dark); border-color: rgba(255,153,51,0.4); }

.lib-card {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: background var(--transition);
}
.lib-card:hover { background: #FFFAF4; }
.lib-card.selected { background: var(--saffron-light); border-left: 3px solid var(--saffron); }
.lib-pin {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--saffron);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background var(--transition);
}
.lib-card.selected .lib-pin { background: var(--saffron-dark); }
.lib-info { flex: 1; min-width: 0; }
.lib-info h4 { font-size: 0.9rem; font-weight: 500; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-info .addr { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.lib-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.lib-tag { font-size: 0.68rem; padding: 2px 9px; border-radius: 4px; font-weight: 500; }
.lib-tag.city { background: var(--green-light); color: var(--green); }
.lib-tag.new { background: var(--saffron-light); color: var(--saffron-dark); }
.lib-tag.lang { background: var(--cream); color: var(--text-muted); }

/* Map area */
.map-container { position: relative; background: #E5EDDA; overflow: hidden; }
#map { width: 100%; height: 100%; }

/* Info popup */
.map-popup {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 260px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 10;
}
.map-popup.visible { display: block; animation: fadeUp 0.25s ease; }
.popup-close { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; padding: 4px; border-radius: 4px; }
.popup-close:hover { color: var(--text); background: var(--cream); }
.popup-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; padding-right: 20px; }
.popup-addr { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; }
.popup-meta { display: flex; flex-direction: column; gap: 6px; }
.popup-row { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.popup-row svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--saffron-dark); }
.popup-row strong { color: var(--text); font-weight: 500; }
.popup-divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.popup-dir { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 9px; background: var(--saffron-light); color: var(--saffron-dark); border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 500; transition: background var(--transition); border: none; cursor: pointer; }
.popup-dir:hover { background: rgba(255,153,51,0.2); }

/* No-results */
.no-results { padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.no-results svg { width: 40px; height: 40px; margin: 0 auto 1rem; color: var(--text-faint); }

/* =============================================
   ABOUT PAGE — about.html
   ============================================= */
.about-hero {
  background: linear-gradient(135deg, var(--saffron-light) 0%, var(--cream) 60%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 2px solid rgba(255,153,51,0.15);
}
.about-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 2px solid rgba(255,153,51,0.1);
}
.about-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); max-width: 700px; margin: 0.75rem auto 1.25rem; }
.about-hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; line-height: 1.8; }

.about-body { max-width: 760px; margin: 0 auto; padding: 5rem 2rem; }
.about-body h2 { font-size: 1.9rem; margin: 2.5rem 0 1rem; color: var(--text); }
.about-body h2:first-child { margin-top: 0; }
.about-body p { color: var(--text-muted); line-height: 1.85; margin-bottom: 1rem; font-size: 0.95rem; }
.about-body strong { color: var(--text); font-weight: 600; }
.pull-quote {
  background: var(--saffron-light);
  border-left: 4px solid var(--saffron);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
}
.pull-quote p { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; color: var(--text); margin: 0; line-height: 1.6; }
.pull-quote cite { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; font-style: normal; font-family: var(--font-body); }
.about-cta { background: var(--navy); padding: 5rem 2rem; text-align: center; }
.about-cta h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.about-cta p { color: rgba(255,255,255,0.55); max-width: 460px; margin: 0 auto 2.5rem; line-height: 1.75; }

/* =============================================
   REGISTER PAGE — register.html
   ============================================= */
.register-hero { background: var(--cream); border-bottom: 1px solid var(--border); padding: 4rem 2rem 5rem; text-align: center; }
.register-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.75rem 0 1rem; }
.register-hero p { color: var(--text-muted); max-width: 500px; margin: 0 auto; line-height: 1.75; }
.register-body { max-width: 680px; margin: 0 auto; padding: 4rem 2rem 6rem; }
.reg-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; }
.reg-form h3 { font-family: var(--font-body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); font-weight: 600; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.reg-form h3 + h3 { margin-top: 2rem; }
.form-submit { background: var(--saffron); color: #fff; border: none; border-radius: 100px; width: 100%; padding: 15px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all var(--transition); margin-top: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.form-submit:hover { background: var(--saffron-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,153,51,0.3); }
.form-note { font-size: 0.78rem; color: var(--text-faint); text-align: center; margin-top: 1rem; line-height: 1.5; }
.success-msg { display: none; text-align: center; padding: 2rem; }
.success-msg .check { width: 64px; height: 64px; background: var(--green-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; color: var(--green); font-size: 28px; }
.success-msg h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.success-msg p { color: var(--text-muted); font-size: 0.9rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .what-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-connector { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .find-layout { grid-template-columns: 1fr; height: auto; }
  .lib-sidebar { max-height: 360px; }
  .map-container { height: 420px; }
}
@media (max-width: 640px) {
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
        flex-direction: column;
        align-items: center;       /* 1. Horizontally center the links */
        justify-content: flex-start;/* 2. Push content from the top down */
        position: fixed;
        inset: 68px 0 0;           /* Fits right under your header */
        height: calc(100vh - 68px);/* 3. Force full viewport height coverage */
        /* 4. Ensure solid background color so background text can't bleed through */
        background-color: #FAF6F0; /* Fallback to your exact warm-white hex */
        background: var(--warm-white, #FAF6F0); 
        padding: 3rem 2rem;
        z-index: 1000;             /* 5. Crank up z-index above everything else */
        gap: 2rem;                 /* 6. Increase gap so links have breathing room */
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Adds clean separation */
   }

  .hamburger { display: block; }
  .hero h1 { font-size: 2.8rem; }
  .hero-stats-strip { gap: 2rem; flex-wrap: wrap; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .reg-form { padding: 1.5rem; }
}

/* Container framework inside the popup */
.map-popup-card {
    padding: 0.4rem 0.2rem;
    text-align: center;
    font-family: inherit;
}

/* The Library Name Header */
.popup-title {
    font-family: 'Playfair Display', serif; /* Replace with your primary brand font */
    color: #2B2625; /* Dark Charcoal text tone */
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

/* Description Typography */
.popup-description {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.45;
    margin: 0 0 1rem 0;
}

/* Meta Data Row */
.popup-meta {
    font-size: 0.85rem;
    color: #777777;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

/* The Button CTA (Pill Shape matching your aesthetic) */
.popup-btn {
    display: inline-block;
    background-color: #E88B42 !important; /* Terracotta Orange */
    color: #FFFFFF !important;
    padding: 0.6rem 1.4rem;
    border-radius: 30px; 
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.popup-btn:hover {
    background-color: #D3762E !important; /* Slightly deeper orange tone on hover */
}

/* Override Leaflet container wrapper boxes */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
    background: #FAF6F0; /* Warm paper/cream background color */
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 0.4rem;
}

.custom-leaflet-popup .leaflet-popup-tip {
    background: #FAF6F0; /* Colors the pointer arrow bubble element underneath */
}

.custom-leaflet-popup .leaflet-popup-close-button {
    color: #2B2625 !important;
    padding: 8px 8px 0 0 !important;
}

/* ==========================================================================
   GLOBAL LAYOUT FLOW RESET (Unlocking the window floors)
   ========================================================================== */

/* 1. Force the root container to grow naturally with the document flow */
html, body, .find-page-wrap {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  display: block !important;
}

/* 2. Break any absolute positioning or hard constraints on the main split container */
.find-layout {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;

  /* Adds plenty of beautiful breathing room at the top, sides, and critically the bottom! */
  padding: 2rem 1.5rem 5rem 1.5rem !important; 

  gap: 2rem !important;
  height: auto !important;      /* Destroys any inherited desktop viewport locks */
  position: relative !important; /* Clears desktop absolute positioning defaults */
}

/* 3. Re-verify the desktop sidebar layout frame */
.lib-sidebar {
  position: relative !important;
  width: 380px !important;
  flex: 0 0 380px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  padding: 1.5rem !important;

  /* Give it a crisp, fixed view height so the cards scroll internally */
  height: 70vh !important;
  min-height: 550px !important;
  overflow-y: auto !important;
}

/* 4. Re-verify the desktop map canvas layout frame */
.map-container {
  position: relative !important;
  flex: 1 !important;

  /* Perfectly mirrors the sidebar height so they form a beautiful, balanced pair */
  height: 70vh !important;
  min-height: 550px !important;

  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

/* 5. Force the Leaflet canvas block to render precisely within its card */
#map {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
  display: block !important;
}


/* ==========================================================================
   MOBILE VERTICAL RESPONSIVE FLOW
   ========================================================================== */
@media (max-width: 991px) {
  /* 1. Remove strict layout limits so elements hug their actual contents */
  .find-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    gap: 1rem !important;
    padding: 1rem !important;
  }

  /* 2. Make the sidebar automatically shrink or grow based on its cards */
  .lib-sidebar {
    width: 100% !important;
    position: static !important;

    /* THE MAGIC TRICK: Let it auto-size based on results, but cap it if there are 24 libraries */
    height: auto !important;
    min-height: 200px !important;
    max-height: 380px !important;

    overflow-y: auto !important; /* Keeps it scrollable internally ONLY if it hits the max-height */
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;

    /* Eliminates extra blank padding bottom leaking inside the component wrapper */
    padding-bottom: 1rem !important;
  }

  /* 3. Keep the map perfectly stable right underneath the list layout */
  .map-container {
    width: 100% !important;
    height: 400px !important;
    min-height: 400px !important;
    flex: none !important;
    margin-top: 0.5rem;
  }
}