/*
Theme Name: Studybroker Theme
Theme URI: https://studybroker.de
Author: Studybroker
Description: Custom Theme for Studybroker — matches static page design.
Version: 2.2
*/

/* ===== Fonts ===== */
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap }
@font-face { font-family: 'IBM Plex Sans'; src: url('/static/fonts/ibm-plex-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap }
@font-face { font-family: 'IBM Plex Sans'; src: url('/static/fonts/ibm-plex-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap }
@font-face { font-family: 'IBM Plex Sans'; src: url('/static/fonts/ibm-plex-sans-600.woff2') format('woff2'); font-weight: 600; font-display: swap }

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 400;
  background: #f8f8f8;
  color: #334155;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; transition: color .2s }
img { max-width: 100%; height: auto; display: block }

/* ===== Header ===== */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .35s, box-shadow .35s, backdrop-filter .35s }
.hdr:not(.stuck) { background: transparent }
.hdr.stuck { background: rgba(255,255,255,.72); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 1px 0 rgba(0,0,0,.06) }
.hdr-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 clamp(20px,5vw,48px) }
.hdr-logo { display: flex; align-items: center; gap: 10px; font-family: 'Inter', system-ui, sans-serif; font-weight: 700; font-size: 19px; color: #111; text-decoration: none; transition: color .35s }
.hdr-logo img { width: 30px; height: 30px; border-radius: 8px }
.hdr-links { display: flex; align-items: center; gap: 32px }
.hdr-links a { font-size: 14px; font-weight: 500; color: #6b6b6b; transition: color .2s; text-decoration: none }
.hdr-links a:hover { color: #111 }
.hdr-cta, .hdr-links .hdr-cta { padding: 9px 20px !important; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14px !important; font-weight: 600 !important; color: #fff !important; background: #111 !important; border-radius: 10px !important; transition: all .25s !important; text-decoration: none !important }
.hdr-cta:hover, .hdr-links .hdr-cta:hover { background: #2d6a4f !important; transform: translateY(-1px) !important; box-shadow: 0 6px 24px rgba(45,106,79,.35) !important }
.mob-btn { display: none; background: none; border: none; cursor: pointer; color: #111; padding: 4px; transition: color .35s }
.mob-menu { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(255,255,255,.96); backdrop-filter: blur(24px); padding: 90px 32px 40px; flex-direction: column; gap: 4px }
.mob-menu.open { display: flex }
.mob-menu a { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 20px; font-weight: 600; padding: 16px 0; color: #111; border-bottom: 1px solid rgba(0,0,0,.06); text-decoration: none; display: block }
.mob-menu .hdr-cta { margin-top: 20px; text-align: center; display: block !important; padding: 16px !important; border-radius: 14px !important; color: #fff !important; background: #111 !important; border-bottom: none !important }
@media (max-width: 768px) { .hdr-links { display: none } .mob-btn { display: block } }

/* ===== Footer ===== */
.site-footer { padding: 64px 0 0; background: #0a0a0a; border-top: 1px solid rgba(255,255,255,.05); font-family: 'IBM Plex Sans', system-ui, sans-serif }
.footer-wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(20px,5vw,48px) }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px }
.footer-brand { color: rgba(255,255,255,.5); font-size: 14px; line-height: 1.6 }
.footer-brand-logo { display: flex; align-items: center; gap: 10px; font-family: 'Inter', system-ui, sans-serif; font-weight: 700; font-size: 19px; color: #fff; text-decoration: none; margin-bottom: 14px }
.footer-brand-logo img { width: 30px; height: 30px; border-radius: 8px }
.footer-col h4 { font-family: 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px }
.footer-col a { font-size: 14px; color: rgba(255,255,255,.4); transition: color .2s; text-decoration: none }
.footer-col a:hover { color: rgba(255,255,255,.85) }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.3) }
.footer-social { display: flex; gap: 12px }
.footer-social a { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.08); transition: all .25s; text-decoration: none }
.footer-social a svg { width: 15px; height: 15px; flex-shrink: 0 }
.footer-social a:hover { color: #fff; border-color: rgba(45,106,79,.4); transform: translateY(-2px) }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr } }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px } .footer-bottom { flex-direction: column; gap: 12px; text-align: center } }

/* ===== Page layout ===== */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px 80px;
}

/* ===== Legal pages (WP pages) ===== */
.legal-card {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.legal-card-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: #020617;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.legal-card-subtitle {
  font-size: 15px;
  color: #334155;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #cbd5e1;
}
.legal-content h2 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #020617;
  margin-top: 40px;
  margin-bottom: 12px;
}
.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  margin-top: 28px;
  margin-bottom: 8px;
}
.legal-content p {
  margin-bottom: 14px;
  line-height: 1.75;
}
.legal-content a {
  color: #2d6a4f;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  color: #1b4332;
}
.legal-content ul, .legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 14px;
}
.legal-content li {
  margin-bottom: 6px;
  line-height: 1.75;
}
.legal-page-meta {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #94a3b8;
}

/* ===== Blog list ===== */
.blog-grid {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.blog-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #e2e8f0;
  transition: box-shadow .25s, transform .25s;
}
.blog-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
.blog-card-meta {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.blog-card-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  color: #020617;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.blog-card-title a {
  color: inherit;
  text-decoration: none;
}
.blog-card-title a:hover {
  color: #2d6a4f;
}
.blog-card-excerpt {
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 16px;
}
.blog-card-link {
  font-size: 14px;
  font-weight: 600;
  color: #2d6a4f;
  text-decoration: none;
}
.blog-card-link:hover {
  color: #1b4332;
}
.blog-card-thumbnail {
  border-radius: 10px;
  margin-bottom: 20px;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ===== Single post ===== */
.post-article {
  max-width: 720px;
  margin: 0 auto;
}
.post-header {
  margin-bottom: 40px;
}
.post-meta {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.post-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #020617;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.post-featured-img {
  border-radius: 14px;
  width: 100%;
  margin-bottom: 40px;
}
.post-content h2 {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #020617;
  margin-top: 40px;
  margin-bottom: 14px;
}
.post-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin-top: 32px;
  margin-bottom: 10px;
}
.post-content p {
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 16px;
  color: #2a2a2a;
}
.post-content a {
  color: #2d6a4f;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover {
  color: #1b4332;
}
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 18px;
}
.post-content li {
  margin-bottom: 8px;
  line-height: 1.8;
  font-size: 16px;
  color: #2a2a2a;
}
.post-content blockquote {
  border-left: 3px solid #2d6a4f;
  padding: 16px 24px;
  margin: 24px 0;
  background: #f0fdf4;
  border-radius: 0 10px 10px 0;
  color: #1b4332;
  font-style: italic;
}
.post-content img {
  border-radius: 10px;
  margin: 24px 0;
}
.post-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
}
.post-content code {
  font-size: 14px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0f172a;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ===== Pagination ===== */
.blog-pagination {
  max-width: 820px;
  margin: 48px auto 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.blog-pagination a, .blog-pagination span {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.blog-pagination a {
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.blog-pagination a:hover {
  background: #f1f5f9;
  color: #111;
}
.blog-pagination .current {
  background: #2d6a4f;
  color: #fff;
  border: 1px solid #2d6a4f;
}

/* ===== Empty state ===== */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 16px;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 768px) {
  .page-main { padding: 100px 20px 60px }
  .blog-card { padding: 24px }
  .blog-card-thumbnail { height: 180px }
}

@media (max-width: 480px) {
  .legal-card-title, .post-title { font-size: 22px }
  .blog-card-title { font-size: 18px }
}
