/**
 * tpl_planetzoo – Planet Zoo Community Template
 * Wildlife-friendly design inspired by AT EcoFarm layout
 *
 * Design language (golden-hour wildlife palette, matched to the
 * fixed body background photo – pz-body-bg.jpg):
 *   --pz-forest       : warm dark olive    (navbar, header bg)
 *   --pz-forest-dark  : near-black olive   (footer, overlays)
 *   --pz-forest-mid   : sunlit olive       (feature strip, bottom row)
 *   --pz-forest-light : golden leaf green  (accents, hover)
 *   --pz-gold         : sunset amber       (CTA buttons, highlights)
 *   --pz-earth        : warm cream         (alt section backgrounds)
 *
 * @author  Éjmadár - Nightbird <ejmadar@ejmadar.hu>
 * @license GNU/GPL 2.0
 */

/* ═══════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES  (defaults – overridden by inline :root)
   ═══════════════════════════════════════════════════════════════ */
:root {
  --pz-forest:       #3c4a1f;
  --pz-forest-dark:  #272f13;
  --pz-forest-mid:   #5a682c;
  --pz-forest-light: #8fa04b;
  --pz-gold:         #d9a441;
  --pz-gold-hover:   #e5b95f;
  --pz-earth:        #faf4e6;
  --pz-white:        #ffffff;
  --pz-text:         #2e2a1f;
  --pz-text-light:   #6a6252;
  --pz-border:       #ddd3bd;

  /* Fixed page background photo (golden-hour wildlife panorama).
     index.php overrides this with the first image found in
     images/backgrounds/ and rotates through the rest via main.js. */
  --pz-body-bg:      url('../images/backgrounds/pz-bg-01.jpg');

  /* Frosted content panels – keep text readable over the photo */
  --pz-panel:        rgba(253, 250, 242, 0.88);
  --pz-card:         rgba(255, 255, 255, 0.90);

  /* Typography */
  --pz-font-sans:    'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --pz-font-serif:   Georgia, 'Times New Roman', serif;

  /* Spacing */
  --pz-container:    1200px;
  --pz-section-pad:  4rem 0;
  --pz-header-h:     70px;
  --pz-topbar-h:     38px;
  --pz-radius:       8px;
  --pz-radius-lg:    16px;

  /* Transitions */
  --pz-tr:           0.25s ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESET / BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--pz-font-sans);
  color: var(--pz-text);
  background-color: var(--pz-forest-dark);
  margin: 0;
  padding: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Fixed full-viewport background photo.
   A fixed pseudo-element is used instead of background-attachment:fixed,
   which is unreliable on mobile browsers. The image stays put while the
   page content scrolls over it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--pz-body-bg) center / cover no-repeat var(--pz-forest-dark);
  pointer-events: none;
}

/* Crossfade layer for the rotating backgrounds: main.js preloads the next
   image into --pz-body-bg-next, toggles .pz-bg-fading on <body> to fade it
   in, then commits it to --pz-body-bg and resets. Keep the transition
   duration in sync with FADE_MS in main.js. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--pz-body-bg-next, none) center / cover no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

body.pz-bg-fading::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  body::after { transition: none; }
}

a {
  color: var(--pz-forest-light);
  text-decoration: none;
  transition: color var(--pz-tr);
}
a:hover, a:focus { color: var(--pz-gold); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pz-font-sans);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.6em;
  color: var(--pz-forest);
}

p { margin-top: 0; margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════════ */
.pz-container {
  max-width: var(--pz-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.pz-section--earth   { background-color: rgba(250, 244, 230, 0.82); }
.pz-section--forest  { background-color: rgba(60, 74, 31, 0.90); color: var(--pz-white); }
.pz-section--forest-mid {
  background-color: rgba(39, 47, 19, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--pz-white);
}

.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
}

/* ═══════════════════════════════════════════════════════════════
   SKIP LINK (accessibility)
   ═══════════════════════════════════════════════════════════════ */
.pz-skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  background: var(--pz-gold);
  color: var(--pz-forest-dark);
  padding: .5rem 1rem;
  border-radius: var(--pz-radius);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════ */
.pz-topbar {
  background: rgba(39, 47, 19, 0.92);
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  height: var(--pz-topbar-h);
  display: flex;
  align-items: center;
}

.pz-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.pz-topbar__left,
.pz-topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pz-topbar a { color: rgba(255,255,255,.75); }
.pz-topbar a:hover { color: var(--pz-gold); }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.pz-header {
  background: rgba(39, 47, 19, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--pz-header-h);
  z-index: 500;
  transition: box-shadow var(--pz-tr), background var(--pz-tr);
}

.pz-header--sticky {
  position: sticky;
  top: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.pz-sticky-header .pz-header--sticky.pz-header--scrolled {
  background: rgba(39, 47, 19, .88);
}

.pz-header__inner {
  display: flex;
  align-items: center;
  height: var(--pz-header-h);
  gap: 1.5rem;
}

/* ── Logo ── */
.pz-header__brand { flex-shrink: 0; }

.pz-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--pz-white);
  text-decoration: none;
}
.pz-logo:hover { color: var(--pz-gold); }

