/* NETA prototype site styles.
 *
 * Reproduces the current site's visual design — magenta primary with the
 * multi-colour section/footer palette and Arial type (design tokens taken
 * from the captured site.min.css) — while folding in the WAI-AA corrections
 * from the audit: visible focus, a skip link, sufficient contrast, and no
 * suppression of zoom.
 */

:root {
  --magenta: #d1005d;      /* accessible tuning of the site's #ff0075 for text/contrast */
  --magenta-bright: #ff0075; /* original brand magenta, used for large/decorative fills */
  --purple: #7a3ff2;
  --blue: #0077cc;
  --gold: #b58900;
  --green: #4a9c00;
  --ink: #222;
  --muted: #555;
  --line: #d7d7d7;
  --bg: #fff;
  --focus: #0b5fff;
  --maxw: 1000px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 18px;      /* audience-appropriate base size (2011 spec: generous minimum) */
  line-height: 1.6;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Accessibility helpers --- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: #fff; color: var(--magenta); padding: 10px 16px;
  border: 3px solid var(--magenta); border-radius: 0 0 6px 6px;
  z-index: 1000; transition: top .15s ease; font-weight: bold;
}
.skip-link:focus { top: 0; }

a { color: var(--magenta); }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* --- Top navigation --- */
.navbar {
  background: #111;
  color: #fff;
}
.navbar .container { display: flex; flex-wrap: wrap; align-items: center; }
.navbar-header { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
#logo-tiny { height: 34px; width: auto; }
#navbar-title { font-weight: bold; font-size: 1.1rem; }
.navbar-toggle {
  margin-left: auto; display: none; background: none; border: 2px solid #fff;
  border-radius: 4px; padding: 6px 8px; cursor: pointer;
}
.navbar-toggle .icon-bar {
  display: block; width: 22px; height: 3px; background: #fff; margin: 3px 0;
}
.navbar ul.nav {
  list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0;
  width: 100%;
}
.navbar ul.nav li { flex: 1 1 0; text-align: center; }
.navbar ul.nav a {
  display: block; padding: 12px 8px; color: #fff; text-decoration: none;
  font-weight: bold; border-top: 4px solid transparent;
}
.navbar ul.nav a:hover { background: #000; }
.navbar ul.nav li.selected a { border-top-color: var(--magenta-bright); background: #000; }
/* Section accent colours on the tabs (the multi-colour scheme) */
.navbar li.home.selected a        { border-top-color: var(--magenta-bright); }
.navbar li.neta-charity.selected a{ border-top-color: var(--blue); }
.navbar li.what-is-aphasia.selected a { border-top-color: var(--purple); }
.navbar li.living-with-aphasia.selected a { border-top-color: var(--green); }
.navbar li.newsletter.selected a  { border-top-color: var(--gold); }
.navbar li.contacts.selected a    { border-top-color: var(--magenta-bright); }

/* --- Masthead --- */
#masthead {
  display: flex; align-items: center; gap: 16px; padding: 18px 0;
  border-bottom: 3px solid var(--magenta-bright); flex-wrap: wrap;
}
#logo-small img { height: 72px; width: auto; }
.site-title { font-size: 1.9rem; font-weight: bold; margin: 0; color: var(--ink); }
.site-title .pink { color: var(--magenta); }
#banner-small { margin-left: auto; }
#banner-small img { max-height: 90px; width: auto; border-radius: 4px; }

/* --- Content area: sidebar + main --- */
#content-area {
  display: grid;
  gap: 32px;
  padding: 24px 0;
}
#content-area .col-content { min-width: 0; }

/* Inner pages: sidebar visually left, but content is first in the DOM. */
.with-sidebar { grid-template-columns: 300px 1fr; }
.with-sidebar #sidebar    { grid-column: 1; grid-row: 1; }
.with-sidebar .col-content { grid-column: 2; grid-row: 1; }

/* Home: welcome copy left (wide), section icon grid right. */
#content-area:not(.with-sidebar) { grid-template-columns: 1fr 300px; }

#sidebar { min-width: 0; }
#submenu .submenu-title { font-size: 1.3rem; margin: 0 0 10px; }
#submenu .submenu-title .blue { color: var(--blue); }
#submenu ul { list-style: none; margin: 0 0 20px; padding: 0; }
#submenu > ul > li > a {
  display: block; padding: 10px 12px; text-decoration: none;
  color: var(--ink); border-left: 5px solid var(--line); background: #f6f6f6;
  margin-bottom: 4px;
}
#submenu > ul > li > a:hover { background: #eee; }
#submenu li.selected > a {
  border-left-color: var(--magenta-bright);
  background: #fbe6ef; font-weight: bold; color: var(--magenta);
}
.submenu-children { margin: 4px 0 8px 14px !important; }
.submenu-children a {
  display: block; padding: 7px 10px; text-decoration: none; color: var(--ink);
  border-left: 4px solid var(--line); background: #fafafa; margin-bottom: 3px;
  font-size: .95rem;
}
.submenu-children li.selected a {
  border-left-color: var(--magenta-bright); background: #fbe6ef;
  font-weight: bold; color: var(--magenta);
}
.widget { margin-top: 18px; padding: 14px; background: #f6f6f6; border-radius: 6px; }
.widget h2 { font-size: 1.05rem; margin: 0 0 6px; }

/* Home icon grid */
.icon-area { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.icon-holder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 84px; padding: 10px; border-radius: 8px; text-decoration: none;
  color: #fff; font-weight: bold; background: var(--magenta);
}
.icon-holder.icon-home { background: var(--magenta-bright); }
.icon-holder.icon-charity { background: var(--blue); }
.icon-holder.icon-what { background: var(--purple); }
.icon-holder.icon-people { background: var(--green); }
.icon-holder.icon-newsletter { background: var(--gold); }
.icon-holder.icon-contacts { background: #c0006a; }
.icon-holder:hover { filter: brightness(0.92); text-decoration: none; }

/* --- Main content typography --- */
main h1 { color: var(--magenta); font-size: 2rem; margin: 0 0 .5em; }
main h2 { color: var(--blue); font-size: 1.4rem; margin: 1.2em 0 .4em; }
main h3, main h4 { color: var(--ink); margin: 1em 0 .3em; }
main img { max-width: 100%; height: auto; }
main a { color: var(--magenta); }
main ul, main ol { padding-left: 1.3em; }
main table { border-collapse: collapse; }
main th, main td { border: 1px solid var(--line); padding: 6px 10px; }

/* --- YouTube consent-gated embed --- */
.youtube-embed {
  position: relative; aspect-ratio: 16 / 9; background: #000; margin: 1em 0;
  border-radius: 6px; overflow: hidden; max-width: 720px;
}
.youtube-embed .yt-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #fff; background: #1a1a1a; cursor: pointer; padding: 16px;
  text-align: center; font: inherit;
}
.youtube-embed .yt-facade:hover { background: #262626; }
.youtube-embed .yt-play {
  font-size: 1rem; font-weight: bold; background: var(--magenta-bright);
  color: #fff; padding: 10px 18px; border-radius: 6px;
}
.youtube-embed .yt-note { font-size: .85rem; opacity: .85; max-width: 34ch; }
.youtube-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Footer --- */
footer hr, .body-content > hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
#footer-center ul {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 12px;
}
#footer-center li { border-radius: 8px; }
#footer-center a { display: block; padding: 16px 12px; text-align: center; color: #fff; text-decoration: none; font-weight: bold; }
#footer-center a:hover { text-decoration: underline; }
.footer-green   { background: var(--green); }
.footer-babyblue{ background: var(--blue); }
.footer-pink    { background: var(--magenta-bright); }
.footer-yellow  { background: var(--gold); }
.blurb { color: var(--muted); font-size: .95rem; }
.blurb .pink { color: var(--magenta); }
.blurb ul.social { list-style: none; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }

/* --- Responsive --- */
@media (max-width: 820px) {
  #content-area,
  #content-area:not(.with-sidebar),
  .with-sidebar { grid-template-columns: 1fr; }
  .with-sidebar #sidebar,
  .with-sidebar .col-content { grid-column: 1; grid-row: auto; }
  .navbar ul.nav { display: none; }
  .navbar ul.nav.open { display: flex; flex-direction: column; }
  .navbar ul.nav li { text-align: left; }
  .navbar-toggle { display: block; }
  #footer-center ul { grid-template-columns: 1fr 1fr; }
  #banner-small { display: none; }
}
@media (max-width: 480px) {
  #footer-center ul { grid-template-columns: 1fr; }
  .icon-area { grid-template-columns: 1fr; }
}
