/* ==========================================================================
   SOSOACTIVE DIGITAL MEDIA PLATFORM - OFFICIAL CORE STYLESHEET
   Default Light Theme | Ultra-Fast 100/100 PageSpeed | Modern Aesthetics
   ========================================================================== */

:root {
  /* Default Light Palette - Premium Media Aesthetic */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-highlight: #4f46e5;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-indigo: #4f46e5;
  --accent-indigo-hover: #4338ca;
  --accent-emerald: #059669;
  --accent-cyan: #0891b2;
  --accent-amber: #d97706;
  
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.08), transparent 70%);
  
  /* Typography & Spacing */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 4px 20px rgba(79, 70, 229, 0.2);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Dark Theme Overrides (Optional Toggle) */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border-color: #334155;
  --border-highlight: #6366f1;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --accent-indigo: #6366f1;
  --accent-indigo-hover: #4f46e5;
  --accent-emerald: #10b981;
  
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Global Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Reading Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
}

.progress-bar {
  height: 3px;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(30, 41, 59, 0.92);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.brand-logo svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.25));
}

.brand-logo span.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-indigo);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-contact {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.35);
}

.theme-toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--accent-indigo);
  border-color: var(--accent-indigo);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Drawer Navigation */
.mobile-nav {
  position: fixed;
  top: 65px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 899;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open {
  display: flex;
}

/* Main Container Layout */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: var(--gradient-glow), var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--accent-indigo);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.85rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.metric-card {
  text-align: left;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-indigo);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.hero-image-wrapper:hover img {
  transform: scale(1.02);
}

/* Category Quick Bar */
.category-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2.5rem;
  scrollbar-width: thin;
}

.cat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.cat-chip:hover, .cat-chip.active {
  background: var(--accent-indigo);
  color: #ffffff;
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

/* Article Content Layout with Sidebar */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

/* Main Article Container */
.article-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Table of Contents Box */
.toc-box {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-indigo);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

[data-theme="dark"] .toc-box {
  background: var(--bg-primary);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-list li {
  font-size: 0.925rem;
}

.toc-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
  font-weight: 500;
}

.toc-list li a:hover {
  color: var(--accent-indigo);
  transform: translateX(3px);
}

.toc-list li.sub-item {
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

/* Article Content Typography & Formatting */
.prose {
  color: var(--text-secondary);
  font-size: 1.075rem;
  line-height: 1.85;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.prose h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
}

.prose h4 {
  font-size: 1.15rem;
  color: var(--accent-indigo);
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 700;
}

.prose a {
  color: var(--accent-indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.prose a:hover {
  color: var(--accent-cyan);
}

/* Primary Keyword Anchor Styling */
.main-keyword-link {
  color: var(--accent-indigo) !important;
  font-weight: 800 !important;
  background: rgba(79, 70, 229, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid var(--accent-indigo);
  text-decoration: none !important;
}

.main-keyword-link:hover {
  background: rgba(79, 70, 229, 0.18);
}

.prose ul, .prose ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.6rem;
}

.prose blockquote {
  background: #f8fafc;
  border-left: 4px solid var(--accent-indigo);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .prose blockquote {
  background: var(--bg-primary);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Article Visual Cards & Media */
.content-figure {
  margin: 2.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.content-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.content-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  font-weight: 500;
}

[data-theme="dark"] .content-figure figcaption {
  background: var(--bg-primary);
}

/* Feature Grid Box inside Article */
.feature-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2.25rem 0;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-indigo);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-indigo);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Styled HTML Data Tables */
.table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.seo-table th, .seo-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.seo-table th {
  background: #f1f5f9;
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .seo-table th {
  background: var(--bg-primary);
}

.seo-table tr:last-child td {
  border-bottom: none;
}

.seo-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.03);
}

/* FAQ Accordion Component */
.faq-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 2px dashed var(--border-color);
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-header {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background var(--transition-fast);
}

.faq-header:hover {
  background: #f8fafc;
}

[data-theme="dark"] .faq-header:hover {
  background: var(--bg-card-hover);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform var(--transition-normal);
  color: var(--accent-indigo);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
  display: none;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.faq-item.open .faq-content {
  display: block;
}

/* Sticky Sidebar */
.sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-indigo);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.stat-item span:first-child {
  color: var(--text-secondary);
}

.stat-item span:last-child {
  font-weight: 700;
  color: var(--accent-indigo);
}

/* Footer Section */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 4rem 1.5rem 2rem 1.5rem;
}

[data-theme="dark"] .site-footer {
  background: var(--bg-secondary);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.footer-col h5 {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent-indigo);
}

.footer-bottom {
  max-width: 1280px;
  margin: 3rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-indigo);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 800;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--accent-indigo-hover);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
  
  .hero-metrics {
    grid-template-columns: 1fr;
  }
  
  .article-container {
    padding: 1.75rem 1.25rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
}