.pz-logo__img {
  height: 52px;
  width: auto;
  display: block;
}

.pz-logo__text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pz-white);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.pz-logo__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.pz-logo__tagline {
  display: block;
  font-size: .65rem;
  font-weight: 400;
  color: rgba(255,255,255,.6);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-top: 1px;
}

/* ── Navigation ── */
.pz-header__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.pz-header__nav .mod-menu,
.pz-header__nav .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .15rem;
}

.pz-header__nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.pz-header__nav .nav-item > a,
.pz-header__nav .nav-item > span {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .85rem;
  color: rgba(255,255,255,.88);
  font-size: .88rem;
  font-weight: 500;
  border-radius: var(--pz-radius);
  transition: background var(--pz-tr), color var(--pz-tr);
  white-space: nowrap;
}

.pz-header__nav .nav-item > a:hover,
.pz-header__nav .nav-item.active > a,
.pz-header__nav .nav-item.current > a {
  background: rgba(255,255,255,.12);
  color: var(--pz-gold);
}

/* ── Submenu toggle ── */
.mod-menu__toggle-sub {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.6);
  padding: 0 .25rem;
  line-height: 1;
  font-size: .7rem;
  vertical-align: middle;
}

/* ── Dropdown submenus ── */
.pz-header__nav .mod-menu__sub {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--pz-forest-dark);
  border-radius: var(--pz-radius);
  padding: .5rem 0;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  list-style: none;
  margin: 0;
  z-index: 600;
}

.pz-header__nav .nav-item:hover > .mod-menu__sub,
.pz-header__nav .nav-item:focus-within > .mod-menu__sub {
  display: block;
}

/* Invisible hover bridge across the 6px gap between a menu item and its
   dropdown. It's a descendant of the submenu (hence of .nav-item), so the
   pointer crossing the gap keeps .nav-item:hover true and the submenu open.
   Without it the dropdown closes the instant the cursor leaves the link. */
.pz-header__nav .mod-menu__sub::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}

.pz-header__nav .mod-menu__sub li a {
  display: block;
  padding: .5rem 1rem;
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  transition: background var(--pz-tr), color var(--pz-tr);
}

.pz-header__nav .mod-menu__sub li a:hover {
  background: rgba(255,255,255,.08);
  color: var(--pz-gold);
}

/* ── Search ── */
.pz-header__search {
  flex-shrink: 0;
}

.pz-header__search input[type="search"],
.pz-header__search input[type="text"] {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .35rem .9rem;
  color: var(--pz-white);
  font-size: .85rem;
  outline: none;
  transition: background var(--pz-tr), border-color var(--pz-tr);
  width: 180px;
}

.pz-header__search input:focus {
  background: rgba(255,255,255,.2);
  border-color: var(--pz-gold);
}

.pz-header__search input::placeholder { color: rgba(255,255,255,.5); }

/* ── Burger button ── */
.pz-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--pz-radius);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--pz-tr);
}
.pz-burger:hover { background: rgba(255,255,255,.2); }

