/* =========================
   Calgary Youth Resources – Styles
   ========================= */

/* Theme tokens */
:root {
  --bg: #0e1116;
  --card: #141a22;
  --accent: #ff6a3d;      /* coral */
  --accent-2: #2dd4bf;    /* teal (available if needed) */
  --text: #f8fafc;
  --muted: #a8b3bd;
  --danger: #ef4444;
}

/* Base */
html, body { height: 100%; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.wrap {
  width: min(92%, 70rem);
  margin: 0 auto;
  padding: 2em 0;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1em 0;
  flex-wrap: nowrap;
}
header img.logo {
  max-width: 3.5em; /* ~56px */
  height: auto;
  flex-shrink: 0;
  display: inline-block;
}
header .title { display: flex; flex-direction: column; gap: .25em; }
header h1 { font-size: 2em; line-height: 1.1; margin: 0; font-weight: 700; }
header p.tag { margin: 0; color: var(--muted); font-size: 1em; }

/* Hero */
.hero {
  background: linear-gradient(135deg, rgba(255,106,61,.15), rgba(45,212,191,.12));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1em;
  padding: 1.25em;
  display: flex;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: space-between;
}
.hero img.banner {
  width: min(100%, 36em);
  height: auto;
  border-radius: .75em;
  display: block;
}
.hero .copy { flex: 1 1 18em; }
.hero .copy h2 { margin: .25em 0 .5em; font-size: 1.5em; }
.hero .copy p { margin: .2em 0; color: var(--muted); }

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
  gap: 1em;
  margin: 1.5em 0 0;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1em;
  padding: 1.25em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1em;
  transition: transform .08s ease, border-color .15s ease, background-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.card .thumb {
  width: 3.25em; height: 3.25em;
  border-radius: .75em;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
}
.card .thumb img { width: 2.5em; height: auto; }
.card .thumb .fa-solid { font-size: 1.6em; line-height: 1; }
.card .text { display: flex; flex-direction: column; gap: .25em; }
.card .text strong { font-size: 1.1em; }
.card .text span { color: var(--muted); font-size: .95em; }
.card.disabled { opacity: .5; pointer-events: none; }

/* Panels */
.panel {
  margin: 1.25em 0 0;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1em;
}
.panel header {
  padding: 1em 1.25em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.panel header h3 { margin: 0; font-size: 1.15em; }
.panel .content { padding: 1em 1.25em; }

/* Map embed */
.map-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: .75em;
  overflow: hidden;
}
.map-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Category chips in map panel */
.grid.cats { grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); }
.grid.cats .card[aria-selected="true"] {
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 2px rgba(255,255,255,.1) inset;
}

/* Safety footer strip */
.safety {
  display: flex; flex-wrap: wrap; gap: 1em;
  align-items: center; justify-content: space-between;
  margin: 1.25em 0 0; padding: 1em 1.25em;
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 1em;
}
.safety p { margin: 0; color: var(--muted); }
.btn-exit {
  background: transparent; color: var(--text);
  border: 2px solid var(--text);
  padding: .75em 1em; border-radius: .75em;
  font-weight: 600; cursor: pointer;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 2em 0 3em;
  color: var(--muted);
  font-size: .95em;
}
footer a { color: var(--muted); }

/* Utilities */
.muted { color: var(--muted); }
.ml { margin-left: .5em; }

/* =========================
   Compact dropdowns (details/summary)
   ========================= */

/* QUICK NUMBERS (dropdown) */
#quick-numbers details { display: block; }
#quick-numbers summary {
  display: flex; align-items: center; gap: .6em;
  cursor: pointer; padding: .9em 1.25em;
  list-style: none; user-select: none;
}
#quick-numbers summary::-webkit-details-marker { display: none; }
#quick-numbers summary .chev {
  width: .9em; height: .9em;
  border: 2px solid var(--text);
  border-left-color: transparent; border-bottom-color: transparent;
  transform: rotate(45deg); border-radius: .2em; opacity: .7;
  transition: transform .18s ease, opacity .18s ease;
}
#quick-numbers details[open] summary .chev { transform: rotate(225deg); opacity: 1; }
#quick-numbers summary .title { font-weight: 600; }
#quick-numbers summary .hint { margin-left: auto; color: var(--muted); font-size: .95em; }

