/* =========================================
   WISSEN SIE DAS – Haupt-Stylesheet
   ========================================= */

/* Inter – lokal gehostet (kein Google Fonts / kein externer Request) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f2;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === Container === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
  background: #fff;
  border-bottom: 1px solid #e4e4e4;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.logo {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  white-space: nowrap;
}
.logo .logo-wissen { color: #d63031; }
.logo .logo-rest   { color: #1a1a1a; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 24px;
  overflow: hidden;
  transition: border-color .2s;
}
.search-form:focus-within { border-color: #d63031; }
.search-form input {
  border: none;
  outline: none;
  padding: 7px 14px;
  font-size: .85rem;
  font-family: inherit;
  width: 180px;
  background: transparent;
}
.search-form button {
  background: none;
  border: none;
  padding: 7px 12px;
  cursor: pointer;
  color: #888;
  font-size: 1rem;
  line-height: 1;
}
.search-form button:hover { color: #d63031; }

nav.main-nav {
  border-top: 1px solid #f0f0f0;
  overflow-x: auto;
  scrollbar-width: none;
}
nav.main-nav::-webkit-scrollbar { display: none; }

.nav-list { display: flex; list-style: none; }
.nav-list li a {
  display: block;
  padding: 11px 15px;
  font-size: .8rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: #d63031;
  border-bottom-color: #d63031;
}
.nav-list li a.nav-cookies {
  color: #999;
  font-size: .75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.nav-list li a.nav-cookies:hover { color: #d63031; }

/* =========================================
   LAYOUT: CONTENT + SIDEBAR
   ========================================= */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 32px 0 48px;
}

/* =========================================
   PAGE HERO (category/section pages)
   ========================================= */
.page-hero {
  background: linear-gradient(135deg, #d63031 0%, #c0392b 100%);
  color: #fff;
  padding: 36px 0;
  margin-bottom: 0;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.page-hero p { opacity: .85; font-size: 1rem; }

/* =========================================
   ARTICLE GRID (Homepage)
   ========================================= */
.section-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #d63031;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Featured top article (spans 3 cols) */
.article-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: box-shadow .2s;
}
.article-card-featured:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.14); }
.article-card-featured .card-image {
  aspect-ratio: 16/10;
}
.article-card-featured .card-body {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.article-card-featured .card-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.35;
}

/* Standard article card */
.article-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.13);
}
.article-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.article-card:hover .card-image img,
.article-card-featured:hover .card-image img {
  transform: scale(1.05);
}