.pz-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pz-white);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   OFF-CANVAS PANEL
   ═══════════════════════════════════════════════════════════════ */
.pz-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: var(--pz-forest-dark);
  z-index: 900;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pz-offcanvas[aria-hidden="false"] {
  transform: translateX(0);
}

.pz-offcanvas__brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--pz-white);
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.pz-offcanvas__close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem;
  margin-bottom: -.5rem;
  transition: color var(--pz-tr);
}
.pz-offcanvas__close:hover { color: var(--pz-gold); }

/* Off-canvas menu items */
.pz-offcanvas .mod-menu,
.pz-offcanvas .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pz-offcanvas .nav-item > a,
.pz-offcanvas .nav-item > span {
  display: block;
  padding: .65rem .5rem;
  color: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .9rem;
  transition: color var(--pz-tr), padding-left var(--pz-tr);
}

.pz-offcanvas .nav-item > a:hover,
.pz-offcanvas .nav-item.active > a {
  color: var(--pz-gold);
  padding-left: .75rem;
}

.pz-offcanvas .mod-menu__sub {
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0;
}

/* Submenus are always expanded in the offcanvas – the dropdown toggle
   button only makes sense in the desktop header nav. */
.pz-offcanvas .mod-menu__toggle-sub {
  display: none;
}

.pz-offcanvas .mod-menu__sub li a {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  display: block;
  padding: .45rem .5rem;
  transition: color var(--pz-tr);
}
.pz-offcanvas .mod-menu__sub li a:hover { color: var(--pz-gold); }

/* Overlay */
.pz-offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.pz-offcanvas-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════
   HERO / SLIDER
   ═══════════════════════════════════════════════════════════════ */
.pz-hero {
  position: relative;
  min-height: 560px;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.pz-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(39, 47, 19, .45) 0%,
    rgba(39, 47, 19, .20) 50%,
    rgba(39, 47, 19, .55) 100%
  );
  pointer-events: none;
}

.pz-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.pz-hero__content {
  max-width: 640px;
}

.pz-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--pz-white);
  line-height: 1.1;
  margin-bottom: .6rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.pz-hero__sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.85);
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}

/* ── Slider module passes through untouched ── */
.pz-hero__inner > .moduletable {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   SLIDER CARD  (inside .pz-hero)
   Modelled after tpl_esre's EsreSlider; uses pz-* naming
   ═══════════════════════════════════════════════════════════════ */
.pz-slider-card {
  width: 100%;
  position: relative;
  border-radius: var(--pz-radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pz-slider-viewport {
  overflow: hidden;
  width: 100%;
}

.pz-slider-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── Individual slides ── */
.pz-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 3.25rem 4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  visibility: hidden;
}
.pz-slide--active { visibility: visible; }

/* Per-slide subtle tints */
.pz-slide:nth-child(1) { background: rgba(60,74,31,.35); }
.pz-slide:nth-child(2) { background: rgba(90,104,44,.35); }
.pz-slide:nth-child(3) { background: rgba(39,47,19,.35); }
.pz-slide:nth-child(n+4) { background: rgba(60,74,31,.30); }

/* Decorative bokeh orb per slide */
.pz-slide::after {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  right: -50px; top: -70px;
  background: radial-gradient(circle, rgba(217,164,65,.14), transparent 70%);
  pointer-events: none;
}

/* ── Slide eyebrow ── */
.pz-slide__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.pz-slide__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pz-gold), var(--pz-forest-light));
  flex-shrink: 0;
}

.pz-slide__eyebrow span {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pz-gold);
}

/* ── Slide typography ── */
.pz-slide__title {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--pz-white);
  line-height: 1.12;
  margin: 0 0 1rem;
  max-width: 600px;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.pz-slide__title em {
  font-style: normal;
  color: var(--pz-gold);
}

.pz-slide__text {
  font-size: .92rem;
  color: rgba(255,255,255,.78);
  line-height: 1.68;
  margin: 0 0 1.75rem;
  max-width: 480px;
}

