/* =====================================================================
 * Unusida News — Shared stylesheet
 * Editorial, restrained, Western aesthetic: serif headlines, generous
 * whitespace, neutral palette with a single restrained accent.
 * ===================================================================== */

:root {
  --c-bg:        #fbfbf9;
  --c-surface:   #ffffff;
  --c-ink:       #14110f;
  --c-ink-soft:  #4a4540;
  --c-muted:     #8b857d;
  --c-line:      #e6e1da;
  --c-accent:    #9a2b1f;   /* deep editorial red */
  --c-accent-soft:#f4e9e6;
  --c-tag-bg:   #efe9e0;
  --c-tag-ink:  #6b6358;

  --f-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --f-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --w-max: 1200px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20,17,15,.04), 0 8px 24px rgba(20,17,15,.06);
  --shadow-sm: 0 1px 2px rgba(20,17,15,.05);
  --transition: .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--w-max); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
}
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.section-head .view-all {
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-accent); white-space: nowrap;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--c-ink); color: #f5f1ea;
  font-size: .78rem; letter-spacing: .03em;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 38px;
}
.topbar .date { color: #c9c2b8; }
.topbar .socials { display: flex; gap: 14px; }
.topbar .socials a { display: flex; opacity: .8; }
.topbar .socials a:hover { opacity: 1; color: #fff; }
.topbar .socials svg { width: 15px; height: 15px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.brand {
  font-family: var(--f-serif); font-weight: 800;
  font-size: 1.7rem; letter-spacing: -0.02em;
  color: var(--c-ink); line-height: 1;
}
.brand .dot { color: var(--c-accent); }
.brand-tag { display:block; font-family: var(--f-sans); font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--c-muted); margin-top: 4px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 14px; font-size: .9rem; font-weight: 500; color: var(--c-ink-soft);
  border-radius: var(--radius);
}
.main-nav a:hover, .main-nav a.active { color: var(--c-accent); background: var(--c-accent-soft); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--c-ink);
  margin: 5px 0; transition: var(--transition);
}

/* ---------- Search ---------- */
.search-wrap { position: relative; }
.search-input {
  width: 220px; max-width: 40vw;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--c-line); border-radius: 999px;
  background: var(--c-bg); font-size: .85rem; color: var(--c-ink);
  transition: var(--transition);
}
.search-input:focus { outline: none; border-color: var(--c-ink); width: 280px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--c-muted); }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-width: 80vw;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 70vh; overflow-y: auto; z-index: 200; display: none;
}
.search-results.open { display: block; }
.search-results a {
  display: flex; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--c-line);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--c-bg); color: var(--c-ink); }
.search-results .sr-title { font-weight: 600; font-size: .88rem; line-height: 1.35; }
.search-results .sr-cat { font-size: .72rem; color: var(--c-accent); text-transform: uppercase; letter-spacing: .05em; }
.search-results .no-results { padding: 16px; color: var(--c-muted); font-size: .85rem; text-align: center; }

/* ---------- Tag pill ---------- */
.tag {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-tag-ink); background: var(--c-tag-bg);
  padding: 4px 10px; border-radius: 999px;
}
.tag.accent { color: var(--c-accent); background: var(--c-accent-soft); }
.tag-link:hover { color: var(--c-accent); }

/* ---------- Featured hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 36px; align-items: center; padding: 40px 0 56px;
}
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-media:hover img { transform: scale(1.03); }
.hero-text .tag { margin-bottom: 16px; }
.hero-text h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.1; margin-bottom: 16px;
}
.hero-text h1 a:hover { color: var(--c-accent); }
.hero-text .excerpt {
  font-size: 1.08rem; line-height: 1.65; color: var(--c-ink-soft);
  margin-bottom: 20px;
}
.meta-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .82rem; color: var(--c-muted);
}
.meta-row .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--c-muted); }
.meta-row .author { color: var(--c-ink-soft); font-weight: 500; }
.meta-row svg {
  width: 14px; height: 14px; flex-shrink: 0;
  color: var(--c-muted); stroke: currentColor;
}

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

.card {
  display: flex; flex-direction: column; background: var(--c-surface);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-line);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d9d3cb; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .tag { align-self: flex-start; }
.card-body h3 { font-size: 1.18rem; line-height: 1.25; }
.card-body h3 a:hover { color: var(--c-accent); }
.card-body .excerpt {
  font-size: .9rem; color: var(--c-ink-soft); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Recommended (horizontal) ---------- */
