/*
Theme Name: Heimatverein Afferde
Theme URI: https://localhost:8080
Author: OpenCode
Description: Modern custom theme for the Heimatverein Afferde website.
Version: 1.0.3
Text Domain: heimatverein-afferde
*/

:root {
  --pine-900: #1f3a32;
  --pine-700: #355d52;
  --moss-500: #6f8f67;
  --sand-200: #efe6d5;
  --sand-100: #f8f3ea;
  --clay-300: #cf9d69;
  --berry-500: #a44941;
  --ink-900: #19211e;
  --ink-700: #47514c;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(25, 33, 30, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: min(1180px, calc(100vw - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Avenir Next, Segoe UI, Helvetica Neue, sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at top left, rgba(207, 157, 105, 0.3), transparent 24%),
    linear-gradient(180deg, #f6efe1 0%, #fbf8f1 38%, #f1eee6 100%);
  line-height: 1.6;
}

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(248, 243, 234, 0.9);
  border-bottom: 1px solid rgba(53, 93, 82, 0.08);
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: var(--container);
  margin: 0 auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  min-height: 86px;
  padding: 0.65rem 0;
}

.site-branding {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.site-branding__eyebrow,
.site-footer__eyebrow {
  display: inline-block;
  color: var(--berry-500);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-title {
  font-family: Baskerville, Palatino Linotype, serif;
  font-size: clamp(1.05rem, 1.55vw, 1.55rem);
  margin: 0;
  line-height: 1.05;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--pine-900);
  color: var(--white);
  border-radius: 999px;
  padding: 0.8rem 1rem;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-navigation {
  min-width: 0;
  justify-self: end;
}

.primary-menu a {
  display: inline-flex;
  white-space: nowrap;
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 0.96rem;
}

.primary-menu .current-menu-item a,
.primary-menu a:hover,
.primary-menu a:focus-visible {
  background: rgba(53, 93, 82, 0.1);
  color: var(--pine-900);
}

.site-main { padding: 2rem 0 4rem; flex: 1; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 8px);
  background: linear-gradient(135deg, rgba(31, 58, 50, 0.96), rgba(53, 93, 82, 0.82));
  color: var(--white);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -28% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(207, 157, 105, 0.45), transparent 70%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 4vw, 4rem);
}

.hero h1,
.section-title,
.entry-title,
.hv-card h3,
.page-title {
  font-family: Baskerville, Palatino Linotype, serif;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.95;
  margin: 0.4rem 0 1rem;
}

.hero p { max-width: 60ch; color: rgba(255, 253, 248, 0.86); }

.hero__actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button,
.hv-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  border: 0;
  cursor: pointer;
  background: var(--clay-300);
  color: var(--ink-900);
  font-weight: 700;
}

.button--ghost {
  background: rgba(255, 253, 248, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 253, 248, 0.22);
}