.pz-slide__actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Slide CTA buttons */
.pz-slide__actions .pz-btn--primary {
  background: linear-gradient(135deg, var(--pz-gold), var(--pz-gold-hover));
  color: var(--pz-forest-dark);
  border-color: transparent;
  box-shadow: 0 5px 18px rgba(201,168,76,.35);
}
.pz-slide__actions .pz-btn--primary:hover {
  box-shadow: 0 7px 24px rgba(201,168,76,.50);
  color: var(--pz-forest-dark);
}

.pz-slide__actions .pz-btn--secondary {
  background: rgba(255,255,255,.12);
  color: var(--pz-white);
  border-color: rgba(255,255,255,.3);
}
.pz-slide__actions .pz-btn--secondary:hover {
  background: rgba(255,255,255,.22);
  color: var(--pz-white);
}

/* ── Prev / Next buttons ── */
.pz-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  color: var(--pz-white);
  font-size: 1.5rem;
  line-height: 1;
  transition: background var(--pz-tr), box-shadow var(--pz-tr);
  user-select: none;
  padding: 0;
}

.pz-slider-btn:hover {
  background: rgba(201,168,76,.35);
  border-color: var(--pz-gold);
  color: var(--pz-gold);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.pz-slider-prev { left: 14px; }
.pz-slider-next { right: 14px; }

/* ── Dots ── */
.pz-slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}

.pz-sdot {
  height: 7px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255,255,255,.3);
  width: 7px;
  transition: all .28s ease;
  border: none;
  padding: 0;
}

.pz-sdot.active {
  background: var(--pz-gold);
  width: 22px;
}

/* Fallback: if module's own HTML fills the viewport, give it minimum height */
.pz-slider-viewport:not(:has(.pz-slide)) {
  min-height: 220px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pz-slider-track { transition: none !important; }
  .pz-slide { visibility: visible; }
}

/* Small screens: simplify padding, hide nav buttons */
@media (max-width: 640px) {
  .pz-slide { padding: 2rem 1.5rem 3rem; }
  .pz-slider-btn { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FEATURE STRIP
   Dark forest band with icon columns
   ═══════════════════════════════════════════════════════════════ */
.pz-feature {
  background: rgba(60, 74, 31, 0.90);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 2rem 0;
  border-top: 3px solid var(--pz-gold);
}

.pz-feature .pz-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

/* pzStrip module chrome */
.pz-feature .moduletable {
  flex: 1;
  min-width: 200px;
  padding: 1.25rem 2rem;
  border-right: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.pz-feature .moduletable:last-child { border-right: none; }

.pz-feature .moduletable h3,
.pz-feature .moduletable h4,
.pz-feature .module-title {
  color: var(--pz-gold);
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
}

.pz-feature .moduletable p,
.pz-feature .moduletable li,
.pz-feature .moduletable span {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  margin: 0;
}

.pz-feature .moduletable img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: .35rem;
}

/* ═══════════════════════════════════════════════════════════════
   USER ROW
   ═══════════════════════════════════════════════════════════════ */
.pz-user-row {
  padding: var(--pz-section-pad);
}

.pz-user-row__grid {
  display: grid;
  gap: 1.75rem;
}

.pz-user-row__grid.pz-cols-1 { grid-template-columns: 1fr; }
.pz-user-row__grid.pz-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pz-user-row__grid.pz-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pz-user-row__grid.pz-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ═══════════════════════════════════════════════════════════════
   POSITIONS GRIDS  (1-4 and 5-8)
   ═══════════════════════════════════════════════════════════════ */
.pz-positions {
  padding: var(--pz-section-pad);
}

.pz-positions__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ═══════════════════════════════════════════════════════════════
   MODULE CHROME: pzCard  (user*, position*)
   ═══════════════════════════════════════════════════════════════ */
.pz-user-cell .moduletable,
.pz-position-cell .moduletable {
  background: var(--pz-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(221, 211, 189, 0.7);
  border-radius: var(--pz-radius-lg);
  padding: 1.75rem;
  height: 100%;
  transition: box-shadow var(--pz-tr), transform var(--pz-tr);
  box-shadow: 0 2px 8px rgba(39, 47, 19, .10);
  overflow: hidden;
}

.pz-user-cell .moduletable:hover,
.pz-position-cell .moduletable:hover {
  box-shadow: 0 8px 28px rgba(39, 47, 19, .22);
  transform: translateY(-3px);
}

.pz-user-cell .module-title,
.pz-position-cell .module-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pz-forest);
  margin-bottom: .85rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--pz-gold);
  display: inline-block;
}

