/* ==========================================================================
   MG Classics of Jacksonville — site chrome (header, footer, typography,
   background). Scoped as a Kadence child theme. Does not restyle individual
   page layouts (Events, Gallery, Join / Renew .mgc-jr, etc.).
   ========================================================================== */

:root {
  --mgc-brg: #0d2a22;
  --mgc-brg-deep: #081c17;
  --mgc-brg-mid: #164537;
  --mgc-brg-soft: #1e5a47;
  --mgc-cream: #f4efe4;
  --mgc-paper: #faf7f1;
  --mgc-ink: #1c1916;
  --mgc-ink-soft: #4a433b;
  --mgc-gold: #c4a46c;
  --mgc-gold-bright: #d8bd86;
  --mgc-line: rgba(196, 164, 108, 0.45);
  --mgc-serif: "Cormorant Garamond", "Times New Roman", serif;
  --mgc-sans: "Source Sans 3", "Segoe UI", sans-serif;

  /* Override Kadence CSS variables even before Customizer palette is updated. */
  --global-body-font-family: var(--mgc-sans);
  --global-heading-font-family: var(--mgc-serif);
  --global-primary-nav-font-family: var(--mgc-sans);
  --global-fallback-font: "Source Sans 3", sans-serif;
  --global-display-fallback-font: "Cormorant Garamond", serif;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
body.mgc-theme,
body.mgc-theme input,
body.mgc-theme select,
body.mgc-theme optgroup,
body.mgc-theme textarea {
  font-family: var(--mgc-sans);
  color: var(--mgc-ink);
}

body.mgc-theme h1,
body.mgc-theme h2,
body.mgc-theme h3,
body.mgc-theme h4,
body.mgc-theme h5,
body.mgc-theme h6,
body.mgc-theme .entry-hero h1,
body.mgc-theme .entry-title {
  font-family: var(--mgc-serif);
  font-weight: 600;
  color: var(--mgc-brg);
  line-height: 1.15;
}

body.mgc-theme a:where(:not(.button):not(.wp-block-button__link):not(.header-button)) {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* --------------------------------------------------------------------------
   Cream / green page background — replaces the tiled octagon wallpaper
   (uploads/2026/10/background2.jpg) and the tiled content background
   (uploads/2026/10/content-background.jpg). !important is required to beat
   Kadence's inline global CSS until those images are cleared in Customizer.
   -------------------------------------------------------------------------- */
html body.mgc-theme {
  background-color: var(--mgc-cream) !important;
  background-image:
    radial-gradient(1200px 520px at 50% -8%, rgba(13, 42, 34, 0.10), transparent 58%),
    linear-gradient(180deg, #f4efe4 0%, #faf7f1 42%, #eef3ee 100%) !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: auto, auto !important;
  background-attachment: scroll !important;
  color: var(--mgc-ink);
}

body.mgc-theme .content-bg,
body.mgc-theme.content-style-unboxed .site,
body.mgc-theme.content-style-boxed .content-bg,
body.mgc-theme.content-style-boxed .entry-content-wrap,
body.mgc-theme .entry.single-entry,
body.mgc-theme .entry.loop-entry {
  background-color: var(--mgc-paper) !important;
  background-image: none !important;
}

body.mgc-theme.content-style-boxed .entry.single-entry,
body.mgc-theme.content-style-boxed .entry.loop-entry {
  box-shadow: 0 18px 50px rgba(8, 28, 23, 0.08);
  border: 1px solid rgba(28, 25, 22, 0.06);
}

body.mgc-theme .content-area {
  margin-top: 2.25rem;
  margin-bottom: 2.25rem;
}

/* --------------------------------------------------------------------------
   Option A cream masthead (injected by functions.php). Scrolls away.
   -------------------------------------------------------------------------- */
.mgc-masthead {
  position: relative;
  background: var(--mgc-cream);
  padding: 2rem 0 1.35rem;
  z-index: 30;
}

/* No rule across the top: it ran through the logo. */
.mgc-masthead::before { display: none; }

.mgc-masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  pointer-events: none;
  background:
    linear-gradient(var(--mgc-brg), var(--mgc-brg)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--mgc-gold), var(--mgc-gold)) 0 3px / 100% 1px no-repeat;
}

.mgc-masthead::after {
  top: auto;
  bottom: 0;
  background:
    linear-gradient(var(--mgc-gold), var(--mgc-gold)) 0 1px / 100% 1px no-repeat,
    linear-gradient(var(--mgc-brg), var(--mgc-brg)) 0 3px / 100% 2px no-repeat;
}

.mgc-masthead-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
}

