/* ============================================================
   racehorsetrainer.com.au — modern overlay stylesheet (2026)
   Layered over the original 2007 layout; scoped so legacy
   structure keeps working. Relative-path friendly.
   ============================================================ */

:root {
  --rht-ink: #1a2332;
  --rht-ink-soft: #4a5568;
  --rht-paper: #f6f7f9;
  --rht-card: #ffffff;
  --rht-line: #e2e8f0;
  --rht-brand: #0e5c3f;       /* racing green */
  --rht-brand-dark: #093d2a;
  --rht-accent: #c9a227;      /* racing gold */
  --rht-link: #0b6bcb;
  --rht-radius: 10px;
  --rht-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 14px rgba(16, 24, 40, .06);
  --rht-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  font-family: var(--rht-font) !important;
  color: var(--rht-ink);
  background: var(--rht-paper) !important;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- centred 700px-era tables become fluid cards ---- */
body > div[align="center"],
table[width="700"] {
  max-width: 1060px;
  margin-left: auto !important;
  margin-right: auto !important;
}

table[border="1"] {
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* generic content tables: soften */
#content table, table[width="700"] table {
  background: transparent;
}

td, th { vertical-align: top; }

/* images never overflow their container */
img {
  max-width: 100%;
  height: auto;
}

/* ---- typography ---- */
h1, .style1 {
  font-family: var(--rht-font) !important;
  letter-spacing: .01em;
}

#masthead h1, h1.style1, body > div h1 {
  color: var(--rht-brand-dark);
}

h1 { font-size: 1.9rem; line-height: 1.25; margin: .6em 0 .35em; }
h2 { font-size: 1.45rem; line-height: 1.3; color: var(--rht-brand); margin: .9em 0 .35em; }
h3 { font-size: 1.15rem; color: var(--rht-ink); }

p { margin: .5em 0; }

a {
  color: var(--rht-link);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--rht-line);
  margin: 1.2em 0;
}

strong { color: inherit; }

/* ---- masthead / page identity ---- */
#masthead {
  background: linear-gradient(135deg, var(--rht-brand-dark), var(--rht-brand));
  border-radius: var(--rht-radius);
  padding: 1.1rem 1.4rem;
  margin: .8rem 0 1rem;
  box-shadow: var(--rht-shadow);
}
#masthead h1, #masthead .style1, #masthead a {
  color: #fff !important;
  margin: 0;
}
#masthead p { color: #d7e8df; }
#masthead strong { color: #fff; }
#masthead img { border-radius: 6px; }

#pageName, #pageName h2 { color: var(--rht-brand); }

/* ---- content region ---- */
#content {
  background: var(--rht-card);
  border: 1px solid var(--rht-line);
  border-radius: var(--rht-radius);
  box-shadow: var(--rht-shadow);
  padding: 1.2rem 1.5rem;
}

#content p { color: var(--rht-ink-soft); }
#content strong, #content b { color: var(--rht-ink); }

/* trainer photo blocks */
#content img, #content table img {
  border-radius: 8px;
  box-shadow: var(--rht-shadow);
}

/* ---- navigation (old sectionLinks list) ---- */
#navBar { margin-top: 1rem; }

#sectionLinks ul {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
#sectionLinks li { margin: 0; }
#sectionLinks a {
  display: inline-block;
  background: var(--rht-card);
  border: 1px solid var(--rht-line);
  border-radius: 999px;
  padding: .42rem 1rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--rht-brand);
  box-shadow: var(--rht-shadow);
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
#sectionLinks a:hover, #sectionLinks a:focus {
  background: var(--rht-brand);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---- footer / siteInfo ---- */
#siteInfo {
  margin-top: 1.4rem;
  padding: .9rem 1.2rem;
  background: var(--rht-ink);
  color: #cbd5e1;
  border-radius: var(--rht-radius);
  font-size: .85rem;
}
#siteInfo a { color: #f1d688; }
#siteInfo div[align] { text-align: center; }

/* ---- forms ---- */
input[type="text"], input[type="search"] {
  font: inherit;
  padding: .45rem .7rem;
  border: 1px solid var(--rht-line);
  border-radius: 8px;
  background: #fff;
  color: var(--rht-ink);
}
input[type="submit"], input[type="button"], button {
  font: inherit;
  font-weight: 600;
  background: var(--rht-brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .5rem 1.2rem;
  cursor: pointer;
  transition: background .15s ease;
}
input[type="submit"]:hover, button:hover { background: var(--rht-brand-dark); }

/* ============================================================
   Components injected by rht-modern.js
   ============================================================ */

/* screen-reader-only (SEO h1 on pages whose design is banner-only) */
.rht-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* sticky modern header bar (injected) */
.rht-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(9, 61, 42, .97);
  color: #fff;
  padding: .55rem 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.rht-topbar .rht-brand {
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  letter-spacing: .02em;
  white-space: nowrap;
}
.rht-topbar .rht-brand:hover { text-decoration: none; }
.rht-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .6rem;
  margin-left: auto;
}
.rht-topbar nav a {
  color: #d7e8df;
  font-size: .88rem;
  font-weight: 600;
  padding: .15rem .2rem;
}
.rht-topbar nav a:hover, .rht-topbar nav a:focus { color: #fff; text-decoration: none; }

.rht-topbar .rht-navtoggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  padding: .35rem .6rem;
}

/* modal */
.rht-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 15, 25, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity .18s ease;
}
.rht-modal-overlay.rht-open { opacity: 1; }
.rht-modal {
  background: var(--rht-card);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  max-width: min(92vw, 720px);
  max-height: 88vh;
  overflow: auto;
  padding: 1.3rem 1.5rem 1.5rem;
  transform: translateY(8px) scale(.985);
  transition: transform .18s ease;
}
.rht-modal-overlay.rht-open .rht-modal { transform: none; }
.rht-modal h2 { margin-top: 0; }
.rht-modal-close {
  float: right;
  background: var(--rht-paper);
  color: var(--rht-ink-soft);
  border: 1px solid var(--rht-line);
  border-radius: 8px;
  font-size: 1.15rem;
  line-height: 1;
  padding: .3rem .65rem;
}
.rht-modal-close:hover { background: var(--rht-line); color: var(--rht-ink); }

/* lightbox figure */
.rht-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  margin: 0 auto .6rem;
  border-radius: 8px;
}
.rht-lightbox-cap {
  text-align: center;
  color: var(--rht-ink-soft);
  font-size: .95rem;
}

/* back-to-top */
.rht-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  border-radius: 999px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  font-size: 1.15rem;
  box-shadow: var(--rht-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.rht-to-top.rht-show { opacity: 1; pointer-events: auto; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  #sectionLinks ul { gap: .35rem; }
  #sectionLinks a { padding: .35rem .8rem; font-size: .85rem; }
  #content { padding: .9rem 1rem; }
  .rht-topbar { flex-wrap: wrap; }
  .rht-topbar nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: .4rem 0 .6rem;
  }
  .rht-topbar nav.rht-open { display: flex; }
  .rht-topbar .rht-navtoggle { display: block; }
  table, tbody, tr, td { display: block; width: 100% !important; }
  td { padding: .35rem 0; }
}