/* Gradient placeholders per category */
.grad-sauber  { background: linear-gradient(135deg,#74b9ff,#0984e3); }
.grad-gesund  { background: linear-gradient(135deg,#55efc4,#00b894); }
.grad-beauty  { background: linear-gradient(135deg,#fd79a8,#e84393); }
.grad-garten  { background: linear-gradient(135deg,#ffeaa7,#f9ca24); }
.grad-tricks  { background: linear-gradient(135deg,#a29bfe,#6c5ce7); }
.grad-tages   { background: linear-gradient(135deg,#dfe6e9,#b2bec3); }

.card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.card-placeholder svg { opacity: .25; }

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.card-category {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d63031;
  margin-bottom: 8px;
}

.card-title {
  font-size: .97rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.42;
  margin-bottom: auto;
  transition: color .2s;
}
.article-card:hover .card-title { color: #d63031; }
.article-card-featured:hover .card-title { color: #d63031; }

.card-date { font-size: .72rem; color: #aaa; margin-top: 12px; }

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar-widget {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.widget-title {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d63031;
}

.sidebar-article-list { list-style: none; }
.sidebar-article-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
}
.sidebar-article-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-article-list a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sidebar-article-list .num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ececec;
  min-width: 28px;
  line-height: 1;
}
.sidebar-article-list .title {
  font-size: .85rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  transition: color .2s;
}
.sidebar-article-list a:hover .title { color: #d63031; }

.category-list { list-style: none; }
.category-list li {
  padding: 9px 0;
  border-bottom: 1px solid #f2f2f2;
}
.category-list li:last-child { border-bottom: none; }
.category-list a {
  font-size: .9rem;
  color: #444;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .2s;
}
.category-list a:hover { color: #d63031; }
.category-list .count {
  font-size: .72rem;
  background: #f5f5f5;
  padding: 2px 9px;
  border-radius: 20px;
  color: #999;
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 0;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
}
.pagination a {
  background: #fff;
  color: #333;
  border: 1.5px solid #ddd;
  transition: all .2s;
}
.pagination a:hover { background: #d63031; color: #fff; border-color: #d63031; }
.pagination .current { background: #d63031; color: #fff; border: 1.5px solid #d63031; }

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: #191919;
  color: #bbb;
  padding: 48px 0 24px;
  margin-top: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .logo { margin-bottom: 14px; display: block; }
.footer-brand .logo .logo-wissen { color: #d63031; }
.footer-brand .logo .logo-rest   { color: #fff; }
.footer-brand p { font-size: .875rem; line-height: 1.7; color: #777; max-width: 280px; }

.footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: .875rem; color: #777; transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #2e2e2e;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-bottom p { font-size: .78rem; color: #555; }

.footer-legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal-links a { font-size: .78rem; color: #555; transition: color .2s; }
.footer-legal-links a:hover { color: #fff; }

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #222;
  color: #eee;
  padding: 18px 0;
  z-index: 1000;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.visible { transform: translateY(0); }

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner p { font-size: .875rem; color: #ccc; flex: 1; min-width: 240px; line-height: 1.6; }
.cookie-banner p a { color: #d63031; text-decoration: underline; }
.cookie-banner p a:hover { color: #ff6b6b; }

.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }

/* Buttons */
.btn {
  padding: 9px 20px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary  { background: #d63031; color: #fff; }
.btn-primary:hover  { background: #c0392b; }
.btn-secondary { background: transparent; color: #bbb; border: 1.5px solid #444; }
.btn-secondary:hover { background: #333; color: #fff; }
.btn-outline  { background: transparent; color: #d63031; border: 1.5px solid #d63031; }
.btn-outline:hover  { background: #d63031; color: #fff; }
.btn-success  { background: #00b894; color: #fff; }
.btn-success:hover  { background: #00a381; }

/* =========================================
   ARTICLE PAGE
   ========================================= */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 32px 0 48px;
}

.article-breadcrumb {
  font-size: .78rem;
  color: #aaa;
  margin-bottom: 18px;
}
.article-breadcrumb a { color: #aaa; transition: color .2s; }
.article-breadcrumb a:hover { color: #d63031; }
.article-breadcrumb span { margin: 0 6px; }

.article-title {
  font-size: 2rem;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: .78rem;
  color: #aaa;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.article-meta .category-tag {
  background: #fff0f0;
  color: #d63031;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.article-featured-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16/7;
}
.article-featured-image .card-placeholder {
  height: 100%;
}

.article-content { font-size: 1.02rem; line-height: 1.82; color: #333; }
.article-content h2 { font-size: 1.35rem; font-weight: 700; color: #111; margin: 30px 0 14px; }
.article-content h3 { font-size: 1.1rem; font-weight: 700; color: #111; margin: 22px 0 10px; }
.article-content p  { margin-bottom: 18px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 18px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: #111; }

.highlight-box {
  background: #fff8f8;
  border-left: 4px solid #d63031;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
  font-size: .95rem;
}

.article-tags { margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }
.article-tags span { font-size: .75rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .8px; margin-right: 10px; }
.tag-pill {
  display: inline-block;
  background: #f4f4f2;
  color: #555;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  margin: 4px 4px 0 0;
  border: 1px solid #e4e4e4;
  transition: all .2s;
}
.tag-pill:hover { background: #d63031; color: #fff; border-color: #d63031; }

/* Related articles */
.related-articles { margin-top: 40px; padding-top: 28px; border-top: 1px solid #eee; }
.related-articles h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #111; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,0.07); transition: transform .2s; }
.related-card:hover { transform: translateY(-3px); }
.related-card .card-image { aspect-ratio: 16/10; }
.related-card .card-body { padding: 12px; }
.related-card .card-title { font-size: .85rem; }

/* =========================================
   LEGAL PAGES
   ========================================= */
.legal-wrapper { padding: 40px 0 64px; }
.legal-page { max-width: 820px; }

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 6px;
}
.legal-page .last-updated { font-size: .78rem; color: #aaa; margin-bottom: 36px; }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; color: #111; margin: 32px 0 12px; }
.legal-page h3 { font-size: 1rem; font-weight: 700; color: #222; margin: 22px 0 8px; }
.legal-page p  { font-size: .95rem; color: #444; margin-bottom: 14px; line-height: 1.8; }
.legal-page ul { padding-left: 22px; margin-bottom: 14px; color: #444; font-size: .95rem; line-height: 1.8; }
.legal-page li { margin-bottom: 6px; }
.legal-page a  { color: #d63031; text-decoration: underline; }

.legal-page table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9rem; }
.legal-page th { background: #f5f5f5; padding: 10px 14px; text-align: left; font-weight: 700; border: 1px solid #ddd; color: #333; }
.legal-page td { padding: 10px 14px; border: 1px solid #ddd; color: #555; vertical-align: top; }

/* =========================================
   COOKIE SETTINGS PAGE
   ========================================= */
.cookie-settings-page { padding: 40px 0 64px; max-width: 820px; }
.cookie-settings-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.cookie-settings-page .intro { font-size: .95rem; color: #555; margin-bottom: 36px; line-height: 1.7; }

.cookie-toggle-item {
  background: #fff;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.cookie-toggle-info h3 { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 6px; }
.cookie-toggle-info p  { font-size: .875rem; color: #666; line-height: 1.55; }
.cookie-toggle-badge {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: #00b894; background: #e8fdf6; padding: 2px 10px; border-radius: 20px;
  margin-top: 8px; display: inline-block;
}

.toggle-switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; margin-top: 4px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #ccc;
  border-radius: 34px;
  cursor: pointer;
  transition: .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: #d63031; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-switch input:disabled + .toggle-slider { opacity: .65; cursor: not-allowed; }

.save-message {
  display: none;
  background: #e8fdf6;
  color: #00b894;
  border: 1px solid #b2ead8;
  border-radius: 8px;
  padding: 14px 20px;
  margin-top: 20px;
  font-weight: 600;
  font-size: .9rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .content-wrapper { grid-template-columns: 1fr 260px; }
  .articles-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-inner    { grid-template-columns: 1fr 1fr; }
  .article-layout  { grid-template-columns: 1fr 260px; }
  .related-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar         { display: none; }
  .footer-inner    { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .article-layout  { grid-template-columns: 1fr; }
  .article-layout .sidebar { display: block; }
  .article-title   { font-size: 1.55rem; }
  .article-card-featured { grid-template-columns: 1fr; }
  .related-grid    { grid-template-columns: 1fr; }
  .header-top      { flex-wrap: wrap; }
  .search-form     { display: none; }
}

@media (max-width: 540px) {
  .articles-grid { grid-template-columns: 1fr; }
  .cookie-banner-inner { flex-direction: column; }
  .cookie-buttons { width: 100%; justify-content: stretch; }
  .cookie-buttons .btn { flex: 1; text-align: center; }
  .footer-legal-links { flex-direction: column; gap: 8px; text-align: center; }
}
