/* New Hampshire Christmas tree farms — winter evergreen directory */
:root {
  --tree-evergreen: #173f35;
  --tree-evergreen-dark: #0f2c25;
  --tree-pine: #285e4e;
  --tree-spruce: #3d7564;
  --tree-rust: #9b4f36;
  --tree-gold: #c8954c;
  --tree-snow: #f5f7f4;
  --tree-paper: #fffefa;
  --tree-ice: #e7efed;
  --tree-ink: #26302c;
  --tree-muted: #626b66;
  --tree-line: #d4ddd8;
}

body.nh-tree-page {
  background: #eef2ef;
  color: var(--tree-ink);
}

.nh-tree-page .site-header {
  background: rgba(255, 254, 250, .97);
  border-bottom: 3px solid var(--tree-evergreen);
}

.nh-tree-page main {
  padding: 0 0 5rem;
}

.tree-kicker {
  margin: 0 0 .42rem;
  color: var(--tree-rust);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Hero: winter landscape with a floating information card */
.tree-hero {
  position: relative;
  min-height: clamp(35rem, 56vw, 44rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--tree-evergreen-dark);
}

.tree-hero-photo,
.tree-hero-photo::after {
  position: absolute;
  inset: 0;
}

.tree-hero-photo { z-index: -2; }

.tree-hero-photo::after {
  content: "";
  background:
    linear-gradient(0deg, rgba(8, 27, 23, .74) 0%, rgba(8, 27, 23, .14) 48%, transparent 72%),
    linear-gradient(90deg, rgba(8, 27, 23, .32), transparent 58%);
  pointer-events: none;
}

.tree-hero-photo picture,
.tree-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.tree-hero-photo img {
  object-fit: cover;
  object-position: center;
}

.tree-hero-inner {
  width: 100%;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.tree-title-card {
  position: relative;
  max-width: 52rem;
  padding: clamp(1.5rem, 3.5vw, 2.7rem);
  background: rgba(255, 254, 250, .96);
  border: 1px solid rgba(255, 255, 255, .75);
  border-left: 8px solid var(--tree-rust);
  box-shadow: 14px 14px 0 rgba(15, 44, 37, .9);
}

.tree-title-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 1.4rem;
  width: 3.8rem;
  height: .42rem;
  background: var(--tree-gold);
}

.tree-crumb {
  margin: 0 0 1rem;
  color: var(--tree-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tree-crumb a { color: var(--tree-pine); }

.tree-title-card h1 {
  max-width: 48rem;
  margin: 0 0 1rem;
  color: var(--tree-evergreen-dark);
  font-size: clamp(2.7rem, 6.4vw, 5.25rem);
  line-height: .96;
  letter-spacing: -.045em;
}

.tree-title-card > p:last-child {
  max-width: 43rem;
  margin: 0;
  color: #46504b;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.65;
}

/* Season strip */
.tree-facts {
  background: var(--tree-evergreen-dark);
  color: #fff;
  border-bottom: 5px solid var(--tree-rust);
}

.tree-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 80rem;
  padding-block: 1.18rem;
}

.tree-facts-grid div {
  min-width: 0;
  padding: .2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,.2);
}

.tree-facts-grid div:first-child { padding-left: 0; }
.tree-facts-grid div:last-child { border-right: 0; }
.tree-facts-grid strong,
.tree-facts-grid span { display: block; }
.tree-facts-grid strong { margin-bottom: .15rem; font-size: .92rem; }
.tree-facts-grid span { color: #cfddd8; font-size: .75rem; line-height: 1.38; }

/* Directory: listings are visually separate from the green sidebar */
.tree-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 80rem;
  padding-top: clamp(3.5rem, 7vw, 6rem);
}

.tree-main { min-width: 0; }

.tree-directory-head {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 0 0 1.35rem 1.25rem;
  border-left: 6px solid var(--tree-rust);
  border-bottom: 1px solid #bdc9c3;
}

.tree-directory-head h2 {
  margin: .15rem 0 .65rem;
  color: var(--tree-evergreen-dark);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.06;
}

.tree-directory-head p:last-child {
  max-width: 48rem;
  margin: 0;
  color: var(--tree-muted);
  line-height: 1.65;
}

.nh-tree-page .tree-directory { max-width: none; }

.nh-tree-page .farm {
  margin-bottom: .72rem;
  overflow: hidden;
  background: var(--tree-paper);
  border: 1px solid var(--tree-line);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(26, 53, 44, .04);
}

.nh-tree-page .farm::before { display: none; }
.nh-tree-page .farm:hover { box-shadow: 0 8px 22px rgba(26, 53, 44, .09); }
.nh-tree-page .farm.is-open { border-color: #9aafa5; box-shadow: 0 10px 28px rgba(26,53,44,.1); }

.nh-tree-page .farm-trigger {
  min-height: 5rem;
  padding: 1rem 1.1rem 1rem 1.25rem;
  border-left: 6px solid var(--tree-pine);
  transition: background .18s ease, border-color .18s ease;
}

.nh-tree-page .farm-trigger:hover {
  background: #f2f6f3;
  border-left-color: var(--tree-rust);
}

.nh-tree-page .farm.is-open .farm-trigger {
  background: var(--tree-ice);
  border-left-color: var(--tree-rust);
}

.nh-tree-page .farm-name {
  color: var(--tree-evergreen-dark);
  font-weight: 800;
}

.nh-tree-page .farm-town {
  color: var(--tree-muted);
  font-size: .82rem;
  font-weight: 600;
}

.nh-tree-page .farm-panel { background: var(--tree-paper); }

.nh-tree-page .farm-body {
  padding: 1.25rem 1.35rem 1.45rem;
  border-top: 1px solid var(--tree-line);
}

.nh-tree-page .farm-body p {
  max-width: 52rem;
  color: #4b5550;
  line-height: 1.72;
}

.nh-tree-page .farm-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.2rem;
  border: 1px solid var(--tree-line);
}

.nh-tree-page .farm-meta > div {
  min-width: 0;
  padding: .9rem 1rem;
  background: #f8faf8;
  border-right: 1px solid var(--tree-line);
  border-bottom: 1px solid var(--tree-line);
}

.nh-tree-page .farm-meta > div:nth-child(2n) { border-right: 0; }
.nh-tree-page .farm-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
.nh-tree-page .farm-meta dt { color: var(--tree-rust); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nh-tree-page .farm-meta dd { margin: .32rem 0 0; color: #434d48; line-height: 1.5; overflow-wrap: anywhere; }
.nh-tree-page .farm-meta a { color: var(--tree-pine); font-weight: 700; }

/* Sidebar */
.tree-sidebar {
  position: sticky;
  top: 6rem;
}

.tree-sidebar-card {
  overflow: hidden;
  background: var(--tree-evergreen-dark);
  color: #fff;
  border: 1px solid #244f43;
  box-shadow: 9px 9px 0 #c9d4ce;
}

.tree-sidebar-card > .tree-kicker,
.tree-sidebar-card > h2,
.tree-sidebar-card > p {
  margin-left: 1.35rem;
  margin-right: 1.35rem;
}

.tree-sidebar-card > .tree-kicker { margin-top: 1.45rem; color: #e8b66f; }
.tree-sidebar-card h2 { margin-top: .15rem; margin-bottom: .7rem; color: #fff; font-size: 1.55rem; line-height: 1.12; }
.tree-sidebar-card > p { margin-bottom: 1.35rem; color: #cfddd8; font-size: .88rem; line-height: 1.55; }

.tree-sidebar-links { display: grid; }

.tree-sidebar-links a {
  display: block;
  padding: 1rem 1.35rem;
  color: #fff;
  background: #194438;
  border-top: 1px solid rgba(255,255,255,.11);
  transition: background .16s ease, padding-left .16s ease;
}

.tree-sidebar-links a:hover,
.tree-sidebar-links a:focus-visible { background: #285e4e; padding-left: 1.55rem; }
.tree-sidebar-links b { display: block; margin-bottom: .18rem; }
.tree-sidebar-links span { display: block; color: #c7d8d1; font-size: .75rem; line-height: 1.35; }

.tree-plan-card {
  margin-top: 1.4rem;
  padding: 1.35rem;
  background: #fffefa;
  border-top: 5px solid var(--tree-gold);
  box-shadow: 0 8px 22px rgba(28, 45, 39, .08);
}

.tree-plan-card h3 { margin: .2rem 0 .8rem; color: var(--tree-evergreen-dark); font-size: 1.2rem; }
.tree-plan-card ul { margin: 0; padding-left: 1.1rem; color: #515a55; }
.tree-plan-card li + li { margin-top: .45rem; }

/* Editorial planning block */
.tree-guide {
  display: grid;
  grid-template-columns: minmax(14rem, .8fr) minmax(0, 1.35fr);
  gap: 1.2rem 3rem;
  max-width: 80rem;
  margin-top: clamp(4rem, 8vw, 6.5rem);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: #dfe9e4;
  border-top: 7px solid var(--tree-evergreen);
}

.tree-guide-heading h2 { margin: .15rem 0 0; color: var(--tree-evergreen-dark); font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.06; }
.tree-guide-copy p { margin-top: 0; color: #47514c; line-height: 1.7; }
.tree-guide-notes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.tree-guide-notes article { padding: 1.25rem; background: var(--tree-paper); border: 1px solid #c9d4ce; }
.tree-guide-notes span { color: var(--tree-rust); font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tree-guide-notes h3 { margin: .35rem 0 .55rem; color: var(--tree-evergreen-dark); }
.tree-guide-notes p { margin: 0; color: #505a55; line-height: 1.6; }
.tree-guide-notes a { color: var(--tree-pine); font-weight: 700; }

.tree-internal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 80rem;
  margin-top: 1.25rem;
  padding: 0;
  overflow: hidden;
  background: var(--tree-evergreen-dark);
}

.tree-internal-links a {
  min-width: 0;
  min-height: 6.5rem;
  padding: 1.2rem 1.35rem;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.17);
  transition: background .16s ease;
}
.tree-internal-links a:last-child { border-right: 0; }
.tree-internal-links a:hover,
.tree-internal-links a:focus-visible { background: var(--tree-pine); color: #fff; }
.tree-internal-links span { display: block; margin-bottom: .4rem; color: #e8b66f; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.nh-tree-page .tree-finder { max-width: 80rem; margin-top: clamp(4rem, 8vw, 6rem); }
.tree-finder h2 { margin: 0 0 1.25rem; }

@media (max-width: 940px) {
  .tree-layout { grid-template-columns: 1fr; }
  .tree-sidebar { position: static; margin-top: 1rem; }
  .tree-sidebar-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tree-sidebar-links a:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.11); }
  .tree-sidebar-links a:last-child { grid-column: 1 / -1; border-right: 0; }
}

@media (max-width: 700px) {
  .tree-hero { min-height: 43rem; }
  .tree-hero-photo::after { background: linear-gradient(0deg, rgba(8,27,23,.78) 0%, rgba(8,27,23,.12) 64%, transparent 82%); }
  .tree-hero-photo img { object-position: center 36%; }
  .tree-hero-inner { padding: 7rem 1rem 2rem; }
  .tree-title-card { padding: 1.3rem; box-shadow: 7px 7px 0 rgba(15,44,37,.92); }
  .tree-title-card h1 { font-size: clamp(2.35rem, 11.4vw, 3.65rem); }
  .tree-facts-grid { grid-template-columns: 1fr; padding-block: .6rem; }
  .tree-facts-grid div,
  .tree-facts-grid div:first-child { padding: .72rem 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .tree-facts-grid div:last-child { border-bottom: 0; }
  .nh-tree-page .farm-meta,
  .tree-guide,
  .tree-guide-notes,
  .tree-internal-links { grid-template-columns: 1fr; }
  .tree-guide-notes { grid-column: auto; }
  .tree-guide,
  .tree-internal-links { width: auto; margin-left: 1rem; margin-right: 1rem; }
  .tree-internal-links a { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
  .tree-internal-links a:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .tree-crumb span,
  .tree-crumb a { display: none; }
  .nh-tree-page .farm-trigger { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .75rem; }
  .nh-tree-page .farm-name { grid-column: 1; }
  .nh-tree-page .farm-town { grid-column: 1; justify-self: start; }
  .nh-tree-page .chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .tree-sidebar-links { grid-template-columns: 1fr; }
  .tree-sidebar-links a:nth-child(odd) { border-right: 0; }
  .tree-sidebar-links a:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .nh-tree-page .farm,
  .nh-tree-page .farm-trigger,
  .nh-tree-page .farm-panel,
  .tree-sidebar-links a { transition: none; }
}
