/* =========================================================
   BASIS / VARIABLEN
   ========================================================= */
:root{
  --ink:#0f172a;
  --slate:#475569;
  --slate-light:#475569;
  --line:rgba(148,163,184,.15);
  --amber:#f59e0b;
  --amber-dark:#d97706;
  --amber-soft:rgba(245,158,11,.08);
  --hwl-signature: 20260211-hwl-portal-core-v3;
  --cloud:#f8fafc;
  --white:#fff;

  --shadow-sm:0 10px 30px rgba(15,23,42,.04);
  --shadow-md:0 20px 40px rgba(15,23,42,.06);
  --shadow-lg:0 30px 60px rgba(15,23,42,.12);

  --radius:16px;
  --radius-lg:24px;

  /* Kategorie / Unterthemen */
  --cat-accent: <?= h($accent) ?>;
  --cat-soft: <?= h($soft) ?>;
}

/* =========================================================
   RESET / TYPO
   ========================================================= */
*{box-sizing:border-box;padding:0}

body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:#fff;
  color:var(--ink);
  line-height:1.6;
}

a{text-decoration:none;color:inherit}

.wrap{
  max-width:1280px;
  margin:0 auto;
  padding:0 24px;
}

.muted{color:var(--slate)}

h1{font-size:2.6rem;font-weight:900;letter-spacing:-.03em}
h2{font-size:2rem;font-weight:800}
h3{font-size:1.35rem;font-weight:700}
h4{font-size:1.1rem;font-weight:800}

/* =========================================================
   HERO
   ========================================================= */
.blog-hero{
  padding:64px 0 48px;
  background:linear-gradient(135deg,#f8fafc 0%,#eef2ff 100%);
  border-bottom:1px solid var(--line);
  position:relative;
  overflow:hidden;
}

.blog-hero::before{
  content:"";
  position:absolute;
  right:-140px;
  top:-140px;
  width:420px;
  height:420px;
  background:radial-gradient(circle,var(--cat-soft),transparent 72%);
  pointer-events:none;
}

.blog-hero p{
  max-width:78ch;
  font-size:1.1rem;
  margin-top:12px;
}

/* Topic Badge */
.topic-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 22px rgba(15,23,42,.06);
  margin-bottom:12px;
}

.topic-badge .ic{
  width:42px;
  height:42px;
  border-radius:14px;
  background:var(--cat-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.35rem;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section{padding:80px 0}

/* =========================================================
   THEMENGRID
   ========================================================= */
.topic-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:26px;
  margin-top:26px;
}

@media(max-width:1100px){
  .topic-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .topic-grid{grid-template-columns:1fr}
}

.topic-card{
  display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:32px;
  box-shadow:var(--shadow-sm);
  position:relative;
  overflow:hidden;
  transition:.35s ease;

}

.topic-card::before{
  content:"";
  position:absolute;
  top:-40%;
  right:-40%;
  width:260px;
  height:260px;
  background:radial-gradient(
    circle,
    var(--sub-soft, var(--cat-soft)),
    transparent 70%
  );
  pointer-events:none;
}

.topic-card > *{
  position:relative;
  z-index:1;
}

.topic-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-md);
  border-color:color-mix(
    in srgb,
    var(--sub-accent, var(--cat-accent)) 35%,
    rgba(148,163,184,.15)
  );
}

.topic-icon{
  width:54px;
  height:54px;
  border-radius:14px;
  background:var(--sub-soft, var(--cat-soft));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.4rem;
  margin-bottom:18px;
}
/* =========================================================
   KARUSSELL
   ========================================================= */

.carousel-block{
  margin-top:64px;
}

/* =========================
   WRAPPER / VIEWPORT
   ========================= */
.carousel{
  position:relative;
  width:100%;
  overflow:hidden;
  padding:28px 0; 
}

/* =========================
   TRACK (DESKTOP)
   ========================= */
.carousel-track{
  display:flex;
  gap:20px;
  padding:0 96px;
  transition:transform .55s ease;
  will-change:transform;
}

/* =========================
   ARTICLE CARD
   ========================= */
.article-card,
.article-tile{
  flex:0 0 auto;
  width:380px;
  background:#fff;
  border:1px solid rgba(148,163,184,.18);
  border-radius:var(--radius-lg);
  padding:22px;
  box-shadow:var(--shadow-sm);

  display:flex;       
  flex-direction:column;
}


