/* ============================================================
   BackPainReliefIndia.com — Main Stylesheet
   Target: India (Amazon.in Affiliate) | Hostinger Shared
   ============================================================ */

/* --- Variables --- */
:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --secondary: #16a34a;
  --accent: #f97316;
  --accent-hover: #ea6c0a;
  --danger: #dc2626;
  --text: #1c1917;
  --text-light: #57534e;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --article-width: 760px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.3rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin: 2rem 0 .8rem; padding-top: 0.5rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin: 1.5rem 0 .5rem; color: var(--primary-dark); }
h4 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
p { margin-bottom: 1rem; }
strong { color: var(--text); }

/* --- Header --- */
.site-header {
  background: var(--primary);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-logo {
  font-size: 1.25rem; font-weight: 800;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.logo-icon { flex-shrink: 0; }
.site-logo span { color: #fbbf24; }
.site-logo:hover { text-decoration: none; color: #fff; }

/* Nav */
.nav-links { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; }
.nav-links a {
  display: block; padding: 0 14px; height: 60px; line-height: 60px;
  color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,.15); color: #fff; text-decoration: none;
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: #fff;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: #fff;
  margin: 5px 0; transition: all .3s;
}

/* --- Breadcrumb --- */
.breadcrumb {
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  padding: .55rem 1rem; font-size: .82rem; color: var(--text-light);
}
.breadcrumb-inner { max-width: var(--max-width); margin: 0 auto; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 .4rem; color: var(--text-light); }

/* --- Hero / Page Header --- */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #fff; padding: 2.5rem 1rem;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.4rem); margin-bottom: .6rem; }
.page-hero .hero-meta { font-size: .85rem; opacity: .8; margin-bottom: .8rem; }
.page-hero .hero-meta span { margin: 0 .5rem; }
.hero-excerpt { font-size: 1.05rem; opacity: .9; max-width: 650px; margin: 0 auto; }

/* --- Layout --- */
.page-wrapper { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem; }
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.article-content { min-width: 0; }
.sidebar { position: sticky; top: 80px; }

/* --- Table of Contents --- */
.toc-box {
  background: var(--bg-light); border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.toc-box h3 { margin: 0 0 .7rem; font-size: 1rem; color: var(--primary); }
.toc-box ol { padding-left: 1.2rem; margin: 0; }
.toc-box li { margin-bottom: .3rem; font-size: .92rem; }
.toc-box a { color: var(--primary); }

/* --- Quick Verdict Box --- */
.verdict-box {
  background: #f0fdf4; border: 1px solid #86efac;
  border-left: 5px solid var(--secondary);
  border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 1.5rem 0;
}
.verdict-box h3 { color: var(--secondary); margin: 0 0 .5rem; font-size: 1rem; }
.verdict-box p { margin: 0; font-size: .95rem; }

/* --- Info Box --- */
.info-box {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius); padding: 1.2rem 1.5rem; margin: 1.5rem 0;
}
.info-box h4 { color: var(--primary); margin: 0 0 .4rem; }
.info-box p { margin: 0; font-size: .93rem; }

/* --- Warning Box --- */
.warning-box {
  background: #fffbeb; border: 1px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius); padding: 1.2rem 1.5rem; margin: 1.5rem 0;
}
.warning-box h4 { color: #92400e; margin: 0 0 .4rem; }
.warning-box p { margin: 0; font-size: .93rem; }

/* --- Comparison Table --- */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.comparison-table thead { background: var(--primary); color: #fff; }
.comparison-table th { padding: .85rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
.comparison-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg-light); }
.comparison-table tr:hover td { background: #eff6ff; }
.badge-best { background: var(--secondary); color: #fff; font-size: .72rem; padding: 2px 7px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.badge-budget { background: var(--accent); color: #fff; font-size: .72rem; padding: 2px 7px; border-radius: 20px; font-weight: 700; white-space: nowrap; }

/* --- Product Card --- */
.product-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin: 2rem 0; box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.product-card:hover { box-shadow: var(--shadow-md); }
.product-card-header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.product-rank {
  background: var(--primary); color: #fff; border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.product-card h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.product-rating { color: #f59e0b; font-size: .9rem; }
.product-meta { font-size: .83rem; color: var(--text-light); margin-top: .2rem; }
.product-img-wrap { margin: 1rem 0; text-align: center; }
.product-img-wrap img { max-height: 200px; object-fit: contain; margin: 0 auto; border-radius: var(--radius); }
.product-img-placeholder {
  background: var(--bg-alt); border: 2px dashed var(--border);
  border-radius: var(--radius); height: 180px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: .85rem;
}

/* Pros/Cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.pros, .cons { border-radius: var(--radius); padding: 1rem; }
.pros { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cons { background: #fff1f2; border: 1px solid #fecdd3; }
.pros h4 { color: var(--secondary); margin: 0 0 .5rem; font-size: .9rem; }
.cons h4 { color: var(--danger); margin: 0 0 .5rem; font-size: .9rem; }
.pros ul, .cons ul { padding-left: 1.1rem; margin: 0; }
.pros li, .cons li { font-size: .88rem; margin-bottom: .3rem; }

/* --- CTA Button (Affiliate) --- */
.btn-amazon {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: .75rem 1.5rem; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: background .2s, transform .1s;
}
.btn-amazon:hover { background: var(--accent-hover); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-amazon-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--primary); color: var(--primary);
  padding: .6rem 1.2rem; border-radius: var(--radius);
  font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: all .2s;
}
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.cta-wrap { margin: 1.2rem 0; }
.affiliate-note { font-size: .75rem; color: var(--text-light); margin-top: .4rem; display: block; }

/* Price Tag */
.price-tag { font-size: 1.3rem; font-weight: 800; color: var(--secondary); }
.price-range { font-size: .85rem; color: var(--text-light); font-weight: 400; }

/* Star Rating */
.stars { color: #f59e0b; letter-spacing: 2px; }
.rating-count { font-size: .8rem; color: var(--text-light); }

/* --- FAQ Section --- */
.faq-section { margin: 2.5rem 0; }
.faq-section h2 { margin-bottom: 1rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .6rem; overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; background: var(--bg-light);
  border: none; padding: 1rem 1.2rem; cursor: pointer;
  font-size: .97rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .2s;
}
.faq-question:hover { background: #e8f0fe; }
.faq-question.active { background: #e8f0fe; color: var(--primary); }
.faq-icon { font-size: 1.2rem; font-weight: 400; flex-shrink: 0; margin-left: .5rem; transition: transform .3s; }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 1rem 1.2rem; font-size: .93rem; border-top: 1px solid var(--border); }
.faq-answer.open { display: block; }
.faq-answer p:last-child { margin-bottom: 0; }

/* --- Sidebar Widgets --- */
.sidebar-widget {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 1.5rem;
}
.widget-title {
  background: var(--primary); color: #fff;
  padding: .7rem 1rem; font-size: .9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.widget-body { padding: 1rem; }
.widget-links { list-style: none; padding: 0; margin: 0; }
.widget-links li { border-bottom: 1px solid var(--border); }
.widget-links li:last-child { border-bottom: none; }
.widget-links a { display: block; padding: .55rem 0; font-size: .88rem; color: var(--primary); }
.widget-links a:hover { color: var(--primary-dark); text-decoration: underline; }

/* --- Home Page --- */
.home-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
  color: #fff; padding: 4rem 1rem; text-align: center;
}
.home-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .8rem; }
.home-hero p { font-size: 1.1rem; opacity: .9; max-width: 600px; margin: 0 auto 1.8rem; }
.hero-search { display: flex; max-width: 520px; margin: 0 auto; gap: .5rem; }
.hero-search input {
  flex: 1; padding: .8rem 1rem; border-radius: var(--radius);
  border: none; font-size: 1rem; outline: none;
}
.hero-search button {
  background: var(--accent); color: #fff; border: none;
  padding: .8rem 1.4rem; border-radius: var(--radius);
  font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* Category Cards */
.categories-section { padding: 3rem 1rem; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.section-title p { color: var(--text-light); max-width: 500px; margin: .5rem auto 0; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; max-width: var(--max-width); margin: 0 auto; }
.category-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  text-align: center; transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: var(--text);
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--text); }
.category-icon { font-size: 2.5rem; margin-bottom: .7rem; }
.category-card h3 { font-size: 1rem; margin: 0 0 .4rem; }
.category-card p { font-size: .83rem; color: var(--text-light); margin: 0; }

/* Featured Articles Grid */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.article-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow .2s;
  display: flex; flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card-img { background: var(--bg-alt); height: 180px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.article-card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.article-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--primary); letter-spacing: .05em; margin-bottom: .4rem; }
.article-card-body h3 { font-size: 1rem; margin: 0 0 .5rem; line-height: 1.4; }
.article-card-body h3 a { color: var(--text); }
.article-card-body h3 a:hover { color: var(--primary); text-decoration: none; }
.article-excerpt { font-size: .87rem; color: var(--text-light); margin: 0 0 1rem; flex: 1; }
.read-more { font-size: .85rem; font-weight: 600; color: var(--primary); }

/* --- Why Trust Us / Features strip --- */
.features-strip { background: var(--bg-alt); padding: 2.5rem 1rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.feature-item { text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: .5rem; }
.feature-item h4 { font-size: .95rem; margin-bottom: .3rem; }
.feature-item p { font-size: .83rem; color: var(--text-light); margin: 0; }

/* --- Section Separator --- */
.section { padding: 3rem 1rem; }
.section-alt { background: var(--bg-alt); }

/* --- Footer --- */
.site-footer { background: #0f172a; color: rgba(255,255,255,.7); padding: 3rem 1rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: var(--max-width); margin: 0 auto 2rem; }
.footer-brand .site-logo { font-size: 1.1rem; margin-bottom: .7rem; }
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: .9rem; margin-bottom: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-pages { max-width: var(--max-width); margin: 0 auto 1.5rem; font-size: .82rem; color: rgba(255,255,255,.5); letter-spacing: .01em; }
.footer-pages a { color: rgba(255,255,255,.65); margin: 0 .15rem; }
.footer-pages a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-bottom p { font-size: .8rem; margin: 0; }
.footer-disclaimer { font-size: .78rem; color: rgba(255,255,255,.45); max-width: var(--max-width); margin: 1rem auto 0; text-align: center; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-green { color: var(--secondary); }
.text-red { color: var(--danger); }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.tag-pill { display: inline-block; background: #dbeafe; color: var(--primary); font-size: .75rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; margin-right: 4px; }

/* Key Specs Table */
.specs-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.specs-table td { padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { font-weight: 600; width: 40%; color: var(--text-light); }
.specs-table tr:last-child td { border-bottom: none; }

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li { padding: .3rem 0 .3rem 1.6rem; position: relative; font-size: .93rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--secondary); font-weight: 700; }

/* Number list styled */
.num-list { list-style: none; padding: 0; counter-reset: num; }
.num-list li { padding: .5rem 0 .5rem 2.2rem; position: relative; border-bottom: 1px solid var(--border); }
.num-list li:last-child { border-bottom: none; }
.num-list li::before { counter-increment: num; content: counter(num); position: absolute; left: 0; background: var(--primary); color: #fff; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; top: .6rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--primary-dark); padding: .5rem 0; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { height: auto; line-height: 1.4; padding: .75rem 1.2rem; }
  .nav-toggle { display: block; }
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .pros-cons { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .product-card-header { flex-direction: column; }
  .comparison-table { font-size: .82rem; }
  .comparison-table th, .comparison-table td { padding: .6rem .7rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .page-hero { padding: 1.8rem 1rem; }
  .btn-amazon { width: 100%; justify-content: center; }
}

/* --- Blog Section --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.blog-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg);
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card-img { background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%); height: 160px; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; }
.blog-card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.blog-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: .06em; margin-bottom: .4rem; }
.blog-card-body h3 { font-size: .98rem; margin: 0 0 .5rem; line-height: 1.4; }
.blog-card-body h3 a { color: var(--text); }
.blog-card-body h3 a:hover { color: var(--primary); text-decoration: none; }
.blog-excerpt { font-size: .85rem; color: var(--text-light); flex: 1; margin: 0 0 1rem; }
.blog-meta { font-size: .75rem; color: var(--text-light); }

/* --- Print --- */
@media print {
  .site-header, .sidebar, .site-footer, .btn-amazon, .nav-toggle { display: none; }
  .content-sidebar { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
}
