@import './fonts/fonts.css';

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --c-primary:      #65af23;
  --c-primary-dark: #4d8c1b;
  --c-dark:         #3b4c47;
  --c-dark-alt:     #4d6058;
  --c-bg:           #ffffff;
  --c-bg-alt:       #f5f8f4;
  --c-text:         #1e2d26;
  --c-text-muted:   #607068;
  --c-border:       #dde8db;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  --radius:       8px;
  --radius-sm:    5px;
  --shadow:       0 2px 10px rgba(30,45,38,.07);
  --shadow-hover: 0 8px 28px rgba(30,45,38,.13);
  --transition:   .2s ease;

  --header-h: 64px;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.22;
  color: var(--c-text);
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; height: auto; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT CANVAS
   ============================================================ */
.page-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content { flex: 1; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--c-border), 0 2px 8px rgba(0,0,0,.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo img {
  height: 38px;
  width: auto;
  display: block;
}
.site-logo__text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-dark);
}

.site-nav { display: flex; align-items: center; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: .125rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__list > li > a {
  display: block;
  padding: .375rem .875rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  letter-spacing: .01em;
}
.site-nav__list > li > a:hover,
.site-nav__list > li > a.active {
  color: var(--c-primary);
  background: rgba(101,175,35,.08);
}

/* Newsletter CTA pill */
.site-nav__cta > a {
  background: var(--c-primary) !important;
  color: #fff !important;
  border-radius: 20px !important;
  padding: .375rem 1.125rem !important;
}
.site-nav__cta > a:hover {
  background: var(--c-primary-dark) !important;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    padding: .75rem 1rem 1rem;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
  }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; gap: .125rem; }
  .site-nav__list > li { width: 100%; }
  .site-nav__list > li > a { border-radius: var(--radius-sm); }
  .site-nav__cta { margin-top: .375rem; }
  .site-nav__cta > a {
    border-radius: var(--radius-sm) !important;
    text-align: center;
    display: block;
  }
}

/* ============================================================
   BREADCRUMB BAR
   ============================================================ */
.breadcrumb-bar {
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
  padding: .35rem 0;
  font-size: .8rem;
}
.breadcrumb-bar .breadcrumb {
  margin: 0;
  padding: 0;
  background: none;
  flex-wrap: nowrap;
  overflow: hidden;
}
.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--c-text-muted);
  padding: 0 .35rem;
}
.breadcrumb-bar .breadcrumb-item a { color: var(--c-text-muted); }
.breadcrumb-bar .breadcrumb-item a:hover { color: var(--c-primary); }
.breadcrumb-bar .breadcrumb-item.active {
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ============================================================
   PAGE CONTENT WRAPPER
   ============================================================ */
.page-content {
  padding: 2.5rem 0 3.5rem;
}

/* ============================================================
   HOME HERO
   ============================================================ */
.home-hero {
  background: var(--c-dark);
  color: #fff;
  padding: 2.75rem 0 2.25rem;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(101,175,35,.18) 0%, transparent 55%);
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: rgba(101,175,35,.08);
  border-radius: 50%;
  pointer-events: none;
}
.home-hero .container { position: relative; }

.home-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: .4rem;
  line-height: 1.15;
}
.home-hero__slogan {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  font-style: italic;
  margin-bottom: .625rem;
}
.home-hero__body {
  font-size: .95rem;
  color: rgba(255,255,255,.65);
  max-width: 560px;
}

/* ============================================================
   CATEGORY SECTION HEADER
   ============================================================ */
.category-section {
  margin-bottom: 3rem;
}
.category-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.375rem;
  padding-bottom: .625rem;
  border-bottom: 2px solid var(--c-border);
}
.category-section__title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
}
.category-section__title a { color: inherit; }
.category-section__title a:hover { color: var(--c-primary); }
.category-section__link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--c-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.category-section__link:hover { color: var(--c-primary-dark); }

/* ============================================================
   ARTICLE CARDS — shared
   ============================================================ */
.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: inherit;
  text-decoration: none;
}

.article-card__img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-bg-alt);
  flex-shrink: 0;
}
.article-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.article-card:hover .article-card__img-wrap img { transform: scale(1.05); }

.article-card__body {
  padding: 1rem 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card__cat {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .18rem .5rem;
  border-radius: 3px;
  margin-bottom: .55rem;
  align-self: flex-start;
}

.article-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--c-text);
  margin: 0 0 .5rem;
  font-weight: 700;
}
.article-card__excerpt {
  font-size: .855rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  flex: 1;
}
.article-card__date {
  font-size: .74rem;
  color: var(--c-text-muted);
  margin-top: .7rem;
}

/* Hero card (featured — large) */
.article-card--hero { height: 100%; }
.article-card--hero .article-card__img-wrap { aspect-ratio: 4/3; }
.article-card--hero .article-card__title { font-size: 1.3rem; line-height: 1.22; }
.article-card--hero .article-card__excerpt { -webkit-line-clamp: 3; }

