/* =========================================================================
   N-Georgia.com — modern responsive site stylesheet
   Replaces the legacy 1999-era table layout. Loaded once, site-wide.
   ========================================================================= */

:root {
  --color-primary: #1b5e3a;
  --color-primary-dark: #0f3d26;
  --color-primary-light: #e8f3ec;
  --color-accent: #c9791f;
  --color-accent-dark: #a35f14;
  --color-bg: #f7f5ee;
  --color-surface: #ffffff;
  --color-text: #212a22;
  --color-text-muted: #5c6a5e;
  --color-border: #e1ddce;
  --color-link: #175c37;
  --color-link-visited: #14472b;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 30, 20, 0.10);
  --header-h: 64px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Poppins", var(--font-body);
  --max-width: 1360px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg) !important;
  background-image: none !important;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
svg { max-width: 100%; }
iframe {
  max-width: 100%;
  border: 0;
}
iframe[src*="youtube"], iframe[src*="youtu.be"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin: 1.2em 0 0.5em;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-top: 0; }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--color-link); text-decoration: underline; text-decoration-color: rgba(23,92,55,0.35); text-underline-offset: 2px; }
a:visited { color: var(--color-link-visited); }
a:hover { color: var(--color-accent-dark); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Neutralize legacy presentational HTML attributes site-wide (these are
   lower-priority "presentation hints" per the HTML spec, so plain type/attr
   selectors here safely override old bgcolor="" / background="" / width=""
   markup without touching a single byte of the original page content). */
[bgcolor] { background-color: transparent !important; }
[background] { background-image: none !important; }
table[width], td[width], th[width] { width: auto !important; }
table { max-width: 100%; }

/* Legacy inline font-color utility classes used throughout page content —
   redefined here so old markup renders with the new palette/type scale
   instead of 1999 blues-on-cream, with zero HTML changes required. */
.body-text, body, td, th { color: var(--color-text); font-family: var(--font-body); font-size: 1rem; }
.blue-bold, .bold-dark-blue, .blue-bold-text {
  font-family: var(--font-body); font-weight: 700; color: var(--color-primary-dark); font-size: 1rem;
}
.green-bold, .green-bold-heading {
  font-family: var(--font-head); font-weight: 600; color: var(--color-primary); font-size: 1.05rem;
}
.red-head, .red-bold { font-family: var(--font-head); font-weight: 700; font-style: normal; color: var(--color-accent-dark); }
.text-links, .text-links1, .text-links11, .text-links2 {
  font-family: var(--font-body); font-weight: 600; color: var(--color-link); text-decoration: underline;
}
.Lite-Yellow-Top, .Top-White-Header { color: #fff; font-family: var(--font-head); }
.style1 { font-size: 1.05rem; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--color-primary-dark); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.site-header__bar {
  position: relative; /* anchors .site-search-panel's top:100%/right:1rem */
  max-width: var(--max-width); margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 1rem; min-height: var(--header-h);
}
.site-header__brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; flex-shrink: 0; }
.site-header__brand img { height: 46px; width: auto; border-radius: var(--radius-sm); }
.site-header__brand-text { font-family: var(--font-head); line-height: 1.1; }
.site-header__brand-text strong { display: block; font-size: 1.15rem; color: var(--color-primary-dark); }
.site-header__brand-text span { display: block; font-size: .72rem; color: var(--color-text-muted); font-weight: 500; }

.search-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface); cursor: pointer;
  padding: 0;
}
.search-toggle { margin-left: auto; }
.nav-toggle { display: none; }
.search-toggle svg, .nav-toggle svg { flex-shrink: 0; width: 20px; height: 20px; stroke: var(--color-primary-dark); }

@media (max-width: 420px) {
  .site-header__brand-text span { display: none; }
}

/* ---------- Site search (Google Programmable Search) ---------- */
.site-search-panel {
  position: absolute; right: 1rem; top: 100%; margin-top: 8px;
  width: min(420px, calc(100vw - 2rem)); z-index: 200;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: .9rem;
}
.site-search-panel[hidden] { display: none; }
.site-search-panel .gsc-control-cse { padding: 0 !important; border: 0 !important; background: transparent !important; font-family: var(--font-body) !important; }
.site-search-panel table.gsc-search-box { margin-bottom: 0 !important; }
.site-search-panel .gsc-input-box { border-radius: var(--radius-sm) !important; }
.site-search-panel .gsc-search-button-v2 {
  background-color: var(--color-primary) !important; border-color: var(--color-primary) !important;
  border-radius: var(--radius-sm) !important; padding: 9px 14px !important;
}
.site-search-panel .gsc-search-button-v2:hover { background-color: var(--color-primary-dark) !important; }

.search-results-card .gsc-control-cse { font-family: var(--font-body) !important; border: 0 !important; padding: 0 !important; }
.search-results-card .gsc-search-button-v2 { background-color: var(--color-primary) !important; border-color: var(--color-primary) !important; }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1rem; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: .45rem .55rem; border-radius: var(--radius-sm);
  color: var(--color-text); font-weight: 600; font-size: .82rem; text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover, .primary-nav a:focus-visible { background: var(--color-primary-light); color: var(--color-primary-dark); }

