/* Trapp Family Farm – base + section imports */
@import "sections/content-blocks.css";
@import "sections/slideshow.css";
@import "sections/hero.css";
@import "sections/json-layout.css";
@import "sections/crops.css";
@import "sections/animals.css";
@import "sections/homestead.css";
@import "sections/newsletter.css";
@import "sections/info.css";

/* —— Base —— */
:root {
  --teal: #2d5a5e;
  --teal-light: #3d7277;
  --teal-wash: rgba(45, 90, 94, 0.06);
  --olive: #6b7c5c;
  --olive-light: #c4cbaf;
  --olive-wash: #e8ebe0;
  --orange: #c98632;
  --orange-bright: #e0a84d;
  --orange-wash: #faf4e8;
  --charcoal: #2c302e;
  --charcoal-light: #4a4f4c;
  --cream: #faf9f6;
  --header-bg: #f5f0e5;
  --header-border: #dbcfae;
  --header-logo-text: #2f4d45;
  --header-nav: #3b6459;
  --header-nav-hover-bg: #e7ddc6;
  --header-nav-hover-text: #1e362f;
  --header-nav-active-bg: #dfb86d;
  --header-nav-active-text: #233831;
  --white: #fff;
  --text: #2c302e;
  --text-soft: #5c615e;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --width: 1100px;
  --space: 1.5rem;
  --radius: 0;
  --radius-sm: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* —— Header: light bar so the illustration reads clearly —— */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: var(--space) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.28s ease;
}

.site-header--compact {
  padding: 0.5rem 0;
}

.header-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-graphic {
  flex: 0 0 auto;
  width: clamp(150px, 18vw, 240px);
  transition:
    opacity 0.28s ease,
    max-height 0.32s ease,
    margin 0.28s ease,
    width 0.28s ease,
    flex-basis 0.28s ease;
}

.site-header--compact .header-graphic {
  width: 0;
  max-width: 0;
  max-height: 0;
  flex-basis: 0;
  min-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.header-graphic img {
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile menu control (hidden on wide viewports) */
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.35);
  color: var(--header-nav);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-toggle:hover {
  background: var(--header-nav-hover-bg);
  color: var(--header-nav-hover-text);
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.25rem;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(44, 48, 46, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

body.nav-drawer-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 201;
  width: min(18rem, 88vw);
  height: 100%;
  max-height: 100dvh;
  background: var(--header-bg);
  border-right: 1px solid var(--header-border);
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
  transition: transform 0.26s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 0 1.5rem;
}

body.nav-drawer-open .nav-drawer {
  transform: translateX(0);
}

.nav-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(45, 90, 94, 0.12);
}

.nav-drawer-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--header-logo-text);
}

.nav-drawer-close {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--header-nav);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-drawer-close:hover {
  background: var(--header-nav-hover-bg);
  color: var(--header-nav-hover-text);
}

.nav-drawer-nav {
  padding: 1rem 0.75rem 0;
}

.nav-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-drawer-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--header-nav);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-drawer-list a:hover {
  background: var(--header-nav-hover-bg);
  color: var(--header-nav-hover-text);
  text-decoration: none;
}

.nav-drawer-list a.active {
  background: var(--header-nav-active-bg);
  color: var(--header-nav-active-text);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0;
  border-left: none;
  color: var(--header-logo-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--header-nav-hover-text);
  text-decoration: none;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: font-size 0.22s ease;
}

.site-header--compact .logo-text {
  font-size: 0.82rem;
}

