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

:root {
  --red: #C8203A;
  --red-dark: #a81830;
  --red-nav: #b01c33;
  --blue: #1B3A8C;
  --blue-dark: #142d6e;
  --blue-light: #2347a8;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e0e0e0;
  --subtle: #f7f7f7;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #f0f0f0;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── SITE HEADER ── */
.site-header {
  background: var(--red);
  padding: 1rem 0;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header-logo img {
  height: 64px;
  width: auto;
}

.site-header-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-align: right;
  line-height: 1.6;
}

.site-header-meta a { color: rgba(255,255,255,0.85); }
.site-header-meta a:hover { color: #fff; }

/* ── SITE NAV ── */
.site-nav {
  background: var(--blue);
  border-bottom: 2px solid var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-links a {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  transition: background 0.12s, color 0.12s;
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(0,0,0,0.18);
  color: #fff;
}

.nav-cta {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--blue);
  background: #fff;
  border-radius: 3px;
  padding: 0.35rem 0.9rem;
  transition: opacity 0.12s;
}

.nav-cta:hover { opacity: 0.88; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--red-dark);
  padding: 0.5rem 1.25rem 1rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-mobile a:last-child { border-bottom: none; }

@media (max-width: 700px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ── PAGE WRAP ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ── MAIN CONTENT ── */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── ARTICLE LIST ITEM ── */
.article-item {
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  transition: box-shadow 0.12s;
  overflow: hidden;
}

.article-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

@media (max-width: 560px) { .article-item { grid-template-columns: 1fr; } }

.article-item-img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  background: var(--subtle);
  flex-shrink: 0;
}

.article-item-img-placeholder {
  flex: 0 0 200px;
  height: 160px;
  background: var(--subtle);
  border: 1px solid var(--border);
  overflow: hidden;
}

.article-item-img-placeholder img {
  width: 200px;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 560px) {
  .article-item-img, .article-item-img-placeholder { width: 100%; height: 180px; }
}

.article-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
}

.article-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
}

.article-item h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-item h2:hover { color: var(--red); }

.article-item .meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.article-item p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 0.2rem;
}

.read-more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
}

.read-more:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── TOPIC FILTER ── */
.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.topic-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.12s;
  font-family: inherit;
}

.topic-btn:hover { border-color: var(--red); color: var(--red); }
.topic-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── SIDEBAR ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-widget-title {
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 1rem;
}

.sidebar-widget-body {
  padding: 1rem;
}

/* Social links */
.social-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  transition: opacity 0.12s;
}

.social-link:hover { opacity: 0.85; }
.social-link.fb { background: #1877F2; }
.social-link.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* Sponsor ad */
.sponsor-ad {
  display: block;
  text-align: center;
}

.sponsor-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.sponsor-ad img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.sponsor-ad-placeholder {
  background: var(--subtle);
  border: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
}

.sponsor-ad-placeholder .ad-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.sponsor-ad-placeholder .ad-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 0.25rem;
}

.sponsor-ad-placeholder .ad-cta {
  margin-top: 1rem;
  display: inline-block;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 3px;
}

/* Sidebar recent list */
.sidebar-post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-post {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  transition: color 0.12s;
}

.sidebar-post:first-child { padding-top: 0; }
.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post:hover { color: var(--red); }

.sidebar-post .post-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ── ARTICLE PAGE ── */
.article-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 820px) { .article-page-wrap { grid-template-columns: 1fr; } }

.article-page {
  background: #fff;
  border: 1px solid var(--border);
  padding: 2rem;
}

.article-page .article-tag { margin-bottom: 0.5rem; display: block; }

.article-page h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-page .byline {
  margin-top: 0.5rem;
  font-size: 0.775rem;
  color: var(--muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.article-hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.article-body {
  font-size: 0.925rem;
  line-height: 1.85;
  color: #222;
}

.article-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1rem 1.4rem; }
.article-body li { margin-bottom: 0.3rem; }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

.article-body .inline-img {
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  display: block;
}

.article-body .inline-img + .caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: -1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.comments {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.comments h2 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  color: var(--muted);
}

/* ── TIP FORM ── */
.tip-form-wrap {
  background: #fff;
  border: 1px solid var(--border);
  padding: 2rem;
}

.tip-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.6rem 0.8rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  width: 100%;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { min-height: 110px; resize: vertical; }

.btn {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.12s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { opacity: 0.85; }

.success-msg {
  display: none;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 3px;
  padding: 1rem;
  font-size: 0.85rem;
  color: #166534;
  margin-top: 1rem;
}

/* ── FOOTER ── */
.site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.6);
  padding: 2rem 0 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-col-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.6rem;
}

.footer-col p { font-size: 0.78rem; line-height: 1.65; }

.footer-col a {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.12s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
}

.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom strong { color: rgba(255,255,255,0.7); }
