/*
Theme Name: Golf Central NewsMag
Theme URI: https://golfcentralmag.com/
Author: ReLaunch for Golf Central Magazine
Description: Custom NewsMag-inspired newspaper/magazine theme built for Golf Central Mag. Uses site content, images, Issuu links, and Contact Form 7.
Version: 1.0.0
Requires at least: 6.0
Text Domain: golfcentral-newsmag
*/

/* Base tokens — NewsMag newspaper system, Golf Central teal brand CTA */
:root {
  --nm-red: #e02b20;
  --nm-red-dark: #c41f16;
  --nm-ink: #222;
  --nm-muted: #777;
  --nm-line: #eaeaea;
  --nm-bg: #f8f8f8;
  --nm-white: #fff;
  --nm-dark: #111;
  --nm-brand: #00997f;
  --nm-brand-dark: #007a65;
  --font: "Open Sans", "Segoe UI", sans-serif;
  --font-title: "Roboto Condensed", "Arial Narrow", sans-serif;
  --max: 1164px;
  --header-h: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--nm-ink);
  background: var(--nm-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--nm-red); }
h1,h2,h3,h4 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--nm-ink); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--nm-red); color: #fff; padding: 8px 12px; z-index: 9999;
}
.skip-link:focus { left: 8px; top: 8px; }

.nm-wrap {
  width: min(100% - 30px, var(--max));
  margin: 0 auto;
}

/* Top bar */
.nm-topbar {
  background: #222;
  color: #bbb;
  font-size: 12px;
}
.nm-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 12px;
}
.nm-topbar a { color: #ddd; }
.nm-topbar a:hover { color: #fff; }
.nm-topbar__left, .nm-topbar__right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Header */
.nm-header {
  background: #fff;
  border-bottom: 1px solid var(--nm-line);
  padding: 18px 0;
}
.nm-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nm-logo img {
  height: 48px;
  width: auto;
  filter: invert(1) brightness(0.18);
}
.nm-header__cta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Menu bar — NewsMag style */
.nm-menubar {
  background: var(--nm-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nm-menubar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}
.nm-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nm-nav li { margin: 0; padding: 0; }
.nm-nav a {
  display: block;
  color: #fff;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 14px 16px;
}
.nm-nav a:hover,
.nm-nav .current-menu-item > a,
.nm-nav .current_page_item > a,
.nm-nav a[aria-current="page"] {
  background: var(--nm-red);
  color: #fff;
}
.nm-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 0;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nm-red);
  color: #fff !important;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 18px;
  border: 0;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--nm-red-dark); color: #fff !important; }
.btn--brand { background: var(--nm-brand); }
.btn--brand:hover { background: var(--nm-brand-dark); }
.btn--dark { background: var(--nm-dark); }
.btn--outline {
  background: transparent;
  color: var(--nm-ink) !important;
  box-shadow: inset 0 0 0 2px var(--nm-line);
}
.btn--outline:hover { color: var(--nm-red) !important; box-shadow: inset 0 0 0 2px var(--nm-red); }

/* Block titles — NewsMag red bar */
.nm-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--nm-line);
  margin: 0 0 18px;
  padding-bottom: 0;
}
.nm-block-title h2 {
  margin: 0;
  background: var(--nm-red);
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 14px;
  display: inline-block;
}
.nm-block-title .more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nm-muted);
}
.nm-block-title .more:hover { color: var(--nm-red); }

.nm-section { padding: 28px 0; }
.nm-section--gray { background: var(--nm-bg); border-top: 1px solid var(--nm-line); border-bottom: 1px solid var(--nm-line); }

/* Big grid — NewsMag signature */
.nm-biggrid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4px;
  margin: 20px 0 8px;
}
.nm-biggrid__main,
.nm-biggrid__side-item {
  position: relative;
  overflow: hidden;
  background: #111;
  display: block;
  color: #fff !important;
  min-height: 280px;
}
.nm-biggrid__main { min-height: 460px; }
.nm-biggrid__side { display: grid; gap: 4px; }
.nm-biggrid__side-item { min-height: 228px; }
.nm-biggrid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: .85;
  transition: transform .45s ease, opacity .3s;
}
.nm-biggrid a:hover img { transform: scale(1.04); opacity: .7; }
.nm-biggrid__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 20px 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
  z-index: 1;
}
.nm-cat {
  display: inline-block;
  background: var(--nm-red);
  color: #fff;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  margin-bottom: 8px;
}
.nm-cat--brand { background: var(--nm-brand); }
.nm-biggrid h3 {
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  margin: 0 0 6px;
}
.nm-biggrid__side-item h3 { font-size: 1.15rem; }
.nm-biggrid .sub {
  color: rgba(255,255,255,.78);
  font-size: 13px;
  margin: 0;
}

/* Module rows */
.nm-modules {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 8px;
}
.nm-posts {
  display: grid;
  gap: 18px;
}
.nm-post {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nm-line);
}
.nm-post img {
  width: 140px;
  height: 100px;
  object-fit: cover;
}
.nm-post h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.nm-post h3 a:hover { color: var(--nm-red); }
.nm-post .excerpt { color: var(--nm-muted); font-size: 13px; margin: 0; }
.nm-post .meta { color: var(--nm-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

.nm-issue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.nm-issue {
  display: block;
  border: 1px solid var(--nm-line);
  background: #fff;
  transition: box-shadow .25s;
}
.nm-issue:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); color: inherit; }
.nm-issue img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.nm-issue .body { padding: 12px 12px 14px; }
.nm-issue h3 { font-size: .98rem; margin: 0 0 4px; }
.nm-issue span { color: var(--nm-muted); font-size: 12px; }