#quick-numbers .content {
  padding: 1em 1.25em;
  border-top: 1px solid rgba(255,255,255,.08);
}
#quick-numbers .hotline-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: .8em;
}
#quick-numbers .hotline {
  display: flex; gap: .75em; padding: .55em .4em;
  border-radius: .6em; transition: background-color .15s ease;
}
#quick-numbers .hotline:hover { background: rgba(255,255,255,.05); }
#quick-numbers .hotline i.fa-solid {
  width: 1.25em; line-height: 1; color: var(--accent);
  margin-top: .2em; flex: 0 0 auto;
}
#quick-numbers .row { display: flex; align-items: baseline; gap: .5em; }
#quick-numbers .row strong { font-size: 1.05em; }
#quick-numbers .row .label { color: var(--muted); font-size: .95em; }
#quick-numbers .desc { margin: .25em 0 0; color: var(--muted); font-size: .95em; }
#quick-numbers .actions {
  margin-top: .35em; font-size: .95em;
  display: flex; flex-wrap: wrap; align-items: center; gap: .35em;
}
#quick-numbers .actions .sep { opacity: .6; }
#quick-numbers .actions a.call {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,106,61,.55);
  text-decoration-thickness: 2px;
}
#quick-numbers .actions a.call:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* RESOURCES (dropdown + items) */
#resources details { display: block; }
#resources summary {
  display: flex; align-items: center; gap: .6em;
  cursor: pointer; padding: .9em 1.25em;
  list-style: none; user-select: none;
}
#resources summary::-webkit-details-marker { display: none; }
#resources summary .chev {
  width: .9em; height: .9em;
  border: 2px solid var(--text);
  border-left-color: transparent; border-bottom-color: transparent;
  transform: rotate(45deg); border-radius: .2em; opacity: .7;
  transition: transform .18s ease, opacity .18s ease;
}
#resources details[open] summary .chev { transform: rotate(225deg); opacity: 1; }
#resources summary .title { font-weight: 600; }
#resources summary .hint { margin-left: auto; color: var(--muted); font-size: .95em; }

#resources .content {
  padding: 1em 1.25em;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* Resource groups / items */
#resources h4 {
  margin: 1rem 0 .5rem;
  font-size: 1.05em;
  color: var(--muted);
  letter-spacing: .3px;
}
#resources .resource-list { list-style: none; margin: 0; padding: 0; }
#resources .resource-item {
  display: flex; align-items: flex-start; gap: .6em;
  padding: .45em .25em; border-radius: .6em;
  transition: background-color .15s ease;
}
#resources .resource-item:hover { background: rgba(255,255,255,.05); }
#resources .resource-item i.fa-solid {
  width: 1.25em; line-height: 1; color: var(--accent);
  margin-top: .2em;
}
#resources .resource-item a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255,106,61,.55);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
#resources .resource-item a:hover,
#resources .resource-item a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
  outline: none;
}
#resources .meta {
  display: block;
  color: var(--muted);
  font-size: .9em;
  margin-top: .15em;
}
#resources .badges {
  margin-top: .25em;
  display: flex; gap: .35em; flex-wrap: wrap;
}
#resources .badge {
  display: inline-block;
  font-size: .72em;
  padding: .2em .55em;
  border-radius: 999px;
  background: rgba(255,106,61,.16);
  border: 1px solid rgba(255,106,61,.45);
  color: var(--text);
  white-space: nowrap;
}

/* Layout: two columns on wider screens */
@media (min-width: 52rem) {
  #quick-numbers .hotline-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #resources .content {
    column-count: 2;
    column-gap: 2rem;
  }
  #resources h4,
  #resources .resource-list,
  #resources .resource-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Inline-style removals moved to CSS */
#mapStatus { margin: .5em 0 0; }
.map-wrap { margin-top: 1em; }
.tip { margin: 0 0 .75em; }

