/* ============================================================
   DemoRumors — Editorial Design
   ============================================================ */

/* --- Variables --- */
:root {
  --navy:       #1a1a2e;
  --navy-light: #24243e;
  --red:        #c0392b;
  --red-hover:  #a93226;
  --cream:      #f9f7f4;
  --white:      #ffffff;
  --text:       #2c3e50;
  --text-light: #7f8c8d;
  --border:     #e0ddd8;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow:     0 4px 16px rgba(0,0,0,0.10);

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body:  'Lora', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1140px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--red); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--red-hover); }

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


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Top bar */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Logo */
.header-logo {
  text-align: center;
  padding: 1.2rem 0 0.8rem;
}

.header-logo a {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  display: inline-block;
}

.header-logo a:hover { color: rgba(255,255,255,0.85); }

/* Nav */
.header-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-nav a {
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.header-nav a:hover { color: #fff; }

/* Red accent bar */
.header-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, #e74c3c 100%);
}


/* ============================================================
   LAYOUT
   ============================================================ */

main { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}


/* ============================================================
   SECTION HEADER (homepage label)
   ============================================================ */

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--navy);
}

.section-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}

.section-subtitle {
  font-family: var(--sans);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.06em;
}


/* ============================================================
   POST CARDS GRID
   ============================================================ */

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

/* Featured (first) card: full width */
.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-left: 4px solid var(--red);
}

.post-card--featured .post-card-meta { grid-column: 1 / -1; }
.post-card--featured .post-card-title { font-size: 2rem; line-height: 1.22; }
.post-card--featured .post-card-excerpt {
  -webkit-line-clamp: 7;
  font-size: 0.95rem;
}

/* Base card */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

/* Card meta */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.post-card-meta time {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

.post-badge {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
}

/* Card title */
.post-card-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 0.85rem;
  color: var(--navy);
  flex-shrink: 0;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--red); }

/* Card excerpt */
.post-card-excerpt {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card CTA */
.post-card-link {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: auto;
  align-self: flex-start;
}

.post-card-link span {
  display: inline-block;
  transition: transform 0.18s;
}

.post-card-link:hover span { transform: translateX(5px); }
.post-card-link:hover { text-decoration: none; color: var(--red-hover); }


/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-light);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.empty-state p {
  font-family: var(--sans);
  font-size: 1.05rem;
}


/* ============================================================
   POST (Article page)
   ============================================================ */

.post {
  max-width: 760px;
  margin: 0 auto;
}

/* Post header */
.post-header { margin-bottom: 2.75rem; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.post-meta time {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.post-divider {
  height: 3px;
  width: 56px;
  background: var(--red);
  border-radius: 2px;
}

/* Post body */
.post-content {
  font-size: 1.06rem;
  line-height: 1.9;
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.25;
}

.post-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 1.5rem 0 0.5rem;
}

.post-content p { margin-bottom: 1.3rem; }

.post-content strong { color: var(--navy); font-weight: 600; }

.post-content em { color: var(--text-light); }

.post-content a {
  color: var(--red);
  border-bottom: 1px solid rgba(192,57,43,0.25);
}
.post-content a:hover {
  border-bottom-color: var(--red);
  text-decoration: none;
}

.post-content ul,
.post-content ol {
  margin: 0.75rem 0 1.3rem 1.4rem;
}

.post-content li { margin-bottom: 0.35rem; }

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.75rem 0;
}

.post-content blockquote {
  border-left: 3px solid var(--red);
  padding: 0.1rem 0 0.1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

/* Post footer */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.post-footer-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.6;
}

.post-footer-note a { color: var(--text-light); border-bottom: 1px solid var(--border); }
.post-footer-note a:hover { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }

.back-link {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.03em;
}
.back-link:hover { color: var(--red); }


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  padding: 1.75rem 0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-inner p {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
}

.footer-inner strong { color: rgba(255,255,255,0.75); }
.footer-inner a { color: rgba(255,255,255,0.6); border-bottom: 1px solid rgba(255,255,255,0.15); }
.footer-inner a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.5); text-decoration: none; }


/* ============================================================
   RESPONSIVE
   ============================================================ */

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

  .post-card--featured {
    grid-template-columns: 1fr;
  }

  .post-card--featured .post-card-title { font-size: 1.75rem; }
}

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

  .header-top { display: none; }

  .container { padding: 2rem 1.25rem; }

  .post-card--featured { border-left: none; border-top: 4px solid var(--red); }

  .header-logo a { font-size: 2.5rem; }
}
