/*
Theme Name: E-Bike Versicherungen
Theme URI: https://ebikeversicherungen.net
Description: Eigenes Theme für ebikeversicherungen.net — E-Bike Versicherungsvergleich
Author: E-Bike Versicherungen
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ebikeversicherungen
*/

/* ==========================================================================
   0. CSS Custom Properties
   ========================================================================== */

:root {
  --primary: #264b90;
  --primary-dark: #1a3666;
  --secondary: #10b981;
  --accent: #cf181b;
  --text: #333333;
  --text-light: #64748b;
  --dark: #1f1f1f;
  --light: #f8fafc;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

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

a:hover,
a:focus-visible {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   2. Layout
   ========================================================================== */

.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.content-area {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

.content-area.full-width {
  grid-template-columns: 1fr;
  max-width: none;
  padding: 0;
}

.section {
  padding: 3rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .content-area {
    grid-template-columns: 3fr 1fr;
  }

  .section {
    padding: 5rem 2rem;
  }
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.site-logo img {
  max-height: 50px;
  width: auto;
}

.primary-navigation {
  display: none;
}

.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.primary-navigation a {
  position: relative;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.primary-navigation a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible {
  color: var(--primary);
}

.primary-navigation a:hover::after,
.primary-navigation a:focus-visible::after {
  width: 100%;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .primary-navigation {
    display: block;
  }

  .menu-toggle {
    display: none;
  }
}

/* ==========================================================================
   4. Mobile Menu
   ========================================================================== */

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--white);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform var(--transition);
  padding: 5rem 2rem 2rem;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--light);
  min-height: 48px;
  line-height: 48px;
}

.mobile-nav a:hover {
  color: var(--primary);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

body.menu-open .mobile-nav {
  transform: translateX(0);
}

body.menu-open .mobile-overlay {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text);
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */

.section-hero[data-reveal] {
  max-width: none;
  opacity: 1 !important;
  transform: none !important;
}

.section-hero {
  max-width: none;
  margin: 0;
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  overflow: hidden;
}

.section-hero::before,
.section-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}

.section-hero::before {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  left: -5%;
  animation: orbFloat1 18s ease-in-out infinite;
}

.section-hero::after {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -15%;
  right: -5%;
  animation: orbFloat2 15s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(60px, 40px) scale(1.1);
  }
  50% {
    transform: translate(20px, -30px) scale(0.95);
  }
  75% {
    transform: translate(-40px, 20px) scale(1.05);
  }
}

@keyframes orbFloat2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-50px, -40px) scale(1.15);
  }
  66% {
    transform: translate(40px, 30px) scale(0.9);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.section-hero h1 {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-hero .hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.hero-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(46, 163, 242, 0.35);
  color: var(--white);
}

.hero-trust,
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}

.hero-trust span,
.trust-badges li {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 1);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 768px) {
  .section-hero .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   6. Feature Cards
   ========================================================================== */

.section-features {
  background: var(--light);
}

.section-features .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* ==========================================================================
   7. Provider Cards
   ========================================================================== */

.section-providers .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.providers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.provider-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--text-light);
  transition: box-shadow var(--transition);
}

.provider-card:hover {
  box-shadow: var(--shadow-lg);
}

.provider-card:nth-child(1) {
  border-top-color: #fbbf24;
}

.provider-card:nth-child(2) {
  border-top-color: #94a3b8;
}

.provider-card:nth-child(3) {
  border-top-color: #d97706;
}

.provider-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.provider-card h3 {
  margin-bottom: 0.5rem;
  padding-right: 5rem;
}

.provider-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.provider-card .provider-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 1rem;
}

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

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

/* ==========================================================================
   8. FAQ Section
   ========================================================================== */

.section-faq {
  background: var(--light);
}

.section-faq .section-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.faq-list {
  margin-top: 2.5rem;
}

.faq-list details {
  border-bottom: 1px solid #e2e8f0;
}

.faq-list details:first-child {
  border-top: 1px solid #e2e8f0;
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--dark);
  transition: color var(--transition);
}

.faq-list summary:hover {
  color: var(--primary);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::marker {
  content: '';
}

.faq-list summary .faq-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  font-size: 0.85rem;
  color: var(--text-light);
}

