/* ═══════════════════════════════════════════════════════════════════════════
   HotKiosk News — Editorial Design System
   Dark branded nav + warm light editorial body
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
  /* Brand */
  --brand-dark: #0C0C0A;
  --brand-surface: #111110;
  --brand-border: #2D2C29;
  --brand-amber: #F59E0B;
  --brand-amber-hover: #D97706;
  --brand-amber-glow: rgba(245, 158, 11, 0.15);

  /* Editorial palette */
  --page-bg: #FAFAF7;
  --card-bg: #FFFFFF;
  --text-primary: #1A1815;
  --text-body: #3D3A35;
  --text-secondary: #7A756D;
  --text-muted: #A8A49E;
  --border-light: #E8E6E1;
  --border-subtle: #F0EEEA;
  --warm-tint: #FFF9F0;
  --amber-soft: #FEF3C7;

  /* Typography */
  --font-display: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Spacing */
  --content-width: 720px;
  --listing-width: 1040px;
  --nav-height: 64px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */

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

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

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--page-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   Navigation — Dark branded bar
   ═══════════════════════════════════════════════════════════════════════════ */

.news-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 32px;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--brand-border);
  backdrop-filter: blur(12px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: #FAFAF8;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #FAFAF8;
}

.nav-cta {
  background: var(--brand-amber) !important;
  color: var(--brand-dark) !important;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 var(--brand-amber-glow);
}

.nav-cta:hover {
  background: var(--brand-amber-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--brand-amber-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Article Page
   ═══════════════════════════════════════════════════════════════════════════ */

.article-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.article-meta time {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-amber-hover);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reading-time {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.reading-time::before {
  content: '\00B7';
  margin-right: 12px;
}

/* ── Article Typography ──────────────────────────────────────────────────── */

article h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

article h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 8px;
}

article h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
}

article p {
  font-size: 18px;
  color: var(--text-body);
  margin-bottom: 20px;
  line-height: 1.8;
}

article strong {
  color: var(--text-primary);
  font-weight: 600;
}

article em {
  font-style: italic;
}

/* ── Links ───────────────────────────────────────────────────────────────── */

article a {
  color: var(--brand-amber-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(217, 119, 6, 0.3);
  transition: text-decoration-color 0.2s, color 0.2s;
}

article a:hover {
  color: #92400E;
  text-decoration-color: var(--brand-amber-hover);
}

/* ── Lists ───────────────────────────────────────────────────────────────── */

article ul,
article ol {
  margin-bottom: 22px;
  padding-left: 28px;
}

article li {
  font-size: 18px;
  color: var(--text-body);
  margin-bottom: 10px;
  line-height: 1.75;
}

article li::marker {
  color: var(--brand-amber);
}

article ol li::marker {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-amber-hover);
}

/* ── Blockquotes ─────────────────────────────────────────────────────────── */

article blockquote {
  position: relative;
  border: none;
  margin: 32px 0;
  padding: 24px 28px 24px 32px;
  background: linear-gradient(135deg, var(--warm-tint) 0%, var(--amber-soft) 100%);
  border-radius: 2px 16px 16px 2px;
  border-left: 4px solid var(--brand-amber);
  font-style: italic;
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
}

article blockquote::before {
  content: '\201C';
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--brand-amber);
  opacity: 0.3;
  line-height: 1;
}

article blockquote p {
  margin-bottom: 0;
  position: relative;
}

/* ── Images ──────────────────────────────────────────────────────────────── */

article img {
  border-radius: 14px;
  margin: 32px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

article figure {
  margin: 32px 0;
}

article figure img {
  margin: 0;
}

article figcaption {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

article figure.hero-image {
  margin: 0 0 36px 0;
}

article figure.hero-image img {
  border-radius: 14px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ── Horizontal Rule ─────────────────────────────────────────────────────── */

article hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 20%, var(--border-light) 80%, transparent);
  margin: 40px 0;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  font-size: 15px;
  font-family: var(--font-display);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

article th {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--border-subtle);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

article td {
  padding: 13px 18px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
  font-weight: 500;
}

article tr:last-child td {
  border-bottom: none;
}

article tbody tr:hover {
  background: var(--warm-tint);
}

/* ── Table of Contents (nav inside article) ──────────────────────────────── */

article nav {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 28px 0 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}

article nav h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 14px;
  padding: 0;
}

article nav ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

article nav li {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

article nav li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-amber);
}