.rec-list { display: flex; flex-direction: column; gap: 4px; }
.rec-item {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--c-line);
}
.rec-item:last-child { border-bottom: 0; }
.rec-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.rec-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rec-item:hover .rec-media img { transform: scale(1.05); }
.rec-body { display: flex; flex-direction: column; gap: 8px; }
.rec-body h3 { font-size: 1.08rem; line-height: 1.3; }
.rec-body h3 a:hover { color: var(--c-accent); }

/* ---------- Article detail ---------- */
.article-head { padding: 48px 0 32px; max-width: 760px; margin: 0 auto; text-align: center; }
.article-head .tag { margin-bottom: 18px; }
.article-head h1 {
  font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.08; margin-bottom: 20px;
}
.article-head .deck {
  font-size: 1.12rem; line-height: 1.6; color: var(--c-ink-soft);
  margin-bottom: 24px; font-family: var(--f-serif); font-style: italic; font-weight: 400;
}
.article-head .meta-row { justify-content: center; }

.article-cover { max-width: 920px; margin: 0 auto 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.article-body { max-width: 720px; margin: 0 auto; }
.article-body .lead::first-letter {
  font-family: var(--f-serif); font-weight: 700;
  font-size: 3.6rem; line-height: .85; float: left;
  margin: 6px 12px 0 0; color: var(--c-accent);
}
.article-body p {
  font-size: 1.08rem; line-height: 1.75; color: #28231f;
  margin: 0 0 22px;
}
.article-body h2 {
  font-size: 1.5rem; margin: 36px 0 16px; line-height: 1.25;
}

.article-footer {
  max-width: 720px; margin: 48px auto 0; padding-top: 28px;
  border-top: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.share-row { display: flex; gap: 10px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-line); color: var(--c-ink-soft);
  transition: var(--transition);
}
.share-btn:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.share-btn svg { width: 16px; height: 16px; }

/* ---------- Related ---------- */
.related { background: #f3efe9; }

/* ---------- Page (legal/static) ---------- */
.page { padding: 64px 0; }
.page-inner { max-width: 760px; margin: 0 auto; }
.page-head { text-align: center; margin-bottom: 40px; }
.page-head .eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 12px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; }
.page-head .sub { color: var(--c-muted); font-size: .95rem; }
.page-body h2 { font-size: 1.35rem; margin: 34px 0 14px; }
.page-body p { color: var(--c-ink-soft); margin: 0 0 18px; line-height: 1.7; }
.page-body ul { color: var(--c-ink-soft); margin: 0 0 18px; padding-left: 20px; }
.page-body li { margin-bottom: 8px; line-height: 1.65; }
.page-body .lead { font-size: 1.1rem; color: var(--c-ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 24px; }
.contact-info h3 { font-size: 1.15rem; margin-bottom: 12px; }
.contact-info p { color: var(--c-ink-soft); margin: 0 0 14px; }
.contact-info .info-list { list-style: none; padding: 0; margin: 18px 0 0; }
.contact-info .info-list li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.contact-info .info-list svg { width: 18px; height: 18px; color: var(--c-accent); flex-shrink: 0; margin-top: 2px; }
.contact-info .info-list strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); font-weight: 600; margin-bottom: 2px; }
.contact-info .info-list span { color: var(--c-ink); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .03em; color: var(--c-ink-soft); }
.field input, .field textarea {
  padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface); font-size: .95rem; font-family: inherit; color: var(--c-ink);
  transition: var(--transition);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px rgba(20,17,15,.05); }
