/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── VARIABLES ── */
:root {
  --red:       #b52628;
  --navy:      #1a2e5a;
  --gold:      #f5c518;
  --gold-dark: #d4a800;
  --text:      #222;
  --muted:     #666;
  --border:    #e5e5e5;
  --bg:        #f5f0eb;
  --white:     #fff;
  --radius:    10px;
  --font:      'Inter', sans-serif;
}

/* ── BASE ── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

/* ── HEADER ── */
header {
  background: var(--white);
  border-bottom: 2px solid var(--gold);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.logo {
  font-family: var(--font);
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: .5px;
}
.logo span { color: var(--gold-dark); }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 36px 20px 28px;
}
.page-hero h1 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: .5px;
}
.page-hero p {
  margin-top: 8px;
  color: rgba(255, 255, 255, .7);
  font-size: .95rem;
}

/* ── LAYOUT ── */
.container {
  max-width: 1444px;
  margin: 0 auto;
  padding: 23px 50px;
  display: flex;
  gap: 28px;
  align-items: start;
}

main { flex: 1; }

/* ── SEARCH BOX ── */
.search-box {
  display: flex;
  margin-bottom: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--white);
}
.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
  background: transparent;
}
.search-box button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s;
}
.search-box button:hover { background: var(--navy); }

/* ── BLOG GRID ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .22s, box-shadow .22s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(26, 46, 90, .12);
}
.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.blog-card-body { padding: 16px; }
.blog-card-body .tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.blog-card-body h3 {
  font-family: var(--font);
  font-size: 13px;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-body .meta {
  font-size: .78rem;
  color: var(--muted);
}

/* ── SIDEBAR ── */
.blog-sidebar {
  width: 300px;
  position: sticky;
  top: 30px;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.sidebar-card-header {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.05rem;
  padding: 14px 18px;
  letter-spacing: .3px;
}

.category-list { list-style: none; }
.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }
.category-list li a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  color: var(--navy);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .18s, padding-left .18s;
}
.category-list li a:hover {
  background: #f0f3ff;
  padding-left: 24px;
}
.category-list li a::before {
  content: '›';
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── YOUTUBE BANNER ── */
.yt-banner {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s;
}
.yt-banner:hover { opacity: .85; }

.yt-icon {
  background: #ff0000;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yt-icon svg { fill: white; width: 20px; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination button {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--navy);
  border-radius: 6px;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.pagination button.active,
.pagination button:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 24px 16px;
  }

  main        { order: 1; }
  .blog-sidebar {
    order: 2;
    width: 100%;
    position: static;
    margin-top: 20px;
  }
}

@media (max-width: 540px) {
  .blog-grid  { grid-template-columns: 1fr; }
  header      { padding: 12px 16px; }
}