/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fbf7f5;
  --surface: #ffffff;
  --text: #2a2028;
  --muted: #7a6f76;
  --accent: #c2185b;
  --accent-soft: #fce4ec;
  --border: #efe6e9;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(120, 40, 70, 0.08);
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--accent);
}

.logo img {
  height: 48px;
  width: auto;
  display: block;
}

.footer-logo {
  height: 70px;
  width: auto;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  padding: 56px 0 32px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
}

/* ===== Search ===== */
.search {
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

/* ===== Layout ===== */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 0 72px;
  align-items: start;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--accent);
}

/* ===== Featured post ===== */
.featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.featured .cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 10, 20, 0.85), rgba(30, 10, 20, 0.05));
}

.featured .content {
  position: relative;
  z-index: 1;
  padding: 32px;
}

.featured .tag {
  background: var(--accent);
  color: #fff;
}

.featured h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 0 8px;
}

.featured .meta {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Post grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card .cover {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

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

.card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  align-self: flex-start;
}

.meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.read-more {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

/* ===== Sidebar ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 90px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.widget h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  transition: background 0.15s, color 0.15s;
}

.cat-list button:hover,
.cat-list button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.cat-list .count {
  font-size: 0.8rem;
  opacity: 0.8;
}

.newsletter p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.newsletter input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.no-results {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* ===== Article (post page) ===== */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 72px;
}

.article .cover {
  aspect-ratio: 16 / 8;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin: 24px 0 32px;
}

.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 14px 0;
}

.article-body {
  font-size: 1.08rem;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 36px 0 14px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul {
  margin: 0 0 20px 22px;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 22px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-style: italic;
}

.back-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ===== Footer ===== */
.site-footer {
  background: #2a2028;
  color: #d9cdd3;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.site-footer h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.site-footer a {
  color: #d9cdd3;
  font-size: 0.92rem;
  display: block;
  padding: 4px 0;
  transition: color 0.15s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #9c8f95;
  text-align: center;
}

.age-note {
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
  padding: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .nav {
    display: none;
  }
  .nav.open {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .nav-toggle {
    display: block;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