/* Sidebar widgets */
.nm-sidebar .widget {
  background: #fff;
  border: 1px solid var(--nm-line);
  margin-bottom: 20px;
}
.nm-sidebar .widget-title {
  background: var(--nm-dark);
  color: #fff;
  font-family: var(--font-title);
  font-size: 14px;
  text-transform: uppercase;
  margin: 0;
  padding: 10px 14px;
}
.nm-sidebar .widget-body { padding: 14px; }
.nm-sidebar .widget-body a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--nm-line);
  font-weight: 600;
  font-size: 13px;
}
.nm-sidebar .widget-body a:last-child { border-bottom: 0; }

.nm-cover-cta {
  text-align: center;
}
.nm-cover-cta img {
  width: min(100%, 220px);
  margin: 0 auto 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* Dept strip */
.nm-depts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.nm-dept {
  background: var(--nm-dark);
  color: #fff !important;
  padding: 28px 18px;
  text-align: center;
  transition: background .2s;
}
.nm-dept:hover { background: var(--nm-red); color: #fff !important; }
.nm-dept h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.nm-dept p { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }

/* Interior */
.nm-page-hero {
  background: var(--nm-dark);
  color: #fff;
  padding: 36px 0;
  border-bottom: 3px solid var(--nm-red);
}
.nm-page-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.nm-page-hero p { margin: 0; color: #bbb; max-width: 60ch; }
.nm-content { padding: 36px 0 56px; }
.nm-prose { max-width: 760px; }
.nm-prose .lead { font-size: 1.15rem; color: var(--nm-ink); }

.nm-staff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.nm-staff {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  border: 1px solid var(--nm-line);
  padding: 14px;
  background: #fff;
}
.nm-staff img { width: 110px; height: 130px; object-fit: cover; }
.nm-staff h3 { font-size: 1.15rem; margin: 0 0 4px; }
.nm-staff .role { color: var(--nm-red); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.nm-staff p { margin: 0; font-size: 13px; color: var(--nm-muted); }

.nm-roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.nm-roster figure { margin: 0; }
.nm-roster img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 8px; }
.nm-roster figcaption { font-family: var(--font-title); font-weight: 700; font-size: 14px; }

.nm-archive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.nm-archive a { border: 1px solid var(--nm-line); display: block; background: #fff; }
.nm-archive img { width: 100%; }
.nm-archive .body { padding: 10px 12px 12px; }
.nm-archive h3 { font-size: .95rem; margin: 0 0 2px; }
.nm-archive span { color: var(--nm-muted); font-size: 12px; }

.nm-story-list a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--nm-line);
}
.nm-story-list h3 { margin: 0 0 4px; font-size: 1.15rem; }
.nm-story-list p { margin: 0; color: var(--nm-muted); font-size: 13px; }

.nm-timeline {
  border-left: 3px solid var(--nm-red);
  padding-left: 18px;
  display: grid;
  gap: 22px;
  max-width: 700px;
}
.nm-timeline .year { color: var(--nm-red); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.nm-timeline h3 { margin: 2px 0 4px; }
.nm-timeline p { margin: 0; color: var(--nm-muted); }

.nm-media-kit { display: grid; gap: 12px; max-width: 900px; }
.nm-media-kit img { width: 100%; border: 1px solid var(--nm-line); }

.nm-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}
.nm-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nm-form input,
.nm-form select,
.nm-form textarea {
  border: 1px solid var(--nm-line);
  padding: 10px 12px;
  font: inherit;
  width: 100%;
}
.nm-form input:focus,
.nm-form select:focus,
.nm-form textarea:focus {
  outline: 2px solid var(--nm-red);
  outline-offset: 1px;
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.nm-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.nm-contact a { color: var(--nm-brand); font-weight: 600; }

.nm-split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  align-items: center;
}
.nm-split img { width: 100%; border: 1px solid var(--nm-line); }

.nm-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.nm-steps > div {
  border: 1px solid var(--nm-line);
  padding: 20px;
  background: #fff;
}
.nm-steps h3 { font-size: 1.1rem; text-transform: uppercase; }

/* Footer */
.nm-footer {
  background: #1a1a1a;
  color: #999;
  padding: 48px 0 20px;
  margin-top: 20px;
}
.nm-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}
.nm-footer h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.nm-footer a { color: #aaa; }
.nm-footer a:hover { color: #fff; }
.nm-footer ul { display: grid; gap: 7px; }
.nm-footer p { margin: 0 0 8px; font-size: 13px; }
.nm-footer .logo img { filter: none; height: 36px; margin-bottom: 12px; }
.nm-legal {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: #666;
}

/* CF7 tweaks */
.wpcf7 input,
.wpcf7 textarea {
  width: 100%;
  border: 1px solid var(--nm-line);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.wpcf7 input[type="submit"] {
  background: var(--nm-red);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  width: auto;
}

@media (max-width: 980px) {
  .nm-biggrid { grid-template-columns: 1fr; }
  .nm-biggrid__main { min-height: 360px; }
  .nm-modules, .nm-contact, .nm-staff-grid, .nm-split { grid-template-columns: 1fr; }
  .nm-issue-grid, .nm-depts, .nm-archive, .nm-roster, .nm-steps, .nm-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .nm-menu-toggle { display: block; }
  .nm-nav { display: none; width: 100%; flex-direction: column; }
  body.nav-open .nm-nav { display: flex; }
  .nm-menubar__inner { flex-wrap: wrap; padding: 4px 0; }
  .nm-post { grid-template-columns: 100px 1fr; }
  .nm-post img { width: 100px; height: 75px; }
  .nm-issue-grid, .nm-depts, .nm-archive, .nm-roster, .nm-steps, .nm-footer__grid, .nm-staff-grid {
    grid-template-columns: 1fr;
  }
  .nm-header__inner { flex-direction: column; align-items: flex-start; }
}
