/* =====================================================================
 * Fichier : assets/css/pages/ratgeber.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la liste du Ratgeber (ratgeber.php) :
 *           en-tête avec recherche, barre des thèmes, article à la une,
 *           cartes d'articles, pagination, colonne « Beliebte Artikel »,
 *           liens vers les outils, état vide, appel à l'action.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. En-tête et recherche
 * ------------------------------------------------------------------- */
.rg-hero::before { z-index: 0; }
.rg-hero-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rg-hero-inner { position: relative; z-index: 2; }
.rg-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-top: 1rem; }
.rg-hero-text h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); animation: hfk-fade-up .7s var(--hfk-ease) both; }
.rg-hero-text h1 span { display: block; margin-top: .2rem; font-size: .62em; background: var(--hfk-grad-fire-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rg-hero-text p { animation: hfk-fade-up .7s .12s var(--hfk-ease) both; }
.rg-search { padding: 1.3rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-top: 4px solid var(--hfk-flame); animation: hfk-fade-up .7s .2s var(--hfk-ease) both; }
.rg-search-label { display: block; margin-bottom: .6rem; font-family: var(--hfk-font-head); font-weight: 700; color: #fff; }
.rg-search-label i { color: var(--hfk-amber); margin-right: .3rem; }
.rg-search-field { display: flex; }
.rg-search-field input { flex: 1; min-width: 0; height: 54px; padding: 0 1rem; border: 2px solid transparent; border-radius: 0; background: #fff; color: var(--hfk-charcoal); font-size: 1rem; font-weight: 500; outline: 0; transition: border-color .25s, box-shadow .25s; }
.rg-search-field input:focus { border-color: var(--hfk-amber); box-shadow: 0 0 0 4px rgba(255, 227, 43, .25); }
.rg-search-field .btn { width: 58px; height: 54px; padding: 0; flex: 0 0 58px; }
.rg-hero .rg-search-hint { margin: .7rem 0 0; font-size: .86rem; color: #D5DADF; }
.rg-search-hint strong { color: #fff; }

/* ---------------------------------------------------------------------
 * 2. Barre des thèmes
 * ------------------------------------------------------------------- */
.rg-topics { position: relative; z-index: 3; margin-top: -1.6rem; }
.rg-topics-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: .7rem; background: #fff; box-shadow: var(--hfk-shadow-lg); }
.rg-topics-list a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border: 1px solid var(--hfk-border); color: var(--hfk-charcoal); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .25s, color .25s, border-color .25s, transform .25s var(--hfk-ease); }
.rg-topics-list a i { color: var(--hfk-flame); transition: color .25s; }
.rg-topics-list a b { min-width: 22px; padding: 0 .3rem; background: var(--hfk-ash); color: var(--hfk-muted); font-size: .74rem; line-height: 1.5; text-align: center; }
.rg-topics-list a:hover { border-color: var(--hfk-flame); color: var(--hfk-flame-dark); transform: translateY(-2px); }
.rg-topics-list a.is-active { background: var(--hfk-flame); border-color: var(--hfk-flame); color: #fff; }
.rg-topics-list a.is-active i { color: #fff; }
.rg-topics-list a.is-active b { background: rgba(255, 255, 255, .25); color: #fff; }

/* ---------------------------------------------------------------------
 * 3. Article à la une
 * ------------------------------------------------------------------- */
.rg-featured { overflow-x: clip; padding-bottom: calc(var(--hfk-section-y) * .6); }
.rg-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); background: #fff; border: 1px solid var(--hfk-border); box-shadow: var(--hfk-shadow-sm); transition: box-shadow .4s var(--hfk-ease); }
.rg-feature:hover { box-shadow: var(--hfk-shadow-lg); }
.rg-feature-media { position: relative; display: block; min-height: 340px; overflow: hidden; background: var(--hfk-placeholder); }
.rg-feature-media img, .rg-feature-media .img-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--hfk-ease); }
.rg-feature-media .img-ph i { font-size: 4rem; }
.rg-feature:hover .rg-feature-media img, .rg-feature:hover .rg-feature-media .img-ph { transform: scale(1.05); }
.rg-feature-flag { position: absolute; left: 0; top: 1.2rem; z-index: 2; padding: .45rem .9rem; background: var(--hfk-grad-ember); color: #fff; font-family: var(--hfk-font-head); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rg-feature-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.4rem, 3.5vw, 2.8rem); }
.rg-feature-body h2 { margin: .8rem 0; font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.rg-feature-body h2 a { color: var(--hfk-charcoal); background: linear-gradient(var(--hfk-flame), var(--hfk-flame)) no-repeat 0 100% / 0 3px; transition: background-size .45s var(--hfk-ease), color .25s; }
.rg-feature-body h2 a:hover { color: var(--hfk-charcoal); background-size: 100% 3px; }
.rg-feature-body > p { color: var(--hfk-muted); font-size: 1.02rem; }
.rg-feature-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .6rem; padding-top: 1rem; border-top: 1px dashed var(--hfk-border); }
.rg-author { font-size: .9rem; font-weight: 600; color: var(--hfk-charcoal); }
.rg-author i { color: var(--hfk-flame); margin-right: .25rem; }

/* ---------------------------------------------------------------------
 * 4. Cartes et liste
 * ------------------------------------------------------------------- */
.rg-list { scroll-margin-top: var(--hfk-header-h, 80px); }
.rg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 3vw, 2.8rem); align-items: start; }
.rg-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: 1.4rem; padding-bottom: .8rem; border-bottom: 2px solid var(--hfk-charcoal); }
.rg-list-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.rg-list-head p { margin: 0; font-size: .9rem; color: var(--hfk-muted); }
.rg-list-head strong { font-family: var(--hfk-font-head); color: var(--hfk-flame-dark); }
.rg-reset { font-weight: 600; white-space: nowrap; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.3rem; }
.rg-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hfk-border); transition: transform .4s var(--hfk-ease), box-shadow .4s var(--hfk-ease), border-color .3s; }
.rg-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2; background: var(--hfk-grad-fire-h); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--hfk-ease); }
.rg-card:hover { transform: translateY(-6px); box-shadow: var(--hfk-shadow-lg); border-color: transparent; }
.rg-card:hover::before { transform: scaleX(1); }
.rg-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--hfk-placeholder); }
.rg-card-media img, .rg-card-media .img-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--hfk-ease); }
.rg-card:hover .rg-card-media img, .rg-card:hover .rg-card-media .img-ph { transform: scale(1.06); }
.rg-card:hover .img-ph i { animation: hfk-flicker 1.4s ease-in-out infinite; color: rgba(34, 166, 75, .55); }
.rg-card-body { flex: 1; display: flex; flex-direction: column; padding: 1.1rem 1.2rem 1.2rem; }
.rg-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .8rem; color: var(--hfk-muted); }
.rg-topic { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; background: var(--hfk-flame-light); color: var(--hfk-flame-dark); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transition: background .25s, color .25s; }
.rg-topic:hover { background: var(--hfk-flame); color: #fff; }
.rg-card-title { margin: .7rem 0 .5rem; font-size: 1.15rem; line-height: 1.3; }
.rg-card-title a { color: var(--hfk-charcoal); }
.rg-card-title a:hover { color: var(--hfk-flame-dark); }
.rg-card-body > p { flex: 1; margin-bottom: .9rem; font-size: .9rem; line-height: 1.6; color: var(--hfk-muted); }
.rg-card-body footer { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--hfk-border); font-size: .82rem; color: var(--hfk-muted); }
.rg-card-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.rg-card-more i { transition: transform .3s var(--hfk-ease); }
.rg-card:hover .rg-card-more i { transform: translateX(4px); }
.rg-mark { padding: 0 .1em; background: var(--hfk-amber-light); color: var(--hfk-charcoal); box-shadow: inset 0 -2px 0 var(--hfk-amber); }
.rg-only-one { padding: 1rem 1.2rem; background: #fff; border-left: 4px solid var(--hfk-amber); color: var(--hfk-muted); }

/* Pagination */
.rg-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin-top: 2.2rem; }
.rg-pagination ol { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.rg-pagination ol a, .rg-pagination ol span, .rg-pagination .is-gap { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 .5rem; font-family: var(--hfk-font-head); font-weight: 700; }
.rg-pagination ol a { border: 1px solid var(--hfk-border); background: #fff; color: var(--hfk-charcoal); transition: background .25s, color .25s, transform .25s var(--hfk-ease); }
.rg-pagination ol a:hover { background: var(--hfk-charcoal); color: #fff; transform: translateY(-2px); }
.rg-pagination ol span[aria-current] { background: var(--hfk-flame); color: #fff; }
.rg-pagination .is-gap { color: var(--hfk-muted); }
.rg-page-step { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 1rem; background: var(--hfk-charcoal); color: #fff; font-weight: 600; transition: background .25s; }
.rg-page-step:hover { background: var(--hfk-flame); color: #fff; }
.rg-page-step.is-off { background: var(--hfk-border); color: var(--hfk-muted); }

/* État vide */
.rg-empty { background: #fff; border: 1px dashed var(--hfk-border); }
.rg-empty p { max-width: 560px; margin-left: auto; margin-right: auto; color: var(--hfk-muted); }
.rg-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1rem; }

/* ---------------------------------------------------------------------
 * 5. Colonne latérale
 * ------------------------------------------------------------------- */
.rg-side { position: sticky; top: calc(var(--hfk-header-h, 80px) + 1rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.rg-side-box { padding: 1.3rem; background: #fff; border-top: 4px solid var(--hfk-flame); box-shadow: var(--hfk-shadow-sm); }
.rg-side-box h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.rg-side-box h2 i { color: var(--hfk-flame); margin-right: .3rem; }
.rg-popular { margin: 0; padding: 0; list-style: none; }
.rg-popular li { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--hfk-border); }
.rg-popular li:last-child { border-bottom: 0; padding-bottom: 0; }
.rg-popular-rank { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; background: var(--hfk-charcoal); color: var(--hfk-amber); font-family: var(--hfk-font-head); font-weight: 800; transition: background .25s, color .25s, transform .3s var(--hfk-ease-bounce); }
.rg-popular li:hover .rg-popular-rank { background: var(--hfk-flame); color: #fff; transform: rotate(-8deg) scale(1.08); }
.rg-popular a { display: block; font-family: var(--hfk-font-head); font-weight: 600; font-size: .95rem; line-height: 1.35; color: var(--hfk-charcoal); }
.rg-popular a:hover { color: var(--hfk-flame-dark); }
.rg-popular small { font-size: .78rem; color: var(--hfk-muted); }
.rg-tool { position: relative; display: block; padding: 1.3rem 1.3rem 1.2rem; overflow: hidden; color: #fff; transition: transform .35s var(--hfk-ease), box-shadow .35s var(--hfk-ease); }
.rg-tool.is-calc { background: var(--hfk-grad-fire); }
.rg-tool.is-faq { background: var(--hfk-grad-forest); }
.rg-tool:hover { color: #fff; transform: translateY(-5px); box-shadow: var(--hfk-shadow-lg); }
.rg-tool-icon { position: absolute; right: -10px; bottom: -18px; width: 110px; height: 110px; display: grid; place-items: center; font-size: 4.2rem; color: rgba(255, 255, 255, .18); transition: transform .5s var(--hfk-ease); }
.rg-tool:hover .rg-tool-icon { transform: rotate(-12deg) scale(1.1); }
.rg-tool strong { display: block; font-family: var(--hfk-font-head); font-size: 1.25rem; }
.rg-tool > span:not(.rg-tool-icon) { position: relative; display: block; margin: .3rem 0 .7rem; font-size: .88rem; line-height: 1.5; opacity: .95; }
.rg-tool em { position: relative; font-style: normal; font-weight: 700; font-size: .9rem; }
.rg-tool em i { transition: transform .3s var(--hfk-ease); }
.rg-tool:hover em i { transform: translateX(4px); }

/* ---------------------------------------------------------------------
 * 6. Appel à l'action
 * ------------------------------------------------------------------- */
.rg-cta { padding: clamp(2rem, 5vw, 3.5rem) 0; background: var(--hfk-grad-fire-h); background-size: 200% 100%; animation: hfk-gradient-pan 10s ease-in-out infinite alternate; color: #fff; }
.rg-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.rg-cta-inner h2 { margin: 0 0 .3rem; color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.rg-cta-inner p { margin: 0; color: rgba(255, 255, 255, .92); }
.rg-cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------------------------------------------------------------------
 * 7. Adaptation aux écrans
 * ------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .rg-layout { grid-template-columns: minmax(0, 1fr); }
    .rg-side { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .rg-hero-grid, .rg-feature { grid-template-columns: minmax(0, 1fr); }
    .rg-feature-media { min-height: 0; aspect-ratio: 16 / 9; }
    .rg-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    .rg-topics-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
    .rg-cta-inner, .rg-cta-actions { flex-direction: column; align-items: stretch; }
    .rg-pagination ol { order: -1; width: 100%; justify-content: center; }
    .rg-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .rg-cta { animation: none; }
}