/* Shared styles for the KG7SPL site. Page layouts mostly live inline in each page. */

html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #f0b23c; outline-offset: 3px;
}

/* ---------- Section headings (Bulletins) ---------- */
.section-title { margin: 0 0 4px; font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 40px; line-height: 1.1; color: #14243a; }
.section-lede { margin: 0 0 24px; color: #5b6673; }

/* ---------- Tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.doc-tile { display: flex; flex-direction: column; background: #ffffff; border-radius: 14px; overflow: hidden; text-decoration: none; color: #1f2933;
  box-shadow: 0 1px 3px rgba(20,36,58,0.10), 0 8px 24px rgba(20,36,58,0.06); border: none; }
.doc-tile:hover { box-shadow: 0 2px 6px rgba(20,36,58,0.16), 0 12px 32px rgba(20,36,58,0.12); }
.tile-btn { font: inherit; text-align: left; padding: 0; cursor: pointer; width: 100%; }
.tile-pic { position: relative; aspect-ratio: 4 / 3; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #e6ebf0; }
.tile-pic > img.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-pic > img.page { width: 62%; align-self: flex-start; margin-top: 18px; display: block; box-shadow: 0 4px 14px rgba(20,36,58,0.25); }
.club-badge { width: 46%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 50%; background: #ffffff; padding: 6px; box-sizing: border-box; box-shadow: 0 4px 14px rgba(20,36,58,0.2); display: block; }
.blank-page { width: 52%; aspect-ratio: 8.5 / 11; align-self: flex-start; margin-top: 18px; background: #ffffff; box-shadow: 0 4px 14px rgba(20,36,58,0.2);
  background-image: repeating-linear-gradient(180deg, transparent 0 11px, #e6eaef 11px 12px); background-clip: content-box; padding: 22px 18px; box-sizing: border-box; }
.pending-tag, .sample-tag { position: absolute; top: 12px; left: 12px; background: #ffffff; color: #5b6673; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pending-tag { background: #f0b23c; color: #14243a; }
.tile-text { display: block; padding: 16px 20px 20px; }
.tile-title { display: block; margin: 0 0 2px; font-family: Bitter, Georgia, serif; font-weight: 700; font-size: 22px; line-height: 1.2; color: #14243a; }
.tile-sub { display: block; font-size: 16px; color: #5b6673; }
.tile-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; color: #5b6673; }
.tile-meta b { color: #14243a; }
.empty-note { grid-column: 1 / -1; margin: 0; padding: 22px 24px; border: 2px dashed #c9d2dc; border-radius: 14px; color: #5b6673; background: #fbfcfd; }

/* Dashed "Flyer goes here" spots */
.flyer-spot { display: flex; flex-direction: column; border: 2px dashed #b6c1cd; border-radius: 14px; overflow: hidden; background: #fbfcfd; }
.flyer-spot-pic { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #8a96a3; font-weight: 600; font-size: 16px; }

/* Placeholder robot-check badge (until the real one is switched on) */
.robot-badge { display: flex; align-items: center; gap: 8px; border: 1px solid #c9d2dc; border-radius: 6px; padding: 8px 12px; font-size: 14px; color: #5b6673; background: #f7f8fa; }
.robot-dot { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; background: #2f9e5b; }

/* Upcoming Events: the Coming up box stays in view while scrolling on wide screens */
@media (min-width: 900px) { .sticky-aside { position: sticky; top: 16px; } }

/* ---------- Home: What we do tiles, 3 across at most ---------- */
@media (max-width: 1000px) { .wwd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .wwd-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- Home: live band meter beside the logos ---------- */
#band-meter { margin-left: 8px; display: flex; flex-direction: column; gap: 4px; padding: 7px 12px 8px; border-radius: 10px; background: rgba(10,20,34,0.6); box-shadow: 0 2px 10px rgba(0,0,0,0.3); text-decoration: none; color: #ffffff; line-height: 1.2; }
#band-meter:hover { background: rgba(10,20,34,0.75); }
.bm-head { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; color: #d4dce5; }
.bm-title { font-weight: 700; letter-spacing: 0.02em; }
.bm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 16px; }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bm-label { font-size: 13px; font-weight: 700; }
.bm-meter { display: inline-flex; align-items: center; gap: 2px; }
.cm-meter { display: inline-flex; align-items: center; gap: 3px; }
.seg { display: inline-block; width: 11px; height: 6px; border-radius: 1px; border: 1px solid rgba(255,255,255,0.45); box-sizing: border-box; }
.seg.on { border: none; }
@media (max-width: 600px) { #band-meter { display: none; } }

/* ---------- Ham Tools ---------- */
dialog.pop-lookup { max-width: 460px; }
.lk-body { padding: 18px 22px 22px; }
.lk-body .pop-facts { gap: 6px 20px; font-size: 17px; margin-bottom: 0; }
.clock-label { font-size: 14px; color: #aab6c3; margin-right: 8px; }
.clock { font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 26px; letter-spacing: 0.03em; }
.clock-date { font-size: 14px; color: #aab6c3; margin-left: 8px; }
.lookup-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lookup-form input { width: 130px; font: inherit; font-family: Bitter, Georgia, serif; font-weight: 700; font-size: 18px; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 10px; border: none; border-radius: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab { font: inherit; font-weight: 700; font-size: 16px; padding: 7px 16px; border-radius: 999px; cursor: pointer; border: 2px solid #14243a; background: #ffffff; color: #14243a; }
.tab[aria-selected="true"] { background: #14243a; color: #ffffff; }
.cond-head { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: #f0b23c; margin-bottom: 4px; }
.cond-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.cond-row .cm-meter .seg { width: 16px; height: 8px; }
.cond-word { font-size: 13px; color: #c8d2dd; width: 30px; }
.cond-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.cond-stat { background: rgba(255,255,255,0.07); border-radius: 8px; padding: 8px 10px; }
.cond-stat span { display: block; font-size: 12px; color: #aab6c3; }
.cond-stat b { display: block; font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 20px; }
.priv-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid #e3e8ee; }
.priv-band { font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 17px; color: #14243a; }
.priv-segs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
.priv-seg { display: inline-flex; align-items: baseline; gap: 6px; }
.priv-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.priv-kind { color: #5b6673; }
.qbtn { font: inherit; font-size: 16px; text-align: left; width: 100%; padding: 8px 12px; border-radius: 10px; border: 2px solid #dfe5ec; background: #ffffff; cursor: pointer; color: #1f2933; }
.qbtn:hover { border-color: #14243a; }
.qbtn.right { border-color: #2f9e5b; background: #e8f6ee; }
.qbtn.wrong { border-color: #c0392b; background: #fbeaea; }
.qbtn b { margin-right: 8px; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.link-row { display: block; padding: 8px 0; border-top: 1px solid #e3e8ee; text-decoration: none; }
.link-title { display: block; font-weight: 700; font-size: 17px; color: #14243a; }
.link-sub { display: block; font-size: 14px; color: #5b6673; line-height: 1.35; }
@media (max-width: 700px) {
  .lookup-form { margin-left: 0 !important; }
  .link-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Buttons ---------- */
.pill-btn { font: inherit; font-weight: 700; font-size: 16px; color: #14243a; background: #f0b23c; border: none; border-radius: 999px; padding: 10px 20px; cursor: pointer; }
.amber-btn { font: inherit; font-weight: 700; font-size: 17px; color: #14243a; background: #f0b23c; border: none; border-radius: 8px; padding: 11px 24px; cursor: pointer; }
.amber-btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Pop-ups ---------- */
dialog.pop { width: calc(100% - 32px); max-width: 640px; padding: 0; border: none; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35); color: #1f2933; font-family: 'Source Sans 3', system-ui, sans-serif; font-size: 18px; line-height: 1.6; }
dialog.pop-small { max-width: 440px; }
dialog.pop::backdrop { background: rgba(10,20,34,0.6); }
.pop-photo { position: relative; aspect-ratio: 16 / 9; background: #0f1b2b; display: flex; align-items: center; justify-content: center; }
.pop-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pop-photo .sample-tag { top: 14px; left: 14px; }
.pop-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.12); color: #ffffff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pop-close.dark { background: #14243a; }
.pop-head { position: relative; background: #14243a; color: #ffffff; padding: 20px 72px 20px 24px; }
.pop-thumbs { display: flex; gap: 10px; padding: 12px 26px 0; }
.pop-thumbs:empty { display: none; }
.pop-thumbs button { width: 84px; height: 60px; padding: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: #0f1b2b; border: 3px solid transparent; }
.pop-thumbs button[aria-current="true"] { border-color: #f0b23c; }
.pop-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pop-body { padding: 22px 26px 26px; }
.pop-title { margin: 0; font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 30px; line-height: 1.15; color: #14243a; }
.pop-price { margin: 4px 0 14px; font-size: 22px; font-weight: 700; color: #14243a; }
.pop-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 16px; margin-bottom: 22px; }
.pop-facts > span:nth-child(odd) { color: #5b6673; }

/* ---------- Contact form ---------- */
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 22px 24px 24px; }
.contact-form .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 15px; color: #14243a; }
.field-label { font-weight: 600; font-size: 15px; color: #14243a; }
.field input, .field textarea, .field select { font: inherit; font-weight: 400; font-size: 16px; padding: 9px 12px; min-width: 0; border: 1px solid #c9d2dc; border-radius: 8px; background: #ffffff; color: #1f2933; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid #f0b23c; outline-offset: 1px; border-color: #14243a; }
.item-box { display: flex; flex-direction: column; gap: 5px; }
.item-text { font-size: 16px; padding: 9px 12px; border-radius: 8px; background: #f4f6f8; border: 1px solid #e3e8ee; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.form-status { margin: 0; font-size: 16px; min-height: 1.2em; }
.form-status.ok { color: #1d6b3f; font-weight: 700; }
.form-status.err { color: #a12a1f; font-weight: 700; }

/* ---------- Upcoming events: coming-up list and card dates ---------- */
.cu-month { padding: 14px 0 4px; font-family: Bitter, Georgia, serif; font-weight: 800; font-size: 17px; color: #14243a; border-bottom: 2px solid #14243a; }
.cu-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #e3e8ee; font-size: 15px; line-height: 1.35; color: #14243a; }
.cu-row .dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.cu-row .d { flex: 0 0 96px; font-weight: 700; }
.cu-row .t { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.cu-row.net { color: #5b6673; }
.cu-row.net .t { font-weight: 400; }
.cu-row.big { background: #fdf3dc; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.cu-row.big .t { font-weight: 800; }
.card-date { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.18); font-size: 16px; }
.card-date b { flex: 0 0 84px; font-family: Bitter, Georgia, serif; font-weight: 800; color: #f0b23c; }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  header h1 { font-size: 44px !important; }
  header p[style*="font-size: 46px"] { font-size: 32px !important; }
  header p { font-size: 18px !important; }
  main { padding-left: 16px !important; padding-right: 16px !important; }
  header nav, header > div { padding-left: 16px !important; padding-right: 16px !important; }
  .section-title { font-size: 32px; }
  main h2[style*="font-size: 52px"] { font-size: 38px !important; }
  article[id] > div { padding: 24px !important; max-width: none !important; }
  article#firehalls > div { padding-top: 160px !important; }
  article#emcomm > img { width: 40% !important; }
  .contact-form { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .pop-body { padding: 18px; }
}

/* Phones: darken the whole activity card so text stays readable over bright photos */
@media (max-width: 700px) {
  article[id]::before { content: ""; position: absolute; inset: 0; background: rgba(10,20,34,0.45); }
  article[id] > div, article[id] > img { position: relative; z-index: 1; }
  article[id] > img { position: absolute !important; }
}