.article-card h4,
.article-tile h3{
  font-size:1.05rem;
  font-weight:850;
  margin-bottom:10px;

  display:-webkit-box;
  -webkit-line-clamp:2;   
  -webkit-box-orient:vertical;
  overflow:hidden;
}


.article-card p,
.article-tile p{
  font-size:.95rem;
  color:var(--slate);
  line-height:1.5;

  display:-webkit-box;
  -webkit-line-clamp:4;   
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.article-meta{
  margin-top:auto;   
  padding-top:12px;
  border-top:1px solid rgba(148,163,184,.14);
  font-size:.85rem;
  color:var(--slate-light);
}


/* =========================
   META
   ========================= */
.article-meta{
  display:flex;
  justify-content:space-between;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(148,163,184,.14);
  font-size:.85rem;
  color:var(--slate-light);
}

/* =========================
   ARROWS (DESKTOP)
   ========================= */
.carousel-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:50%;
  background:#fff;
  border:1px solid rgba(148,163,184,.25);
  cursor:pointer;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:none; 
}

.carousel-arrow:hover{
  border-color:rgba(245,158,11,.45);
}


.carousel-arrow.left{
  left:24px;
}

.carousel-arrow.right{
  right:24px;
}

/* =========================================================
   MOBILE – VERTIKALE LISTE (KEIN KARUSSELL)
   ========================================================= */
@media (max-width:720px){

  .carousel{
    overflow:visible;
    padding:0;
  }

  .carousel-track{
    display:grid;
    grid-template-columns:1fr;
    gap:16px;
    padding:0;            
    transform:none !important;
  }

  .article-card,
  .article-tile{
    width:100%;
    max-width:100%;
    border-radius:var(--radius);
    box-shadow:var(--shadow-sm);
  }

  .article-card:hover,
  .article-tile:hover{
    transform:none;
    box-shadow:var(--shadow-sm);
  }

  .carousel-arrow{
    display:none !important;
  }
}

/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */
@media (max-width:420px){
  .article-card,
  .article-tile{
    padding:18px;
  }
}



/* =========================================================
   CTA
   ========================================================= */
.cta-band{
  background:linear-gradient(135deg,var(--ink),#1e293b);
  color:#fff;
  padding:90px 0;
  text-align:center;
}

.cta-band h2{
  color:#fff;
  margin-bottom:16px;
}

.cta-band p{
  max-width:600px;
  margin:0 auto 36px;
  color:rgba(255,255,255,.85);
}

.cta-btn{
  padding:16px 34px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--amber),var(--amber-dark));
  color:#fff;
  font-weight:700;
  box-shadow:0 20px 40px rgba(15,23,42,.25);
}

/* =========================================================
   HELPERS / RESPONSIVE
   ========================================================= */
.empty-note{
  padding:18px;
  border:1px dashed var(--line);
  border-radius:12px;
  color:var(--slate);
  background:linear-gradient(180deg,var(--cloud),#fff);
}



@media (max-width:480px){
  h1{font-size:1.8rem}
  .topic-card{padding:20px}
  
}
.article-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
  margin-top:36px;
}
@media(max-width:1000px){.article-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.article-grid{grid-template-columns:1fr}}





.article-tile{
  display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:28px;
  box-shadow:var(--shadow-sm);
  transition:.3s ease;
  position:relative;
  overflow:hidden;
}
.article-tile::before{
  content:"";
  position:absolute;
  top:-40%;
  right:-40%;
  width:240px;
  height:240px;
  background:radial-gradient(circle,var(--sub-soft),transparent 70%);
}
.article-tile:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-md);
  border-color:color-mix(in srgb,var(--sub-accent) 35%, var(--line));
}

.article-badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:var(--sub-soft);
  color:#1e293b;  
  font-weight:700;
  font-size:.75rem;
  margin-bottom:14px;
}

.article-meta{
  display:flex;
  justify-content:space-between;
  margin-top:16px;
  font-size:.85rem;
  color:var(--slate-light);
}

.article-date{
  font-size:.75rem;
  font-weight:600;
  color:var(--slate-light);
  margin-bottom:6px;
}

.article-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.article-top{
  font-size:.75rem;
  font-weight:700;
  color:var(--slate-light);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.article-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.article-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:16px;
  font-size:.85rem;
  color:var(--slate-light);
}

.article-date{
  white-space:nowrap;
}




