/* SensiXpert Blog - Global Styles */
:root {
  --bg: #0D0D18;
  --bg2: #13131f;
  --card: #1a1a2e;
  --card2: #1e1e35;
  --accent: #E53935;
  --accent2: #FF6E40;
  --text: #f0f0f0;
  --text2: #a0a0b8;
  --border: rgba(229,57,53,0.18);
  --radius: 14px;
  --font: 'Poppins', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 16px;
}

/* ── NAV ── */
nav {
  background: rgba(13,13,24,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.nav-brand .dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.6; transform:scale(1.3); }
}

.nav-links { display: flex; gap: 20px; align-items: center; }

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px !important;
  transition: opacity .2s !important;
}

.nav-cta:hover { opacity: .85; }

/* ── HERO (index only) ── */
.hero {
  background: linear-gradient(135deg, #0D0D18 0%, #1a0a0a 60%, #0D0D18 100%);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(229,57,53,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(229,57,53,0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

.hero p {
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 17px;
}

/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 24px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.section-header .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── POST CARDS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(229,57,53,0.15);
}

.post-card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  background: rgba(229,57,53,0.12);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-card p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.post-card-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
}

.post-card-meta .read-more {
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── FEATURED POST ── */
.featured-post {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s;
}

.featured-post:hover { box-shadow: 0 8px 40px rgba(229,57,53,0.2); }

.featured-badge {
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

.featured-post h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.featured-post p { color: var(--text2); font-size: 15px; }
.featured-thumb { font-size: 80px; text-align: center; }

/* ── ARTICLE PAGE ── */
.article-hero {
  background: linear-gradient(135deg, #0D0D18 0%, #1a0a0a 100%);
  padding: 60px 24px 48px;
  border-bottom: 1px solid var(--border);
}

.article-hero .breadcrumb {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 20px;
}

.article-hero .breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.article-hero .breadcrumb span { margin: 0 6px; }

.article-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  max-width: 800px;
  margin-bottom: 16px;
}

.article-hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text2);
  font-size: 14px;
  align-items: center;
}

.article-hero .meta .author {
  color: var(--accent);
  font-weight: 600;
}

/* ── ARTICLE CONTENT ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-thumb { display: none; }
}

.article-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text);
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--text);
}

.article-content p {
  color: var(--text2);
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.8;
}

.article-content strong { color: var(--text); }

.article-content ul, .article-content ol {
  margin: 12px 0 20px 24px;
  color: var(--text2);
}

.article-content li { margin-bottom: 8px; font-size: 15px; }

.article-content a { color: var(--accent); }

/* ── CALLOUT BOXES ── */
.callout {
  border-radius: 10px;
  padding: 18px 20px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout-tip {
  background: rgba(229,57,53,0.08);
  border: 1px solid rgba(229,57,53,0.25);
}

.callout-info {
  background: rgba(33,150,243,0.08);
  border: 1px solid rgba(33,150,243,0.25);
}

.callout-warning {
  background: rgba(255,152,0,0.08);
  border: 1px solid rgba(255,152,0,0.25);
}

.callout-icon { font-size: 22px; line-height: 1; flex-shrink: 0; margin-top: 2px; }

.callout-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.callout-body p {
  font-size: 14px !important;
  margin: 0 !important;
  color: var(--text2);
}

/* ── SENSITIVITY TABLE ── */
.sens-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sens-table th {
  background: rgba(229,57,53,0.15);
  color: var(--accent);
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sens-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text2);
}

.sens-table tr:hover td { background: rgba(255,255,255,0.02); }

.sens-table .val {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

/* ── CTA BLOCK ── */
.cta-block {
  background: linear-gradient(135deg, #1a0808, #130820);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}

.cta-block h3 { font-size: 20px; margin-bottom: 10px; }
.cta-block p { color: var(--text2); font-size: 14px; margin-bottom: 20px; }
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: opacity .2s;
}
.cta-btn:hover { opacity: .85; }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 80px; align-self: start; }

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 14px;
}

.sidebar-link {
  display: block;
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}

.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--accent); }

.toc-link {
  display: block;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  transition: color .2s, border-color .2s;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text2);
  font-size: 14px;
}

footer a { color: var(--accent); text-decoration: none; }
footer strong { color: var(--text); }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex;
  max-width: 480px;
  margin: 0 auto 0;
  gap: 0;
}

.search-bar input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 25px 0 0 25px;
  padding: 12px 20px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

.search-bar input::placeholder { color: var(--text2); }
.search-bar input:focus { border-color: var(--accent); }

.search-bar button {
  background: var(--accent);
  border: none;
  border-radius: 0 25px 25px 0;
  padding: 12px 20px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 16px 40px; }
}
