/* ============================================
   WAG HAPPY - Custom Bootstrap Theme
   Hundespielschule Tina Linge
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --wh-cream:       #f5efe6;
  --wh-ink:         #2c2418;
  --wh-primary:     #d4783c;
  --wh-primary-hover: #c06a30;
  --wh-secondary:   #e8dfd0;
  --wh-accent:      #dcc8a0;
  --wh-muted:       #ede5d8;
  --wh-muted-fg:    #7a6e5f;
  --wh-border:      #d4c9b8;
  --wh-card:        #faf7f2;
  --wh-destructive: #b84a28;
  --wh-white:       #ffffff;

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-py: 5rem;
  --section-py-lg: 7rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius:    0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 50rem;
}

/* --- Base Styles --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--wh-ink);
  background-color: var(--wh-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.75;
  font-feature-settings: "ss01", "cv11";
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
}

.lead {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--wh-muted-fg);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--wh-primary);
}

/* --- Links --- */
a {
  color: var(--wh-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--wh-primary-hover);
}

/* --- Buttons --- */
.btn-wh-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--wh-primary);
  color: var(--wh-cream);
  border: none;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.btn-wh-primary:hover {
  background-color: var(--wh-primary-hover);
  color: var(--wh-cream);
  transform: translateY(-1px);
}

.btn-wh-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--wh-ink);
  border: 1.5px solid var(--wh-border);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.btn-wh-outline:hover {
  border-color: var(--wh-primary);
  color: var(--wh-primary);
  background-color: var(--wh-card);
}

/* --- Navbar --- */
.navbar-wh {
  background-color: rgba(245, 239, 230, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wh-border);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.navbar-wh .navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--wh-ink);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-wh .navbar-brand img {
  height: 44px;
  width: auto;
}

.navbar-wh .nav-link {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wh-ink);
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-wh .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--wh-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar-wh .nav-link:hover,
.navbar-wh .nav-link.active {
  color: var(--wh-primary);
}

.navbar-wh .nav-link.active::after,
.navbar-wh .nav-link:hover::after {
  transform: scaleX(1);
}

.navbar-wh .navbar-toggler {
  border: none;
  padding: 0.25rem;
}

.navbar-wh .navbar-toggler:focus {
  box-shadow: none;
}

/* --- Hero Section --- */
.hero-section {
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-section h1 .text-primary-wh {
  color: var(--wh-primary);
  font-style: italic;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper img {
  border-radius: var(--radius-xl);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 4 / 5;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--wh-border);
}

.hero-stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--wh-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--wh-muted-fg);
  margin-top: 0.25rem;
}

/* --- Section Utilities --- */
.section-padding {
  padding: var(--section-py) 0;
}

.section-padding-lg {
  padding: var(--section-py-lg) 0;
}

.bg-cream {
  background-color: var(--wh-cream);
}

.bg-secondary-wh {
  background-color: var(--wh-secondary);
}

.bg-muted-wh {
  background-color: var(--wh-muted);
}

.bg-ink {
  background-color: var(--wh-ink);
  color: var(--wh-cream);
}

.bg-card-wh {
  background-color: var(--wh-card);
}

.text-primary-wh {
  color: var(--wh-primary) !important;
}

.text-ink {
  color: var(--wh-ink);
}

.text-muted-wh {
  color: var(--wh-muted-fg);
}

.border-wh {
  border-color: var(--wh-border) !important;
}

/* --- Value Cards --- */
.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.value-card .value-icon {
  width: 3rem;
  height: 3rem;
  color: var(--wh-primary);
  margin-bottom: 1.25rem;
}

.value-card h3 {
  margin-bottom: 0.75rem;
}

.value-card p {
  color: var(--wh-muted-fg);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* --- Course Cards --- */
.course-card {
  background-color: var(--wh-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--wh-border);
  transition: all 0.3s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(44, 36, 24, 0.08);
}

.course-card .card-img-wrapper {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.course-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.course-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.course-card .card-body {
  padding: 1.5rem;
}

.course-card .course-number {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--wh-primary);
}

.course-card .course-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wh-muted-fg);
  background-color: var(--wh-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.course-card h4 {
  margin: 0.75rem 0 0.5rem;
}

.course-card p {
  font-size: 0.875rem;
  color: var(--wh-muted-fg);
}

.course-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wh-primary);
  transition: gap 0.3s ease;
}

