/* =============================================
   SoftwareChecks.de — Main Stylesheet
   Clean, light, SEO-friendly tech blog
   ============================================= */

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EFF6FF;
  --blue-mid: #DBEAFE;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFF;
  --border: #E2E8F0;
  --border-hover: #CBD5E1;
  --green: #10B981;
  --red: #EF4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow: 0 4px 16px rgba(37,99,235,.08);
  --shadow-hover: 0 8px 32px rgba(37,99,235,.14);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--blue);
  background: var(--blue-light);
}

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.search-toggle, .nav-toggle {
  width: 38px; height: 38px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.search-toggle:hover, .nav-toggle:hover {
  border-color: var(--blue); color: var(--blue); background: var(--blue-light);
}

.nav-toggle { flex-direction: column; gap: 4px; padding: 10px; }
.nav-toggle span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: .2s; }
.nav-toggle { display: none; }

.search-bar {
  display: none;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.search-bar.open { display: block; }
.search-bar form {
  display: flex; gap: 8px; max-width: 600px;
}
.search-bar input {
  flex: 1; padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem;
  outline: none; transition: border-color .2s;
}
.search-bar input:focus { border-color: var(--blue); }
.search-bar button {
  padding: 10px 20px; background: var(--blue);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; cursor: pointer; transition: background .2s;
}
.search-bar button:hover { background: var(--blue-dark); }

/* =============================================
   HERO / PAGE HEADER
   ============================================= */

.page-hero {
  background: linear-gradient(135deg, var(--blue-light) 0%, #fff 60%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-mid); color: var(--blue-dark);
  padding: 4px 12px; border-radius: 20px;
  font-size: .8rem; font-weight: 600; margin-bottom: 16px;
}

/* =============================================
   POSTS GRID
   ============================================= */

.posts-section { padding: 48px 0; }
.posts-section.alt-bg { background: var(--bg-alt); }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 16px;
}
.section-title {
  font-size: 1.35rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; display: block;
  width: 40px; height: 3px;
  background: var(--blue); border-radius: 2px;
}
.section-link {
  font-size: .875rem; font-weight: 600;
  color: var(--blue); white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue-mid);
}

.post-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}
.post-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--blue-mid));
  color: var(--blue); font-size: 2.5rem;
}

.post-card-body {
  padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px;
}

.post-card-cat {
  display: inline-flex; align-items: center;
  font-size: .75rem; font-weight: 600;
  color: var(--blue); background: var(--blue-light);
  padding: 3px 10px; border-radius: 20px;
  align-self: flex-start; text-transform: uppercase; letter-spacing: .05em;
}

.post-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.4;
  color: var(--text); flex: 1;
}
.post-card:hover .post-card-title { color: var(--blue); }

.post-card-excerpt {
  font-size: .875rem; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.post-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: .8rem; color: var(--text-light);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.post-card-meta svg { flex-shrink: 0; }

.read-more-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--blue-light);
  color: var(--blue); border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  transition: all .2s; align-self: flex-start;
}
.read-more-btn:hover { background: var(--blue); color: #fff; }

/* Featured post (large card) */
.post-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-card-featured .post-card-img {
  width: 45%; flex-shrink: 0; aspect-ratio: auto;
}
.post-card-featured .post-card-body { padding: 32px; }
.post-card-featured .post-card-title { font-size: 1.4rem; }

/* =============================================
   PAGINATION
   ============================================= */

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 40px 0 0;
}
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  transition: all .2s; cursor: pointer; text-decoration: none;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* =============================================
   SINGLE POST
   ============================================= */

.post-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}

.post-hero-img {
  width: 100%; border-radius: var(--radius);
  aspect-ratio: 16/7; object-fit: cover;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.post-header { margin-bottom: 32px; }
.post-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--text-muted); margin-bottom: 16px;
}
.post-breadcrumb a { color: var(--blue); }
.post-breadcrumb a:hover { text-decoration: underline; }

.post-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700; line-height: 1.25;
  color: var(--text); margin-bottom: 16px;
}

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  font-size: .875rem; color: var(--text-muted);
  padding: 16px; background: var(--bg-alt);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.post-meta-item { display: flex; align-items: center; gap: 6px; }
.post-meta .cat-badge {
  background: var(--blue); color: #fff;
  padding: 3px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600;
}

