/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
  --surface: #f8f9ff;
  --surface-card: #ffffff;
  --primary: #4648d4;
  --primary-light: #6063ee;
  --secondary: #6b38d4;
  --text-main: #0b1c30;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-secondary: 'Inter', sans-serif;
}

/* =========================================================
   GLOBAL OVERRIDES (To reset style/style.css conflicts)
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: var(--font-main) !important;
  background: var(--surface) !important;
  color: var(--text-main) !important;
  line-height: 1.8 !important;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  text-decoration: none;
}

/* Clear container styles polluted by style/style.css */
.container {
  width: 100% !important;
  max-width: 1280px !important;
  margin: auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */
.main-wrapper {
  padding-top: 100px;
  padding-bottom: 80px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 8.5fr 3.5fr;
  gap: 32px;
}

.blog-card, aside {
  min-width: 0;
}

/* =========================================================
   BLOG CARD
========================================================= */
.blog-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
.blog-category {
  display: inline-flex;
  align-items: center;
  background: rgba(70,72,212,0.08);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 22px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.blog-title {
  font-size: 3rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.blog-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Styling content headings and text in theme */
.blog-content h2 {
  font-size: 1.7rem;
  margin-top: 42px;
  margin-bottom: 18px;
  border-left: 5px solid var(--primary);
  padding-left: 14px;
  color: var(--text-main);
}

.blog-content h3 {
  font-size: 1.35rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.blog-content p {
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 1.05rem;
}

.blog-content ul, 
.blog-content ol {
  margin-left: 24px;
  margin-bottom: 24px;
}

.blog-content li {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* =========================================================
   MEDIA ELEMENTS
========================================================= */
.hero-image {
  width: 100%;
  height: auto !important;
  max-height: 500px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 36px;
  display: block;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 24px 0;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   TABLES
========================================================= */
.table-responsive {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%;
  display: block;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background: #f1f5f9;
  padding: 16px;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-main);
  border-bottom: 2px solid var(--border);
}

table td {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

table tr:hover td {
  background-color: rgba(70, 72, 212, 0.02);
}

/* =========================================================
   INFO BOX & BLOCKQUOTE & CODE
========================================================= */
.info-box {
  background: rgba(70,72,212,0.05);
  border: 1px solid rgba(70,72,212,0.1);
  padding: 24px;
  border-radius: 18px;
  margin-bottom: 32px;
}

.info-box p {
  margin-bottom: 12px;
  color: var(--text-main);
}

.blog-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 8px 0 8px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(70, 72, 212, 0.02);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-content pre {
  background: #0b1c30;
  color: #f8fafc;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
}

.blog-content code {
  font-family: inherit;
}

:not(pre) > code {
  background: #f1f5f9;
  color: var(--primary);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: var(--font-secondary);
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}

.sidebar-card h3 {
  margin-bottom: 18px;
  font-size: 1.2rem;
  color: var(--text-main);
}

.sidebar-card ul {
  list-style: none;
}

.sidebar-card li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
}

.sidebar-card li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.sidebar-card li a:hover {
  color: var(--primary);
}

.sidebar-card li:last-child {
  border-bottom: none;
}

/* =========================================================
   MOBILE
========================================================= */
@media(max-width:992px){
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

@media(max-width:768px){
  .main-wrapper {
    padding-top: 80px;
    padding-bottom: 40px;
  }
  .container {
    padding: 0 16px !important;
  }
  .blog-card {
    padding: 24px 16px;
  }
  .blog-title {
    font-size: 1.75rem;
  }
  .blog-meta {
    gap: 12px;
    font-size: 0.85rem;
    flex-direction: column;
  }
  .blog-content h2 {
    font-size: 1.25rem;
    margin-top: 32px;
  }
  .sidebar-card {
    padding: 20px 16px;
  }
  .faq-item summary {
    padding: 16px;
    font-size: 0.95rem;
  }
  .faq-content {
    padding: 0 16px 16px 16px;
  }
}

/* =========================================================
   FAQ
========================================================= */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(70, 72, 212, 0.08);
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  line-height: 1.6;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted) !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  margin-bottom: 24px;
}

.back-btn:hover {
  color: var(--primary) !important;
  text-decoration: none;
  transform: translateX(-4px);
}