@media (max-width: 1150px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    order: 10; flex-basis: 100%; margin-left: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .primary-nav.is-open { max-height: 600px; }
  .primary-nav ul { flex-direction: column; padding: .5rem 0; border-top: 1px solid var(--color-border); }
}

/* ---------- Page hero (per-page H1 banner) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
}
.page-hero__inner { max-width: var(--max-width); margin: 0 auto; padding: 1.4rem 1rem; }
.page-hero h1 { color: #fff; margin: 0; }
.breadcrumb { font-size: .8rem; opacity: .85; margin-bottom: .35rem; }
.breadcrumb a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }

/* ---------- Layout grid ---------- */
.layout {
  max-width: var(--max-width); margin: 0 auto; padding: 1.25rem 1rem 2.5rem;
  display: grid; gap: 1.5rem;
  grid-template-columns: 230px minmax(0, 1fr) 260px;
  align-items: start;
}
@media (max-width: 1180px) {
  .layout { grid-template-columns: 210px minmax(0, 1fr); }
  .page-aside { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; padding-top: 1rem; }
}

/* ---------- Sidebar nav (left) ---------- */
.sidebar-nav {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: .9rem; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
.sidebar-nav summary {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted);
  margin: 0 0 .5rem; cursor: default; list-style: none;
}
.sidebar-nav summary::-webkit-details-marker { display: none; }
.sidebar-nav summary::marker { content: ""; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav a {
  display: block; padding: .4rem .5rem; border-radius: var(--radius-sm);
  color: var(--color-text); text-decoration: none; font-size: .89rem; font-weight: 500;
}
.sidebar-nav a:hover, .sidebar-nav a:focus-visible { background: var(--color-primary-light); color: var(--color-primary-dark); }

@media (max-width: 780px) {
  .sidebar-nav { position: static; max-height: none; }
  .sidebar-nav summary {
    cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--color-primary-dark);
    font-size: .95rem; text-transform: none; letter-spacing: normal;
    display: flex; align-items: center; justify-content: space-between; margin: 0;
  }
  .sidebar-nav summary::after { content: "+"; font-size: 1.2rem; }
  .sidebar-nav[open] summary::after { content: "\2212"; }
  .sidebar-nav nav { margin-top: .6rem; }
}

/* ---------- Main content ---------- */
.content {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); min-width: 0; overflow-wrap: break-word;
}
/* The legacy markup uses <table> purely for 1999-era visual striping, not
   real tabular data (almost every row is a single full-width cell). CSS
   table auto-layout tries to grow a table to fit its widest unbroken run
   of text, which on a narrow phone screen can blow straight past the
   container - and table-layout:fixed instead miscounts columns wherever
   a later row uses colspan. Simplest robust fix: stop laying these out as
   tables at all and render every table/row/cell as a plain block, which
   can never overflow its parent and wraps text exactly like a paragraph. */
.content table, .content tbody, .content thead, .content tr,
.page-aside table, .page-aside tbody, .page-aside thead, .page-aside tr {
  display: block; width: auto !important;
}
.content [height], .page-aside [height] {
  height: auto !important; min-height: 0 !important; /* legacy height="54"
    attributes were harmless row-height hints in real table layout, where a
    row always grows to fit its content regardless; as a block box that
    same attribute becomes a hard cap and content silently overflows on
    top of the next row, so it must be neutralized here */
}
.content td, .content th, .page-aside td, .page-aside th {
  display: block; width: auto !important; max-width: 100%;
  padding: .55rem .6rem; vertical-align: top; border-bottom: 1px solid var(--color-border);
  overflow-wrap: anywhere; word-break: break-word;
  clear: both; /* each legacy "row" cell used to be isolated by real table
    layout; now that it's a block, clear any float (e.g. a left-aligned
    photo) left running by a previous row so rows can't overlap it */
}
.content table table, .page-aside table table { border: 0; margin: 0; }
.content table table td, .page-aside table table td { border: 0; padding: .3rem 0; }
.content ul, .content ol { padding-left: 1.3rem; }
.content li { margin-bottom: .4rem; }
.content img { border-radius: var(--radius-sm); }

/* Legacy content images use align="left"/"right" (mapped to CSS float) to
   wrap body copy beside a fixed-size photo. That reads fine at desktop
   widths but leaves no room for text once the column narrows, so drop the
   float below ~700px and let images stack above their paragraph. */
@media (max-width: 700px) {
  .content img { float: none !important; display: block; margin: 0 0 1rem !important; }
}

/* ---------- Page-specific right aside ---------- */
.page-aside {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow-sm); font-size: .92rem;
}
.page-aside h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); margin-top: 0; }

/* ---------- Ad slots ---------- */
.ad-slot { margin: 1.4rem auto; text-align: center; overflow-x: auto; }
.ad-slot__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted);
  margin: 0 0 .35rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: #eaf2ec; margin-top: 2rem; }
.site-footer__inner { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem 1.4rem; }
.site-footer nav ul {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .3rem 1rem;
}
.site-footer a { color: #dcecdf; font-size: .85rem; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__meta { font-size: .78rem; color: #a9c2ae; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; }

/* ---------- Misc ---------- */
.social-links { display: flex; gap: .6rem; align-items: center; margin: .75rem 0; }
.social-links img { height: 30px; width: auto; border-radius: var(--radius-sm); }