.hero__card,
.intro-panel,
.hv-callout,
.hv-card,
.hv-form-panel,
.content-panel,
.site-footer {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(53, 93, 82, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero__card {
  padding: 1.5rem;
  color: var(--ink-900);
}

.hero__card p { color: var(--ink-700); }

.hero__card img {
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: 1rem;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero__meta strong { display: block; font-size: 1.4rem; color: var(--clay-300); }

.intro-panel,
.entry-wrap,
.archive-wrap { padding: 2rem; margin-top: 2rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title,
.page-title,
.entry-title { margin: 0; font-size: clamp(2rem, 3vw, 3rem); }

.hv-front-grid,
.hv-card-grid,
.info-grid,
.two-column {
  display: grid;
  gap: 1.25rem;
}

.hv-front-grid,
.info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hv-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-column { grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); }
.two-column--full { grid-template-columns: 1fr; }

.hv-callout,
.hv-card,
.content-panel {
  padding: 1.4rem;
  border-radius: var(--radius-md);
}

.hv-card-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.hv-card-body { padding-top: 1rem; }
.hv-card h3 { margin: 0 0 0.6rem; font-size: 1.6rem; }
.hv-meta { color: var(--berry-500); font-size: 0.9rem; margin-bottom: 0.5rem; }

.hv-text-link {
  color: var(--pine-700);
  font-weight: 700;
}

.hv-form-panel {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.hv-join-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hv-join-form label {
  display: grid;
  gap: 0.4rem;
}

.hv-join-form .is-full,
.hv-checkbox,
.hv-join-form button { grid-column: 1 / -1; }

input,
textarea {
  width: 100%;
  border: 1px solid rgba(53, 93, 82, 0.18);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font: inherit;
  background: #fffefb;
}

.hv-checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.hv-checkbox input { width: auto; margin-top: 0.3rem; }

.hv-form-message {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  font-weight: 700;
}

.hv-form-message.is-success { background: rgba(111, 143, 103, 0.18); color: var(--pine-900); }
.hv-form-message.is-error { background: rgba(164, 73, 65, 0.14); color: var(--berry-500); }

.entry-content,
.page-content { color: var(--ink-700); }
.entry-content .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.entry-content .gallery .gallery-item {
  float: none;
  width: auto !important;
  margin: 0;
}
.entry-content .gallery br { display: none; }
.entry-content .gallery .gallery-icon,
.entry-content .gallery .gallery-icon a {
  display: block;
  width: 100%;
}
.entry-content .gallery img {
  border-radius: 22px;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(25, 33, 30, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.entry-content .gallery a:hover img,
.entry-content .gallery a:focus-visible img {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(25, 33, 30, 0.18);
}
.single-hv_album .two-column { grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr); }
.single-hv_album .entry-content .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.single-hv_album .two-column--full { grid-template-columns: 1fr; }
.single-hv_album .two-column--full .entry-content .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.single-hv_album .content-panel { padding-bottom: 2rem; }

.hv-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4rem;
  background: rgba(12, 16, 15, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.hv-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hv-lightbox__figure {
  margin: 0;
  width: min(92vw, 1600px);
  max-height: 94vh;
}

.hv-lightbox__image {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 94vh;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.hv-lightbox__close,
.hv-lightbox__nav {
  position: absolute;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.14);
  color: var(--white);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hv-lightbox__close:hover,
.hv-lightbox__close:focus-visible,
.hv-lightbox__nav:hover,
.hv-lightbox__nav:focus-visible {
  background: rgba(255, 253, 248, 0.24);
  transform: scale(1.04);
}

.hv-lightbox__close { top: 1.5rem; right: 1.5rem; }
.hv-lightbox__nav--prev { left: 1.5rem; }
.hv-lightbox__nav--next { right: 1.5rem; }

.sidebar-card {
  padding: 1.4rem;
  background: rgba(31, 58, 50, 0.96);
  color: var(--white);
  border-radius: var(--radius-md);
}

.site-footer {
  margin-top: 2rem;
  background: rgba(25, 33, 30, 0.92);
  color: var(--white);
  border: 0;
  border-top: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 0;
  box-shadow: 0 -10px 28px rgba(25, 33, 30, 0.18);
}

.site-footer__inner {
  padding: 0.9rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__copyright {
  font-size: 0.95rem;
  color: rgba(255, 253, 248, 0.82);
}

.site-footer__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.1);
  color: var(--white);
  transition: background 0.2s ease;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  background: rgba(255, 253, 248, 0.18);
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero__grid,
  .two-column,
  .hv-front-grid,
  .hv-card-grid,
  .info-grid,
  .hv-join-form,
  .entry-content .gallery {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
  }
  .site-branding {
    width: calc(100% - 110px);
  }
  .menu-toggle { display: inline-flex; }
  .site-navigation { width: 100%; display: none; }
  .site-navigation.is-open { display: block; }
  .primary-menu { flex-direction: column; padding-top: 1rem; }
  .site-footer__inner { padding: 0.8rem 0; }
  .single-hv_album .entry-content .gallery { grid-template-columns: 1fr; }
  .single-hv_album .two-column--full .entry-content .gallery { grid-template-columns: 1fr; }
  .hv-lightbox { padding: 0.75rem; }
  .hv-lightbox__close { top: 1rem; right: 1rem; }
  .hv-lightbox__nav { top: auto; bottom: 1rem; }
  .hv-lightbox__nav--prev { left: 1rem; }
  .hv-lightbox__nav--next { right: 1rem; }
}

@media (max-width: 640px) {
  .site-main { padding-top: 1rem; }
  .hero__meta { grid-template-columns: 1fr; }
  .intro-panel,
  .archive-wrap,
  .entry-wrap,
  .hv-form-panel { padding: 1.3rem; }
  .site-footer__inner { flex-wrap: wrap; }
}
