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

body {
  background-color: #f5f1eb;
  color: #1a1a1a;
  font-family: "Roboto Condensed", sans-serif;
}

header {
  background-color: #222222;
}

/* ── PAGE HEADER ── */
.blog-header {
  background-color: #1a1a1a;
  padding: 120px 6vw 64px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #a85a3e;
}

.blog-header::before {
  content: "BLOG";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: 'Barrio', Arial, sans-serif;
  font-size: 8em;
  color: rgba(255,255,255,0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.blog-header .section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cb764e;
  margin-bottom: 14px;
  display: block;
}

.blog-header h1 {
  font-family: 'Barrio', Arial, sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  color: #fff;
  line-height: 1.05;
  margin-bottom: 16px;
}

.blog-header p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  line-height: 1.6;
}

/* ── BLOG CONTAINER WITH SIDEBAR ── */
.blog-container {
  display: flex;
  gap: 2rem;
  max-width: 2400px;
  margin: 0;
  padding: 30px 6vw 100px;
}

.filter-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 2rem;
  height: fit-content;
  background: #fff;
  border: 1px solid #e2ddd6;
  padding: 28px;
  border-radius: 2px;
}

.sidebar-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: left;
  padding-bottom: 10px;
  padding-top: 10px;
  color: #1a1a1a;
  letter-spacing: 0.05em;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  font: inherit;
}

.sidebar-title {
  margin: 0;
}

.toggle-arrow {
  transition: transform 0.3s ease;
  display: inline-block;
  padding-bottom: 10px;
}

.toggle-arrow.open {
  transform: rotate(180deg);
  padding-bottom: 0px;
}

.filter-bar {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.filter-bar.open {
  display: block !important;
  padding-bottom: 5px;
}

.search-box {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: "Roboto Condensed", sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* ── CHECKBOX FILTERS ── */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 2px;
  transition: background 0.2s;
  user-select: none;
}

.filter-checkbox:hover {
  background: rgba(168, 90, 62, 0.04);
}

.checkbox-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #a85a3e;
  flex-shrink: 0;
}

.checkbox-label {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5a5047;
  transition: color 0.2s;
}

.filter-checkbox:hover .checkbox-label {
  color: #a85a3e;
}

.checkbox-input:checked ~ .checkbox-label {
  color: #a85a3e;
  font-weight: 700;
}

.blog-main {
  flex: 1;
  min-width: 0;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 1024px) {
  .blog-container {
    flex-direction: column;
    padding: 48px 6vw 80px;
    gap: 1.5rem;
  }

  .filter-sidebar {
    flex: 1 1 auto;
    position: static;
  }
}

@media (max-width: 600px) {
  .blog-container {
    padding: 40px 6vw 60px;
    gap: 1rem;
  }

  .filter-sidebar {
    padding: 20px;
  }

  .sidebar-title {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .filter-bar {
    gap: 6px;
  }

  .checkbox-input {
    width: 16px;
    height: 16px;
  }

  .checkbox-label {
    font-size: 0.72rem;
  }
}

/* ── GRID ── */
.posts-count {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #666;
}

.blog-main {
  flex: 1;
  min-width: 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── DISPLAY ACTIVE FILTERS ── */
.active-filters-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #333;
  color: #fff;
  border-radius: 20px;
  font-size: 0.9rem;
}

.filter-tag-remove {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}

.filter-tag-remove:hover {
  opacity: 0.7;
}

@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .posts-grid { grid-template-columns: 1fr; } }

/* Featured first post spans full width */
.post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 767px) {
  .post-card:first-child {
    grid-column: auto;
    display: flex;
    flex-direction: column;
  }
}

/* ── CARD ── */
.post-card {
  background: #fff;
  border: 1px solid #e2ddd6;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.post-card:first-child:hover {
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #e2ddd6;
}

.post-card:first-child .card-image {
  aspect-ratio: auto;
  height: 100%;
  min-height: 320px;
}

.card-body {
  padding: 28px 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card:first-child .card-body {
  padding: 44px 48px;
  justify-content: center;
}

@media (max-width: 767px) {
  .post-card:first-child .card-body { padding: 28px; }
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #a85a3e;
  margin-bottom: 12px;
}

.card-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: bold;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.post-card:first-child .card-title {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

.card-excerpt {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #5a5047;
  font-weight: 300;
  flex: 1;
  margin-bottom: 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9e9088;
}

.card-meta .dot { color: #a85a3e; }

.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a85a3e;
  margin-top: 20px;
  transition: gap 0.2s;
}

.post-card:hover .card-read-more { gap: 14px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #9e9088;
  grid-column: 1 / -1;
}
.empty-state h2 {
  font-family: 'Barrio', Arial, sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
  color: #c9c0b4;
}

/* ── LOADING ── */
.loading {
  text-align: center;
  padding: 80px;
  color: #9e9088;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  grid-column: 1 / -1;
}

/* ── FOOTER ── */
.site-footer {
  background-color: #111;
  padding: 36px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 3px solid #a85a3e;
}

.site-footer .footer-brand {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.85em;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.85em;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}

.site-footer .footer-links a:hover { color: #cb764e; }