/* pz-section--earth card variant */
.pz-positions--mid .moduletable {
  background: var(--pz-card);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.pz-main {
  padding: 2.5rem 0;
  min-height: 300px;
}

/* Frosted reading panel: slightly transparent so the wildlife photo
   stays visible behind the content, blurred underneath so body text
   remains fully readable. */
.pz-main > .pz-container {
  opacity: .8;
  background: var(--pz-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--pz-radius-lg);
  box-shadow: 0 10px 40px rgba(39, 47, 19, 0.20);
  padding-top: 2rem;
  padding-bottom: 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.pz-breadcrumb {
  margin-bottom: 1.25rem;
  font-size: .82rem;
  color: var(--pz-text-light);
}

.pz-breadcrumb a { color: var(--pz-forest-light); }
.pz-breadcrumb a:hover { color: var(--pz-gold); }

.pz-breadcrumb .breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pz-content-top,
.pz-content-bottom {
  margin-bottom: 1.5rem;
}

/* Layout modes */
.pz-content-wrap {
  display: grid;
  gap: 2rem;
}

.pz-layout--full  { grid-template-columns: 1fr; }
.pz-layout--left  { grid-template-columns: 260px 1fr; }
.pz-layout--right { grid-template-columns: 1fr 260px; }
.pz-layout--both  { grid-template-columns: 240px 1fr 240px; }

.pz-content-area {
  min-width: 0; /* prevent overflow */
}

/* Sidebar module chrome */
.pz-sidebar .moduletable {
  background: rgba(250, 244, 230, 0.85);
  border-radius: var(--pz-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--pz-forest-light);
}

.pz-sidebar .module-title,
.pz-sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pz-forest);
  margin-bottom: .75rem;
}

.pz-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pz-sidebar ul li {
  border-bottom: 1px solid rgba(36,61,24,.1);
}

.pz-sidebar ul li:last-child { border-bottom: none; }

.pz-sidebar ul li a {
  display: block;
  padding: .4rem 0;
  color: var(--pz-text);
  font-size: .88rem;
}
.pz-sidebar ul li a:hover { color: var(--pz-forest-light); padding-left: .4rem; }

/* ── Joomla component area typography ── */
.pz-content-area h1 { font-size: 2rem; color: var(--pz-forest); }
.pz-content-area h2 { font-size: 1.6rem; color: var(--pz-forest); }
.pz-content-area h3 { font-size: 1.25rem; color: var(--pz-forest-mid); }

.pz-content-area .page-header {
  border-bottom: 2px solid var(--pz-gold);
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
}

/* ── Buttons ── */
.btn, button, input[type=submit], .pz-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.3rem;
  border-radius: var(--pz-radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--pz-tr), color var(--pz-tr), border-color var(--pz-tr), box-shadow var(--pz-tr);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary, .pz-btn--primary {
  background: var(--pz-gold);
  color: var(--pz-forest-dark);
  border-color: var(--pz-gold);
}
.btn-primary:hover, .pz-btn--primary:hover {
  background: var(--pz-gold-hover);
  border-color: var(--pz-gold-hover);
  color: var(--pz-forest-dark);
  box-shadow: 0 4px 14px rgba(201,168,76,.35);
}

.btn-secondary, .pz-btn--secondary {
  background: transparent;
  color: var(--pz-forest);
  border-color: var(--pz-forest);
}
.btn-secondary:hover, .pz-btn--secondary:hover {
  background: var(--pz-forest);
  color: var(--pz-white);
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

th {
  background: var(--pz-forest);
  color: var(--pz-white);
  padding: .6rem 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--pz-border);
}

tr:nth-child(even) td { background: var(--pz-earth); }

