/* 
  RiddlesAbout.com — Exact CoffeeAbout Theme Replica 
  Clean White & Warm Cream (#FAEBD6), 20px Readable Typography, Segoe UI, Short Paragraphs
*/

:root {
  --base-bg: #FFFFFF;
  --nav-bg: #FAEBD6;
  --text-dark: #222222;
  --text-muted: #575760;
  --brand-primary: #AE6000;
  --brand-accent: #D2A98C;
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --callout-bg: #FAEBD6;
  --badge-bg: #FFE5C2;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] {
  --base-bg: #111827;
  --nav-bg: #1F2937;
  --text-dark: #F9FAFB;
  --text-muted: #9CA3AF;
  --brand-primary: #F59E0B;
  --brand-accent: #D97706;
  --card-bg: #1F2937;
  --card-border: #374151;
  --callout-bg: #374151;
  --badge-bg: #4B5563;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--base-bg);
  color: var(--text-dark);
  font-size: 20px; /* CoffeeAbout 20px Legible Body Font */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation (Exact CoffeeAbout Navbar) */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  padding: 24px 0;
  text-align: center;
}

.site-logo {
  display: inline-block;
}

.site-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: #222222;
}

.site-title span {
  color: var(--brand-primary);
}

.site-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

.main-navigation {
  background-color: var(--nav-bg);
  border-top: 1px solid #E5D5C0;
  border-bottom: 1px solid #E5D5C0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li a {
  display: block;
  padding: 16px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #222222;
  text-transform: uppercase;
}

.nav-links li a:hover {
  background-color: var(--brand-accent);
  color: #FFFFFF;
  text-decoration: none;
}

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

.btn-pill {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: #FFFFFF !important;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: var(--brand-accent);
  text-decoration: none;
}

/* CoffeeAbout Style Hero Section */
.hero-section {
  background: var(--callout-bg);
  padding: 50px 0;
  text-align: center;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 40px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 28px;
}

.search-box-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  font-size: 1rem;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-dark);
  outline: none;
}

.search-input:focus {
  border-color: var(--brand-primary);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Category Grid & Cards (CoffeeAbout Style) */
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--brand-primary);
  display: inline-block;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--brand-primary);
}

.cat-icon-badge {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cat-name {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.cat-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Topic / Article Cards Grid */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.topic-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.topic-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.topic-content {
  padding: 24px;
}

.topic-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.35;
  color: var(--text-dark);
}

.topic-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.65;
}

/* Single Blog Post Layout (Exact CoffeeAbout Single Post) */
.blog-post-header {
  margin-bottom: 30px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
  cursor: pointer;
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.post-title {
  font-size: 2.6rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.meta-box {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--callout-bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 24px;
}

.featured-image-wrap {
  margin-bottom: 36px;
}

.featured-image-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.semantic-vector-box {
  background: var(--callout-bg);
  border-left: 5px solid var(--brand-primary);
  padding: 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 40px;
}

.semantic-vector-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.semantic-vector-box p {
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 500;
}

/* Article Body Typography (20px, 2-3 line paragraphs) */
.article-body p {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--text-dark);
}

.article-body h2 {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 40px 0 20px;
  color: var(--text-dark);
}

.article-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 30px 0 16px;
  color: var(--text-dark);
}

/* Interactive Riddle Cards Inside Post */
.riddle-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-primary);
  padding: 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.riddle-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge-easy { background: #D1FAE5; color: #065F46; }
.badge-medium { background: #FEF3C7; color: #92400E; }
.badge-hard { background: #FEE2E2; color: #991B1B; }

.riddle-question {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}

.reveal-btn {
  background: var(--brand-primary);
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 10px;
}

.reveal-btn:hover {
  background: var(--brand-accent);
}

.answer-box {
  display: none;
  background: #F3F4F6;
  border: 1px dashed var(--brand-primary);
  padding: 16px;
  margin-top: 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  color: #065F46;
}

.answer-box.visible {
  display: block;
}

/* CoffeeAbout Style Footer */
.site-footer {
  background: var(--text-dark);
  color: #FFFFFF;
  padding: 50px 0 20px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: #FFFFFF;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #9CA3AF;
  font-size: 0.92rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #374151;
  color: #9CA3AF;
  font-size: 0.88rem;
}

/* Modal Popup */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--card-bg);
  padding: 36px;
  max-width: 600px;
  width: 90%;
  border-radius: var(--radius-sm);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}