.article-page{
  max-width:1200px;
  margin:64px auto;
  padding:0 20px;
}
.article-header h1{
  font-size:2.2rem;
  line-height:1.15;
  margin-bottom:16px;
  color:#065f46;
}
}
.article-lead{
  font-size:1.15rem;
  color:var(--slate);
  margin-bottom:20px;
}
.article-meta-bar{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  font-size:.9rem;
  color:var(--slate);
  border-bottom:1px solid var(--line);
  padding-bottom:14px;
  margin-bottom:32px;
}
.article-content{
  font-size:1.05rem;
  line-height:1.75;
  color:#0f172a;
}
.article-content p{ margin-bottom:1.2em; }
.article-content h2{ margin-top:48px; margin-bottom:16px; font-size:1.6rem; }
.article-content h3{ margin-top:32px; margin-bottom:12px; font-size:1.3rem; }

.article-content ul {
  list-style-position: inside; 
  padding-left: 0; 
  margin: 1rem 0;
}

.article-content li {
  margin: 0.4rem 0;
}

.article-reviews{
  margin-top:8px;
  padding-top:6px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:10px;
  font-size:.9rem;
}

.article-reviews .review-count{
  color:var(--slate);
  font-weight:600;
  white-space:nowrap;
}

.article-reviews .review-stars{
  color:#fbbf24;
  letter-spacing:1px;
  line-height:1;
}

.article-reviews .review-avg{
  font-weight:800;
  color:#0f172a;
}


/* =========================================
   Artikel Navigation (Zurück-Buttons)
========================================= */

.article-nav{
  margin-top: 72px;
  padding: 32px;
  border-radius: 24px;

  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;

  /* Dezentes Portal-Grau */
  background: #f1f5f9;
  border: 1px solid #e2e8f0;

  box-shadow: 0 20px 40px rgba(15,23,42,.06);
}


/* ===============================
   BASIS BUTTON
=============================== */
.article-back{
  display: inline-flex;
  align-items: center;
  gap: .55rem;

  border-radius: 999px;
  padding: .7rem 1.2rem;
  font-weight: 800;
  letter-spacing: .3px;
  text-decoration: none;

  background: #334155;      
  color: #fff;
  border: 1px solid #1e293b;

  box-shadow: 0 8px 18px rgba(15,23,42,.25);
  transition: all .25s ease;
  white-space: nowrap;
}

.article-back:hover{
  background: #1e293b;
  transform: translateY(-2px);
}



.article-back.primary{
  background: var(--amber);
  color: #1f2937;
  border: 1px solid #00000012;
  box-shadow: 0 10px 24px rgba(245,158,11,.32);
}

.article-back.primary:hover{
  background: var(--amber-700);
  color: #fff;
}



@media (max-width: 768px){
  .article-nav{
    flex-direction: column;
    align-items: stretch;
  }

  .article-back{
    justify-content: center;
    width: 100%;
  }
}



/********************************************
 * 13) BEWERTUNGS-BEREICH (Review-Section)
 *     betrifft: <div class="review-section"> ... </div>
 ********************************************/

.review-section {
  max-width: 1170px;
  margin: 40px auto 50px;
  padding: 20px 18px 22px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Überschrift */
.review-section h2 {
  text-align: center;
  font: 800 clamp(1.6rem, 1.2vw + 1.2rem, 2rem)/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0 0 8px;
  color: var(--charcoal);
}

#averageStars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 1.1rem;
  color: var(--amber-700, #b45309);
}

.review {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.review:last-child {
  border-bottom: none;
  padding-bottom: 0;
}


.review .avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #fef3c7 0%, #f59e0b 50%, #b45309 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  color: #111827;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.18);
}


.review-content {
  flex: 1 1 auto;
  min-width: 0;
}

.review-content h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.review-content .stars {
  color: #fbbf24;
  margin: 2px 0 6px;
  font-size: 0.95rem;
}

.review-content p {
  margin: 0;
  color: var(--slate);
  line-height: 1.55;
  font-size: 0.95rem;
  word-wrap: break-word;
}


.add-review {
  margin-top: 26px;
  padding: 18px 16px 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.add-review h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.add-review form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.add-review label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  display: block;
  margin-bottom: 4px;
}

.add-review input,
.add-review textarea,
.add-review select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.add-review textarea {
  min-height: 120px;
  resize: vertical;
}

.add-review input::placeholder,
.add-review textarea::placeholder {
  color: #9ca3af;
}


.add-review input:focus,
.add-review textarea:focus,
.add-review select:focus {
  outline: 0;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}


.add-review button {
  align-self: flex-start;
  padding: 10px 18px;
  border: 1px solid #d97706;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.06s ease;
}

.add-review button:hover {
  background: #d97706;
  color: #ffffff;
  transform: translateY(-1px);
}

.add-review button:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(180, 83, 9, 0.25);
}

