/*
Theme Name: Animal Aid
Theme URI: https://wp.animal-thp.de
Author: Animal Aid
Description: Eigenständiges Theme für Animal Aid – Tierheilpraxis. Selbst entwickelt, keine Drittanbieter-Theme-Abhängigkeit.
Version: 1.1.1
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: animal-aid
*/

/* ==========================================================================
   Design-Tokens
   ========================================================================== */
:root {
  --color-primary: #7fa621;        /* etwas abgedunkeltes Naturgrün, WCAG-AA-tauglich auf Weiß */
  --color-primary-dark: #5f7d18;
  --color-primary-light: #eef4de;
  --color-text: #33383d;
  --color-text-muted: #5f6670;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7f4;
  --color-border: #e3e5e0;
  --color-dark: #24281f;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Open Sans Condensed', var(--font-body);
  --container-width: 1160px;
  --radius: 10px;
  --shadow-soft: 0 2px 18px rgba(36, 40, 31, 0.07);
}

/* ==========================================================================
   Fonts (selbst gehostet, DSGVO-konform – kein externes Google-Fonts-CDN)
   ========================================================================== */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/open-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/open-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/open-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/open-sans-condensed-700.woff2') format('woff2');
}

/* ==========================================================================
   Reset & Basis
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-dark);
  color: #fff;
  padding: 12px 18px;
  z-index: 10000;
}
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid var(--color-primary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn.btn-outline { background: transparent; color: var(--color-primary-dark); }
.btn.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* ==========================================================================
   Site-Header / Navigation (angelehnt an Sticky-Horizontal-Menü mit Logo)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; color: var(--color-primary-dark); }
.site-logo img { max-height: 52px; width: auto; }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.primary-nav li { position: relative; }
.primary-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.97rem;
  border-radius: 6px;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  text-decoration: none;
}
.primary-nav .menu-item-has-children > a::after { content: '▾'; font-size: 0.7em; margin-left: 5px; }
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  min-width: 230px;
  padding: 8px;
  z-index: 50;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { border-radius: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  margin: 5px 0;
  content: '';
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--color-border);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: 10px 0; }
  .primary-nav .sub-menu { position: static; box-shadow: none; border: none; padding-left: 14px; display: block; }
  .header-inner { flex-wrap: wrap; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(160deg, var(--color-primary-light) 0%, #ffffff 62%);
  padding: 76px 0 90px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.hero .eyebrow {
  display: inline-block;
  color: var(--color-primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero .lede {
  max-width: 640px;
  margin: 18px auto 30px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Sections / Cards (Leistungen-Grid als Kartenraster, statt Flip-Boxen)
   ========================================================================== */
.section { padding: 74px 0; }
.section.alt { background: var(--color-bg-alt); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 46px; }
.section-head .eyebrow {
  color: var(--color-primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(36,40,31,0.12); }
.card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  font-weight: 700;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-text-muted); margin-bottom: 0; }

/* ==========================================================================
   FAQ-Akkordeon
   ========================================================================== */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 4px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-dark);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--color-primary-dark); transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 4px 20px; color: var(--color-text-muted); }

/* ==========================================================================
   Blog / Beiträge
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.post-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .meta { font-size: 0.82rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.post-card h3 { margin: 0; font-size: 1.2rem; }
.post-card .excerpt { color: var(--color-text-muted); font-size: 0.95rem; flex: 1; }
.post-card .read-more { font-weight: 700; color: var(--color-primary-dark); }

.entry-content { max-width: 760px; margin: 0 auto; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 0.4em 1.4em;
  border-left: 4px solid var(--color-primary);
  color: var(--color-text-muted);
  font-style: italic;
}
.entry-header { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.entry-header .meta { color: var(--color-text-muted); font-size: 0.9rem; }
.page-title-band { padding: 56px 0 42px; background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); text-align: center; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
}
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ==========================================================================
   Kontakt-Bereich / Formular
   ========================================================================== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: start;
}
@media (max-width: 780px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-wrap-single {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contact-info .card { margin-bottom: 18px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-primary); color: #fff; padding: 60px 0 26px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 34px; margin-bottom: 34px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid a { color: #fff; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.35);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #fff;
}
.footer-bottom a { color: #fff; }
.footer-bottom a:hover { text-decoration: underline; }

/* ==========================================================================
   Adresszeile (Topbar)
   ========================================================================== */
.topbar {
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}
.topbar .container { padding-top: 6px; padding-bottom: 6px; }
.topbar-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
}
.topbar-list a { color: var(--color-primary); font-weight: 700; }
.topbar-list a:hover { color: var(--color-primary-dark); }
@media (max-width: 560px) {
  .topbar-list { gap: 4px 14px; font-size: 0.78rem; }
}

/* Kommentare */
.comments-area { max-width: 760px; margin: 60px auto 0; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-body { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.comment-list .comment-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }

/* Screenreader-only */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}