.course-card .card-link:hover {
  gap: 0.625rem;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  background-color: var(--wh-card);
  border: 1px solid var(--wh-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.testimonial-card .quote-icon {
  color: var(--wh-primary);
  opacity: 0.3;
  font-size: 2.5rem;
  font-family: var(--font-serif);
  line-height: 1;
  margin-bottom: 1rem;
}

.testimonial-card blockquote {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--wh-ink);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.testimonial-card .testimonial-author {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wh-ink);
}

.testimonial-card .testimonial-detail {
  font-size: 0.8125rem;
  color: var(--wh-muted-fg);
}

/* --- About / Bio Section --- */
.about-image {
  border-radius: var(--radius-xl);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 3 / 4;
}

/* --- CTA Section (Dark) --- */
.cta-dark {
  background-color: var(--wh-ink);
  color: var(--wh-cream);
  padding: var(--section-py-lg) 0;
}

.cta-dark .eyebrow {
  color: var(--wh-accent);
}

.cta-dark h2 {
  color: var(--wh-cream);
}

.cta-dark p {
  color: rgba(245, 239, 230, 0.7);
}

.cta-dark .btn-wh-primary {
  background-color: var(--wh-primary);
  color: var(--wh-cream);
}

.cta-dark .btn-wh-outline {
  border-color: rgba(245, 239, 230, 0.3);
  color: var(--wh-cream);
}

.cta-dark .btn-wh-outline:hover {
  border-color: var(--wh-cream);
  background-color: rgba(245, 239, 230, 0.1);
  color: var(--wh-cream);
}

/* --- Footer --- */
.footer-wh {
  background-color: var(--wh-ink);
  color: rgba(245, 239, 230, 0.7);
  padding: 4rem 0 2rem;
}

.footer-wh h5 {
  color: var(--wh-cream);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.footer-wh a {
  color: rgba(245, 239, 230, 0.7);
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-wh a:hover {
  color: var(--wh-cream);
}

.footer-wh .footer-brand {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: var(--wh-cream);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-wh .footer-brand img {
  height: 40px;
}

.footer-wh .footer-description {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 1rem;
}

.footer-wh .footer-bottom {
  border-top: 1px solid rgba(245, 239, 230, 0.12);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.8125rem;
}

.footer-wh .footer-credits {
  font-size: 0.75rem;
  opacity: 0.5;
}

.footer-wh .footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.footer-wh .footer-contact-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--wh-primary);
}

.footer-wh ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-wh ul li {
  margin-bottom: 0.5rem;
}

/* --- Page Header --- */
.page-header {
  padding: 6rem 0 3rem;
  border-bottom: 1px solid var(--wh-border);
}

.page-header--no-border {
  border-bottom: none;
}

.page-header .eyebrow {
  margin-bottom: 1rem;
}

.page-header h1 {
  margin-bottom: 1.25rem;
}

.page-header .lead {
  max-width: 640px;
}

/* --- FAQ / Accordion --- */
.accordion-wh .accordion-item {
  border: none;
  border-bottom: 1px solid var(--wh-border);
  background-color: transparent;
}

.accordion-wh .accordion-button {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--wh-ink);
  background-color: transparent;
  padding: 1.25rem 0;
  box-shadow: none;
}

.accordion-wh .accordion-button:not(.collapsed) {
  color: var(--wh-primary);
  background-color: transparent;
  box-shadow: none;
}

.accordion-wh .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d4783c'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-wh .accordion-body {
  padding: 0 0 1.25rem;
  color: var(--wh-muted-fg);
  line-height: 1.75;
}

/* --- Forms --- */
.form-wh .form-control,
.form-wh .form-select {
  background-color: var(--wh-cream);
  border: 1px solid var(--wh-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  color: var(--wh-ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-wh .form-control:focus,
.form-wh .form-select:focus {
  border-color: var(--wh-primary);
  box-shadow: 0 0 0 3px rgba(212, 120, 60, 0.15);
  background-color: var(--wh-cream);
}

.form-wh .form-control::placeholder {
  color: var(--wh-muted-fg);
  opacity: 0.6;
}

.form-wh .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wh-ink);
  margin-bottom: 0.375rem;
}

.form-wh .form-check-input:checked {
  background-color: var(--wh-primary);
  border-color: var(--wh-primary);
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-grid.gallery-cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 36rem;
}

.gallery-grid.gallery-cols-3 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 54rem;
}