.faq-list details[open] summary {
  color: var(--primary);
}

.faq-list details[open] summary .faq-arrow {
  transform: rotate(180deg);
}

.faq-list .faq-answer {
  padding: 0 0 1.5rem;
  line-height: 1.7;
  color: var(--text-light);
}

/* ==========================================================================
   9. CTA Section
   ========================================================================== */

.section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 1.25rem;
}

.section-cta .section-inner {
  max-width: 700px;
  margin: 0 auto;
}

.section-cta h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.section-cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.section-cta .btn-cta {
  display: inline-block;
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.section-cta .btn-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark);
}

/* ==========================================================================
   10. Page Content / Entry Content
   ========================================================================== */

.entry-content {
  max-width: 720px;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

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

.entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content li::marker {
  color: var(--primary);
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
  background: var(--light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #e2e8f0;
}

.entry-content th {
  background: var(--light);
  font-weight: 600;
}

.entry-content tr:nth-child(even) td {
  background: #f8fafc;
}

.entry-content img {
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  text-decoration-color: var(--primary-dark);
}

/* ==========================================================================
   11. Sidebar
   ========================================================================== */

.sidebar .widget {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.sidebar .widget-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--light);
}

.sidebar .widget ul {
  list-style: none;
}

.sidebar .widget li {
  padding: 0.4rem 0;
}

.sidebar .widget a {
  color: var(--text);
  font-size: 0.95rem;
}

.sidebar .widget a:hover {
  color: var(--primary);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 1.25rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-widgets .widget-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-widgets a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-widgets a:hover {
  color: var(--primary);
}

.footer-widgets ul {
  list-style: none;
}

.footer-widgets li {
  padding: 0.3rem 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 1rem;
}

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

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

/* ==========================================================================
   13. 404 Error Page
   ========================================================================== */

.error-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
  padding: 4rem 1.25rem;
}

.error-404 .error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--light);
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-404 h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-404 p {
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

/* ==========================================================================
   14. Scroll Reveal Animation
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-30px);
}

[data-reveal="left"].revealed {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(30px);
}

[data-reveal="right"].revealed {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section-hero::before,
  .section-hero::after {
    animation: none;
  }
}

/* ==========================================================================
   15. Responsive Breakpoints
   ========================================================================== */

/* -- Tablet (768px) -- */
@media (min-width: 768px) {
  .site-content {
    padding: 3rem 2rem;
  }

  .section {
    padding: 4rem 2rem;
  }

  h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
  h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
}

/* -- Desktop (1024px) -- */
@media (min-width: 1024px) {
  .header-inner {
    padding: 1rem 2rem;
  }

  .section-hero {
    padding: 6rem 2rem;
  }
}

/* -- Wide (1200px) -- */
@media (min-width: 1200px) {
  .header-inner,
  .site-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ==========================================================================
   16. Print Styles
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .primary-navigation,
  .mobile-nav,
  .mobile-overlay,
  .menu-toggle,
  .section-hero,
  .section-cta,
  .hero-cta,
  .btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
    line-height: 1.5;
  }

  .content-area {
    display: block;
  }

  .entry-content {
    max-width: 100%;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #555;
  }
}

/* ==========================================================================
   17. Utility Classes
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* -- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius);
}

/* -- Section heading utility -- */

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2rem;
}

