/* styles.css
   Zweck: Zentrales Stylesheet der PWA "Akku-Ladestation Guide".
   Premium-Look: moderne Verlaufsflächen, weiche Schatten, Glassmorphism-Akzente,
   dezente Animationen. Mobile-first, responsive Anpassungen über media queries. */

:root {
  --color-primary: #2563eb;
  --color-primary-light: #38bdf8;
  --color-primary-dark: #0b1730;
  --color-accent: #22d3a7;
  --color-accent-dark: #0ea886;
  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-text: #101827;
  --color-text-muted: #5b6675;
  --color-border: #e2e8f0;
  --color-warning-bg: #fff6dd;
  --color-warning-text: #7a5b00;

  --gradient-hero: linear-gradient(135deg, #0b1730 0%, #123a68 45%, #2563eb 85%, #38bdf8 100%);
  --gradient-accent: linear-gradient(135deg, #22d3a7 0%, #38bdf8 100%);
  --gradient-card-hover: linear-gradient(145deg, rgba(37,99,235,0.06), rgba(34,211,167,0.08));

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--color-bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,0.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(34,211,167,0.08), transparent 40%);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus { text-decoration: underline; }
a:focus, button:focus, input:focus { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.hidden { display: none !important; }

/* Banners */
.offline-banner, .update-banner {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.btn-link {
  background: none; border: none; text-decoration: underline;
  color: var(--color-primary-dark); cursor: pointer; font-size: 0.9rem;
}

/* Header */
.site-header {
  background: rgba(11, 23, 48, 0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 0.55rem;
  color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
}
.logo-placeholder {
  font-size: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient-accent);
  box-shadow: 0 4px 14px rgba(34,211,167,0.35);
}
.nav-toggle {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  padding: 0.45rem 0.65rem; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: #fff; display: block; border-radius: 2px; }
.main-nav {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem;
  width: 100%;
  margin-top: 0.6rem;
}
.main-nav a {
  color: rgba(255,255,255,0.85); padding: 0.5rem 0.7rem; font-size: 0.95rem;
  border-radius: 8px; transition: all 0.2s ease;
}
.main-nav a:hover, .main-nav a.active {
  color: #fff; background: rgba(255,255,255,0.1);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav { width: auto; margin-top: 0; }
}
@media (max-width: 767px) {
  .main-nav { display: none; flex-direction: column; }
  .main-nav.open { display: flex; }
}

/* Main layout */
.app-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
  min-height: 60vh;
}
.loading-hint { color: var(--color-text-muted); text-align: center; padding: 2rem; }

/* Hero / intro */
.hero {
  background: var(--gradient-hero);
  color: #fff; border-radius: var(--radius);
  padding: 2.75rem 2rem; margin-bottom: 2rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.hero h1 {
  margin-top: 0; font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em; max-width: 680px;
}
.hero p { color: rgba(255,255,255,0.88); max-width: 620px; font-size: 1.02rem; }

/* Search */
.search-box { margin: 1.25rem 0 2.25rem; }
.search-box input[type="search"] {
  width: 100%; padding: 0.85rem 1.1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-box input[type="search"]:focus { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.search-results { margin-top: 1rem; display: grid; gap: 0.75rem; }

/* Category tiles */
.tiles { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: 2.25rem; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column;
  gap: 0.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gradient-card-hover);
  opacity: 0; transition: opacity 0.25s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile:hover::before { opacity: 1; }
.tile h3 { margin: 0; color: var(--color-primary-dark); font-size: 1.15rem; position: relative; }
.tile p { color: var(--color-text-muted); flex-grow: 1; margin: 0; position: relative; }

.btn {
  display: inline-block; background: var(--color-primary); color: #fff;
  padding: 0.65rem 1.15rem; border-radius: 999px; border: none; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; text-align: center;
  box-shadow: 0 6px 16px rgba(37,99,235,0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative; z-index: 1;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(37,99,235,0.32); }
.btn-accent { background: var(--gradient-accent); color: #052e26; box-shadow: 0 6px 16px rgba(34,211,167,0.32); }
.btn-accent:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn[disabled], .btn.disabled { background: #b7bec4; cursor: not-allowed; box-shadow: none; }

/* Article list */
.article-list { display: grid; gap: 1.1rem; margin-top: 1.1rem; }
.article-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.2rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-card h3 { margin: 0 0 0.35rem; font-size: 1.08rem; color: var(--color-primary-dark); }
.article-card p { color: var(--color-text-muted); margin: 0 0 0.7rem; }
.card-actions { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }

/* Favorite star */
.fav-btn {
  background: none; border: none; cursor: pointer; font-size: 1.35rem;
  color: #cbd3dc; transition: color 0.2s ease, transform 0.2s ease;
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.active { color: #f5a623; text-shadow: 0 0 12px rgba(245,166,35,0.5); }

/* Article detail */
.article-detail { background: var(--color-surface); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.article-detail h1 { margin-top: 0.6rem; letter-spacing: -0.01em; }
.article-detail .category-tag {
  display: inline-block; background: var(--gradient-accent); color: #052e26;
  padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  margin-bottom: 0.4rem; letter-spacing: 0.02em;
}
.content-section { margin-bottom: 1.3rem; }
.content-section h2 { font-size: 1.1rem; color: var(--color-primary-dark); }

/* Product cards */
.product-filter { display: flex; gap: 0.5rem; margin: 1.1rem 0; flex-wrap: wrap; }
.product-filter button {
  padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: var(--color-surface); cursor: pointer; font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s ease;
}
.product-filter button.active {
  background: var(--gradient-hero); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(37,99,235,0.3);
}
.products-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.15rem; display: flex; flex-direction: column; gap: 0.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card img {
  width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e7f0f7, #f4f7fb);
}
.product-card ul { margin: 0; padding-left: 1.2rem; color: var(--color-text-muted); font-size: 0.9rem; }
.badge {
  display: inline-block; font-size: 0.75rem; background: var(--color-surface-soft);
  border: 1px solid var(--color-border); padding: 0.2rem 0.6rem; border-radius: 999px;
  color: var(--color-text-muted); align-self: flex-start; font-weight: 600;
}
.affiliate-disabled { color: var(--color-warning-text); font-size: 0.85rem; }

/* Product recommendation box in article */
.recommendation-box {
  margin-top: 2.25rem; padding: 1.5rem; border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #f0f6fb 0%, #ffffff 60%);
  box-shadow: var(--shadow-sm);
}
.recommendation-box h2 { margin-top: 0; }

/* Footer */
.site-footer {
  text-align: center; padding: 1.5rem 1.25rem; color: var(--color-text-muted); font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
}