.logo-text span { display: block; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  white-space: normal;
  justify-content: flex-end;
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

.main-nav a {
  color: var(--header-nav);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s, font-size 0.2s ease, padding 0.2s ease;
}

.site-header--compact .main-nav a {
  font-size: 0.68rem;
  padding: 0.38rem 0.55rem;
}

.site-header--compact .main-nav ul.nav-with-icons a::before {
  width: 0.82rem;
  height: 0.82rem;
}

.main-nav ul.nav-with-icons a,
.nav-drawer-list.nav-with-icons a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.main-nav ul.nav-with-icons a::before,
.nav-drawer-list.nav-with-icons a::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.main-nav ul.nav-with-icons a[href="info.html"]::before,
.nav-drawer-list.nav-with-icons a[href="info.html"]::before {
  -webkit-mask-image: var(--icon-nav-more_info, url("../assets/icon/ui/icon-info.svg"));
  mask-image: var(--icon-nav-more_info, url("../assets/icon/ui/icon-info.svg"));
}

.main-nav ul.nav-with-icons a[href="crops.html"]::before,
.nav-drawer-list.nav-with-icons a[href="crops.html"]::before {
  -webkit-mask-image: var(--icon-nav-crops, url("../assets/icon/ui/icon-data.svg"));
  mask-image: var(--icon-nav-crops, url("../assets/icon/ui/icon-data.svg"));
}

.main-nav ul.nav-with-icons a[href="animals.html"]::before,
.nav-drawer-list.nav-with-icons a[href="animals.html"]::before {
  -webkit-mask-image: var(--icon-nav-animals, url("../assets/icon/ui/icon-relationship.svg"));
  mask-image: var(--icon-nav-animals, url("../assets/icon/ui/icon-relationship.svg"));
}

.main-nav ul.nav-with-icons a[href="homestead.html"]::before,
.nav-drawer-list.nav-with-icons a[href="homestead.html"]::before {
  -webkit-mask-image: var(--icon-nav-homestead, url("../assets/icon/ui/icon-home.svg"));
  mask-image: var(--icon-nav-homestead, url("../assets/icon/ui/icon-home.svg"));
}

.main-nav ul.nav-with-icons a[href="newsletter.html"]::before,
.nav-drawer-list.nav-with-icons a[href="newsletter.html"]::before {
  -webkit-mask-image: var(--icon-nav-newsletters, url("../assets/icon/ui/icon-inbox.svg"));
  mask-image: var(--icon-nav-newsletters, url("../assets/icon/ui/icon-inbox.svg"));
}

.main-nav a:hover {
  color: var(--header-nav-hover-text);
  background: var(--header-nav-hover-bg);
  text-decoration: none;
}

.main-nav a.active {
  background: var(--header-nav-active-bg);
  color: var(--header-nav-active-text);
  text-decoration: none;
}

/* —— Main —— */
.main { min-height: 60vh; }

.container {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-block {
  background: var(--olive-wash);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--orange);
}

/* —— Two-column: orange panel + image (about-section-1) —— */
.section-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 340px;
}

.section-split .panel-text {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-split .panel-text.accent {
  background: var(--orange-bright);
  color: var(--charcoal);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.section-split .panel-text.accent h2,
.section-split .panel-text.accent h3 {
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.5rem;
}

.section-split .panel-text.accent p { margin: 0 0 0.75rem; color: var(--charcoal); }
.section-split .panel-text.accent ul { list-style: none; padding-left: 0; margin: 0.5rem 0 0; }
.section-split .panel-text.accent li {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  padding-left: 1.25rem;
  position: relative;
}
.section-split .panel-text.accent li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.section-split .panel-image {
  overflow: hidden;
}
.section-split .panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .section-split {
    grid-template-columns: 1fr;
  }
  .section-split .panel-image {
    min-height: 260px;
    order: -1;
  }
}

/* —— Page sections: alternating bands —— */
.page-section {
  padding: 3rem 1.5rem;
  border-bottom: none;
}

.page-section:nth-child(odd)  { background: var(--cream); }
.page-section:nth-child(even) { background: var(--olive-wash); }

.page-section:last-of-type { border-bottom: none; }

.page-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 4px solid var(--orange);
  text-transform: none;
  letter-spacing: 0;
  border-left: none;
}

.page-section h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--olive);
  margin: 1.5rem 0 0.5rem;
}

.page-section p { margin: 0 0 1rem; }
.page-section ul { margin: 0 0 1rem; padding-left: 1.25rem; }

.section-block { padding: 0; }

.section-block .section-image {
  margin: 1.75rem 0;
  overflow: hidden;
  border: 3px solid var(--charcoal);
}

.section-block .section-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 50%;
  max-height: 420px;
}

/* —— Footer: dark block to match header —— */
.site-footer {
  background: var(--charcoal);
  color: var(--olive-light);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 0;
  border-top: 4px solid var(--orange);
}

.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-illustration {
  width: clamp(120px, 15vw, 190px);
}

.footer-illustration img { width: 100%; height: auto; }

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--white);
  margin: 0 0 0.6rem;
  padding-bottom: 0;
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-col h3::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.footer-details h3::before {
  -webkit-mask-image: var(--icon-footer-visit, url("../assets/icon/icon-location.svg"));
  mask-image: var(--icon-footer-visit, url("../assets/icon/icon-location.svg"));
}

.footer-hours h3::before {
  -webkit-mask-image: var(--icon-footer-stand_hours, url("../assets/icon/ui/icon-time.svg"));
  mask-image: var(--icon-footer-stand_hours, url("../assets/icon/ui/icon-time.svg"));
}

