/* Add your custom styles here */

/* ---------- FrauFam brand tokens ---------- */
:root {
  --ff-green: #1e6b3e;
  --ff-green-light: #2a8a52;
  --ff-green-pale: #8fd6ae;
  --ff-dark: #12281c;
  --ff-heading: #16321f;
}

/* Brand-green primary buttons everywhere (Bootstrap 5 CSS variables). */
.btn-primary {
  --bs-btn-bg: var(--ff-green);
  --bs-btn-border-color: var(--ff-green);
  --bs-btn-hover-bg: var(--ff-green-light);
  --bs-btn-hover-border-color: var(--ff-green-light);
  --bs-btn-active-bg: var(--ff-dark);
  --bs-btn-active-border-color: var(--ff-dark);
  font-weight: 600;
}

h1, h2, h3, h4 {
  color: var(--ff-heading);
  font-weight: 700;
}

/* Button blocks dropped directly into a grid column render as a bare
   <a class="btn"> with no wrapper or margin — glued to the block above.
   Scoped to #content so footer buttons (styled as text links) and
   buttons inside cards/heroes are unaffected. */
#content .crx-grid .row > div > .btn {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* ---------- Navbar ---------- */
.navbar.bg-light {
  background: #fff !important;
  border-bottom: 1px solid rgba(18, 40, 28, 0.08);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.navbar-brand img {
  max-height: 48px;
  width: auto;
}
.navbar .nav-link {
  font-weight: 600;
  color: #2c3a31;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--ff-green);
}
/* Donate call-to-action in the menu (set via the item's Custom CSS Class) */
.navbar a.nav-spenden {
  background: var(--ff-green);
  color: #fff !important;
  border-radius: 2rem;
  padding: 0.45rem 1.25rem !important;
  margin-left: 0.5rem;
}
.navbar a.nav-spenden:hover,
.navbar a.nav-spenden:focus {
  background: var(--ff-green-light);
}
/* Collapsed (hamburger) menu: below the lg breakpoint nav links become
   full-width blocks — right for text links, wrong for the Spenden pill,
   which would stretch into a full-width bar. */
@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    padding: 0.75rem 0.25rem 1rem;
  }
  .navbar .nav-link {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  .navbar a.nav-spenden {
    display: inline-block;
    width: fit-content;
    margin-left: 0;
    margin-top: 0.5rem;
  }
  .navbar form {
    margin-top: 1rem;
  }
}

/* Quieter search: outline button in brand color */
.navbar form .btn {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--ff-green);
  --bs-btn-border-color: var(--ff-green);
  --bs-btn-hover-bg: var(--ff-green);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: var(--ff-green);
}

/* ---------- Footer ---------- */
/* Sticky footer: body is a flex column filling the viewport and #content
   (the CRX page-body wrapper) absorbs the leftover space, so on short
   pages the footer still sits at the bottom. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#content {
  flex: 1 0 auto;
}
footer {
  background: var(--ff-dark);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 4rem;
}
footer .crx-grid {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}
footer h2,
footer h3,
footer h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
footer p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
footer a {
  color: var(--ff-green-pale);
  text-decoration: none;
}
footer a:hover,
footer a:focus {
  color: #fff;
  text-decoration: underline;
}
/* Button blocks used as footer links (e.g. "btn-link" style) should look
   like the surrounding text links, not Bootstrap-blue buttons. */
footer .btn-link {
  --bs-btn-color: var(--ff-green-pale);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  padding: 0;
  text-decoration: none;
}
footer .btn-link:hover,
footer .btn-link:focus {
  text-decoration: underline;
}
/* Partner/funder logos in the footer: small chip on the dark background */
footer img {
  max-height: 56px;
  width: auto;
  background: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
}

/* ---------- CTA band (hero block with Custom CSS Class "cta-band") ---------- */
.cta-band {
  position: relative;
  background-size: cover;
  background-position: center;
}
/* Dark scrim so white text passes contrast on any photo */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(18, 40, 28, 0.88) 0%,
    rgba(18, 40, 28, 0.6) 55%,
    rgba(18, 40, 28, 0.25) 100%
  );
}
.cta-band .hero-fg {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 4.5rem 0;
}
.cta-band .hero-fg h1,
.cta-band .hero-fg h2,
.cta-band .hero-fg h3 {
  color: #fff;
  font-weight: 800;
}
.cta-band .hero-fg .crx-grid {
  padding-top: 0;
  padding-bottom: 0;
}
/* Neutralize stray borders/rules inside the band */
.cta-band hr {
  display: none;
}

/* ---------- Title hero on cover images (all page types) ---------- */
/* "page-hero" is set by our web_page.html override (events, indexes,
   forms, locations inherit it); "article-hero" by the article template.
   Scoped to these classes so editor Hero Unit blocks (also .hero-bg)
   keep their own styling. */
.article-hero,
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}
.article-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 40, 28, 0.05) 25%,
    rgba(18, 40, 28, 0.78) 100%
  );
}
.article-hero .hero-fg,
.page-hero .hero-fg {
  position: relative;
  width: 100%;
  padding: 6rem 0 1.75rem;
}
.article-hero .hero-fg h1,
.page-hero .hero-fg h1 {
  color: #fff;
  font-weight: 800;
  margin-bottom: 0;
}

/* ---------- Article pages ---------- */
/* Comfortable reading column (navbar/footer use container-fluid, unaffected) */
.crx-articlepage .container {
  max-width: 820px;
}
/* FrauFam article header (article_page_fraufam.html) — works in both
   contexts: overlaid on the cover-image hero, or as a plain header. */
