/*
  Default Theme — Elegant Refresh
  Palette, typography, layout and navigation refinements
*/

/* Design tokens */
:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #1a1f36;
  --color-muted: #5b6475;
  --color-border: #e3e8f2;
  --color-accent: #6c63ff; /* indigo */
  --color-accent-700: #564df5;
  --color-header-start: #0f172a; /* slate-900 */
  --color-header-end: #111827;   /* gray-900 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 16px rgba(17, 24, 39, 0.08);
  --radius-md: 14px;
}

/* Global base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding: 0;
  color: #0a0a0a;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, Helvetica, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* Home page content should be full width */
main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Ensure all content within main is full width */
main > * {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

h2 {
  line-height: 3rem !important;
}

h3 {
  font-size: 2rem !important;
  margin-top: 1em !important;
  margin-bottom: 1em !important;
}

/* Override any container constraints for home page content */
main .container,
main .parallax-section,
main h1, main h2, main h3, main h4, main h5, main h6,
main p, main div {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0arem !important;
}

.parallax-section {
  margin-top: 0;
  margin-bottom: 0;
}

/* Header */
header {
  background: #ffffff;
  color: #111827;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  color: #0a0a0a;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo {
  display: block;
  height: clamp(28px, 20px + 2vw, 40px);
  width: auto;
  flex-shrink: 0;
}
.brand-text {
  display: inline-block;
}
.fcms-hamburger{display:none; gap:6px; flex-direction:column; justify-content:center; align-items:center; width:40px; height:36px; border:1px solid rgba(0,0,0,0.15); border-radius:10px; background:#fff; margin-left:6px}
.fcms-hamburger span{display:block; width:20px; height:2px; background:#111; border-radius:2px}
.fcms-theme-toggle{display:inline-flex; align-items:center; justify-content:center; width:40px; height:36px; margin-left:8px; border:1px solid rgba(0,0,0,0.15); border-radius:10px; background:#fff; color:#111; font-size:16px; line-height:1}
.fcms-theme-toggle:focus{outline:2px solid #6366f1; outline-offset:2px}

/* Navigation: support both bare <nav><ul>… and classed .main-nav */
nav ul,
.main-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
nav li { position: relative; }
nav a,
.main-nav a {
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.2rem;
  display: inline-block;
  transition: color .2s ease;
  /* chic underline */
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
}
nav a:hover,
.main-nav a:hover { color: #000; background-size: 100% 2px; }

/* Dropdowns: support either nested <ul> or .submenu */
nav ul ul,
.submenu {
  display: none;
  position: absolute;
  top: 100%; /* Remove the gap */
  left: 0;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-width: 220px;
  padding: 0.4rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  z-index: 20;
}

/* Add padding to parent menu items to extend hover area */
nav li {
  padding-bottom: 8px;
}

/* Show submenu on parent hover */
nav li:hover > ul,
nav li:hover > .submenu { 
  display: block; 
}

/* Keep submenu visible when hovering over it */
nav ul ul:hover,
.submenu:hover { 
  display: block; 
}

/* Create a continuous hover area by adding invisible padding to submenu */
nav ul ul::before,
.submenu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}

nav ul ul li,
.submenu li { 
  width: 100%; 
}

nav ul ul a,
.submenu a {
  display: block;
  white-space: nowrap;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
}

nav ul ul a:hover,
.submenu a:hover { 
  background: rgba(0,0,0,0.04); 
}

/* Main content card */
main {
  width: min(100%, 92vw);
  margin: 3rem auto 3.5rem auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
}

/* Typography */
h1, h2, h3, h4, h5, h6 { 
  line-height: 1.2; 
  color: #0a0a0a; 
  font-weight: 600;
  margin-top: 0;
}

h1 { 
  font-size: clamp(2.5rem, 1.5rem + 3vw, 3.5rem) !important; 
  margin: 0 0 1rem 0; 
  letter-spacing: -0.02em; 
  font-weight: 700;
  color: #111827;
}

h2 { 
  font-size: clamp(2rem, 1.25rem + 2.5vw, 3rem) !important; 
  margin: 2rem 0 1rem 0; 
  letter-spacing: -0.01em; 
  font-weight: 600;
  color: #1f2937;
  padding-bottom: 0.5rem;
}

h3 { 
  font-size: 1.3rem; 
  margin: 1.5rem 0 0.75rem 0; 
  font-weight: 600;
  color: #374151;
}

h4 { 
  font-size: 1.1rem; 
  margin: 1.25rem 0 0.5rem 0; 
  font-weight: 600;
  color: #4b5563;
}

h5 { 
  font-size: 1rem; 
  margin: 1rem 0 0.5rem 0; 
  font-weight: 600;
  color: #6b7280;
}

h6 { 
  font-size: 0.9rem; 
  margin: 1rem 0 0.5rem 0; 
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p { color: #374151; margin: 0 0 1rem; line-height: 1.6; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-700); }

/* Additional typography improvements */
ul, ol { 
  margin: 0 0 1rem 1.5rem; 
  line-height: 1.6; 
  color: #374151; 
}

li { 
  margin-bottom: 0.5rem; 
}

strong, b { 
  font-weight: 600; 
  color: #111827; 
}

em, i { 
  font-style: italic; 
  color: #4b5563; 
}

code { 
  background: #f3f4f6; 
  color: #dc2626; 
  padding: 0.2rem 0.4rem; 
  border-radius: 4px; 
  font-size: 0.9em; 
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; 
}

/* Dark mode typography improvements */
@media (prefers-color-scheme: dark) {
  ul, ol { color: #cbd5e1; }
  strong, b { color: #f9fafb; }
  em, i { color: #9ca3af; }
  code { background: #1f2937; color: #fca5a5; }
}

:root[data-theme="dark"] ul, :root[data-theme="dark"] ol { color: #cbd5e1; }
:root[data-theme="dark"] strong, :root[data-theme="dark"] b { color: #f9fafb; }
:root[data-theme="dark"] em, :root[data-theme="dark"] i { color: #9ca3af; }
:root[data-theme="dark"] code { background: #1f2937; color: #fca5a5; }

:root[data-theme="light"] ul, :root[data-theme="light"] ol { color: #374151; }
:root[data-theme="light"] strong, :root[data-theme="light"] b { color: #111827; }
:root[data-theme="light"] em, :root[data-theme="light"] i { color: #4b5563; }
:root[data-theme="light"] code { background: #f3f4f6; color: #dc2626; }

blockquote {
  margin: 1.2rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--color-accent);
  background: #f3f5ff;
  border-radius: 8px;
}
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
pre {
  background: #f8fafc;
  color: #0b1020;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--color-border);
  overflow: auto;
}

/* Generic button if themes use it */
.button, .btn {
  display: inline-block;
  background: #111827;
  color: #fff;
  padding: 0.68rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #111827;
  transition: transform .05s ease, background-color .2s ease;
}
.button:hover, .btn:hover { background: #000; border-color: #000; }
.button:active, .btn:active { transform: translateY(1px); }

/* Footer */
footer {
  background: #ffffff;
  color: #6b7280;
  text-align: center;
  padding: 1.4rem 0 1.2rem 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  nav ul, .main-nav { gap: 0.8rem; flex-wrap: wrap; }
  main { padding: 1rem; }
  .brand {
    gap: 0.5rem;
  }
  .brand-logo {
    height: clamp(24px, 18px + 1.5vw, 32px);
  }
}

@media (max-width: 480px) {
  .brand-logo { height: 24px; }
  .brand {
    gap: 0.4rem;
    font-size: clamp(1rem, 0.8rem + 0.8vw, 1.3rem);
  }
  h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); }
  .hero .actions { flex-direction: column; align-items: stretch; }
  nav ul, .main-nav { gap: 0.6rem; }
}

/* Mobile navigation behavior for default theme */
@media (max-width: 900px) {
  header nav { display: none; }
  header nav.is-open { display: block; }
  .fcms-hamburger { display: inline-flex; }
}

@media (prefers-color-scheme: dark) {
  .fcms-hamburger{ background:#0f172a; border-color:rgba(255,255,255,0.25) }
  .fcms-hamburger span{ background:#e5e7eb }
  .fcms-theme-toggle{ background:#0f172a; border-color:rgba(255,255,255,0.25); color:#e5e7eb }
}

/* Hero section */
.hero {
  position: relative;
  padding: clamp(2.5rem, 5vw, 5rem) 0 2rem;
  background: #ffffff;
}
.hero .container { display: grid; grid-template-columns: 1.1fr; gap: 1.4rem; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--color-muted);
  background: #fff;
}
.hero h1 {
  margin: 0.4rem 0 0.6rem 0;
  font-size: clamp(2.5rem, 1.5rem + 3vw, 3.5rem) !important;
}
.hero p.lead {
  color: var(--color-muted);
  font-size: clamp(1rem, 0.95rem + 0.5vw, 1.125rem);
  margin: 0 auto;
  max-width: 60ch;
}
.hero .actions { margin-top: 1rem; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: #111827;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #111827;
}
.btn-primary:hover { background: #000; border-color: #000; }
.btn-secondary {
  background: transparent;
  color: #111827;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--color-border);
}
.hero .stats { margin-top: 1.2rem; display: flex; gap: 1rem; justify-content: center; color: var(--color-muted); font-size: 0.95rem; }

/* Image-based hero banner (uses {{heroBanner}}) */
.hero-banner {
  padding: clamp(0.75rem, 1.5vw, 1.25rem) 0 0;
}
.hero-banner .container { width: min(1100px, 92vw); margin-inline: auto; }
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

/* Features */
.features {
  padding: clamp(1.5rem, 3vw, 3rem) 0;
}
.features .section-title { text-align: center; margin: 0 0 1.2rem 0; }
.features .section-lead { text-align: center; color: var(--color-muted); margin: 0 auto 1.6rem; max-width: 65ch; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}
.feature-card h3 { margin: 0.2rem 0 0.4rem 0; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--color-muted); }
.feature-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: #111827;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* Logos strip */
.logos { padding: clamp(1rem, 2vw, 2rem) 0; }
.logos .container { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1rem; align-items: center; justify-items: center; }
.logo-item { opacity: 0.6; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease; }
.logo-item:hover { opacity: 1; filter: grayscale(0); }
@media (max-width: 900px) { .logos .container { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 560px) { .logos .container { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Quick start */
.quickstart { padding: clamp(1.5rem, 3vw, 3rem) 0; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.quick-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 1rem; position: relative; }
.quick-step { position: absolute; top: -12px; left: 14px; background: var(--color-accent); color: #fff; border-radius: 999px; font-size: 0.8rem; padding: 0.2rem 0.55rem; box-shadow: 0 8px 20px rgba(108, 99, 255, 0.35); }
.quick-card h3 { margin: 0.2rem 0 0.4rem 0; font-size: 1.05rem; }
.quick-card pre { margin: 0.6rem 0 0 0; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: 1fr; } }

/* CTA strip */
.cta-strip { margin: 1rem 0 0; padding: clamp(1.2rem, 2.5vw, 2rem) 0; }
.cta-inner { background: #f5f7fb; color: #0b1020; border-radius: 16px; padding: clamp(1rem, 3vw, 1.6rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--color-border); }
.cta-title { color: #111827; font-weight: 700; font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem); letter-spacing: -0.01em; }
.cta-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cta-actions .btn-outline { background: transparent; border: 1px solid rgba(0,0,0,0.15); color: #0b1020; padding: 0.6rem 1rem; border-radius: 12px; text-decoration: none; }
.cta-actions .btn-dark { background: #0f172a; color: #fff; padding: 0.6rem 1rem; border-radius: 12px; text-decoration: none; }
@media (max-width: 720px) { .cta-inner { flex-direction: column; align-items: flex-start; } }

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  body { background: #0b0f1a; color: #e5e7eb; }
  header { background: rgba(17, 24, 39, 0.75); color: #e5e7eb; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .brand { color: #ffffff; }
  nav a, .main-nav a { color: #e5e7eb; }
  nav a:hover, .main-nav a:hover { color: #ffffff; }
  nav ul ul, .submenu { background: #111827; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
  nav ul ul a:hover, .submenu a:hover { background: rgba(255,255,255,0.06); }
  


  main { background: transparent; }
  h1, h2, h3, h4, h5, h6 { color: #ffffff; }
  h1 { color: #f9fafb; }
  h2 { color: #e5e7eb; border-bottom-color: rgba(255,255,255,0.1); }
  h3 { color: #d1d5db; }
  h4 { color: #9ca3af; }
  h5 { color: #6b7280; }
  h6 { color: #4b5563; }
  p { color: #cbd5e1; }
  a { color: var(--color-accent); }
  blockquote { background: #0f172a; border-left-color: var(--color-accent); }
  pre { background: #0f172a; color: #e5e7eb; border-color: rgba(255,255,255,0.08); }

  .button, .btn { background: #e5e7eb; color: #111827; border-color: #e5e7eb; }
  .button:hover, .btn:hover { background: #ffffff; border-color: #ffffff; }
  .btn-primary { background: #e5e7eb; color: #111827; border-color: #e5e7eb; }
  .btn-primary:hover { background: #ffffff; border-color: #ffffff; }
  .btn-secondary { background: transparent; color: #e5e7eb; border-color: rgba(255,255,255,0.18); }

  .hero { background: transparent; }
  .hero .eyebrow { background: transparent; border-color: rgba(255,255,255,0.18); color: #94a3b8; }
  .hero .stats { color: #94a3b8; }

  .hero-banner img { border-color: rgba(255,255,255,0.12); box-shadow: 0 10px 24px rgba(0,0,0,0.45); }

  .features .section-lead { color: #94a3b8; }
  .feature-card { background: #0f172a !important; border: 1px solid rgba(255,255,255,0.12) !important; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.4) !important; }
  .feature-card p { color: #e2e8f0 !important; }
  .feature-card h3 { color: #f1f5f9 !important; }
  .feature-icon { background: #e5e7eb; color: #111827; }

  .logos .logo-item { opacity: 0.8; filter: grayscale(1) brightness(1.2); }

  footer { background: #0b0f1a; color: #9ca3af; border-top: 1px solid rgba(255,255,255,0.08); }
  .cta-inner { background: #0f172a; border: 1px solid rgba(255,255,255,0.08); color: #e5e7eb; }
  .cta-title { color: #ffffff; }
  .cta-actions .btn-outline { border-color: rgba(255,255,255,0.25); color: #e5e7eb; }
  .cta-actions .btn-dark { background: #e5e7eb; color: #111827; }
}

/* Forced theme overrides via data-theme attribute */
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: #0b0f1a; color: #e5e7eb; }
:root[data-theme="dark"] header { background: rgba(17, 24, 39, 0.75); color: #e5e7eb; border-bottom: 1px solid rgba(255,255,255,0.08); }
:root[data-theme="dark"] .brand { color: #ffffff; }
:root[data-theme="dark"] nav a, :root[data-theme="dark"] .main-nav a { color: #e5e7eb; }
:root[data-theme="dark"] nav a:hover, :root[data-theme="dark"] .main-nav a:hover { color: #ffffff; }
:root[data-theme="dark"] nav ul ul, :root[data-theme="dark"] .submenu { background: #111827; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
:root[data-theme="dark"] nav ul ul a:hover, :root[data-theme="dark"] .submenu a:hover { background: rgba(255,255,255,0.06); }


:root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3, :root[data-theme="dark"] h4, :root[data-theme="dark"] h5, :root[data-theme="dark"] h6 { color: #ffffff; }
:root[data-theme="dark"] h1 { color: #f9fafb; }
:root[data-theme="dark"] h2 { color: #e5e7eb; border-bottom-color: rgba(255,255,255,0.1); }
:root[data-theme="dark"] h3 { color: #d1d5db; }
:root[data-theme="dark"] h4 { color: #9ca3af; }
:root[data-theme="dark"] h5 { color: #6b7280; }
:root[data-theme="dark"] h6 { color: #4b5563; }
:root[data-theme="dark"] p { color: #cbd5e1; }
:root[data-theme="dark"] blockquote { background: #0f172a; border-left-color: var(--color-accent); }
:root[data-theme="dark"] pre { background: #0f172a; color: #e5e7eb; border-color: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .button, :root[data-theme="dark"] .btn { background: #e5e7eb; color: #111827; border-color: #e5e7eb; }
:root[data-theme="dark"] .btn-primary { background: #e5e7eb; color: #111827; border-color: #e5e7eb; }
:root[data-theme="dark"] .btn-secondary { background: transparent; color: #e5e7eb; border-color: rgba(255,255,255,0.18); }
:root[data-theme="dark"] .hero { background: transparent; }
:root[data-theme="dark"] .hero .eyebrow { background: transparent; border-color: rgba(255,255,255,0.18); color: #94a3b8; }
:root[data-theme="dark"] .hero .stats { color: #94a3b8; }
:root[data-theme="dark"] .hero-banner img { border-color: rgba(255,255,255,0.12); box-shadow: 0 10px 24px rgba(0,0,0,0.45); }
:root[data-theme="dark"] .features .section-lead { color: #94a3b8; }
:root[data-theme="dark"] .feature-card { background: #0f172a !important; border: 1px solid rgba(255,255,255,0.12) !important; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.4) !important; }
:root[data-theme="dark"] .feature-card p { color: #e2e8f0 !important; }
:root[data-theme="dark"] .feature-card h3 { color: #f1f5f9 !important; }
:root[data-theme="dark"] .feature-icon { background: #e5e7eb; color: #111827; }
:root[data-theme="dark"] .logos .logo-item { opacity: 0.8; filter: grayscale(1) brightness(1.2); }
:root[data-theme="dark"] footer { background: #0b0f1a; color: #9ca3af; border-top: 1px solid rgba(255,255,255,0.08); }
:root[data-theme="dark"] .cta-inner { background: #0f172a; border: 1px solid rgba(255,255,255,0.08); color: #e5e7eb; }
:root[data-theme="dark"] .cta-title { color: #ffffff; }

:root[data-theme="light"] {
  color-scheme: light;
}
/* Force light values to override system dark media rules */
:root[data-theme="light"] body { background: #ffffff; color: #0a0a0a; }
:root[data-theme="light"] header { background: #ffffff; color: #111827; border-bottom: 1px solid var(--color-border); }
:root[data-theme="light"] .brand { color: #0a0a0a; }
:root[data-theme="light"] nav a, :root[data-theme="light"] .main-nav a { color: #111827; }
:root[data-theme="light"] nav a:hover, :root[data-theme="light"] .main-nav a:hover { color: #000000; }
:root[data-theme="light"] nav ul ul, :root[data-theme="light"] .submenu { background: #ffffff; border: 1px solid var(--color-border); box-shadow: 0 12px 28px rgba(0,0,0,0.06); }
:root[data-theme="light"] nav ul ul a:hover, :root[data-theme="light"] .submenu a:hover { background: rgba(0,0,0,0.04); }


:root[data-theme="light"] h1, :root[data-theme="light"] h2, :root[data-theme="light"] h3, :root[data-theme="light"] h4, :root[data-theme="light"] h5, :root[data-theme="light"] h6 { color: #0a0a0a; }
:root[data-theme="light"] h1 { color: #111827; }
:root[data-theme="light"] h2 { color: #1f2937; border-bottom-color: var(--color-border); }
:root[data-theme="light"] h3 { color: #374151; }
:root[data-theme="light"] h4 { color: #4b5563; }
:root[data-theme="light"] h5 { color: #6b7280; }
:root[data-theme="light"] h6 { color: #9ca3af; }
:root[data-theme="light"] p { color: #374151; }
:root[data-theme="light"] blockquote { background: #f3f5ff; border-left-color: var(--color-accent); }
:root[data-theme="light"] pre { background: #f8fafc; color: #0b1020; border-color: var(--color-border); }
:root[data-theme="light"] .button, :root[data-theme="light"] .btn { background: #111827; color: #ffffff; border-color: #111827; }
:root[data-theme="light"] .btn-primary { background: #111827; color: #ffffff; border-color: #111827; }
:root[data-theme="light"] .btn-secondary { background: transparent; color: #111827; border-color: var(--color-border); }
:root[data-theme="light"] .hero { background: #ffffff; }
:root[data-theme="light"] .hero .eyebrow { background: #ffffff; border-color: var(--color-border); color: var(--color-muted); }
:root[data-theme="light"] .hero .stats { color: var(--color-muted); }
:root[data-theme="light"] .hero-banner img { border-color: var(--color-border); box-shadow: var(--shadow-md); }
:root[data-theme="light"] .features .section-lead { color: var(--color-muted); }
:root[data-theme="light"] .feature-card { background: #ffffff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
:root[data-theme="light"] .feature-card p { color: var(--color-muted); }
:root[data-theme="light"] .feature-icon { background: #111827; color: #ffffff; }
:root[data-theme="light"] .logos .logo-item { opacity: 0.6; filter: grayscale(1); }
:root[data-theme="light"] footer { background: #ffffff; color: #6b7280; border-top: 1px solid var(--color-border); }
:root[data-theme="light"] .cta-inner { background: #f5f7fb; border: 1px solid var(--color-border); color: #0b1020; }
:root[data-theme="light"] .cta-title { color: #111827; }

/* Features Grid Container */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 1rem;
    width: 100%;
    margin: 2rem 0;
}



/* Manifesto Grid - Simple 2x4 layout */
.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .manifesto-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature Cards - Basic styling */
.feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    min-height: 120px;
}

/* Style the h3 headers within feature cards */
.feature-card h3 {
    background: none;
    border: none;
    padding: 0 0 1rem 0;
    margin: 0 0 1rem 0;
    box-shadow: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    text-align: center;
    width: 100%;
    display: block;
}

/* Style the description text within feature cards */
.feature-card p {
    margin: 0 !important;
    padding: 0 !important;
    color: #4a5568 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

/* Hover effects for feature cards */
.feature-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
    border-color: #cbd5e1 !important;
}

/* Create a container for the features that will force the grid layout */
.parallax-section + h2 + p {
    display: block !important;
    clear: both !important;
    margin-bottom: 2rem !important;
}

/* Force the first feature card to start a new line */
.parallax-section + h2 + p + .feature-card {
    clear: both !important;
}

/* Responsive grid adjustments */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    }
}

@media (max-width: 560px) {
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .feature-card {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
}

/* Center CTA buttons on home page */
.cta-buttons {
    text-align: center;
    margin: 2rem 0;
}

.cta-buttons .btn,
.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
    display: inline-block;
    margin: 0 0.5rem;
}

/* Center specific sections */
h2 + p:has(.btn-primary),
h2 + p:has(.btn-secondary) {
    text-align: center;
}

/* Alternative approach for browsers that don't support :has() */
.centered-cta {
    text-align: center;
    margin: 2rem 0;
}

.centered-cta .btn,
.centered-cta .btn-primary,
.centered-cta .btn-secondary {
    display: inline-block;
    margin: 0 0.5rem;
    vertical-align: middle;
}

/* Ensure buttons have consistent spacing when centered */
.centered-cta .btn + .btn {
    margin-left: 1rem;
}

/* Hero section button centering */
.hero .actions {
    text-align: center;
    margin-top: 2rem;
}

.hero .actions .btn {
    margin: 0 0.5rem;
}

/* Blog post styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.post-header h1 {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-meta {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.post-meta time {
    font-style: italic;
}

.post-content {
    line-height: 1.7;
    color: var(--color-text);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent);
    background: rgba(108, 99, 255, 0.05);
    border-radius: 8px;
}

.post-content code {
    background: rgba(108, 99, 255, 0.1);
    color: var(--color-accent-700);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.prev-post,
.next-post {
    color: var(--color-accent);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.prev-post:hover,
.next-post:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Dark mode blog post styles */
@media (prefers-color-scheme: dark) {
    .post-content blockquote {
        background: rgba(108, 99, 255, 0.1);
    }
    
    .post-content pre {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .post-content code {
        background: rgba(108, 99, 255, 0.2);
    }
}

:root[data-theme="dark"] .post-content blockquote {
    background: rgba(108, 99, 255, 0.1);
}

:root[data-theme="dark"] .post-content pre {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .post-content code {
    background: rgba(108, 99, 255, 0.2);
}

/* Responsive blog post styles */
@media (max-width: 768px) {
    .blog-post {
        padding: 1rem 0;
    }
    
    .post-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .prev-post,
    .next-post {
        width: 100%;
        text-align: center;
    }
}

/* Force manifesto and export cards to stack on mobile */
@media (max-width: 768px) {
    /* Override any grid layouts to force single column on mobile */
    .grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
    
    /* Specific targeting for manifesto and export sections */
    [id*="manifesto-section"] .grid,
    [id*="export-section"] .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Ensure cards take full width on mobile */
    .grid > div {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    /* Override any inline styles that might be preventing stacking */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="repeat(2"] {
        grid-template-columns: 1fr !important;
    }
}

/* Additional mobile-first responsive rules */
@media (max-width: 480px) {
    /* Extra small screens - ensure single column */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* Reduce padding on cards for mobile */
    .grid > div {
        padding: 1rem !important;
    }
    
    /* Ensure text is readable on mobile */
    .grid > div h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .grid > div p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}