@media (min-width: 768px) {
  .gallery-grid.gallery-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 1;
  cursor: pointer;
  border: none;
  padding: 0;
  background-color: var(--wh-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gallery-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--wh-primary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--wh-primary);
  color: var(--wh-cream);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(44, 36, 24, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--wh-primary-hover);
  transform: translateY(-2px);
}

/* --- Utility Classes --- */
.max-w-prose {
  max-width: 72rem;
}

.rounded-wh {
  border-radius: var(--radius);
}

.rounded-wh-lg {
  border-radius: var(--radius-lg);
}

.rounded-wh-xl {
  border-radius: var(--radius-xl);
}

.separator {
  height: 1px;
  background-color: var(--wh-border);
}

/* --- Responsive Tweaks --- */
@media (max-width: 767.98px) {
  :root {
    --section-py: 3.5rem;
    --section-py-lg: 4.5rem;
  }

  .hero-section {
    padding-top: 4rem;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-image-wrapper {
    margin-top: 2.5rem;
  }

  .hero-image-wrapper img {
    aspect-ratio: 16 / 10;
  }

  .cta-dark {
    text-align: center;
  }
}

/* --- Bootstrap Overrides --- */
.container {
  max-width: 1200px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 120, 60, 0.3);
}

::selection {
  background-color: var(--wh-primary);
  color: var(--wh-cream);
}

/* ============================================
   WordPress-Specific Styles
   ============================================ */

/* --- Course Detail (Kursseite Accordions) --- */
.course-content h4 {
  font-size: 1.25rem;
  color: var(--wh-ink);
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.course-content ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.375rem;
  grid-template-columns: repeat(2, 1fr);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
  .course-content ul {
    grid-template-columns: 1fr;
  }
}

.course-content ul li {
  display: flex;
  gap: 0.5rem;
  color: rgba(44, 36, 24, 0.9);
}

.course-content ul li::before {
  content: '\203A';
  color: var(--wh-primary);
  flex-shrink: 0;
}

.course-content dl {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, 1fr);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
  .course-content dl {
    grid-template-columns: 1fr;
  }
}

.course-content dl > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 201, 184, 0.6);
  padding: 0.5rem 0;
}

.course-content dl dt {
  color: var(--wh-muted-fg);
  font-weight: 400;
}

.course-content dl dd {
  font-weight: 500;
  color: var(--wh-ink);
  margin-bottom: 0;
}

.course-content ul.cols-1 {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

/* Privatschule-Accordion */
.privat-content {
  font-size: 0.9375rem;
  line-height: 1.625;
}

.privat-content ul {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
}

.privat-content ul li {
  color: rgba(44, 36, 24, 0.9);
}

/* --- Anchor Pills --- */
.anchor-pill {
  display: inline-block;
  border-radius: var(--radius-pill);
  border: 1px solid var(--wh-border);
  background-color: var(--wh-cream);
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  color: rgba(44, 36, 24, 0.8);
  transition: border-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
}

.anchor-pill:hover {
  border-color: var(--wh-primary);
  color: var(--wh-primary);
}

/* --- Lightbox --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(44, 36, 24, 0.9);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.lightbox-img {
  max-height: 88vh;
  max-width: 92vw;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(245, 239, 230, 0.1);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--wh-cream);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(245, 239, 230, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245, 239, 230, 0.1);
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  color: var(--wh-cream);
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (min-width: 768px) {
  .lightbox-prev { left: 2rem; }
  .lightbox-next { right: 2rem; }
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(245, 239, 230, 0.2);
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(245, 239, 230, 0.7);
  margin: 0;
}

/* --- WordPress Block & Content Overrides --- */
.wp-block-image img {
  border-radius: var(--radius-lg);
}

.entry-content ul {
  color: var(--wh-muted-fg);
  line-height: 2.2;
}

.entry-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Honeypot */
.wh-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Form Messages */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.form-message-success {
  background-color: rgba(34, 139, 34, 0.1);
  color: #228b22;
  border: 1px solid rgba(34, 139, 34, 0.2);
}

.form-message-error {
  background-color: rgba(184, 74, 40, 0.1);
  color: var(--wh-destructive);
  border: 1px solid rgba(184, 74, 40, 0.2);
}