.article-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ff-green);
  margin-bottom: 0.5rem;
}
.article-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.article-caption {
  color: #5c6660;
  margin-bottom: 0.5rem;
}
.article-meta {
  display: flex;
  gap: 0.5rem;
  color: #6b7570;
  font-size: 0.9rem;
  margin-bottom: 0;
}
/* On the dark cover-image hero: lift text colors for contrast */
.article-hero {
  min-height: 380px;
}
.article-hero .article-kicker {
  color: var(--ff-green-pale);
}
.article-hero .article-title {
  color: #fff;
}
.article-hero .article-caption {
  color: rgba(255, 255, 255, 0.85);
}
.article-hero .article-meta {
  color: rgba(255, 255, 255, 0.75);
}
.crx-articlepage p {
  line-height: 1.7;
}
.crx-articlepage .img-fluid {
  border-radius: 0.5rem;
}

/* ---------- Cards (news teasers etc.) ---------- */
.card {
  border: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(18, 40, 28, 0.08), 0 8px 24px rgba(18, 40, 28, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(18, 40, 28, 0.14);
}
.card a {
  color: var(--ff-green);
  font-weight: 700;
  text-decoration: none;
}
.card a:hover {
  color: var(--ff-green-light);
  text-decoration: underline;
}

/* Supporters Grid */
/* Constrained width so wide displays wrap into 2 balanced rows instead of
   one long cramped line; generous gaps for a spacious, airy feel. */
.supporter-grid-block .supporter-row {
  max-width: 66rem;
  margin-inline: auto;
  column-gap: 4rem;
  row-gap: 2.75rem;
}
@media (max-width: 767.98px) {
  .supporter-grid-block .supporter-row {
    column-gap: 2rem;
    row-gap: 1.75rem;
  }
}
.supporter-item a {
  display: inline-block;
  transition: opacity 0.2s;
}
.supporter-item a:hover {
  opacity: 0.75;
}
.supporter-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  /* Uniform muted look; full color on hover/focus */
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.supporter-item:hover .supporter-logo,
.supporter-item a:focus .supporter-logo {
  filter: none;
  opacity: 1;
}


/* ---------- Hero Carousel (Volto-light-inspired) ---------- */
.hero-carousel .hero-slide {
  position: relative;
}
.hero-carousel .hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Dark text panel. Mobile-first: sits BELOW the image in normal flow,
   full width, solid dark background (WCAG AA contrast). Extra bottom
   padding leaves room for the overlaid dots. */
.hero-carousel .hero-panel {
  background: #141d18;
  color: #fff;
  padding: 1.75rem 1.5rem 2.75rem;
}

/* Typography scale: small green kicker -> big bold heading -> muted text */
.hero-carousel .hero-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8fd6ae;
  margin-bottom: 0.75rem;
}
.hero-carousel .hero-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #fff; /* keep white on the dark panel (global h* color must not win) */
}
.hero-carousel .hero-text {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  max-width: 38rem;
  margin-bottom: 1.25rem;
}
.hero-carousel .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}
.hero-carousel .hero-buttons .btn-primary {
  background: #2a8a52;
  border-color: #2a8a52;
  font-weight: 600;
}
.hero-carousel .hero-buttons .btn-primary:hover {
  background: #1e6b3e;
  border-color: #1e6b3e;
}
.hero-carousel .hero-buttons .btn-outline-light {
  font-weight: 600;
}

/* Desktop: panel overlaid bottom-LEFT with breathing room (not centered),
   soft blur behind it. z-index above the slide, below the controls. */
@media (min-width: 768px) {
  .hero-carousel .hero-panel {
    position: absolute;
    left: max(3rem, 4vw);
    bottom: 3.25rem;
    z-index: 2;
    max-width: 34rem;
    padding: 2rem 2.25rem;
    border-radius: 0.75rem;
    background: rgba(15, 22, 18, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

/* Dots: small circles, bottom-center. text-indent kills any stray
   numbering from conflicting styles. */
.hero-carousel .carousel-indicators {
  margin-bottom: 1rem;
  z-index: 3;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 0;
  margin: 0 0.25rem;
  background-color: rgba(255, 255, 255, 0.55);
  opacity: 1;
  text-indent: -9999px;
  overflow: hidden;
}
.hero-carousel .carousel-indicators .active {
  background-color: #fff;
}

/* Arrows: compact circular buttons pinned bottom-RIGHT, far away from the
   panel. Replaces Bootstrap's invisible full-height 15%-wide click columns
   (which overlapped the panel and stole button clicks). */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  top: auto;
  bottom: 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(15, 22, 18, 0.55);
  opacity: 1;
  z-index: 3;
  transition: background 0.2s;
}
.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background: rgba(15, 22, 18, 0.85);
}
.hero-carousel .carousel-control-prev {
  left: auto;
  right: 5.25rem;
}
.hero-carousel .carousel-control-next {
  right: 1.5rem;
}
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Mobile: keep arrows (swipe only works on real touch devices), but small
   and vertically centered ON THE IMAGE. The fill-1600x640 rendition is
   always 2.5:1, so at full width the image's center sits at 20vw — the
   arrows never touch the stacked panel below. */
@media (max-width: 767.98px) {
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    top: 20vw;
    bottom: auto;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
  }
  .hero-carousel .carousel-control-prev {
    left: 0.75rem;
    right: auto;
  }
  .hero-carousel .carousel-control-next {
    right: 0.75rem;
  }
  .hero-carousel .carousel-control-prev-icon,
  .hero-carousel .carousel-control-next-icon {
    width: 0.9rem;
    height: 0.9rem;
  }
}

/* Accessibility: honor reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .carousel-item {
    transition: none;
  }
}

/* Adds a bit of spacing to "Responsive Grid Row" blocks. */
.crx-grid {
  padding-top: 40px;
  padding-bottom: 40px;
}
.crx-grid .crx-grid {
  padding-top: 0;
  padding-bottom: 0;
}

