/* ============================================
   Best Random Chat Sites - Main Stylesheet
   Violet / Rose / Emerald design system
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #ede9fe;
  --primary-lighter: #f5f3ff;
  --secondary: #e11d48;
  --secondary-dark: #be123c;
  --secondary-light: #ffe4e6;
  --accent: #10b981;
  --accent-dark: #059669;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #fafaf9;
  --bg-white: #ffffff;
  --text: #1c1917;
  --text-light: #78716c;
  --text-lighter: #a8a29e;
  --border: #e7e5e4;
  --border-light: #f5f5f4;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow: 0 1px 3px rgba(28, 25, 23, 0.08), 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 6px rgba(28, 25, 23, 0.06), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 10px 15px rgba(28, 25, 23, 0.08), 0 4px 6px rgba(28, 25, 23, 0.04);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-width: 1180px;
  --header-height: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.5em; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--text); font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }

/* --- Header / Navigation (DARK) --- */
.site-header {
  background: linear-gradient(180deg, #1c1917 0%, #292524 100%);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.25);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
}
.site-logo:hover { color: var(--primary-light); }
.site-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  color: #a8a29e;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.main-nav a:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #ede9fe;
}
.main-nav a.active {
  background: var(--primary);
  color: #ffffff;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #ffffff;
  font-size: 1.5rem;
}

/* --- Ad Slots --- */
.ad-slot {
  background: var(--border-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-lighter);
  font-size: 0.8rem;
  overflow: hidden;
  margin: 1rem 0;
  min-height: 90px;
}
.ad-slot-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.ad-slot-sidebar {
  min-height: 250px;
  margin: 0 0 1.5rem 0;
}
.ad-slot-content {
  margin: 1.5rem 0;
  min-height: 100px;
}
.ad-slot-footer {
  min-height: 90px;
  margin: 0;
}

/* --- Hero Section (Homepage) --- */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 3.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-title {
  font-size: 2.25rem;
  color: white;
  margin-bottom: 1rem;
  font-weight: 800;
}
.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.hero-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* --- Main Layout --- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  flex: 1;
}
.page-wrapper.full-width {
  grid-template-columns: 1fr;
}
.main-content { min-width: 0; }
.main-content > section { margin-bottom: 2.5rem; }
.main-content > section:last-child { margin-bottom: 0; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 0.25rem; }

/* --- Post Cards (Listing Pages) --- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
}
.post-card:nth-child(3n+2) {
  border-left-color: var(--secondary);
}
.post-card:nth-child(3n+3) {
  border-left-color: var(--accent);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.post-card-body { padding: 1.5rem; }
.card-category,
.post-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.card-title,
.post-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.card-title a,
.post-card h2 a { color: var(--text); }
.card-title a:hover,
.post-card h2 a:hover { color: var(--primary); }
.card-excerpt,
.post-card .excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.read-more,
.post-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.read-more:hover,
.post-card .read-more:hover { gap: 0.5rem; }

/* --- Featured Post Card --- */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 4px solid var(--primary);
}
.post-card.featured .post-card-img { min-height: 250px; }

/* --- Rating Badge & Stars --- */
.site-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
}
.rating-stars {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* --- Article / Single Post --- */
.article-header { margin-bottom: 2rem; }
.article-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.article-meta span { display: inline-flex; align-items: center; gap: 0.25rem; }
.category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}
.article-body {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.article-body h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
}
.article-body h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: 1rem; line-height: 1.8; }
.article-body ul, .article-body ol {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.article-body li { margin-bottom: 0.25rem; }
.article-body img {
  border-radius: var(--radius);
  margin: 1rem 0;
}
.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
}
.article-body a {
  text-decoration: underline;
  text-decoration-color: var(--primary-light);
  text-underline-offset: 2px;
}
.article-body a:hover { text-decoration-color: var(--primary); }

