/* ==============================================================
   249 SIGNAL SQUADRON - SHARED WEBSITE STYLES
   Place at: /249/css/249-style.css
   Include in each converted PHP page:
   <link rel="stylesheet" href="/249/css/249-style.css">

   All classes begin with sqn- so older pages stay untouched until
   intentionally converted. Individual page backgrounds remain separate.
   ============================================================== */
:root {
  --sqn-blue: #035e96;
  --sqn-blue-hover: #0074a9;
  --sqn-green: #00995a;
  --sqn-card-bg: rgba(220, 240, 250, 0.87);
  --sqn-card-heading: rgba(3, 94, 150, 0.83);
  --sqn-highlight: #ffe15b;
  --sqn-text: #141414;
}

/* Headings: bold black with white glow */
.sqn-title, .sqn-subtitle, .sqn-section-title {
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-shadow: 1px 1px 3px #fff, -1px -1px 3px #fff, 0 0 6px #fff;
}
.sqn-title { font-size: 23px; margin: 4px 0 10px; }
.sqn-subtitle { font-size: 15px; margin: 0 0 12px; }
.sqn-section-title { font-size: 19px; margin: 10px 0 12px; }

/* Standard four-column rows - matching card heights */
.sqn-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
/* Use sqn-card-grid--centred for short upcoming-reunion groups */
.sqn-card-grid--centred {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}
.sqn-card-grid--centred > .sqn-card {
  flex: 0 1 calc((100% - 42px) / 4);
  min-width: 0;
}
.sqn-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--sqn-green);
  border-radius: 10px;
  background: var(--sqn-card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.sqn-card-heading {
  background: var(--sqn-card-heading);
  color: #fff;
  text-shadow: 1px 1px 2px #111;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 11px;
  overflow-wrap: anywhere;
}
.sqn-card-content { padding: 11px; display: flex; flex: 1; flex-direction: column; min-width: 0; }
.sqn-card-footer { margin-top: auto; padding-top: 8px; font-size: 12px; }
.sqn-edit-link { color: #064c77; font-size: 11px; text-decoration: underline; }

/* On save: colour the ENTIRE card yellow then fade to normal. */
.sqn-card.sqn-just-saved {
  animation: sqn-card-save-fade 5s ease-out forwards;
}
@keyframes sqn-card-save-fade {
  0%, 20% { background-color: var(--sqn-highlight); box-shadow: 0 0 0 4px var(--sqn-highlight); }
  100% { background-color: var(--sqn-card-bg); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
}

/* Standard actions and forms */
.sqn-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.sqn-toolbar .sqn-add-button { margin-left: auto; }
.sqn-button, .sqn-cancel-button {
  display: inline-block;
  background: var(--sqn-blue);
  color: #fff;
  border: 1px solid #fff;
  border-radius: 5px;
  font: bold 13px Arial, Helvetica, sans-serif;
  padding: 9px 12px;
  text-decoration: none;
  cursor: pointer;
}
.sqn-button:hover, .sqn-cancel-button:hover { background: var(--sqn-blue-hover); }
.sqn-delete-button { background: #a02a2a; }
.sqn-delete-button:hover { background: #842020; }
.sqn-editor {
  max-width: 860px;
  margin: 0 0 18px;
  padding: 15px;
  background: rgba(220, 240, 250, .97);
  border: 2px solid var(--sqn-green);
  border-radius: 9px;
}
.sqn-editor h2 { margin: 0 0 12px; font-size: 18px; }
.sqn-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sqn-field { display: block; font: bold 13px Arial, Helvetica, sans-serif; }
.sqn-field input, .sqn-field select, .sqn-field textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #8ca8b7;
  border-radius: 4px;
  font: 14px Arial, Helvetica, sans-serif;
}
.sqn-field textarea { min-height: 150px; resize: vertical; }
.sqn-field--wide { grid-column: 1 / -1; }
.sqn-form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.sqn-form-actions .sqn-delete-button { margin-left: auto; }

/* Floating Top button: consistent location in every converted page.
   Keep the page's existing scroll-show JavaScript or use the example below.
   <button id="sqnTopButton" class="sqn-top-button" type="button"
           onclick="window.scrollTo({top:0,behavior:'smooth'})">Top</button>
*/
.sqn-top-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  padding: 10px 14px;
  border: 0;
  border-radius: 5px;
  background: var(--sqn-blue);
  color: white;
  font: bold 14px Arial, Helvetica, sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 7px rgba(0,0,0,.35);
}
.sqn-top-button:hover { background: var(--sqn-blue-hover); }
html { scroll-padding-top: 90px; }

@media (max-width: 1130px) {
  .sqn-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sqn-card-grid--centred > .sqn-card { flex-basis: calc((100% - 28px) / 3); }
}
@media (max-width: 830px) {
  .sqn-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sqn-card-grid--centred > .sqn-card { flex-basis: calc((100% - 14px) / 2); }
}
@media (max-width: 560px) {
  .sqn-title { font-size: 20px; }
  .sqn-card-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .sqn-card-grid--centred > .sqn-card { flex-basis: 100%; }
  .sqn-form-grid { grid-template-columns: minmax(0, 1fr); }
  .sqn-top-button { right: 12px; bottom: 15px; }
}