.footer-follow h3::before {
  -webkit-mask-image: var(--icon-footer-instagram, url("../assets/icon/logos/logo-instagram.svg"));
  mask-image: var(--icon-footer-instagram, url("../assets/icon/logos/logo-instagram.svg"));
}

.footer-col p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--olive-light);
}

.footer-col a {
  color: var(--orange-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-col a::before {
  content: none;
}

.footer-col a[href^="mailto:"]::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  display: inline-block;
  flex: 0 0 0.9rem;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-footer-mail, url("../assets/icon/icon-mail.svg"));
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--icon-footer-mail, url("../assets/icon/icon-mail.svg"));
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.footer-col a.instagram-link::before {
  content: none;
}

.footer-col a.instagram-link {
  width: 1.35rem;
  height: 1.35rem;
  justify-content: center;
  color: var(--orange-bright);
}

.footer-col a.instagram-link img {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0) saturate(100%) invert(72%) sepia(31%) saturate(777%) hue-rotate(349deg) brightness(96%) contrast(91%);
}
.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--charcoal-light);
  font-size: 0.8rem;
  color: var(--text-soft);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-illustration { margin: 0 auto; }

  .nav-toggle {
    display: inline-flex;
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    text-align: right;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
  }

  .header-graphic {
    order: 3;
    flex: 1 1 100%;
    width: min(220px, 62vw);
    margin: 0 auto;
  }

  .site-header--compact .header-graphic {
    display: none;
  }

  .main-nav {
    display: none !important;
  }

  .home-page .main-nav {
    margin-left: 0;
  }
}

.home-page .header-inner {
  justify-content: flex-start;
}

.home-page .main-nav {
  margin-left: auto;
}

.home-page .site-footer {
  background: #f8f4ea;
  color: #45534d;
  border-top-color: #d9b168;
}

.home-page .footer-col h3 {
  color: #2f4d45;
}

.home-page .footer-col p {
  color: #4a5a52;
}

.home-page .footer-col a {
  color: #9f6224;
}

.home-page .footer-col a:hover {
  color: #2f4d45;
}

.home-page .footer-col a.instagram-link img {
  filter: brightness(0) saturate(100%) invert(40%) sepia(34%) saturate(1131%) hue-rotate(353deg) brightness(93%) contrast(88%);
}

.home-page .footer-bottom {
  border-top-color: #e0d8c3;
  color: #738177;
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
}

/* —— Hero: see sections/hero.css (landscape image + dark body) —— */
.hero-image {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 4px solid var(--charcoal);
}

/* —— Link cards: bento-style grid (varied sizes) —— */
.link-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 0.75rem;
  padding: 0 1.5rem 2rem;
  max-width: var(--width);
  margin: 0 auto;
}

.link-card {
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--teal);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.link-card:nth-child(1) { grid-column: span 2; background: var(--teal); border-color: var(--teal); }
.link-card:nth-child(1) a,
.link-card:nth-child(1) p { color: var(--white); }
.link-card:nth-child(1) a:hover { color: var(--orange-bright); }

.link-card:nth-child(2) { background: var(--orange-wash); border-color: var(--orange); }

.link-card:nth-child(3),
.link-card:nth-child(4) { border-color: var(--olive); }
.link-card:nth-child(5) { grid-column: span 2; background: var(--olive-wash); border-color: var(--olive); }

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 90, 94, 0.15);
  text-decoration: none;
}

.link-card a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-card p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .link-cards { grid-template-columns: 1fr; }
  .link-card:nth-child(1),
  .link-card:nth-child(5) { grid-column: span 1; }
}

/* —— Newsletter issues: stacked blocks with strong left edge —— */
.newsletter-issue {
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  margin-bottom: 1.25rem;
  background: var(--white);
  border: none;
  border-left: 6px solid var(--orange);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(45, 90, 94, 0.08);
}

.newsletter-issue h3 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-top: 0;
}

/* —— Media items: list with teal accent —— */
.media-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--white);
  border: 2px solid var(--olive-wash);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}

.media-item:hover {
  background: var(--orange-wash);
  border-color: var(--orange);
}

.media-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--teal);
}

.media-item .meta {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* —— Buttons —— */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
}

/* —— News/sources list —— */
#news ul { list-style: none; padding-left: 0; }
#news ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}
#news ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--orange);
  border-radius: 50%;
}
#news ul li a:hover { color: var(--orange); }
