/* ============================================================
   Suitpedia – Global Styles
   Wikipedia-inspired, clean, mobile-first design
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #202122;
  background: #f8f9fa;
}

a {
  color: #0645ad;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #0b0080;
}

a:visited {
  color: #0b0080;
}

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

ul, ol {
  padding-left: 1.5rem;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-weight: normal;
  line-height: 1.3;
  color: #000;
}

h1 { font-size: 2rem; border-bottom: 1px solid #a2a9b1; padding-bottom: 0.25rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; border-bottom: 1px solid #a2a9b1; padding-bottom: 0.2rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.2rem; margin: 1.25rem 0 0.4rem; }
h4 { font-size: 1rem; font-weight: bold; margin: 1rem 0 0.3rem; }

p { margin-bottom: 0.75rem; }

/* ── Layout ───────────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  display: flex;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 1.5rem 2rem;
  border-left: 1px solid #a2a9b1;
  border-right: 1px solid #a2a9b1;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #a2a9b1;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: bold;
}

.logo-text {
  font-size: 1.4rem;
  font-family: 'Linux Libertine', 'Georgia', serif;
  color: #202122;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: #72777d;
  font-size: 0.75rem;
  display: block;
  font-family: sans-serif;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1;
}

.header-search {
  flex: 1;
  max-width: 400px;
}

.search-form {
  display: flex;
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  overflow: hidden;
}

.search-form input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: none;
  outline: none;
  font-size: 0.875rem;
  font-family: sans-serif;
  background: #fff;
}

.search-form button {
  background: #f8f9fa;
  border: none;
  border-left: 1px solid #a2a9b1;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #54595d;
  transition: background 0.15s;
}

.search-form button:hover {
  background: #e8e8e8;
}

/* ── Navigation Bar ───────────────────────────────────────── */
.nav-bar {
  background: #1a1a2e;
  border-bottom: 3px solid #c9a84c;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-inner a {
  color: #d4d4d4;
  font-family: sans-serif;
  font-size: 0.8125rem;
  padding: 0.6rem 1rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.nav-inner a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.nav-inner a.active {
  color: #c9a84c;
  border-bottom-color: #c9a84c;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 1.5rem 0;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #54595d;
  padding: 0 0.75rem 0.4rem;
  border-bottom: 1px solid #a2a9b1;
  margin-bottom: 0.4rem;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
}

.sidebar-section ul li a {
  display: block;
  padding: 0.25rem 0.75rem;
  font-family: sans-serif;
  font-size: 0.8125rem;
  color: #0645ad;
  border-radius: 2px;
  transition: background 0.1s;
}

.sidebar-section ul li a:hover {
  background: #eaf3fb;
  text-decoration: none;
}

/* ── Article Info Box ─────────────────────────────────────── */
.infobox {
  float: right;
  clear: right;
  margin: 0 0 1rem 1.5rem;
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  font-size: 0.8125rem;
  font-family: sans-serif;
  width: 260px;
  border-collapse: collapse;
}

.infobox-title {
  background: #1a1a2e;
  color: #fff;
  text-align: center;
  font-weight: bold;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-family: 'Georgia', serif;
}

.infobox-image {
  text-align: center;
  padding: 0.75rem;
  background: #fff;
}

.infobox-image .suit-illustration {
  width: 120px;
  height: 160px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1a1a2e 0%, #1a1a2e 40%, #e8e0d5 40%, #e8e0d5 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.infobox-image figcaption {
  font-size: 0.75rem;
  color: #54595d;
  margin-top: 0.4rem;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
}

.infobox td {
  padding: 0.35rem 0.5rem;
  border-top: 1px solid #a2a9b1;
  vertical-align: top;
}

.infobox td:first-child {
  font-weight: bold;
  color: #54595d;
  white-space: nowrap;
  width: 40%;
}

/* ── Table of Contents ────────────────────────────────────── */
.toc {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  display: inline-block;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  font-family: sans-serif;
  font-size: 0.875rem;
  min-width: 200px;
  max-width: 380px;
}

.toc-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.toc ol {
  padding-left: 1.25rem;
  margin: 0;
}

.toc li {
  margin: 0.2rem 0;
}

.toc a {
  color: #0645ad;
}

.toc ol ol {
  font-size: 0.8125rem;
  padding-left: 1.25rem;
}

/* ── Article Content Helpers ──────────────────────────────── */
.article-intro {
  margin-bottom: 1rem;
}

.article-section {
  margin-bottom: 1.5rem;
}

.note-box {
  background: #eaf3fb;
  border-left: 4px solid #36c;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-family: sans-serif;
  font-size: 0.875rem;
}

.note-box strong {
  display: block;
  margin-bottom: 0.25rem;
}

.warning-box {
  background: #fef6e4;
  border-left: 4px solid #c9a84c;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-family: sans-serif;
  font-size: 0.875rem;
}

/* ── Comparison Table ─────────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-family: sans-serif;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
}

.comparison-table th {
  background: #1a1a2e;
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: normal;
}

.comparison-table th:first-child {
  width: 30%;
}

.comparison-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #a2a9b1;
  vertical-align: top;
}

.comparison-table tr:nth-child(even) td {
  background: #f8f9fa;
}

.comparison-table tr:hover td {
  background: #eaf3fb;
}

/* ── Category Grid ────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.category-card {
  border: 1px solid #a2a9b1;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
}

.category-card-header {
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: 'Georgia', serif;
  font-size: 1rem;
}

.category-card-body {
  padding: 0.75rem 1rem;
  font-family: sans-serif;
  font-size: 0.8125rem;
  color: #54595d;
}

.category-card-body ul {
  padding-left: 1rem;
  margin: 0;
}

.category-card-body li {
  margin: 0.2rem 0;
}

.category-card-body li a {
  color: #0645ad;
}

/* ── Hero Banner (Homepage) ───────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 3px solid #c9a84c;
}

.hero-banner h1 {
  font-size: 2.5rem;
  color: #fff;
  border: none;
  margin-bottom: 0.5rem;
  font-family: 'Linux Libertine', 'Georgia', serif;
}

.hero-banner p {
  font-size: 1.1rem;
  color: #c8ccd1;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-family: sans-serif;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: bold;
  color: #c9a84c;
  font-family: 'Georgia', serif;
}

.hero-stat .label {
  font-size: 0.8125rem;
  color: #a8b0b8;
  font-family: sans-serif;
}

/* ── Featured Article (Homepage) ─────────────────────────── */
.featured-article {
  background: #fff;
  border: 1px solid #a2a9b1;
  margin: 1.5rem 0;
  padding: 1.25rem;
}

.featured-label {
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9a84c;
  margin-bottom: 0.5rem;
}

/* ── Article List ─────────────────────────────────────────── */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.article-list li {
  border-bottom: 1px solid #eaecf0;
  padding: 0.6rem 0;
  font-family: sans-serif;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list .article-date {
  font-size: 0.75rem;
  color: #72777d;
  white-space: nowrap;
}

/* ── FAQ Styles ───────────────────────────────────────────── */
.faq-item {
  border: 1px solid #a2a9b1;
  margin-bottom: 0.75rem;
  border-radius: 2px;
  overflow: hidden;
}

.faq-question {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 0.9375rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}

.faq-question:hover {
  background: #eaf3fb;
}

.faq-question.open {
  background: #1a1a2e;
  color: #fff;
  border-bottom-color: #c9a84c;
}

.faq-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-question.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0.75rem 1rem;
  font-family: sans-serif;
  font-size: 0.875rem;
  line-height: 1.65;
  display: none;
}

.faq-answer.open {
  display: block;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  font-family: sans-serif;
  font-size: 0.8125rem;
  color: #54595d;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.breadcrumb a {
  color: #0645ad;
}

.breadcrumb .sep {
  color: #a2a9b1;
}

/* ── Tags ─────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.tag {
  background: #eaf3fb;
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
  font-family: sans-serif;
  font-size: 0.75rem;
  color: #0645ad;
  text-decoration: none;
}

.tag:hover {
  background: #d0e6f8;
  text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: #1a1a2e;
  color: #a8b0b8;
  padding: 2rem 1rem;
  margin-top: auto;
  font-family: sans-serif;
  font-size: 0.8125rem;
  border-top: 3px solid #c9a84c;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.footer-section h4 {
  color: #c9a84c;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  font-family: sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.35rem;
}

.footer-section ul li a {
  color: #a8b0b8;
  text-decoration: none;
}

.footer-section ul li a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: #72777d;
  font-size: 0.75rem;
}

/* ── Gold Accent ──────────────────────────────────────────── */
.gold { color: #c9a84c; }

/* ── Suit Fabric SVG Placeholder ─────────────────────────── */
.suit-svg-wrap {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

/* ── "Did You Know" Box ───────────────────────────────────── */
.did-you-know {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-top: 3px solid #c9a84c;
  padding: 1rem;
  margin: 1rem 0;
  font-family: sans-serif;
  font-size: 0.875rem;
}

.did-you-know h3 {
  font-size: 0.875rem;
  font-family: sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #54595d;
  margin-bottom: 0.5rem;
}

.did-you-know ul {
  margin: 0;
}

.did-you-know li {
  margin-bottom: 0.4rem;
}

/* ── Mobile Hamburger ─────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #54595d;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main-content {
    border: none;
    padding: 1rem;
  }

  .content-wrapper {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .hero-banner h1 { font-size: 1.75rem; }
  .hero-banner p  { font-size: 0.9375rem; }
  .hero-stats { gap: 1.5rem; }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }

  .header-search { display: none; }

  .hamburger { display: flex; }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .site-header, .nav-bar, .sidebar, .site-footer { display: none; }
  .main-content { border: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* ============================================================
   SEO Enhancement Components
   ============================================================ */

/* ── Reading Progress Bar ─────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #c9a84c, #e8c96e);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── Article Meta Row ─────────────────────────────────────── */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.6rem 0 1rem;
  font-family: sans-serif;
  font-size: 0.8125rem;
  color: #54595d;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eaecf0;
}

.article-meta a {
  color: #0645ad;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-meta-item .icon {
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1;
}

.meta-sep {
  color: #a2a9b1;
  font-size: 0.75rem;
}

.reading-time-badge {
  background: #f0f7ee;
  border: 1px solid #a2c99a;
  border-radius: 2px;
  padding: 0.15rem 0.45rem;
  color: #2d6a2d;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ── TOC Scroll-Spy ───────────────────────────────────────── */
.toc a {
  transition: color 0.15s;
}

.toc a.toc-active {
  color: #c9a84c;
  font-weight: bold;
}

/* ── Author Box ───────────────────────────────────────────── */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border: 1px solid #a2a9b1;
  border-top: 3px solid #1a1a2e;
  background: #f8f9fa;
  padding: 1.25rem;
  margin: 2rem 0 1.5rem;
  font-family: sans-serif;
}

.author-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #c9a84c;
  font-family: 'Georgia', serif;
  font-style: italic;
  border: 2px solid #c9a84c;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-label {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #72777d;
  margin-bottom: 0.25rem;
}

.author-name {
  font-size: 1rem;
  font-weight: bold;
  color: #1a1a2e;
  margin-bottom: 0.1rem;
}

.author-name a {
  color: #1a1a2e;
  text-decoration: none;
}

.author-name a:hover {
  color: #0645ad;
  text-decoration: underline;
}

.author-title {
  font-size: 0.8125rem;
  color: #c9a84c;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.8125rem;
  color: #54595d;
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.author-links a {
  font-size: 0.75rem;
  background: #1a1a2e;
  color: #c9a84c;
  border: 1px solid #1a1a2e;
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.author-links a:hover {
  background: #c9a84c;
  color: #1a1a2e;
  text-decoration: none;
}

/* ── Related Articles Section ─────────────────────────────── */
.related-articles {
  margin: 1.5rem 0;
}

.related-articles h2 {
  font-size: 1.2rem;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.related-article-card {
  border: 1px solid #a2a9b1;
  border-top: 3px solid #c9a84c;
  background: #fff;
  padding: 0.85rem 1rem;
  font-family: sans-serif;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
}

.related-article-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  text-decoration: none;
}

.related-article-card .card-category {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #c9a84c;
}

.related-article-card .card-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #0645ad;
  line-height: 1.35;
}

.related-article-card:hover .card-title {
  text-decoration: underline;
}

.related-article-card .card-excerpt {
  font-size: 0.8rem;
  color: #54595d;
  line-height: 1.5;
  flex: 1;
}

.related-article-card .card-meta {
  font-size: 0.75rem;
  color: #a2a9b1;
  margin-top: 0.25rem;
}

/* ── Responsive: SEO components ──────────────────────────── */
@media (max-width: 640px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-links {
    justify-content: center;
  }

  .article-meta {
    gap: 0.5rem;
  }

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

@media (max-width: 400px) {
  .related-articles-grid {
    grid-template-columns: 1fr;
  }
}