.mgc-mast-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.mgc-mast-brand img,
.mgc-mast-logo {
  width: 108px;
  height: 108px;
  max-width: 108px !important;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(8, 28, 23, 0.12));
}

.mgc-mast-names {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.mgc-mast-names strong {
  font-family: var(--mgc-serif);
  font-size: 2.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mgc-brg);
}

.mgc-mast-names em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mgc-ink-soft);
}

.mgc-mast-tagline {
  margin: 0.15rem 0 0;
  font-family: var(--mgc-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--mgc-brg-mid);
}

.mgc-mast-tagline::before,
.mgc-mast-tagline::after {
  content: " — ";
  color: var(--mgc-gold);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Sticky racing-green Kadence nav (header builder Main row)
   -------------------------------------------------------------------------- */
body.mgc-theme #masthead,
body.mgc-theme #masthead .site-header-row-container-inner,
body.mgc-theme #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container):not(.site-main-header-wrap),
body.mgc-theme #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) > .site-header-row-container-inner,
body.mgc-theme #mobile-header,
body.mgc-theme #mobile-header .site-header-row-container-inner {
  background: var(--mgc-brg) !important;
}

body.mgc-theme #masthead,
body.mgc-theme #mobile-header {
  border-bottom: 1px solid rgba(196, 164, 108, 0.45);
  box-shadow: 0 8px 24px rgba(8, 28, 23, 0.18);
}

body.mgc-theme .site-main-header-inner-wrap {
  min-height: 52px;
}

body.mgc-theme #masthead .site-branding a.brand img,
body.mgc-theme #mobile-header .site-branding a.brand img {
  max-width: 30px !important;
  width: 30px;
  height: auto;
}

body.mgc-theme #masthead .site-branding .site-title,
body.mgc-theme #masthead .site-branding .site-title a,
body.mgc-theme #mobile-header .site-branding .site-title,
body.mgc-theme #mobile-header .site-branding .site-title a,
body.mgc-theme #mobile-header .site-branding .site-title.vs-md-false {
  font-family: var(--mgc-serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: var(--mgc-cream) !important;
  line-height: 1.1;
}

/* Tagline lives in the masthead; hide the duplicate in the slim nav bar. */
body.mgc-theme #masthead .site-branding .site-description,
body.mgc-theme #mobile-header .site-branding .site-description {
  display: none !important;
}