.section-header p {
  color: var(--text-light);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

/* -- Shimmer effect for loading states -- */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--light) 25%,
    #e2e8f0 50%,
    var(--light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* -- WordPress specific -- */

.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-image img {
  border-radius: var(--radius-sm);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: center;
}

/* -- Navigation pagination -- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
}

.pagination a {
  color: var(--text);
  background: var(--light);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
}

.pagination .current {
  background: var(--primary);
  color: var(--white);
}


/* Trust Badges Row */
.trust-badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.trust-stars {
  color: #fbbf24;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.trust-score {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}

.trust-source {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
}

/* Partners Section */
.section-partners {
  background: var(--light);
  padding: 2rem 1.25rem;
  text-align: center;
}

.section-partners .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.partners-label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.partner-name {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
  opacity: 0.7;
}

.partner-name:hover {
  opacity: 1;
}

/* Section Content */
.section-content .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

/* Content buttons */
.entry-content .btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}

.entry-content .btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* Fix white text from Divi cleanup */
.entry-content span[style*="color: #ffffff"],
.entry-content span[style*="color: #FFFFFF"],
.entry-content span[style*="color: rgb(255, 255, 255)"],
.entry-content span[style*="color:#ffffff"],
.entry-content span[style*="color:#FFFFFF"] {
  color: var(--text) !important;
}

.entry-content [style*="color: #fff"],
.entry-content [style*="color:#fff"],
.entry-content [style*="color: white"] {
  color: var(--text) !important;
}

/* Partners Logo Grid */
.partners-logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.partners-logos-grid img {
  max-height: 50px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s, opacity 0.3s;
}
.partners-logos-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Partner Badges */
.partner-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin: 0.25rem;
  background: rgba(38,75,144,0.06);
  border: 1px solid rgba(38,75,144,0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: rgba(38,75,144,0.7);
  letter-spacing: 0.02em;
  transition: background 0.3s, color 0.3s;
}
.partner-badge:hover {
  background: rgba(38,75,144,0.12);
  color: #264b90;
}

/* ==========================================================================
   Autorenbox – "Über den Autor"
   ========================================================================== */

/* Wrapper-Effekt: entry-content bekommt am Ende einen visuellen Container.
   Da kein HTML-Wrapper existiert, nutzen wir :has() + Sibling-Selektoren
   auf den letzten h2 im Artikel. */

.entry-content > h2:last-of-type {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem 0.25rem;
  background: #f0f4fa;
  border-left: 4px solid #264b90;
  border-radius: 12px 12px 0 0;
  color: #264b90;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Alle Geschwister nach dem letzten h2 = Autorenbox-Inhalt */
.entry-content > h2:last-of-type ~ figure,
.entry-content > h2:last-of-type ~ p {
  background: #f0f4fa;
  padding: 0.5rem 1.75rem;
  margin: 0;
}

/* Letztes Element der Autorenbox: abgerundete Ecken unten */
.entry-content > h2:last-of-type ~ *:last-child {
  border-radius: 0 0 12px 12px;
  padding-bottom: 1.5rem;
}

/* Avatar-Bild: rund, kleiner, mit Schatten */
.entry-content > h2:last-of-type + figure {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  text-align: left;
}

.entry-content > h2:last-of-type + figure img {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #264b90;
  box-shadow: 0 4px 12px rgba(38, 75, 144, 0.15);
}

/* Bio-Text Typografie */
.entry-content > h2:last-of-type ~ p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333;
}

.entry-content > h2:last-of-type ~ p strong {
  color: #264b90;
}

/* Zweites Bild (Logo/Badge) kleiner halten */
.entry-content > h2:last-of-type ~ figure:not(:first-of-type) img,
.entry-content > h2:last-of-type ~ figure + p + p + figure img {
  width: auto !important;
  height: auto !important;
  max-width: 200px;
  border-radius: 8px;
  border: none;
  box-shadow: none;
}

/* Kontakt-Absatz: etwas abgesetzt */
.entry-content > h2:last-of-type ~ *:last-child {
  font-size: 0.9rem;
  color: #555;
}

.entry-content > h2:last-of-type ~ *:last-child a {
  color: #264b90;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.entry-content > h2:last-of-type ~ *:last-child a:hover {
  color: #cf181b;
}

/* Responsive */
@media (max-width: 600px) {
  .entry-content > h2:last-of-type,
  .entry-content > h2:last-of-type ~ figure,
  .entry-content > h2:last-of-type ~ p {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .entry-content > h2:last-of-type + figure img {
    width: 90px !important;
    height: 90px !important;
  }
  .entry-content > h2:last-of-type {
    font-size: 1.15rem;
  }
}


/* Related Pages Section */
.related-pages {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 2rem 1.5rem;
  background: #f8f9fb;
  border-radius: 12px;
}
.related-pages h2 {
  font-size: 1.3rem;
  color: #264b90;
  margin-bottom: 1rem;
  padding-left: 12px;
  border-left: 4px solid #cf181b;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.related-card:hover {
  border-color: #264b90;
  box-shadow: 0 2px 8px rgba(38,75,144,0.1);
}
.related-title {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.related-excerpt {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-pages { padding: 1.25rem 1rem; }
}