/* Compact card (secondary in hero row) */
.article-card--compact .article-card__img-wrap { aspect-ratio: 16/9; }
.article-card--compact .article-card__body { padding: .625rem .75rem .75rem; }
.article-card--compact .article-card__title { font-size: .88rem; line-height: 1.3; margin-bottom: 0; }

/* Article list gutter */
.article-list .row {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
}

/* ============================================================
   PAGE INTRO (category page)
   ============================================================ */
.page-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.page-intro h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin-bottom: .4rem; }
.page-intro p  { color: var(--c-text-muted); font-size: 1rem; margin: 0; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-header { margin-bottom: 1.75rem; }

.article-header__image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--c-bg-alt);
  aspect-ratio: 970/500;
}
.article-header__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-header h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.4rem);
  line-height: 1.18;
  margin-bottom: .625rem;
}

.article-date {
  font-size: .82rem;
  color: var(--c-text-muted);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--c-text);
}
.article-body h2  { font-size: 1.5rem; margin-top: 2.25rem; margin-bottom: .75rem; }
.article-body h3  { font-size: 1.2rem; margin-top: 1.75rem; margin-bottom: .5rem; }
.article-body h4, .article-body h5 { margin-top: 1.25rem; margin-bottom: .4rem; }
.article-body p   { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li  { margin-bottom: .35rem; }
.article-body a   { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--c-primary-dark); }
.article-body blockquote {
  border-left: 3px solid var(--c-primary);
  padding: .75rem 1.25rem;
  background: var(--c-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--c-text-muted);
  margin: 1.5rem 0;
}
.article-body img    { border-radius: var(--radius); }
.article-body strong { color: var(--c-text); }

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--c-border);
}
.related-articles > h2 { font-size: 1.35rem; margin-bottom: 1.5rem; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}

.sidebar-newsletter {
  background: var(--c-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.375rem 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.sidebar-newsletter::before {
  content: '';
  position: absolute;
  top: -35px; right: -35px;
  width: 130px; height: 130px;
  background: rgba(101,175,35,.18);
  border-radius: 50%;
  pointer-events: none;
}
.sidebar-newsletter__badge {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 3px;
  margin-bottom: .625rem;
}
.sidebar-newsletter h3 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: .375rem;
}
.sidebar-newsletter p {
  font-size: .855rem;
  color: rgba(255,255,255,.72);
  margin-bottom: .875rem;
  line-height: 1.5;
}
.btn-newsletter {
  display: block;
  background: var(--c-primary);
  color: #fff;
  text-align: center;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .875rem;
  transition: background var(--transition);
  text-decoration: none;
  position: relative;
}
.btn-newsletter:hover { background: var(--c-primary-dark); color: #fff; text-decoration: none; }

.sidebar-categories {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem .5rem;
}
.sidebar-categories h4 {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}
.sidebar-categories ul { list-style: none; margin: 0; padding: 0; }
.sidebar-categories li { border-bottom: 1px solid var(--c-border); }
.sidebar-categories li:last-child { border-bottom: none; }
.sidebar-categories li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  font-size: .9rem;
  color: var(--c-text);
  text-decoration: none;
}
.sidebar-categories li a::after {
  content: '›';
  color: var(--c-primary);
  font-size: 1.1rem;
  line-height: 1;
}
.sidebar-categories li a:hover { color: var(--c-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.6);
  padding: 1.375rem 0;
  font-size: .84rem;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.site-footer__copy { margin: 0; color: rgba(255,255,255,.5); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.125rem; }
.footer-nav a { color: rgba(255,255,255,.62); transition: color var(--transition); text-decoration: none; }
.footer-nav a:hover { color: var(--c-primary); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-link { color: var(--c-primary); border-color: var(--c-border); font-size: .9rem; }
.pagination .page-item.active .page-link { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination .page-item.disabled .page-link { color: var(--c-text-muted); }
.pagination .page-link:hover { background: var(--c-bg-alt); color: var(--c-primary-dark); border-color: var(--c-border); }

/* ============================================================
   STATIC PAGES (impressum, datenschutz, page-layout)
   ============================================================ */
.page-body {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 720px;
}
.page-body h1 { margin-bottom: .75rem; }
.page-body h2 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: .5rem; }
.page-body h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: .4rem; }
.page-body p  { margin-bottom: 1rem; }
.page-body ul, .page-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-body a  { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .sidebar { position: static; margin-top: 2.5rem; }
}
@media (max-width: 767px) {
  .page-content       { padding: 1.75rem 0 2.5rem; }
  .home-hero          { padding: 2rem 0 1.75rem; }
  .category-section   { margin-bottom: 2.25rem; }
  .article-body       { font-size: 1rem; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