/* --- Info Box / Callout --- */
.info-box {
  background: var(--primary-light);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-box.warning {
  background: #fef3c7;
  border-color: #fde68a;
}
.info-box.success {
  background: #d1fae5;
  border-color: #a7f3d0;
}
.info-box h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.info-box p:last-child { margin-bottom: 0; }

/* --- Quick Info Table --- */
.quick-info {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}
.quick-info-title {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.quick-info table { width: 100%; border-collapse: collapse; }
.quick-info td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.quick-info tr:last-child td { border-bottom: none; }
.quick-info td:first-child {
  font-weight: 600;
  color: var(--text-light);
  width: 40%;
  background: var(--primary-lighter);
}

/* --- Pros/Cons --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.pros-list, .cons-list {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}
.pros-list { border-top: 3px solid var(--accent); }
.cons-list { border-top: 3px solid var(--danger); }
.pros-list h4, .cons-list h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.pros-list li, .cons-list li { margin-bottom: 0.375rem; font-size: 0.9rem; }

/* --- CTA Button --- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.cta-button:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.cta-button.secondary {
  background: var(--secondary);
  color: white;
}
.cta-button.secondary:hover {
  background: var(--secondary-dark);
  color: white;
}
.cta-button.accent {
  background: var(--accent);
}
.cta-button.accent:hover {
  background: var(--accent-dark);
}
.cta-button.outline {
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.cta-button.outline:hover {
  background: var(--primary-light);
}

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sidebar-widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text);
}
.sidebar-widget-body { padding: 1rem 1.25rem; }
.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li {
  border-bottom: 1px solid var(--border-light);
}
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.sidebar-links a:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-links .badge {
  font-size: 0.75rem;
  background: var(--accent);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

/* --- Featured Box (sidebar promo) --- */
.featured-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  text-align: center;
}
.featured-box h3 { color: white; margin-bottom: 0.5rem; font-size: 1.1rem; }
.featured-box p { opacity: 0.92; font-size: 0.9rem; margin-bottom: 1rem; }
.featured-box .cta-button {
  background: white;
  color: var(--primary);
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
}
.featured-box .cta-button:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.comparison-table th:first-child {
  border-radius: var(--radius) 0 0 0;
}
.comparison-table th:last-child {
  border-radius: 0 var(--radius) 0 0;
}
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.comparison-table tr:nth-child(even) { background: var(--primary-lighter); }
.comparison-table tr:hover { background: var(--primary-light); }

/* --- Video Embed --- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* --- Table of Contents --- */
.toc {
  background: var(--primary-lighter);
  border: 1px solid var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.toc-title,
.toc h4 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--primary-dark);
  font-weight: 700;
}
.toc-list,
.toc ol { padding-left: 1.25rem; }
.toc-list li,
.toc li { margin-bottom: 0.375rem; font-size: 0.9rem; }
.toc-list a,
.toc a { color: var(--text); }
.toc-list a:hover,
.toc a:hover { color: var(--primary); }

/* --- Top Sites List --- */
.top-sites-list {
  counter-reset: site-counter;
  list-style: none;
  padding: 0;
}
.top-site-item {
  counter-increment: site-counter;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 4.5rem;
  transition: box-shadow 0.2s;
}
.top-site-item:hover {
  box-shadow: var(--shadow-md);
}
.top-site-item::before {
  content: "#" counter(site-counter);
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}
.top-site-item h3 { margin-bottom: 0.5rem; }
.top-site-item .site-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* --- FAQ Section --- */
.faq-section {
  margin: 2rem 0;
}
.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  transition: background 0.2s;
}
.faq-question:hover {
  background: var(--primary-lighter);
}
.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-answer p:last-child { margin-bottom: 0; }

/* --- Related Posts --- */
.related-posts { margin-top: 2.5rem; }
.related-posts h3 { margin-bottom: 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.related-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  transition: all 0.2s;
}
.related-card:nth-child(3n+2) { border-left-color: var(--secondary); }
.related-card:nth-child(3n+3) { border-left-color: var(--accent); }
.related-card:hover {
  border-left-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.related-card h4 { font-size: 0.95rem; margin-bottom: 0.375rem; }
.related-card h4 a { color: var(--text); }
.related-card h4 a:hover { color: var(--primary); }
.related-card p { font-size: 0.8rem; color: var(--text-light); margin: 0; }

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.form-textarea {
  min-height: 140px;
  resize: vertical;
}
.form-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.form-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* --- Success / Error Messages --- */
.success-message {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.error-message {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.pagination a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.pagination .current {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

/* --- Footer (dark warm brown) --- */
.site-footer {
  background: #292524;
  color: #d6d3d1;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #a8a29e; font-size: 0.9rem; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #44403c;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #78716c;
}

/* --- Search Form --- */
.search-form {
  display: flex;
  gap: 0;
}
.search-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  outline: none;
}
.search-form input:focus { border-color: var(--primary); }
.search-form button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 0.9rem;
}

/* --- Responsive: 960px --- */
@media (max-width: 960px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .main-content { order: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .post-card.featured { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* --- Responsive: 768px --- */
@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: #1c1917;
    border-bottom: 2px solid var(--primary);
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.3);
  }
  .main-nav.open a {
    padding: 0.75rem 1rem;
    color: #d6d3d1;
  }
  .main-nav.open a:hover,
  .main-nav.open a.active {
    background: rgba(124, 58, 237, 0.2);
    color: #ffffff;
  }
  .mobile-menu-btn { display: block; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .article-header h1 { font-size: 1.5rem; }
  .article-body { padding: 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem 0.625rem; }
}

/* --- Responsive: 480px --- */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .hero-section { padding: 2rem 1rem; }
  .page-wrapper { padding: 1rem; }
  .article-body { padding: 1rem; }
  .top-site-item { padding-left: 3.5rem; }
  .top-site-item::before { font-size: 1rem; left: 1rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .contact-form { max-width: 100%; }
  .quick-info td { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
}