/* ── Forms ── */
.control-label, label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--pz-forest);
  margin-bottom: .3rem;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
textarea,
select {
  width: 100%;
  padding: .5rem .85rem;
  border: 1px solid var(--pz-border);
  border-radius: var(--pz-radius);
  font-family: var(--pz-font-sans);
  font-size: .9rem;
  color: var(--pz-text);
  background: var(--pz-white);
  transition: border-color var(--pz-tr), box-shadow var(--pz-tr);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pz-forest-light);
  box-shadow: 0 0 0 3px rgba(92,143,64,.15);
}

textarea { min-height: 120px; resize: vertical; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .6rem;
  border: 1px solid var(--pz-border);
  border-radius: var(--pz-radius);
  color: var(--pz-text);
  font-size: .88rem;
  transition: background var(--pz-tr), border-color var(--pz-tr), color var(--pz-tr);
}

.pagination .page-link:hover {
  background: var(--pz-forest);
  border-color: var(--pz-forest);
  color: var(--pz-white);
}

.pagination .active .page-link {
  background: var(--pz-gold);
  border-color: var(--pz-gold);
  color: var(--pz-forest-dark);
  font-weight: 700;
}

/* ── Alerts ── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--pz-radius);
  margin-bottom: 1rem;
  font-size: .9rem;
  border-left: 4px solid transparent;
}
.alert-info    { background: #e8f4ec; border-color: var(--pz-forest-light); color: var(--pz-forest); }
.alert-success { background: #e8f4ec; border-color: #4caf50; color: #2e5e2e; }
.alert-warning { background: #fdf3e3; border-color: var(--pz-gold); color: #7a5e1a; }
.alert-danger, .alert-error { background: #fde8e8; border-color: #e53935; color: #7a1c1c; }

/* ── Article / blog layout ── */
.items-row, .item-page {
  margin-bottom: 2rem;
}

.article-info-term,
.article-info-entry {
  font-size: .78rem;
  color: var(--pz-text-light);
}

.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-bottom: 1rem;
  font-size: .78rem;
  color: var(--pz-text-light);
}

.readmore a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--pz-forest-light);
  font-weight: 600;
  font-size: .88rem;
  transition: color var(--pz-tr), gap var(--pz-tr);
}
.readmore a:hover { color: var(--pz-gold); gap: .5rem; }

/* ═══════════════════════════════════════════════════════════════
   BOTTOM ROW (bottom1 – bottom4)  forest-mid band
   ═══════════════════════════════════════════════════════════════ */
.pz-bottom {
  padding: 3rem 0;
}

.pz-bottom__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* pzFooterModule chrome */
.pz-bottom-cell .moduletable {
  color: rgba(255,255,255,.85);
}