/* Responsiv */
@media (max-width: 700px) {
  .review-section {
    margin: 30px auto 40px;
    padding: 16px 12px 18px;
  }

  .review {
    gap: 12px;
  }

  .add-review {
    padding: 14px 12px 16px;
  }
}




/* ============================
   Optische Überschriften-Ersatz-Styles
   ============================ */


.card-title {
  display: block;
  font-weight: 700;   
  font-size: 1.5rem;    
  margin-bottom: 0.35rem;
  color: #111827;      
}


.faq-question {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
  color: #111827;
}


.review-section .card-title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  text-align: center;
}





.topic-grid .topic-card {
  position: relative;
}

.topic-grid .sub-article-count {
  position: absolute;
  top: 14px;
  right: 14px;

  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;

  color: var(--sub-accent);
  background: var(--sub-soft);
  border: 1px solid color-mix(in srgb, var(--sub-accent) 30%, transparent);

  transition:
    transform .25s cubic-bezier(.16,.8,.2,1),
    background .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;

  will-change: transform;
  backface-visibility: hidden;
}


.topic-grid .topic-card:hover .sub-article-count {

  transform: translateY(-3px);

  background: color-mix(in srgb, var(--sub-accent) 18%, white);
  border-color: var(--sub-accent);

  box-shadow:
    0 6px 18px color-mix(in srgb, var(--sub-accent) 35%, transparent),
    0 2px 6px rgba(0,0,0,.06);
}





.breadcrumb{
  width: 100%;
  margin: 0;
  padding: 10px max(16px, calc((100vw - 1200px) / 2));
  box-sizing: border-box;

  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);


  overflow: visible;
}


.breadcrumb__list{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-wrap: wrap;


  column-gap: 8px;
  row-gap: 8px;

  
  align-items: flex-start;


  min-width: 0;
}


.breadcrumb__item{
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;

  font-size: 0.92rem;
  line-height: 1.25;
  color: #0f172a;
}


.breadcrumb__item + .breadcrumb__item::before{
  content: "›";
  margin-right: 8px;
  color: rgba(100, 116, 139, 0.85);
  font-weight: 700;
  line-height: 1;
}


.breadcrumb__link{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 999px;

  text-decoration: none;
  color: #0f172a;

  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);

  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;


  white-space: nowrap;


  max-width: 100%;
  min-width: 0;
}

.breadcrumb__link:hover{
  background: rgba(255, 251, 235, 0.95);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.12);
  transform: translateY(-1px);
}

.breadcrumb__link:focus-visible{
  outline: 2px solid rgba(245, 158, 11, 0.9);
  outline-offset: 2px;
}


.breadcrumb__current{
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(255, 251, 235, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #b45309;
  font-weight: 700;


  white-space: nowrap;

  max-width: 100%;
  min-width: 0;

 
  overflow: visible;
  text-overflow: clip;
}


@media (max-width: 768px){
  .breadcrumb{
    padding: 10px 12px;  */
  }

  .breadcrumb__item{
    font-size: 0.92rem;
    line-height: 1.2;
  }


  .breadcrumb__link,
  .breadcrumb__current{

    display: inline-block;

    padding: 7px 10px;
    line-height: 1.15;

    white-space: normal;


    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;


    max-width: 100%;
  }


  .breadcrumb__link{
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  }


  .breadcrumb__item + .breadcrumb__item::before{
    margin-right: 6px;
    transform: translateY(0.5px);
  }
}


@media (max-width: 420px){
  .breadcrumb__link,
  .breadcrumb__current{
    padding: 7px 9px;
    border-radius: 14px; 
  }
}


/* =========================================
   FIX: Article Tile Link Color Override
========================================= */

.article-tile {
  color: #0f172a; /* dunkles Standard-Text */
}

.article-tile h3 {
  color: #064e3b; /* dein dunkles Grün */
}

.article-tile .article-topic,
.article-tile .article-date,
.article-tile span,
.article-tile p {
  color: inherit;
}
