/* ================================
   custom-style.css
   Heißluftfritteusen Rezepte
   Bootstrap 5.3.3
   ================================ */

/* ------------------------------------------------------------------
   CSS Custom Properties (Design-Tokens)
   ------------------------------------------------------------------ */
:root {
  --primary-color:        #2c5f2d;
  --primary-dark:         #1e4620;
  --accent-color:         #7cb342;
  --text-muted-custom:    #6c757d;
  --border-radius-card:   0.5rem;
  --transition-default:   0.3s ease;
  --shadow-card:          0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-nav:           0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ------------------------------------------------------------------
   Basis & Überlauf-Schutz
   ------------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------ */
.custom-navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-nav);
}

.navbar-brand {
  font-size: 1.5rem;
}

/* Toggler-Button – sichtbare Focus-Ring für Accessibility */
.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(124, 179, 66, 0.5);
  outline: none;
}

.nav-link {
  font-weight: 500;
  transition: opacity var(--transition-default);
}

.nav-link:hover,
.nav-link:focus {
  opacity: 0.8;
}

/* ------------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------------ */
.hero-section {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

/* ------------------------------------------------------------------
   Bootstrap-Farben überschreiben
   ------------------------------------------------------------------ */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-success,
.btn-success {
  background-color: var(--primary-color) !important;
  border-color:     var(--primary-color) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: var(--primary-dark) !important;
  border-color:     var(--primary-dark) !important;
}

.badge.bg-success {
  background-color: var(--primary-color) !important;
}

/* ------------------------------------------------------------------
   Gradient-Hilfsklasse
   ------------------------------------------------------------------ */
.custom-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* ------------------------------------------------------------------
   Karten
   ------------------------------------------------------------------ */
.card {
  border-radius: var(--border-radius-card);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card) !important;
}

/* Abstand zwischen Text und Button */
.card .card-body .btn {
  margin-top: 1.5rem;
}

.card .card-body .btn + .btn {
  margin-left: 0.5rem;
}

/* ------------------------------------------------------------------
   Bilder in Karten
   ------------------------------------------------------------------ */
.card .rounded.overflow-hidden img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------------------------------
   Figures & Bilder – SEO: Bilder immer responsive & LCP-freundlich
   ------------------------------------------------------------------ */
figure {
  margin: 0;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.375rem;
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted-custom);
  margin-top: 0.5rem;
  text-align: center;
}

/* ------------------------------------------------------------------
   Breadcrumb – strukturierte Navigation (SEO: BreadcrumbList Schema)
   ------------------------------------------------------------------ */
.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-muted-custom);
}

/* ------------------------------------------------------------------
   Accordion
   ------------------------------------------------------------------ */
.accordion-button:not(.collapsed) {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(124, 179, 66, 0.25);
  outline: none;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.custom-footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.custom-footer a:hover,
.custom-footer a:focus {
  opacity: 0.85;
}

.custom-footer .d-flex a {
  transition: opacity 0.2s, transform 0.2s;
}

.custom-footer .d-flex a:hover,
.custom-footer .d-flex a:focus {
  opacity: 0.75;
  transform: translateY(-2px);
}

.footer-link:hover,
.footer-link:focus {
  color: #fff !important;
  text-decoration: underline !important;
}

.footer-share-btn:hover,
.footer-share-btn:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ------------------------------------------------------------------
   Cookie Banner
   ------------------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 1.25rem 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner a {
  color: var(--primary-color);
}

/* ------------------------------------------------------------------
   Scroll-to-Top Button
   ------------------------------------------------------------------ */
#scrollToTopBtn {
  display: none;           /* per JS auf flex umschalten */
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 1010;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background var(--transition-default), transform 0.2s;
}

#scrollToTopBtn:hover,
#scrollToTopBtn:focus {
  background: var(--primary-dark);
  transform: scale(1.1);
  outline: none;
}

#scrollToTopBtn i,
#scrollToTopBtn::before {
  pointer-events: none;
}

/* Pfeil via Bootstrap-Icons als Pseudo-Element */
#scrollToTopBtn::before {
  content: "\F235";          /* bi-arrow-up-circle-fill */
  font-family: "bootstrap-icons";
  font-style: normal;
  font-weight: normal;
  font-size: 1.5rem;
  line-height: 1;
}

/* ------------------------------------------------------------------
   Responsive Anpassungen
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  #scrollToTopBtn {
    right: 20px;
    bottom: 90px;
  }
}

/* ------------------------------------------------------------------
   Druck-Styles
   ------------------------------------------------------------------ */
@media print {
  .custom-navbar,
  .cookie-banner,
  .floating-share-btn,
  #scrollToTopBtn,
  .btn,
  footer {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #555;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }
}