.pz-bottom-cell .module-title,
.pz-bottom-cell h3 {
  color: var(--pz-gold);
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.pz-bottom-cell a { color: rgba(255,255,255,.75); }
.pz-bottom-cell a:hover { color: var(--pz-gold); }

.pz-bottom-cell ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pz-bottom-cell ul li {
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .87rem;
}
.pz-bottom-cell ul li:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.pz-footer {
  background: rgba(39, 47, 19, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,.8);
}

.pz-footer__widgets {
  padding: 3.5rem 0 2.5rem;
}

.pz-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pz-footer__col .module-title,
.pz-footer__col h3 {
  color: var(--pz-gold);
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.pz-footer__col p,
.pz-footer__col li {
  font-size: .87rem;
  color: rgba(255,255,255,.7);
}

.pz-footer__col a {
  color: rgba(255,255,255,.7);
  transition: color var(--pz-tr);
}
.pz-footer__col a:hover { color: var(--pz-gold); }

.pz-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pz-footer__col ul li {
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pz-footer__col ul li:last-child { border-bottom: none; }

/* Footer bar */
.pz-footer__bar {
  background: rgba(0,0,0,.25);
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.pz-footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
}

.pz-footer__bar-inner a { color: rgba(255,255,255,.6); }
.pz-footer__bar-inner a:hover { color: var(--pz-gold); }

/* ═══════════════════════════════════════════════════════════════
   PAGEBUILDER / COMINGSOON / 404 positions
   ═══════════════════════════════════════════════════════════════ */
/* These positions render their module content without extra chrome */
/* 404 and coming soon are typically rendered full-width via the
   component area, but position modules can augment them */

/* ═══════════════════════════════════════════════════════════════
   JOOMLA CORE OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

/* System messages */
#system-message-container .alert { margin-bottom: 1.25rem; }

/* Category blog / featured */
.blog-featured .article-list,
.blog .items-row {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--pz-border);
  margin-bottom: 1.5rem;
}

/* Contact form */
.contact-form .control-group { margin-bottom: 1.1rem; }
.contact-form .btn-primary { margin-top: .5rem; }

/* Login module */
.login-form .control-group,
.mod-login .control-group { margin-bottom: .85rem; }

/* Password show/hide toggle: the template's transparent .btn-secondary left
   the eye icon low-contrast against the panel, so the sibling username box
   (Bootstrap's light .input-group-text) looked present while this one didn't.
   Give the toggle the same light box + dark icon so both read consistently. */
.input-group > .input-password-toggle {
  background: var(--pz-earth);
  color: var(--pz-forest);
  border: 1px solid var(--pz-border);
  border-left: 0;
}
.input-group > .input-password-toggle:hover,
.input-group > .input-password-toggle:focus {
  background: var(--pz-forest);
  color: var(--pz-white);
  border-color: var(--pz-forest);
}
.input-group > .input-password-toggle .icon-eye,
.input-group > .input-password-toggle .icon-eye-slash { color: inherit; }

/* Search */
.search-results .result-text { color: var(--pz-text); font-size: .9rem; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root {
    --pz-container: 100%;
  }

  .pz-layout--both  { grid-template-columns: 220px 1fr; }
  .pz-layout--left  { grid-template-columns: 220px 1fr; }
  .pz-layout--right { grid-template-columns: 1fr 220px; }
}

@media (max-width: 900px) {
  .pz-header__nav  { display: none; }
  .pz-header__search { display: none; }
  .pz-burger { display: flex; }

  .pz-layout--both,
  .pz-layout--left,
  .pz-layout--right { grid-template-columns: 1fr; }

  .pz-sidebar--left  { order: 2; }
  .pz-sidebar--right { order: 2; }
  .pz-content-area   { order: 1; }

  .pz-user-row__grid.pz-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .pz-user-row__grid.pz-cols-3 { grid-template-columns: repeat(2, 1fr); }

  .pz-hero { min-height: 420px; }
  .pz-hero__title { font-size: 2.1rem; }
}

@media (max-width: 640px) {
  :root {
    --pz-section-pad: 2.5rem 0;
  }

  .pz-main > .pz-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    border-radius: var(--pz-radius);
  }

  .pz-user-row__grid.pz-cols-2,
  .pz-user-row__grid.pz-cols-3,
  .pz-user-row__grid.pz-cols-4 { grid-template-columns: 1fr; }

  .pz-positions__grid { grid-template-columns: 1fr; }

  .pz-footer__grid  { grid-template-columns: 1fr; }
  .pz-bottom__grid  { grid-template-columns: 1fr; }

  .pz-hero { min-height: 320px; }
  .pz-hero__title { font-size: 1.75rem; }

  .pz-feature .moduletable {
    flex-basis: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .pz-feature .moduletable:last-child { border-bottom: none; }

  .pz-topbar { display: none; }

  .pz-footer__bar-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .pz-header__inner { gap: .75rem; }
  .pz-logo__text    { font-size: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════ */
@media print {
  .pz-topbar,
  .pz-header,
  .pz-offcanvas,
  .pz-offcanvas-overlay,
  .pz-hero,
  .pz-feature,
  .pz-bottom,
  .pz-footer,
  .pz-skip-link { display: none !important; }

  .pz-main { padding: 0; }
  .pz-main > .pz-container {
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }
  body { color: #000; background: #fff; }
  body::before, body::after { display: none; }
  a { color: #000; text-decoration: underline; }
}
