/* KidTechRadar - Main Stylesheet */
:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --text: #1F2937;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --bg-dark: #111827;
  --border: #E5E7EB;
  --success: #10B981;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}

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

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

/* ===== HEADER ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover { color: var(--primary); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== ARTICLE GRID ===== */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem;
  color: var(--text);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-body { padding: 1.5rem; }

.card-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }

.card-body p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-meta {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== ARTICLE PAGE ===== */
.article-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.article-header .category-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.2;
}

.article-header .meta {
  opacity: 0.8;
  font-size: 0.9rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--primary-dark);
}

.article-content p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* Product Card */
.product-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.product-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.product-card .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.product-card .pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.product-card .pros h5 { color: var(--success); }
.product-card .cons h5 { color: #EF4444; }

.affiliate-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  transition: background 0.2s;
}

.affiliate-btn:hover {
  background: var(--accent-light);
  color: var(--bg-dark);
}

/* Ad Placeholder */
.ad-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 2rem 0;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.comparison-table tr:nth-child(even) { background: var(--bg-alt); }

/* Info Box */
.info-box {
  background: #EEF2FF;
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.info-box strong { color: var(--primary-dark); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-dark);
  color: #9CA3AF;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.site-footer .footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.site-footer h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.site-footer p { font-size: 0.9rem; margin-bottom: 0.5rem; }

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
}

.footer-links a { color: #9CA3AF; }
.footer-links a:hover { color: white; }

.disclosure {
  font-size: 0.8rem;
  max-width: 600px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .article-header h1 { font-size: 1.6rem; }
  nav ul { gap: 1rem; }
  .article-grid { grid-template-columns: 1fr; }
  .product-card .pros-cons { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem; }
}

@media (max-width: 480px) {
  nav ul { display: none; }
  .hero { padding: 2.5rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
}