article nav li:last-child {
  margin-bottom: 0;
}

article nav a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

article nav a:hover {
  color: var(--brand-amber-hover);
}

/* ── Sources section styling ─────────────────────────────────────────────── */

article h2#sources {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-top: 20px;
  padding-top: 0;
}

article h2#sources + ul {
  list-style: none;
  padding-left: 0;
}

article h2#sources + ul li {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 18px;
  position: relative;
}

article h2#sources + ul li::before {
  content: '↗';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 12px;
}

article h2#sources + ul li::marker {
  content: '';
}

article h2#sources + ul a {
  font-weight: 500;
  text-decoration-color: rgba(217, 119, 6, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Listing Page
   ═══════════════════════════════════════════════════════════════════════════ */

.listing-container {
  max-width: var(--listing-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.listing-container h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.listing-subtitle {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.5;
}

/* ── Article Cards ───────────────────────────────────────────────────────── */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1),
              box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1),
              border-color 0.25s;
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-amber), var(--brand-amber-hover));
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 1;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-amber);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.08),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

.article-card:hover::before {
  opacity: 1;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .card-image img {
  transform: scale(1.03);
}

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

.article-card h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-card p {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-footer time {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-read-time {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
}

.card-read-time::before {
  content: '\00B7';
  margin-right: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display);
  color: var(--text-muted);
  padding: 80px 0;
  font-size: 16px;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  font-family: var(--font-display);
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.page-link:hover {
  border-color: var(--brand-amber);
  color: var(--brand-amber-hover);
}

.page-link.active {
  background: var(--brand-amber);
  color: var(--brand-dark);
  border-color: var(--brand-amber);
}

/* ── Share Buttons (sticky sidebar) ─────────────────────────────────────── */

.share-buttons {
  position: fixed;
  left: calc((100vw - var(--content-width)) / 2 - 72px);
  top: calc(var(--nav-height) + 120px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}

.share-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 2px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.share-whatsapp:hover { color: #25D366; border-color: #25D366; }
.share-facebook:hover { color: #1877F2; border-color: #1877F2; }
.share-twitter:hover { color: #000; border-color: #000; }
.share-copy:hover { color: var(--brand-amber-hover); border-color: var(--brand-amber); }

/* ── Related Articles ───────────────────────────────────────────────────── */

.related-articles {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
}

.related-articles h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

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

.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-amber);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.06);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.related-text {
  padding: 16px;
}

.related-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card time {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════════════ */

.news-footer {
  background: var(--brand-dark);
  border-top: 1px solid var(--brand-border);
  margin-top: 0;
}

.footer-inner {
  max-width: var(--listing-width);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: #4A4845;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: #6B6762;
  transition: color 0.2s;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .news-nav {
    padding: 0 16px;
    height: 56px;
  }

  .nav-logo {
    font-size: 16px;
  }

  .nav-logo img {
    height: 28px;
    width: auto;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

  .nav-cta {
    padding: 6px 14px;
    font-size: 12px !important;
  }

  .article-container {
    padding: 32px 18px 60px;
  }

  article h1 {
    font-size: 30px;
    letter-spacing: -0.02em;
  }

  article h2 {
    font-size: 22px;
    margin-top: 36px;
  }

  article h3 {
    font-size: 18px;
    margin-top: 28px;
  }

  article p,
  article li {
    font-size: 16.5px;
    line-height: 1.75;
  }

  article blockquote {
    padding: 20px 20px 20px 24px;
    margin: 24px 0;
    font-size: 16.5px;
  }

  article blockquote::before {
    font-size: 36px;
    top: 4px;
    left: 8px;
  }

  article nav {
    padding: 20px 22px;
  }

  article table {
    font-size: 13px;
  }

  article th,
  article td {
    padding: 10px 12px;
  }

  .listing-container {
    padding: 32px 18px 60px;
  }

  .listing-container h1 {
    font-size: 26px;
  }

  .listing-subtitle {
    font-size: 15px;
    margin-bottom: 32px;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-body {
    padding: 18px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .share-buttons {
    position: static;
    flex-direction: row;
    margin: 32px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
  }

  .pagination {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 24px 18px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .share-buttons {
    position: static;
    flex-direction: row;
    margin: 32px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
  }
}

@media (max-width: 480px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  article h1 {
    font-size: 26px;
  }

  .listing-container h1 {
    font-size: 22px;
  }
}