body.mgc-theme .main-navigation .primary-menu-container > ul > li.menu-item > a {
  font-family: var(--mgc-sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(244, 239, 228, 0.92) !important;
}

body.mgc-theme .main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
body.mgc-theme .main-navigation .primary-menu-container > ul > li.menu-item > a:focus {
  color: var(--mgc-gold-bright) !important;
}

body.mgc-theme .main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > a,
body.mgc-theme .main-navigation .primary-menu-container > ul > li.menu-item.current-menu-ancestor > a {
  color: var(--mgc-gold-bright) !important;
  box-shadow: inset 0 -2px 0 var(--mgc-gold);
}

body.mgc-theme .main-navigation .dropdown-nav-toggle,
body.mgc-theme .main-navigation .kadence-svg-icon {
  color: inherit;
}

/* Dropdowns */
body.mgc-theme .header-navigation .header-menu-container ul ul.sub-menu,
body.mgc-theme .header-navigation .header-menu-container ul ul.submenu {
  background: var(--mgc-brg-deep) !important;
  border: 1px solid rgba(196, 164, 108, 0.28);
  box-shadow: 0 12px 28px rgba(8, 28, 23, 0.28);
}

body.mgc-theme .header-navigation .header-menu-container ul ul li.menu-item > a {
  color: var(--mgc-cream) !important;
  font-size: 0.85rem;
}

body.mgc-theme .header-navigation .header-menu-container ul ul li.menu-item > a:hover,
body.mgc-theme .header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > a {
  color: var(--mgc-brg-deep) !important;
  background: var(--mgc-gold) !important;
}

/* Header / mobile "Join the Club" button (Kadence Header Button item) */
body.mgc-theme .header-button,
body.mgc-theme a.button.header-button,
body.mgc-theme .mobile-header-button-wrap .button,
body.mgc-theme .header-button-wrap .button {
  background: var(--mgc-gold) !important;
  color: var(--mgc-brg-deep) !important;
  border: 0 !important;
  border-radius: 2px !important;
  padding: 0.5rem 0.95rem !important;
  font-family: var(--mgc-sans) !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

body.mgc-theme .header-button:hover,
body.mgc-theme a.button.header-button:hover,
body.mgc-theme .mobile-header-button-wrap .button:hover,
body.mgc-theme .header-button-wrap .button:hover {
  background: var(--mgc-gold-bright) !important;
  color: var(--mgc-brg-deep) !important;
}

/* Mobile hamburger */
body.mgc-theme .mobile-toggle-open-container .menu-toggle-open,
body.mgc-theme .mobile-toggle-open-container .menu-toggle-open:focus {
  color: var(--mgc-cream) !important;
}

body.mgc-theme .mobile-toggle-open-container .menu-toggle-open:hover,
body.mgc-theme .mobile-toggle-open-container .menu-toggle-open:focus-visible {
  color: var(--mgc-gold-bright) !important;
}

/* Off-canvas drawer */
body.mgc-theme #mobile-drawer,
body.mgc-theme #mobile-drawer .drawer-inner,
body.mgc-theme #mobile-drawer .drawer-header {
  background: var(--mgc-brg-deep) !important;
  color: var(--mgc-cream);
}

body.mgc-theme #mobile-drawer .drawer-header .drawer-toggle,
body.mgc-theme .mobile-navigation ul li > a,
body.mgc-theme .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap {
  color: var(--mgc-cream) !important;
}

body.mgc-theme .mobile-navigation ul li.current-menu-item > a,
body.mgc-theme .mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap {
  color: var(--mgc-gold-bright) !important;
}

body.mgc-theme .mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap,
body.mgc-theme .mobile-navigation ul li:not(.menu-item-has-children) a {
  border-bottom-color: rgba(196, 164, 108, 0.22) !important;
}

/* --------------------------------------------------------------------------
   Footer + odometer (styles the existing SRS Simple Hits Counter markup)
   -------------------------------------------------------------------------- */
body.mgc-theme #colophon,
body.mgc-theme #colophon .site-footer-row-container-inner,
body.mgc-theme #colophon .site-bottom-footer-wrap .site-footer-row-container-inner,
body.mgc-theme #colophon .site-middle-footer-wrap .site-footer-row-container-inner,
body.mgc-theme #colophon .site-top-footer-wrap .site-footer-row-container-inner {
  background: var(--mgc-brg-deep) !important;
  color: rgba(244, 239, 228, 0.82);
}

body.mgc-theme #colophon .footer-html,
body.mgc-theme #colophon .footer-html a,
body.mgc-theme #colophon .site-footer-section a,
body.mgc-theme #colophon .widget a {
  color: rgba(244, 239, 228, 0.82);
}

body.mgc-theme #colophon a:hover {
  color: var(--mgc-cream);
}

body.mgc-theme #colophon .site-bottom-footer-inner-wrap {
  padding-top: 2.4rem;
  padding-bottom: 1.6rem;
}

/* Rich footer markup pasted into Footer HTML (see footer-html.html). */
.mgc-footer {
  color: rgba(244, 239, 228, 0.82);
  text-align: left;
}

.mgc-foot-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(196, 164, 108, 0.22);
}

.mgc-foot-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.85rem;
}

.mgc-foot-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.mgc-foot-brand strong {
  display: block;
  font-family: var(--mgc-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mgc-cream);
  line-height: 1.05;
}

.mgc-foot-brand span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.65);
  font-weight: 600;
}