.field textarea { min-height: 140px; resize: vertical; }
.btn {
  align-self: flex-start; padding: 12px 28px;
  background: var(--c-ink); color: #fff; border: 0; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; letter-spacing: .03em;
  transition: var(--transition);
}
.btn:hover { background: var(--c-accent); color: #fff; }
.form-note { font-size: .78rem; color: var(--c-muted); margin-top: 4px; }
.form-success {
  padding: 14px 18px; background: var(--c-accent-soft); color: var(--c-accent);
  border-radius: var(--radius); font-size: .9rem; font-weight: 500; display: none;
}
.form-success.show { display: block; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.stat { text-align: center; padding: 24px 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); }
.stat .num { font-family: var(--f-serif); font-size: 2.2rem; font-weight: 700; color: var(--c-accent); line-height: 1; }
.stat .label { font-size: .78rem; color: var(--c-muted); margin-top: 8px; letter-spacing: .04em; text-transform: uppercase; }
.values-list { list-style: none; padding: 0; margin: 0; }
.values-list li { padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.values-list li:last-child { border-bottom: 0; }
.values-list h3 { font-size: 1.05rem; margin-bottom: 4px; }
.values-list p { color: var(--c-ink-soft); margin: 0; font-size: .92rem; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--c-ink); color: #f5f1ea; padding: 64px 0;
}
.newsletter-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.newsletter h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.newsletter p { color: #c9c2b8; margin: 0 auto 28px; max-width: 520px; }
.newsletter form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter input {
  flex: 1; padding: 13px 16px; border: 0; border-radius: var(--radius);
  background: rgba(255,255,255,.1); color: #fff; font-size: .92rem; font-family: inherit;
}
.newsletter input::placeholder { color: #a9a299; }
.newsletter input:focus { outline: none; background: rgba(255,255,255,.16); }
.newsletter button {
  padding: 13px 24px; background: var(--c-accent); color: #fff; border: 0;
  border-radius: var(--radius); font-weight: 600; font-size: .9rem; letter-spacing: .03em;
  transition: var(--transition);
}
.newsletter button:hover { background: #c0392b; }
.newsletter .nl-note { font-size: .76rem; color: #8f887e; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: #14110f; color: #a9a299; padding: 56px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 36px; border-bottom: 1px solid #2a251f;
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .9rem; line-height: 1.6; max-width: 320px; margin: 0 0 18px; }
.footer-brand .footer-socials { display: flex; gap: 12px; }
.footer-brand .footer-socials a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #2a251f;
  display: flex; align-items: center; justify-content: center; color: #a9a299;
}
.footer-brand .footer-socials a:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.footer-brand .footer-socials svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer-col h4 { color: #fff; font-family: var(--f-sans); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: .9rem; color: #a9a299; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; font-size: .8rem; color: #6f685e; flex-wrap: wrap;
}
.footer-bottom a { color: #8f887e; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 20px 0 0; font-size: .82rem; color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { margin: 0 8px; }

/* ---------- Category chips row ---------- */
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 24px 0 8px; }
.chip-row a {
  padding: 7px 16px; border: 1px solid var(--c-line); border-radius: 999px;
  font-size: .82rem; font-weight: 500; color: var(--c-ink-soft);
  background: var(--c-surface); transition: var(--transition);
}
.chip-row a:hover, .chip-row a.active { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }

/* ---------- Empty / not found ---------- */
.not-found { text-align: center; padding: 80px 0; }
.not-found h1 { font-size: 3rem; color: var(--c-accent); margin-bottom: 12px; }
.not-found p { color: var(--c-ink-soft); margin-bottom: 24px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-ink); color: #fff; border: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: var(--transition);
  box-shadow: var(--shadow);
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--c-accent); }
.to-top svg { width: 18px; height: 18px; }

/* =====================================================================
 * Responsive
 * ===================================================================== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .section { padding: 40px 0; }
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
    background: var(--c-surface); flex-direction: column; align-items: stretch;
    padding: 16px; gap: 4px; transform: translateX(100%); transition: transform .3s ease;
    overflow-y: auto; z-index: 99;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 16px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .search-wrap { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .rec-item { grid-template-columns: 110px 1fr; gap: 12px; }
  .stat-row { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-head { padding: 32px 0 24px; }
  .article-body p { font-size: 1rem; }
  .topbar .socials { display: none; }
}
