/*
Theme Name:  Incorporate North Tahoe
Theme URI:   https://townofnorthtahoe.org
Author:      Custom
Description: Custom theme for the Town of North Tahoe incorporation campaign.
Version:     2.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: north-tahoe
Tags:        custom, one-page, responsive, full-width-template
*/

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  --nt-peach:        #fed4ac;
  --nt-peach-light:  #fff3e4;
  --nt-navy:         #1e3a5c;
  --nt-teal-bar:     #1a5e6e;
  --nt-teal-mid:     #1d6565;
  --nt-orange:       #c84c18;
  --nt-cream:        #f5e6d0;
  --nt-heading-blue: #1a5080;
  --nt-text:         #333333;
  --nt-subtext:      #444444;

  --nt-font-script:  'Satisfy', cursive;
  --nt-font-body:    'Nunito', sans-serif;

  --nt-max-w:        1200px;
  --nt-radius:       10px;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--nt-font-body);
  background-color: var(--nt-cream);
  color: var(--nt-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* =====================================================================
   HERO / HEADER  —  image-based mountain illustrations
   ===================================================================== */
.nt-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--nt-peach);
}

/* Mountain illustration images positioned at bottom corners */
.nt-hero__mountain {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 52%;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
}
.nt-hero__mountain--left  { left: 0; }
.nt-hero__mountain--right { right: 0; }

/* Overlay sits above the mountain images in normal flow */
.nt-hero__overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: clamp(220px, 28vw, 400px);
}

/* ---- Navigation ---- */
.nt-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px 36px;
  position: relative;
  z-index: 20;
}

.nt-nav__list {
  display: flex;
  gap: 30px;
}

.nt-nav__list a {
  font-family: var(--nt-font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--nt-navy);
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nt-nav__list a:hover { opacity: 0.65; }

/* Hamburger button (hidden on desktop) */
.nt-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 30;
}
.nt-nav__toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--nt-navy);
  border-radius: 2px;
  transition: all 0.3s;
}
.nt-nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nt-nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nt-nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---- Hero logo (centered image) ---- */
.nt-hero__logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px 30px;
}

.nt-hero__logo-img {
  max-width: clamp(360px, 44vw, 560px);
  height: auto;
  pointer-events: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

/* =====================================================================
   SPONSOR BAR
   ===================================================================== */
.nt-sponsor-bar {
  background-color: var(--nt-teal-bar);
  color: #fff;
  text-align: center;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.015em;
  line-height: 1.4;
}

/* =====================================================================
   CONTAINER
   ===================================================================== */
.nt-container {
  max-width: var(--nt-max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* =====================================================================
   CONTENT ROW  (3 columns: Donate | Video | Text)
   ===================================================================== */
.nt-content-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 40px;
  padding: 52px 0 44px;
  align-items: start;
}

/* --- Block image (shared) --- */
.nt-block__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--nt-radius);
  display: block;
}

.nt-block__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--nt-radius);
  background: linear-gradient(135deg, #c8e0e8 0%, #a8c8d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a7a88;
  font-size: 0.85rem;
  font-style: italic;
}

/* --- Donate column --- */
.nt-col-donate .nt-block__label {
  display: inline-block;
  margin-top: 16px;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--nt-heading-blue);
  letter-spacing: -0.01em;
}
.nt-col-donate a:hover .nt-block__label { text-decoration: underline; }

/* --- Video column (thumbnail with baked-in play button) --- */
.nt-video-thumb {
  display: block;
  border-radius: var(--nt-radius);
  overflow: hidden;
  transition: opacity 0.2s;
}
.nt-video-thumb:hover { opacity: 0.92; }

.nt-video-thumb__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.nt-block__caption {
  display: inline-block;
  margin-top: 14px;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--nt-heading-blue);
  line-height: 1.3;
}
a.nt-block__caption:hover { text-decoration: underline; }

/* --- Text column --- */
.nt-col-text .nt-block__heading {
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  font-weight: 800;
  color: var(--nt-navy);
  line-height: 1.2;
  margin-bottom: 14px;
}

.nt-col-text .nt-block__body {
  font-size: 0.93rem;
  color: var(--nt-subtext);
  line-height: 1.75;
  font-style: italic;
}

/* =====================================================================
   SECONDARY GRID  (4 columns on desktop)
   ===================================================================== */
.nt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 8px 0 64px;
}

/* Donate grid block — hidden on desktop, shown on mobile */
.nt-grid-block.nt-grid-block--donate-mobile {
  display: none;
}

.nt-grid-block { display: flex; flex-direction: column; }

.nt-grid-block__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--nt-radius);
  display: block;
  transition: opacity 0.2s;
}
.nt-grid-block a:hover .nt-grid-block__img { opacity: 0.9; }