/* Article content */
.post-content {
  font-size: 1rem; line-height: 1.8; color: var(--text);
}
.post-content h2 {
  font-size: 1.5rem; font-weight: 700; margin: 40px 0 16px;
  color: var(--text); padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-mid);
}
.post-content h3 {
  font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: var(--text);
}
.post-content h4 {
  font-size: 1rem; font-weight: 700; margin: 20px 0 8px; color: var(--text);
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol {
  margin: 0 0 18px 24px; display: flex; flex-direction: column; gap: 8px;
}
.post-content li { line-height: 1.7; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--blue-dark); }
.post-content img {
  width: 100%; border-radius: var(--radius-sm);
  margin: 24px 0; box-shadow: var(--shadow-sm);
}
.post-content blockquote {
  border-left: 4px solid var(--blue);
  padding: 16px 20px; margin: 24px 0;
  background: var(--blue-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-muted);
}
.post-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-content th {
  background: var(--blue); color: #fff;
  padding: 12px 16px; text-align: left; font-size: .9rem;
}
.post-content td {
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.post-content tr:nth-child(even) td { background: var(--bg-alt); }
.post-content tr:last-child td { border-bottom: none; }
.post-content code {
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px;
  font-family: monospace; font-size: .875em;
}
.post-content pre {
  background: #1E293B; color: #E2E8F0;
  padding: 20px; border-radius: var(--radius-sm);
  overflow-x: auto; margin: 24px 0;
}
.post-content pre code { background: none; border: none; padding: 0; }

/* Rating box */
.rating-box {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 32px 0;
}
.rating-box h3 { margin-bottom: 16px; font-size: 1.1rem; }
.rating-stars { display: flex; gap: 4px; font-size: 1.5rem; margin-bottom: 8px; }
.rating-val { font-size: 2rem; font-weight: 700; color: var(--blue); }

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar { position: sticky; top: calc(var(--header-h) + 24px); }

.sidebar-widget {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-mid);
  display: flex; align-items: center; gap: 8px;
}

.cat-list { display: flex; flex-direction: column; gap: 4px; }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--text-muted);
  transition: all .2s;
}
.cat-list a:hover { background: var(--blue-light); color: var(--blue); }
.cat-list .count {
  background: var(--bg-alt); color: var(--text-light);
  font-size: .75rem; padding: 2px 8px; border-radius: 20px;
}

.recent-posts { display: flex; flex-direction: column; gap: 16px; }
.recent-post { display: flex; gap: 12px; align-items: flex-start; }
.recent-post-img {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; background: var(--bg-alt);
}
.recent-post-title {
  font-size: .875rem; font-weight: 600; line-height: 1.4; color: var(--text);
}
.recent-post-title:hover { color: var(--blue); }
.recent-post-date { font-size: .75rem; color: var(--text-light); margin-top: 4px; }

/* =============================================
   CATEGORY PAGE
   ============================================= */

.category-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 48px 0;
}
.category-header h1 { font-size: 2rem; margin-bottom: 8px; }
.category-header p { opacity: .85; font-size: 1rem; }
.category-header .post-count {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.2); padding: 4px 14px;
  border-radius: 20px; font-size: .85rem; margin-bottom: 16px;
}

/* =============================================
   SEARCH PAGE
   ============================================= */

.search-header { padding: 40px 0; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.search-form-large {
  display: flex; gap: 12px; max-width: 600px; margin: 24px 0 0;
}
.search-form-large input {
  flex: 1; padding: 14px 18px; font: inherit; font-size: 1rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: border-color .2s;
}
.search-form-large input:focus { border-color: var(--blue); }
.search-form-large button {
  padding: 14px 24px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.search-form-large button:hover { background: var(--blue-dark); }

.no-results {
  text-align: center; padding: 80px 20px;
}
.no-results-icon { font-size: 4rem; margin-bottom: 16px; }
.no-results h2 { font-size: 1.5rem; margin-bottom: 8px; }
.no-results p { color: var(--text-muted); }

/* =============================================
   BADGES & MISC
   ============================================= */

.badge {
  display: inline-flex; align-items: center;
  background: var(--blue-light); color: var(--blue);
  padding: 2px 8px; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
  background: #0F172A; color: #CBD5E1;
  padding: 64px 0 32px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand .site-logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; color: #94A3B8; line-height: 1.6; }
.footer-desc { margin-top: 8px; font-size: .85rem !important; }

.footer-col h4 {
  font-size: .9rem; font-weight: 700; color: #fff;
  margin-bottom: 16px; text-transform: uppercase;
  letter-spacing: .08em; font-size: .8rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: .875rem; color: #94A3B8; transition: color .2s;
  display: flex; align-items: center; gap: 8px;
}
.footer-col a:hover { color: #fff; }
.footer-col .badge { background: rgba(37,99,235,.3); color: #93C5FD; }

.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: .8rem; color: #475569; }
.footer-note { font-size: .75rem !important; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-img { width: 100%; aspect-ratio: 16/9; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; padding: 12px 0; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-layout { padding: 24px 0; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .post-content table { font-size: .8rem; }
  .post-content th, .post-content td { padding: 8px 10px; }
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card { animation: fadeIn .4s ease both; }
.post-card:nth-child(1) { animation-delay: .05s; }
.post-card:nth-child(2) { animation-delay: .1s; }
.post-card:nth-child(3) { animation-delay: .15s; }
.post-card:nth-child(4) { animation-delay: .2s; }
.post-card:nth-child(5) { animation-delay: .25s; }
.post-card:nth-child(6) { animation-delay: .3s; }
