/* ============================================
   ICI Review Site - Core Design System
   Independent review site for at-home insemination kits
   ============================================ */

:root {
  --primary: #6B4C9A;
  --primary-light: #8B6BBF;
  --primary-dark: #4A3470;
  --secondary: #E8937E;
  --secondary-light: #F0B5A5;
  --accent: #4ABFBF;
  --accent-light: #7ED4D4;
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --bg-alt: #F3F0F8;
  --text: #2D2D3A;
  --text-light: #6B6B80;
  --text-muted: #9999AD;
  --border: #E8E5F0;
  --border-light: #F0EDF5;
  --gold: #E8B84B;
  --gold-light: #FFF4D6;
  --success: #4CAF7D;
  --warning: #E8A84B;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 50px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

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

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-logo svg { width: 36px; height: 36px; }

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

.nav-main { display: flex; align-items: center; gap: 32px; }

.nav-main a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}

.nav-main a:hover, .nav-main a.active { color: var(--primary); }

.nav-main a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--bg-alt) 0%, #E8E0F4 50%, var(--secondary-light) 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(107,76,154,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.8);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-item svg { width: 16px; height: 16px; color: var(--success); }

/* ============================================
   Product Cards / Rankings
   ============================================ */
.rankings-section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 12px auto 0;
  font-size: 1.05rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: auto 140px 1fr auto;
  gap: 28px;
  align-items: center;
  transition: all var(--transition);
  position: relative;
}

.product-image {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.product-card.featured {
  border: 2px solid var(--gold);
  background: linear-gradient(to bottom, var(--gold-light), var(--bg-card) 30%);
}

.product-card.featured::before {
  content: "Editor's Choice";
  position: absolute;
  top: -12px;
  left: 32px;
  background: linear-gradient(135deg, var(--gold), #D4A03A);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rank-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, var(--gold), #D4A03A); }
.rank-2 { background: linear-gradient(135deg, #8B9DAF, #6B7D8F); }
.rank-3 { background: linear-gradient(135deg, #C07940, #A06530); }
.rank-4, .rank-5, .rank-6, .rank-7, .rank-8, .rank-9 { background: var(--primary-light); }

.product-info h3 { margin-bottom: 6px; }
.product-info h3 a { color: var(--text); }
.product-info h3 a:hover { color: var(--primary); }

.product-brand {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-snippet {
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 8px 0 12px;
  line-height: 1.6;
}

.product-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.feature-tag {
  font-size: 0.78rem;
  background: var(--bg-alt);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 500;
}

.product-meta {
  text-align: right;
  flex-shrink: 0;
  min-width: 140px;
}

.product-rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 8px;
}

.rating-score {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-heading);
}

.rating-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stars { color: var(--gold); font-size: 0.9rem; letter-spacing: 1px; }

.product-price {
  margin: 10px 0;
}

.price-current {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--success);
}

.price-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--primary);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-secondary:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 7px 16px; font-size: 0.85rem; }

/* ============================================
   Comparison Table
   ============================================ */
.comparison-table-wrap {
  overflow-x: auto;
  margin: 40px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--bg-alt);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.comparison-table tr:hover td { background: rgba(107,76,154,0.03); }

.comparison-table .highlight-row td { background: var(--gold-light); font-weight: 500; }

.check { color: var(--success); font-weight: 700; }
.cross { color: var(--text-muted); }

/* ============================================
   Blog Section
   ============================================ */
.blog-section { padding: 60px 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

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

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-alt);
}

.blog-card-body { padding: 24px; }

.blog-card-category {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-card-body h3 { font-size: 1.15rem; margin-bottom: 10px; }
.blog-card-body h3 a { color: var(--text); }
.blog-card-body h3 a:hover { color: var(--primary); }

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Blog Post Layout
   ============================================ */
.blog-post {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.blog-post-header {
  margin-bottom: 36px;
  text-align: center;
}

.blog-post-header .blog-card-category { margin-bottom: 12px; }
.blog-post-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 16px; }

.blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-post-content h2 { margin: 36px 0 16px; }
.blog-post-content h3 { margin: 28px 0 12px; }
.blog-post-content p { margin-bottom: 18px; font-size: 1.05rem; line-height: 1.8; }
.blog-post-content ul, .blog-post-content ol { margin: 16px 0; padding-left: 28px; }
.blog-post-content li { margin-bottom: 8px; font-size: 1.05rem; line-height: 1.7; }
.blog-post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
}

.blog-post-content .callout-box {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.blog-post-content .callout-box h4 { color: var(--primary-dark); margin-bottom: 8px; }

.related-posts {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-posts h3 { text-align: center; margin-bottom: 28px; }

/* Interlink sidebar */
.blog-interlinks {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 32px 0;
}

.blog-interlinks h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--primary-dark); }

.blog-interlinks ul { list-style: none; padding: 0; }

.blog-interlinks li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.blog-interlinks li:last-child { border-bottom: none; }

/* ============================================
   Blog Search
   ============================================ */
.blog-search-wrap {
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
}

.blog-search {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  background: var(--bg-card);
  transition: border-color var(--transition);
  font-family: var(--font-body);
  outline: none;
}

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

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

.blog-categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.cat-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   About Page
   ============================================ */
.about-hero {
  background: linear-gradient(135deg, var(--bg-alt) 0%, #E8E0F4 100%);
  padding: 80px 0 60px;
  text-align: center;
}

.about-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px;
}

.about-content p { font-size: 1.05rem; line-height: 1.9; }

.about-content .founder-quote {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--primary);
  text-align: center;
  padding: 40px;
  margin: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.value-card svg { width: 40px; height: 40px; color: var(--primary); margin-bottom: 16px; }
.value-card h4 { margin-bottom: 8px; }
.value-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about { max-width: 300px; }
.footer-about p { font-size: 0.9rem; line-height: 1.7; margin-top: 12px; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.affiliate-disclosure {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 30px 0;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.affiliate-disclosure strong { color: var(--text); }

/* ============================================
   Table of Contents (Blog)
   ============================================ */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 0 0 32px;
}

.toc h4 { font-size: 0.9rem; font-family: var(--font-body); margin-bottom: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }

.toc ol { padding-left: 20px; }
.toc li { padding: 4px 0; font-size: 0.9rem; }
.toc a { color: var(--primary); }

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { margin: 0 6px; }

/* ============================================
   CTA Sections
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
  margin: 60px 0;
}

.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; max-width: 500px; margin: 0 auto 24px; }

.cta-section .btn-primary {
  background: #fff;
  color: var(--primary);
}

.cta-section .btn-primary:hover { background: var(--bg-alt); }

/* Methodology badge */
.methodology-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.85rem;
  margin: 20px 0;
}

.methodology-badge svg { color: var(--primary); flex-shrink: 0; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
  .mobile-toggle { display: block; }

  .product-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    padding: 24px;
  }

  .product-image {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

  .product-meta { text-align: center; min-width: auto; }
  .product-rating { justify-content: center; }

  .rank-badge { margin: 0 auto; }

  .hero { padding: 50px 0 40px; }

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

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

  .cta-section { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .product-card { padding: 20px; }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-alt) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
  .site-header, .site-footer, .nav-main, .blog-search-wrap { display: none; }
  body { background: #fff; }
  .product-card { break-inside: avoid; }
}