.nt-grid-block__placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--nt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255,255,255,0.75);
}

.nt-grid-block__label {
  margin-top: 13px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nt-heading-blue);
  letter-spacing: -0.01em;
}
.nt-grid-block a:hover .nt-grid-block__label { text-decoration: underline; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.nt-footer {
  background: var(--nt-navy);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 32px 20px;
  font-size: 0.83rem;
  line-height: 1.7;
}
.nt-footer a { color: rgba(255,255,255,0.85); }
.nt-footer a:hover { text-decoration: underline; }

/* =====================================================================
   INNER PAGE STYLES (page.php / single.php / index.php)
   ===================================================================== */
.nt-inner-header {
  background: var(--nt-navy);
  padding: 0;
}

.nt-inner-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 28px;
  max-width: var(--nt-max-w);
  margin: 0 auto;
}

.nt-inner-nav .nt-logo-img {
  height: 64px;
  width: auto;
  display: block;
}

.nt-inner-nav .nt-nav__list a { color: #fff; }
.nt-inner-nav .nt-nav__toggle span { background: #fff; }

@media (max-width: 900px) {
  .nt-inner-nav {
    padding: 10px 18px;
  }

  .nt-inner-nav .nt-logo-img {
    height: 52px;
  }
}

.nt-page-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 52px 28px 72px;
}

.nt-page-body h1,
.nt-page-body h2,
.nt-page-body h3 {
  color: var(--nt-navy);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6em;
}
.nt-page-body h1 { font-size: 2rem; }
.nt-page-body h2 { font-size: 1.5rem; }
.nt-page-body h3 { font-size: 1.2rem; }
.nt-page-body p  { margin-bottom: 1.2em; color: var(--nt-subtext); }

.nt-posts-grid {
  max-width: var(--nt-max-w);
  margin: 0 auto;
  padding: 40px 28px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.nt-post-card { background: #fff; border-radius: var(--nt-radius); overflow: hidden; }
.nt-post-card__img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.nt-post-card__body { padding: 18px; }
.nt-post-card__title { font-size: 1.05rem; font-weight: 700; color: var(--nt-navy); margin-bottom: 8px; }
.nt-post-card__excerpt { font-size: 0.88rem; color: var(--nt-subtext); }

/* =====================================================================
   RESPONSIVE — TABLET  ≤ 920px
   ===================================================================== */
@media (max-width: 920px) {
  .nt-content-row {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 40px 0 32px;
  }
  .nt-col-text {
    grid-column: 1 / -1;
  }
  .nt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .nt-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================================================================
   RESPONSIVE — MOBILE  ≤ 600px
   ===================================================================== */
@media (max-width: 600px) {
  .nt-nav { padding: 14px 18px; }

  .nt-nav__toggle { display: flex; }

  .nt-nav__list {
    display: none;
    position: absolute;
    top: 58px;
    right: 18px;
    background: rgba(250, 243, 232, 0.97);
    backdrop-filter: blur(6px);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    min-width: 160px;
    z-index: 50;
  }
  .nt-nav__list.is-open { display: flex; }
  .nt-nav__list a { display: block; padding: 11px 22px; font-size: 1rem; }

  /* Hero adjustments for mobile */
  .nt-hero__overlay {
    min-height: clamp(220px, 66vw, 340px);
  }
  .nt-hero__logo {
    flex: none;
    padding: 8px 20px 20px;
  }
  .nt-hero__logo-img {
    max-width: clamp(280px, 82vw, 420px);
  }
  .nt-hero__mountain {
    max-width: 52%;
  }
  .nt-hero__mountain--left {
    left: -4%;
    z-index: 2;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 98%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 98%, transparent 100%);
  }
  .nt-hero__mountain--right {
    right: -4%;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to left, #000 0%, #000 98%, transparent 100%);
    mask-image: linear-gradient(to left, #000 0%, #000 98%, transparent 100%);
  }

  /* Content row: single column, reordered for mobile mockup */
  .nt-content-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 24px;
  }
  .nt-col-text    { order: -2; text-align: center; }
  .nt-col-video   { order: -1; }
  .nt-col-donate  { display: none; }  /* Hidden — donate appears in grid instead */
  .nt-col-text    { grid-column: auto; }

  /* Grid: 3 columns on mobile, donate block visible */
  .nt-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 8px 0 32px;
  }
  .nt-grid-block.nt-grid-block--donate-mobile {
    display: flex;
  }

  .nt-grid-block__label {
    font-size: 1.05rem;
    margin-top: 8px;
    text-align: center;
  }

  .nt-site-title__top    { font-size: 2.2rem; }
  .nt-site-title__bottom { font-size: 3.2rem; }

  .nt-inner-nav { flex-wrap: wrap; gap: 10px; }

  .nt-posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nt-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .nt-grid-block__label {
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .nt-grid { grid-template-columns: repeat(2, 1fr); }
}


/* =====================================================================
   BREADCRUMBS
   ===================================================================== */
.nt-breadcrumbs-wrap {
  background: #ffffff;
  border-bottom: 1px solid rgba(30, 58, 92, 0.1);
}

.nt-breadcrumbs-wrap .nt-container {
  padding-top: 14px;
  padding-bottom: 0;
}

.nt-breadcrumbs {
  color: var(--nt-subtext);
  font-size: 0.95rem;
}

.nt-breadcrumbs a {
  color: var(--nt-heading-blue);
  text-decoration: none;
}

.nt-breadcrumbs a:hover,
.nt-breadcrumbs a:focus {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .nt-breadcrumbs {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .nt-breadcrumbs-wrap .nt-container {
    padding-top: 12px;
  }
}


/* =====================================================================
   PAGE/POST CONTENT — GUTENBERG PARITY
   ===================================================================== */
.nt-page-body p:empty {
  display: none;
}

.nt-page-body a {
  color: var(--nt-heading-blue);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.nt-page-body a:hover,
.nt-page-body a:focus {
  color: var(--nt-orange);
}

.nt-page-body ul,
.nt-page-body ol {
  margin: 0 0 1.35em 1.35em;
  padding-left: 0.35em;
}

.nt-page-body ul {
  list-style: disc;
}

.nt-page-body ul ul {
  list-style: circle;
}

.nt-page-body ul ul ul {
  list-style: square;
}

.nt-page-body ol {
  list-style: decimal;
}

.nt-page-body li {
  margin-bottom: 0.55em;
}

.nt-page-body li:last-child {
  margin-bottom: 0;
}

.nt-page-body .wp-block-separator,
.nt-page-body hr {
  margin: 2rem auto;
}

.nt-page-body .wp-block-separator {
  color: rgba(30, 58, 92, 0.24);
}

.nt-page-body .wp-block-latest-posts {
  margin-bottom: 1.5em;
}

.nt-page-body .wp-block-latest-posts > li {
  margin-bottom: 1.4em;
}

.nt-page-body .wp-block-latest-posts time {
  display: block;
  margin-top: 0.35rem;
  color: #6b7280;
}


/* =====================================================================
   HOMEPAGE CORE BLOCKS
   ===================================================================== */
.wp-block-group.nt-sponsor-bar {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-group.nt-sponsor-bar p {
  margin: 0;
}

.wp-block-group.nt-homepage-content {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-group.nt-homepage-content > .wp-block-group__inner-container {
  max-width: var(--nt-max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.wp-block-columns.nt-content-row,
.wp-block-columns.nt-grid {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-columns.nt-content-row > .wp-block-column,
.wp-block-columns.nt-grid > .wp-block-column {
  margin-inline-start: 0 !important;
  min-width: 0;
}

figure.nt-home-figure,
figure.nt-home-video {
  margin: 0;
}

figure.nt-home-figure a,
figure.nt-home-video a {
  display: block;
}

figure.nt-home-figure img,
figure.nt-home-video img {
  width: 100%;
  display: block;
  border-radius: var(--nt-radius);
}

figure.nt-home-figure--featured img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

figure.nt-home-figure--grid img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

figure.nt-home-video img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

figure.nt-home-figure:hover img,
figure.nt-home-video:hover img {
  opacity: 0.9;
}

figure.nt-home-figure figcaption {
  margin-top: 13px;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nt-heading-blue);
  letter-spacing: -0.01em;
  text-align: left;
}

.nt-col-donate figure.nt-home-figure--featured figcaption {
  margin-top: 16px;
  font-size: 1.55rem;
}

figure.nt-home-figure figcaption a {
  color: inherit;
  text-decoration: none;
}

figure.nt-home-figure:hover figcaption a {
  text-decoration: underline;
}

.nt-col-video > .wp-block-image {
  margin-bottom: 0;
}

.nt-col-video > .wp-block-paragraph.nt-block__caption {
  margin-bottom: 0;
}

.nt-col-text > :last-child,
.nt-grid-block > :last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .wp-block-group.nt-homepage-content > .wp-block-group__inner-container {
    padding: 0 18px;
  }

  .wp-block-columns.nt-content-row > .wp-block-column.nt-col-donate {
    display: none;
  }

  .wp-block-columns.nt-grid > .wp-block-column.nt-grid-block--donate-mobile {
    display: block;
  }
}