.mgc-foot-blurb {
  margin: 0;
  max-width: 16rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.mgc-footer h4 {
  font-family: var(--mgc-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mgc-gold);
  margin: 0 0 0.85rem;
}

.mgc-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mgc-footer li {
  margin: 0.32rem 0;
}

.mgc-footer a {
  text-decoration: none;
  font-size: 0.95rem;
}

.mgc-affiliates {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mgc-affiliates a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.mgc-foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.3rem;
  font-size: 0.85rem;
  color: rgba(244, 239, 228, 0.55);
}

/* Visitor registry panel: heading + rule, labels left, counters right,
   both counter boxes the same width so the rows line up. */
.mgc-odo {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 1.6rem;
  row-gap: 0.6rem;
  align-items: center;
  min-width: 17rem;
}

.mgc-odo-title {
  grid-column: 1 / -1;
  font-family: var(--mgc-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mgc-gold);
  padding-bottom: 0.45rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid rgba(196, 164, 108, 0.55);
  text-align: left;
}

.mgc-odo-primary,
.mgc-odo-secondary {
  display: contents;
}

.mgc-odo-label,
#colophon .footer-html-inner > p:has(.srs-meter-counter) {
  font-family: var(--mgc-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4efe4;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.mgc-odo > div > :not(.mgc-odo-label),
#colophon .mgc-odo .srs-meter-counter {
  justify-self: end;
}

/* SRS Simple Hits Counter — restyle plugin markup (and its inline styles)
   as the approved odometer. Do not replace the shortcode or plugin. */
#colophon .srs-meter-counter,
#colophon .visitors.srs-meter-counter,
#colophon .page-views.srs-meter-counter {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 4px 6px !important;
  width: auto !important;
  min-width: 7.6rem !important;
  justify-content: flex-end !important;
  background: linear-gradient(180deg, #0a1814, #050f0c) !important;
  border: 1px solid rgba(196, 164, 108, 0.5) !important;
  border-radius: 2px !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(8, 28, 23, 0.4) !important;
  writing-mode: horizontal-tb !important;
}

#colophon .srs-meter-counter .srs-meter-digit {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.15rem !important;
  height: 1.45rem !important;
  overflow: hidden;
  border-radius: 1px !important;
  background:
    linear-gradient(
      180deg,
      #2a3f38 0%,
      #152420 46%,
      #0a1411 50%,
      #1a2c26 54%,
      #101c19 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45) !important;
}

#colophon .srs-meter-counter .srs-meter-digit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

#colophon .srs-meter-counter .srs-meter-digit span {
  position: relative;
  z-index: 1;
  font-family: var(--mgc-sans) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700 !important;
  font-size: 0.98rem !important;
  font-style: normal !important;
  line-height: 1 !important;
  color: #f3e6c4 !important;
  text-shadow: none !important;
}

/* Unwrap the plugin's full-width centering wrappers inside our bottom bar. */
#colophon .mgc-odo .srs-meter-counter,
#colophon .mgc-foot-bottom [style*="display:block"] {
  /* keep digits in the flow next to the label */
}

#colophon .mgc-odo [style*="display:block"][style*="width:100%"] {
  display: inline-flex !important;
  width: auto !important;
  text-align: inherit !important;
}

/* Fallback when the new footer HTML has not been pasted yet: the live
   Footer HTML is a copyright line plus "Unique Visitors :" and
   "Total Page-views:" around the shortcodes. */
#colophon .footer-html-inner > p {
  margin: 0.35rem 0;
}

/* --------------------------------------------------------------------------
   Buttons & scroll-to-top (global, after palette update; CSS as backup)
   -------------------------------------------------------------------------- */
body.mgc-theme .wp-block-button__link,
body.mgc-theme input[type="submit"],
body.mgc-theme #kt-scroll-up,
body.mgc-theme #kt-scroll-up-reader {
  border-radius: 2px;
}

body.mgc-theme #kt-scroll-up,
body.mgc-theme #kt-scroll-up-reader {
  background: var(--mgc-brg);
  color: var(--mgc-cream);
  border-color: var(--mgc-gold);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .mgc-masthead {
    padding: 1.1rem 0 1rem;
  }

  .mgc-masthead-inner {
    width: min(1180px, calc(100% - 32px));
  }

  .mgc-mast-brand img,
  .mgc-mast-logo {
    width: 78px;
    height: 78px;
    max-width: 78px !important;
  }

  .mgc-mast-names strong {
    font-size: 1.55rem;
    letter-spacing: 0.1em;
  }

  .mgc-mast-tagline {
    font-size: 0.95rem;
  }

  .mgc-foot-top,
  .mgc-foot-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    text-align: center;
  }

  .mgc-foot-brand {
    justify-content: center;
  }

  .mgc-foot-blurb {
    max-width: none;
  }

  .mgc-affiliates {
    align-items: center;
  }

  .mgc-foot-bottom {
    gap: 0.85rem;
  }
}

@media (max-width: 700px) {
  body.mgc-theme #masthead .site-branding .site-title,
  body.mgc-theme #mobile-header .site-branding .site-title {
    font-size: 0.92rem;
  }
}

/* Footer HTML auto-paragraphing adds <br> after labels; drop them so each
   label + counter pair stays one grid row. Right-align the plugin's
   full-width centred wrapper so both counter boxes share a right edge. */
.mgc-odo br { display: none !important; }
#colophon .mgc-odo [style*="display:block"][style*="width:100%"] {
  display: block !important;
  width: auto !important;
  text-align: right !important;
  justify-self: end;
}
#colophon .mgc-odo p { margin: 0 !important; display: contents; }


/* Affiliates: auto-paragraphing adds <br>/<p>; keep the list tight. */
.mgc-affiliates br { display: none !important; }
.mgc-affiliates p { margin: 0 !important; display: contents; }
.mgc-footer ul br { display: none !important; }
