/* ==========================================================================
   DigestPaper Media - Main Stylesheet
   Consolidated from multiple CSS files - September 17, 2025
   ========================================================================== */

/* Utility classes */
.svg-sprite {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
}

.inline-block-middle {
  display: inline-block;
  vertical-align: middle;
}

.hero-stats {
  margin-top: 1rem;
}

.hero-cta {
  margin-top: 2rem;
}

.portfolio-section {
  margin-top: 1rem;
}

.grid-item {
  grid-template-columns: 1fr auto;
}

.auth-hidden {
  display: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.responsive-logo {
  max-width: 330px;
  height: auto;
}

.auth-widget-container {
  margin-top: 3rem;
  text-align: center;
}

.auth-logged-out {
  display: block;
}

.auth-logged-in {
  display: none;
}

.auth-widget-container {
  margin-top: 3rem;
  text-align: center;
}

.auth-logged-out {
  display: block;
}

.auth-logged-in {
  display: none;
}

/* ==========================================================================
   Base styles and variables
   ========================================================================== */

/* Accessible base tokens */
:root {
  --background: #0f1419;
  --fg: #fff; /* on dark background: pure white for 15:1 ratio */
  --fg-alt: #f1f5f9;
  --muted: #c4c9d2; /* improved from b0b8c4 for contrast vs card */
  --muted-strong: #d8dde4;
  --accent: #8856ff; /* higher saturation for focus elements */
  --accent-hover: #a98dff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --ink: #0f1419; /* text placed on accent backgrounds */
  --card: #1a2230; /* opaque to stabilize contrast & CLS */
  --card-hover: #223041;
  --ring: #38bdf8;
  --border: #314057;
  --border-soft: #2a384b;
  --shadow: 0 2px 4px rgb(0 0 0 / 40%);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%);
  --nav-bg: #121a24;
  --nav-fg: #fff;
  --nav-ring: rgb(56 189 248 / 55%);
  --menu-shadow: 0 14px 40px rgb(0 0 0 / 35%);
  --accent-light: rgb(136 86 255 / 12%);
  --focus-outline: 2px solid #8856ff;
}

[data-theme="light"] {
  --bg: #fff;
  --fg: #111827; /* near-black */
  --fg-alt: #1f2937;
  --muted: #4b5563;
  --muted-strong: #374151;
  --accent: #5b21b6;
  --accent-hover: #6d28d9;
  --ink: #fff;
  --card: #fff;
  --card-hover: #f8fafc;
  --ring: #3b82f6;
  --border: #d1d5db;
  --border-soft: #e2e8f0;
  --shadow: 0 2px 4px rgb(0 0 0 / 8%);
  --accent-light: rgb(91 33 182 / 10%);
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --accent: #bf94ff;
    --accent-hover: #d9c4ff;
    --border: #466789;
    --card: #16202a;
    --card-hover: #1e2b38;
  }

  [data-theme="light"] {
    --accent: #4c14ad;
    --accent-hover: #5e1fd1;
    --border: #334155;
    --card: #fff;
    --card-hover: #f1f5f9;
  }
}

[data-theme="dark"] {
  --nav-bg: #0f172a;
  --nav-fg: #e5e7eb;
  --menu-shadow: 0 14px 40px rgb(0 0 0 / 60%);
}

* {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
button,
small,
li {
  font-family:
    Montserrat,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-feature-settings: "cv01", "cv02", "cv03", "cv04";
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Accessible link styling */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Icons turn white on hover - JavaScript handles the hover effect */
.cta:hover svg,
.cta:hover svg *,
.cta:hover svg use,
.cta:hover svg path,
.cta:hover svg g,
.cta:hover svg circle,
.cta:hover svg rect,
.cta:hover svg polygon,
.nav__link:hover svg,
.nav__link:hover svg *,
.nav__link:hover svg use,
.nav__link:hover svg path,
.nav__link:hover svg g,
.nav__link:hover svg circle,
.nav__link:hover svg rect,
.nav__link:hover svg polygon,
.dropdown__link:hover svg,
.dropdown__link:hover svg *,
.dropdown__link:hover svg use,
.dropdown__link:hover svg path,
.dropdown__link:hover svg g,
.dropdown__link:hover svg circle,
.dropdown__link:hover svg rect,
.dropdown__link:hover svg polygon {
  fill: white !important;
  color: white !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

/* Additional icon targeting on hover - MAXIMUM SPECIFICITY */
.cta:hover .icon,
.cta:hover [class*="icon-"],
.cta:hover i,
.nav__link:hover .icon,
.nav__link:hover [class*="icon-"],
.nav__link:hover i,
.dropdown__link:hover .icon,
.dropdown__link:hover [class*="icon-"],
.dropdown__link:hover i {
  fill: white !important;
  color: white !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

/* Ensure enhanced icons turn white on hover - ULTIMATE PRIORITY */
.cta:hover .enhanced-icon,
.cta:hover .enhanced-icon *,
.cta:hover .enhanced-icon use,
.cta:hover svg[class*="enhanced"],
.cta:hover svg[data-enhanced="true"],
.cta:hover svg[data-enhanced="true"] *,
.cta:hover svg[data-enhanced="true"] use,
.nav__link:hover .enhanced-icon,
.nav__link:hover .enhanced-icon *,
.nav__link:hover .enhanced-icon use,
.nav__link:hover svg[class*="enhanced"],
.nav__link:hover svg[data-enhanced="true"],
.nav__link:hover svg[data-enhanced="true"] *,
.nav__link:hover svg[data-enhanced="true"] use,
.dropdown__link:hover .enhanced-icon,
.dropdown__link:hover .enhanced-icon *,
.dropdown__link:hover .enhanced-icon use,
.dropdown__link:hover svg[class*="enhanced"],
.dropdown__link:hover svg[data-enhanced="true"],
.dropdown__link:hover svg[data-enhanced="true"] *,
.dropdown__link:hover svg[data-enhanced="true"] use {
  fill: white !important;
  color: white !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

/* Force white on hover for all button content - NUCLEAR OPTION */
.cta:hover *,
.nav__link:hover *,
.dropdown__link:hover * {
  fill: white !important;
  color: white !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  contain: layout; /* Improve layout performance */
}

@media (width <= 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Tablet header optimizations */
  .nav__data {
    gap: 0.75rem;
  }

  .hdr {
    gap: 1.5rem;
  }

  /* Hide less important navigation elements */
  .nav__menu .nav__link[href*="tips"],
  .nav__menu .nav__link[href*="labs"] {
    display: none;
  }
}

/* Main content spacing to avoid sticky header overlap */
main {
  display: block !important;
  visibility: visible !important;
  padding-top: 1rem;
  min-height: calc(100vh - 8rem); /* More stable height calculation */
  height: auto;
  contain: layout style; /* Comprehensive containment */
  will-change: auto; /* Optimize for layout stability */
  position: relative; /* Establish positioning context */
  overflow-x: hidden; /* Prevent horizontal shifts */
}

/* Prevent layout shifts from dynamic content */
main * {
  contain: layout style; /* Isolate layout changes */
}

/* Ensure all content sections are visible */
.content-grid,
.container,
section,
.hero,
.grid,
.card {
  display: block !important;
  visibility: visible !important;
}

/* Force display for critical content elements */
main#main,
.hero,
.grid,
.card,
section[id*="portfolio"],
.brands,
.portfolio-brand {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix grid display specifically */
.grid {
  display: grid !important;
}

/* Ensure stable container dimensions */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  contain: layout; /* Improve layout performance */
  position: relative; /* Prevent reflow */
  display: block !important;
  visibility: visible !important;
}

/* Reserve space for dynamic content containers */
#categories-container {
  min-height: 400px;
  contain: layout;
}

#articles-container {
  min-height: 300px;
  contain: layout;
}

#news-flash-content {
  min-height: 60px;
  contain: layout;
}

.flasher-content {
  min-height: 60px;
  contain: layout;
}

/* ==========================================================================
   Navigation styles
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(15 20 25 / 95%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid;
  border-image: var(--gradient-primary) 1;
  box-shadow: 0 1px 3px var(--shadow);
}

[data-theme="light"] .header {
  background: rgb(255 255 255 / 95%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav__data {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transition: transform 0.2s ease;
}

.nav__logo-img:hover {
  transform: scale(1.05);
}

/* Prevent font loading layout shifts */

/* Removed invalid global font-display declaration (font-display only valid inside @font-face) */

/* (Previously: * { font-display: swap; }) */

/* Font loading optimization - prevent FOUT/FOIT */
@font-face {
  font-family: Montserrat;
  font-display: swap;
  font-weight: 400 800;
  src: local("Montserrat");
}

@font-face {
  font-family: Poppins;
  font-display: swap;
  font-weight: 400 700;
  src: local("Poppins");
}

/* Ensure stable image dimensions */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: auto; /* Let content determine aspect ratio */
  display: block; /* Prevent inline spacing issues */
}

/* Specific image stability */
.brand-figure img {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 10%);
  transition: transform 0.3s ease;
  width: 330px;
  height: 330px;
  object-fit: cover;
  aspect-ratio: 1/1;
  display: block; /* Prevent layout shifts */
}

/* Navigation logo stability */
.nav__logo-img,
.logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transition: transform 0.2s ease;
  display: block; /* Prevent layout shifts */
  aspect-ratio: 1/1;
  object-fit: cover;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  contain: layout style;
}

/* Mobile menu toggle stable dimensions */
#mobile-menu-toggle {
  width: 44px;
  height: 44px;
  contain: layout style;
  position: relative;
}

#mobile-menu-toggle .hamburger-line {
  width: 28px;
  height: 3px;
  contain: layout;
  display: block;
  margin: 5px auto;
  transition: all 0.3s ease;
  background-color: currentcolor;
}

.nav__burger,
.nav__close {
  font-size: 1.25rem;
  color: var(--fg);
  transition: color 0.3s ease;
}

.nav__close {
  display: none;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  color: var(--nav-fg);
  box-shadow: 0 1px 0 rgb(0 0 0 / 2%);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.nav__link:hover {
  box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
  transform: translateY(-1px);
  text-decoration: none;
}

.nav__link--active {
  background: var(--accent);
  color: var(--ink);
}

.dropdown__item {
  position: relative;
}

.dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 18rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  box-shadow: var(--menu-shadow);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown__item.show-dropdown .dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  color: var(--nav-fg);
  text-decoration: none;
  transition: all 0.15s ease;
}

.dropdown__link:hover {
  background: rgb(135 116 134 / 20%);
  text-decoration: none;
}

.dropdown__link--active {
  background: rgb(135 116 134 / 20%);
}

.dropdown__arrow {
  margin-left: 0.25rem;
  transition: transform 0.3s ease;
}

.dropdown__item.show-dropdown .dropdown__arrow {
  transform: rotate(180deg);
}

.nav__buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.change-theme {
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--card);
}

.change-theme:hover {
  background: var(--accent);
  color: var(--ink);
  transform: scale(1.05);
}

.btn--cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(128 59 246 / 30%);
}

.btn--cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(128 59 246 / 40%);
  color: #fff;
  text-decoration: none;
}

/* Dropdown triggers (bright like Login) */
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 10%);
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
  transition:
    transform 0.06s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
  font-weight: 500;
}

.nav-trigger:hover {
  box-shadow: 0 8px 25px rgb(0 0 0 / 20%);
  transform: translateY(-2px);
  background: rgb(255 255 255 / 15%);
  border-color: rgb(255 255 255 / 30%);
}

.nav-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--nav-ring);
}

.nav-trigger:hover > i,
.nav-trigger:hover > span {
  background: var(--gradient-primary);
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.nav-menu a:hover {
  background: rgb(135 116 134 / 20%) !important;
}

.nav-menu a:hover i {
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

.nav-menu a:hover span {
  background: var(--gradient-primary) !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.nav-menu a:focus {
  background: #87748631;
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 18rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  box-shadow: var(--menu-shadow);
  list-style: none;
}

.nav-menu[hidden] {
  display: none;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  color: var(--nav-fg);
  text-decoration: none;
  transition: all 0.15s ease;
}

/* Login button styling - now consistent with other nav triggers */
.nav-login {
  margin-left: 1rem;
}

/* Settings button styling - consistent with other nav triggers */
.nav-settings {
  margin-left: 0.5rem;
}

/* Mobile Navigation */
@media (width <= 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--card);
    flex-direction: column;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav__menu.show-menu {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 2rem;
  }

  .nav__menu.show-menu .nav__close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .nav__menu.show-menu .nav__burger {
    display: none;
  }

  .dropdown__menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 1rem;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .nav__link {
  border-color: rgb(255 255 255 / 10%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 2%);
}

[data-theme="dark"] .dropdown__menu {
  border-color: rgb(255 255 255 / 10%);
  background: #0f172a;
}

[data-theme="dark"] .dropdown__link {
  color: #e5e7eb;
}

[data-theme="dark"] .dropdown__link:hover {
  background: #87748660;
}

@media (prefers-color-scheme: dark) {
  .nav-trigger {
    border-color: rgb(255 255 255 / 10%);
    box-shadow: 0 1px 0 rgb(255 255 255 / 2%);
  }

  .nav-menu {
    border-color: rgb(255 255 255 / 10%);
    background: #0f172a;
  }

  .nav-menu a {
    color: #e5e7eb;
  }

  .nav-menu a:hover {
    background: #8774860a;
  }
}

/* Theme toggle (inline with navigation) */
.nav-theme {
  margin-left: 0.5rem;
}

.theme-toggle-nav {
  background: var(--nav-bg);
  color: var(--nav-fg);
  border: 1px solid rgb(2 6 23 / 10%);
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  padding: 0.55rem 0.9rem;
}

.theme-toggle-nav:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
}

/* Remove old header-theme-toggle styles */
.header-theme-toggle {
  display: none;
}

#theme-toggle,
.theme-toggle-btn {
  /* Keep base styles but override for nav version */
}

#theme-toggle.theme-toggle-nav {
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  padding: 0.55rem 0.9rem;
}

/* ==========================================================================
   Header and logo styles - Redesigned Header
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(15 20 25 / 95%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid;
  border-image: var(--gradient-primary) 1;
  box-shadow: 0 1px 3px var(--shadow);
}

[data-theme="light"] header {
  background: rgb(255 255 255 / 95%);
}

.hdr {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  backdrop-filter: blur(8px);
}

#site-title {
  text-align: center !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  font-size: 4.5rem !important;   /* much bigger */
  font-weight: 900 !important;  /* bolder */
  background: var(--gradient-primary) !important; /* use gradient */ /* clip to text */
  background-clip: text !important; /* webkit support */
  -webkit-text-fill-color: transparent !important; /* make text transparent for gradient */
  color: transparent !important; /* fallback transparent */
}

#site-title .tagline {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

/* Three-zone header layout */
.header-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Brand section (left) */
.header-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  border-radius: 0.5rem;
}

.brand-text {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
}

/* Navigation section (center) */
.header-nav .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.header-nav .nav-dropdown {
  position: relative;
}

.header-nav .nav-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.header-nav .nav-trigger:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--text-primary);
}

.header-nav .nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 200px;
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(255 255 255 / 10%);
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgb(0 0 0 / 30%);
  list-style: none;
}

.header-nav .nav-menu[hidden] {
  display: none;
}

.header-nav .nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.header-nav .nav-menu a:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--text-primary);
}

/* Controls section (right) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-item {
  position: relative;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.375rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
  font-size: 0.875rem;
}

.control-btn:hover {
  background: rgb(255 255 255 / 10%);
  color: var(--text-primary);
}

.btn-text {
  font-size: 0.875rem;
}

.chevron {
  opacity: 0.6;
  font-size: 0.75rem;
}

/* Mobile responsive */
@media (width <= 768px) {
  .header-nav {
    display: none;
  }

  .brand-text {
    display: none;
  }

  .btn-text {
    display: none;
  }

  .header-layout {
    gap: 1rem;
  }
}

/* Language selector dropdown */
.language-selector {
  position: relative;
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgb(0 0 0 / 30%);
  backdrop-filter: blur(16px);
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  list-style: none;
  z-index: 1000;
}

.language-menu[hidden] {
  display: none;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.language-option:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--text-primary);
}

.language-option .flag-icon {
  font-size: 1rem;
}

/* Auth widget styling */
.auth-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--secondary-color, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Mobile navigation */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid rgb(255 255 255 / 10%);
  backdrop-filter: blur(16px);
  z-index: 999;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-content {
  padding: 1rem 0;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.mobile-nav-link:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--text-primary);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 3px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

@media (width <= 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Theme button specific styling */
.theme-btn {
  padding: 0.5rem;
  border-radius: 50%;
}

.theme-btn:hover {
  transform: rotate(180deg);
}

/* Header content styles - updated layout */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
}

/* Brand/Logo styling - bigger */
.logo .brand a {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
}

.logo .brand a:hover {
  color: var(--accent);
}

/* Navigation controls container */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Control buttons - smaller than main nav items */
.nav-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  color: var(--nav-fg);
  box-shadow: 0 1px 0 rgb(0 0 0 / 2%);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-control-btn:hover {
  box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Header authentication widget styles */
.header-auth {
  margin: 0;
  margin-left: auto;
}

.header-auth .auth-logged-out,
.header-auth .auth-logged-in {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-auth .cta {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.header-auth .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.header-auth .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

@media (width <= 768px) {
  .header-auth {
    display: none; /* Hide on mobile to save space */
  }
}

.mobile-menu-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

@media (width >= 769px) {
  .mobile-menu-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transition: transform 0.2s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.logo .brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  background: var(--gradient-primary);
  background-clip: text;
}

.logo small {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Language Selector
   ========================================================================== */
.language-selector {
  position: relative;
  margin-left: 1rem;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  color: var(--nav-fg);
  box-shadow: 0 1px 0 rgb(0 0 0 / 2%);
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.language-trigger:hover {
  box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
  transform: translateY(-1px);
}

.language-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--nav-ring);
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 12rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(2 6 23 / 10%);
  background: var(--nav-bg);
  box-shadow: var(--menu-shadow);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.language-selector[aria-expanded="true"] .language-menu,
.language-trigger[aria-expanded="true"] + .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  background: transparent;
  border: none;
  color: var(--nav-fg);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 0.875rem;
}

.language-option:hover {
  background: rgb(135 116 134 / 20%);
}

.language-option.active {
  background: rgb(135 116 134 / 30%);
  font-weight: 600;
}

.flag-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.current-language {
  font-weight: 500;
}

/* Dark theme adjustments */
[data-theme="dark"] .language-trigger {
  border-color: rgb(255 255 255 / 10%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 2%);
}

[data-theme="dark"] .language-menu {
  border-color: rgb(255 255 255 / 10%);
  background: #0f172a;
}

[data-theme="dark"] .language-option {
  color: #e5e7eb;
}

[data-theme="dark"] .language-option:hover {
  background: #87748660;
}

/* Mobile adjustments for language selector */
@media (width <= 768px) {
  .language-selector {
    margin-left: 0.5rem;
  }

  .language-trigger {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .language-menu {
    min-width: 10rem;
    right: -1rem;
  }
}

@media (width <= 480px) {
  .language-selector {
    margin-left: 0.25rem;
  }

  .language-trigger {
    padding: 0.35rem 0.5rem;
    gap: 0.25rem;
  }

  .current-language {
    display: none;
  }

  .language-menu {
    min-width: 8rem;
    right: -0.5rem;
  }
}

/* ==========================================================================
   Content and cards
   ========================================================================== */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  transform: none !important; /* Override AOS transform that causes overlap */
  min-height: 600px; /* Prevent hero layout shift */
  contain: layout; /* Isolate layout */
  display: flex !important;
  visibility: visible !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 1rem 0 0.1rem;
  letter-spacing: -0.025em;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h2 {
  margin-top: 0.1rem;
  margin-bottom: 1rem;
}

.hero p {
  color: #d1d5db;
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 1rem;
  line-height: 1.7;
}

[data-theme="light"] .hero p {
  color: #374151;
}

.badge {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgb(16 185 129 / 30%);
  margin-bottom: 1rem;
  min-height: 2.5rem; /* Prevent layout shift */
  min-width: 6rem; /* Prevent layout shift */
  justify-content: center;
}

.brand-figure {
  text-align: center;
  margin: 1rem auto 2rem;
  width: 330px;
  height: 330px;
  contain: layout; /* Prevent layout shifts */
}

.brand-figure img {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 10%);
  transition: transform 0.3s ease;
  width: 330px;
  height: 330px;
  object-fit: cover;
  aspect-ratio: 1/1;
}

.brand-figure img:hover {
  transform: scale(1.05);
}

.grid {
  display: grid;
  gap: 1.5rem;
  margin: 3rem 0;
}

@media (width >= 768px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.card {
  background: var(--card);
  border: 1px solid rgb(100 85 135 / 60%);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--card);
  border-color: #ffffff8c;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 5%);
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--fg);
}

.card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

[data-theme="light"] .card p {
  color: var(--muted-strong);
}

/* Section title generic (add if missing) */
.section-title,
h2.section-title {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Note / subtitle text */
.note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

[data-theme="light"] .note {
  color: var(--muted-strong);
}

.cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(128 59 246 / 30%);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(128 59 246 / 40%);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 64%);
  text-decoration: none;
}

.cta.secondary {
  background: var(--card, #1e293b); /* Fallback for better contrast */
  color: var(--fg, #fff);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px rgb(0 0 0 / 40%);
}

.cta.secondary:hover,
.cta.secondary:focus-visible {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  text-decoration: none;
}

[data-theme="light"] .cta.secondary {
  color: #111827; /* Use darker color for better contrast */
  background: #f8fafc; /* Light background for better contrast */
  border-color: var(--accent);
}

[data-theme="light"] .cta.secondary:hover {
  color: var(--ink);
}

.cta.secondary:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 3px;
}

/* High contrast preference enhances secondary CTA visibility */
@media (prefers-contrast: more) {
  .cta.secondary {
    background: var(--ink);
    color: var(--accent);
    border-color: var(--accent);
  }

  .cta.secondary:hover,
  .cta.secondary:focus-visible {
    background: var(--accent);
    color: var(--ink);
  }
}

/* Gradient text fallback: ensure readable color when gradients not applied */
.gradient-text {
  color: var(--accent);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .gradient-text {
    color: transparent;
  }
}

/* Portfolio brand paragraph contrast */
.portfolio-brand p {
  color: var(--muted);
}

[data-theme="light"] .portfolio-brand p {
  color: var(--muted-strong);
}

/* Newsletter input refinement */
#newsletter input[type="email"] {
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--border);
}

[data-theme="light"] #newsletter input[type="email"] {
  background: var(--card);
  color: var(--fg-alt);
  border: 2px solid var(--border);
}

#newsletter input[type="email"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Fallback alert (ensure contrast) */
#fallback-message {
  color: var(--fg);
}

.card .cta {
  align-self: center;
  margin-top: auto;
}

/* ==========================================================================
   Portfolio / brands grid
   ========================================================================== */
.brands {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.portfolio-brand {
  background: var(--card);
  border: 1px solid rgb(100 85 135 / 60%);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

/* Light mode portfolio brand background - remove custom styling */

/* Uses same background as cards via var(--card) */

.portfolio-brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-brand:hover {
  background: rgb(64 47 80 / 44%) !important;
  border-color: #ffffff8c;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 5%);
}

/* Enhanced portfolio brands hover - highest specificity */
.portfolio-brand[data-enhanced="true"]:hover,
li.portfolio-brand[data-enhanced="true"]:hover {
  background: rgb(64 47 80 / 44%) !important;
  border-color: #ffffff8c;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 5%);
}

/* Light theme specific portfolio brand hover */
[data-theme="light"] .portfolio-brand:hover {
  background: #fff !important;
  border-color: #0000008c;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 5%);
}

/* Light theme enhanced portfolio brands hover */
[data-theme="light"] .portfolio-brand[data-enhanced="true"]:hover,
[data-theme="light"] li.portfolio-brand[data-enhanced="true"]:hover {
  background: #fff !important;
  border-color: #0000008c;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 5%);
}

.portfolio-brand:hover::before {
  opacity: 1;
}

/* Portfolio brand heading uses theme foreground for consistent contrast */
.portfolio-brand h3 {
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}

[data-theme="dark"] .portfolio-brand h3 {
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  background: none;
}

.portfolio-brand h4 {
  color: #94a3b8;
  font-weight: 600;
  font-size: 1rem;
  margin: 0.5rem 0;
}

/* Description text uses muted variable with theme override */
.portfolio-brand p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

[data-theme="light"] .portfolio-brand p {
  color: var(--muted-strong, var(--muted));
}

.portfolio-brand svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: url("#iconGradient");
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Gradient text for special elements */

/* Gradient text with solid fallback for users preferring reduced transparency or high contrast */
.gradient-text {
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(
    --accent
  ); /* Fallback solid color for environments not supporting background-clip */
}

@media (prefers-contrast: more) {
  .gradient-text {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--accent-contrast, var(--accent));
  }
}

/* ==========================================================================
   News Flasher Styles
   ========================================================================== */
.flasher-content {
  white-space: nowrap;
  padding: 2px 5px;
  position: relative;
  margin-top: -3px;
}

#news-flasher {
  width: 100%;
  background: var(--accent-light, rgb(107 33 168 / 10%));
  padding: 10px 0;
  margin: 10px 0 20px;
  border-radius: 8px;
  overflow: hidden;
}

.news-flasher {
  width: 100%;
  position: relative;
}

.flasher-container {
  width: 100%;
  overflow: hidden;
}

.news-ticker {
  display: inline-block;
  white-space: nowrap;
  padding: 5px 0;
  animation-duration: 20s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.news-item {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--accent, #6b21a8);
  font-weight: 500;
  cursor: pointer;
}

.news-item:hover {
  color: var(--accent-hover, #9333ea);
  text-decoration: underline;
}

.news-item-icon {
  flex-shrink: 0;
  margin-right: 6px;
  vertical-align: middle;
  fill: var(--accent, #6b21a8);
  transition: fill 0.2s ease;
}

.news-item:hover .news-item-icon {
  fill: var(--accent-hover, #9333ea);
}

.news-item-text {
  vertical-align: middle;
}

.news-separator {
  display: inline-block;
  color: var(--accent, #6b21a8);
  opacity: 0.7;
}

.loading-spinner {
  text-align: center;
  color: var(--accent, #6b21a8);
  font-weight: 500;
  padding: 5px;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

/* Fix for svg use element namespaces */
svg use {
  pointer-events: none;
}

/* Enhanced SVG icons with accessibility */
.enhanced-icon {
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.enhanced-icon:hover {
  transform: translateY(-1px);
}

/* Ensure hidden microdata doesn't affect layout */
[itemprop] meta {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Enhanced accessibility for screen readers */
.enhanced-icon title,
.enhanced-icon desc {
  display: none; /* Visual hiding, but accessible to screen readers */
}

/* Focus indicators for keyboard navigation */
.enhanced-icon:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .enhanced-icon {
    filter: contrast(1.5);
  }
}

/* Optional fallback for Windows High Contrast */
@media (forced-colors: active) {
  .enhanced-icon {
    forced-color-adjust: auto;
    filter: contrast(1.2);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .enhanced-icon {
    transition: none;
  }

  .enhanced-icon:hover {
    transform: none;
  }
}

/* ==========================================================================
   Article styles and overrides
   ========================================================================== */

/* Article Category Styling */
.article-category {
  display: inline-block;
  padding: 4px 8px;
  background: #000;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.article-category::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #6b21a8, #9333ea);
}

/* Add white border to Nieuws category */
.article-category[data-category="Nieuws"],
.nieuws-category {
  border: 2px solid white !important;
}

/* For news items in the news flasher */
.nieuws-icon {
  border: 2px solid white !important;
  border-radius: 4px;
}

/* Article action buttons */
.article-actions {
  margin-top: 16px;
  padding: 10px 0;
  border-radius: 4px;
}

/* Apply gradient to read-more button */
.article-actions .read-more,
.read-more {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #6b21a8, #9333ea);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-actions .read-more:hover,
.read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(107 33 168 / 40%);
  text-decoration: none;
  color: white;
}

/* ==========================================================================
   Footer styles
   ========================================================================== */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  background: #ffffff;
  border: 1px solid #e5e5e5 !important;
  border-radius: 0;
  position: relative;
  color: #4a5568;
}

[data-theme="dark"] footer {
  background: #1a202c;
  border: 1px solid #2d3748 !important;
  color: #e2e8f0;
}

/* Light mode footer styling */
[data-theme="light"] footer {
  background: #ffffff !important;
  border: 1px solid #e5e5e5 !important;
  color: #4a5568;
}

/* Dark mode footer text styling */
[data-theme="dark"] footer .footer-address [itemprop="streetAddress"],
[data-theme="dark"] footer [itemprop="streetAddress"],
[data-theme="dark"] footer [itemprop="postalCode"],
[data-theme="dark"] footer [itemprop="addressLocality"],
[data-theme="dark"] footer [itemprop="addressCountry"] {
  color: #fff !important;
}

[data-theme="dark"] footer .footer-links a,
[data-theme="dark"] footer .footer-text-muted,
[data-theme="dark"] footer .footer-legal p,
[data-theme="dark"] footer .footer-contact a,
[data-theme="dark"] footer .footer-toplink a {
  color: #fff !important;
}

/* Light mode footer text styling */
[data-theme="light"] footer .footer-address [itemprop="streetAddress"],
[data-theme="light"] footer [itemprop="streetAddress"],
[data-theme="light"] footer [itemprop="postalCode"],
[data-theme="light"] footer [itemprop="addressLocality"],
[data-theme="light"] footer [itemprop="addressCountry"] {
  color: #4a5568 !important;
}

[data-theme="light"] footer .footer-links a,
[data-theme="light"] footer .footer-text-muted,
[data-theme="light"] footer .footer-legal p,
[data-theme="light"] footer .footer-contact a,
[data-theme="light"] footer .footer-toplink a {
  color: #4a5568 !important;
}

/* Ensure ALL paragraph elements in footer are dark gray */
[data-theme="light"] footer p,
[data-theme="light"] footer span,
[data-theme="light"] footer div {
  color: #4a5568 !important;
}

[data-theme="light"] footer .footer-links a:hover,
[data-theme="light"] footer .footer-contact a:hover,
[data-theme="light"] footer .footer-toplink a:hover {
  color: #2d3748 !important;
}

/* Erkenningen icon gradient styling */
[data-theme="dark"] footer .footer-links a[href*="acknowledgments"] svg,
[data-theme="dark"] footer .footer-links a[href*="erkenningen"] svg,
[data-theme="dark"] .erkenningen-icon {
  fill: url("#iconGradient") !important;
}

[data-theme="light"] footer .footer-links a[href*="acknowledgments"] svg,
[data-theme="light"] footer .footer-links a[href*="erkenningen"] svg,
[data-theme="light"] .erkenningen-icon {
  fill: url("#iconGradient") !important;
}

/* Default Erkenningen icon styling (fallback) */
footer .footer-links a[href*="acknowledgments"] svg,
footer .footer-links a[href*="erkenningen"] svg,
.erkenningen-icon {
  fill: url("#iconGradient") !important;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgb(139 82 208 / 28.3%) 0%,
    rgb(118 75 162 / 1%) 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

footer::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgb(109 60 168 / 28.3%) 0%,
    rgb(118 75 162 / 8%) 100%
  );
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
}

.foot {
  display: grid;
  gap: 2rem;
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}

@media (width >= 768px) {
  .foot {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Typography */
.footer-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--fg);
}

.footer-text-muted {
  color: var(--muted);
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Address & contact */
.footer-address {
  margin: 0 0 1rem;
  font-style: normal;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-contact a {
  color: var(--accent, #2563eb);
  text-decoration: none;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Socials */
.footer-socials {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.footer-socials .icon-btn {
  padding: 0.75rem;
  display: inline-flex;
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 10%);
  background: rgb(255 255 255 / 5%);
  transition: all 0.3s ease;
}

.footer-socials .icon-btn svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.footer-socials .icon-btn:hover,
.footer-socials .icon-btn:focus-visible {
  transform: translateY(-2px);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgb(107 33 168 / 30%);
  outline: none;
}

/* Dark mode social icons */
[data-theme="dark"] .footer-socials .icon-btn:hover svg {
  fill: black;
}

/* Light mode social icons */
[data-theme="light"] .footer-socials .icon-btn:hover svg {
  fill: white;
}

/* Utility nav (policies) */
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin: 0.5rem 0;
}

.footer-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted, #6b7280);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--fg, #0f172a);
  text-decoration: underline;
  outline: none;
}

/* Divider & legal line */
.footer-legal {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-legal p {
  margin: 0;
}

.footer-legal .small {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

/* Back to top */
.footer-toplink {
  margin-top: 1rem;
}

.footer-toplink a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-toplink a:hover,
.footer-toplink a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Contact email styling */
.contact-email {
  font-size: 0.9em;
  opacity: 0.8;
  margin-left: 0.5rem;
}

.contact-email:hover {
  opacity: 1;
  text-decoration: none;
}

/* Dark mode styling */
@media (prefers-color-scheme: dark) {
  .contact-email {
    color: white !important;
  }
}

/* Light mode styling */
@media (prefers-color-scheme: light) {
  .contact-email {
    color: black !important;
  }
}

/* Manual theme class overrides */
[data-theme="dark"] .contact-email {
  color: white !important;
}

[data-theme="light"] .contact-email {
  color: black !important;
}

.footer-contactpoint {
  margin-bottom: 1rem;
}

.contact-item {
  line-height: 1.4;
}

/* Contact section headers with gradient styling */
.footer-contact-header {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact-header svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: url("#icon-gradient");
  flex-shrink: 0;
}

/* Contact links styling */
.footer-contactpoint a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-contactpoint a:hover {
  text-decoration: none;
  color: var(--accent-hover);
}

/* Contact email specific styling - keep white */
.footer-contactpoint .contact-email {
  color: white !important;
  font-size: 0.9em;
  opacity: 0.8;
}

.footer-contactpoint .contact-email:hover {
  color: white !important;
  text-decoration: none;
  opacity: 1;
}

/* Dark mode contact links - purple color */
[data-theme="dark"] .footer-contactpoint a {
  color: #b205b9;
}

[data-theme="dark"] .footer-contactpoint a:hover {
  color: #d946ef;
  text-decoration: none;
}

/* Keep email addresses white in dark mode */
[data-theme="dark"] .footer-contactpoint .contact-email {
  color: white !important;
}

[data-theme="dark"] .footer-contactpoint .contact-email:hover {
  color: white !important;
  text-decoration: none;
}

/* Light mode contact links */
[data-theme="light"] .footer-contactpoint a {
  color: #7c3aed;
}

[data-theme="light"] .footer-contactpoint a:hover {
  color: #8b5cf6;
  text-decoration: none;
}

/* Keep email addresses dark in light mode */
[data-theme="light"] .footer-contactpoint .contact-email {
  color: #000 !important;
}

[data-theme="light"] .footer-contactpoint .contact-email:hover {
  color: #000 !important;
  text-decoration: none;
}

/* Enhanced back to top button */
.footer-toplink {
  margin-top: 1.5rem;
  text-align: center;
}

.footer-toplink a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  transition: all 0.3s ease;
}

.footer-toplink a:hover,
.footer-toplink a:focus-visible {
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(107 33 168 / 30%);
  outline: none;
}

.footer-toplink svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentcolor;
  transition: all 0.3s ease;
}

/* Dark mode specific styling for TOP button */
[data-theme="dark"] .footer-toplink a:hover {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 30%);
}

[data-theme="dark"] .footer-toplink a:hover svg {
  fill: url("#icon-gradient");
}

[data-theme="dark"] .footer-toplink a:hover {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Light mode specific styling for TOP button */
[data-theme="light"] .footer-toplink a:hover {
  background: rgb(0 0 0 / 10%);
  border-color: rgb(0 0 0 / 30%);
}

[data-theme="light"] .footer-toplink a:hover svg {
  fill: url("#icon-gradient");
}

[data-theme="light"] .footer-toplink a:hover {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==========================================================================
   Icons and utility classes
   ========================================================================== */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: text-bottom;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

/* basis: gradient uit sprite wordt gebruikt via <use> */
.icon use {
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

/* hover/focus: path wordt effectief wit met paarse gloed */
.icon-link:hover .icon use,
.icon-link:focus-visible .icon use {
  filter: drop-shadow(0 0 2px #a855f7) drop-shadow(0 0 6px #9333ea);
}

/* Optioneel: ook de fill naar wit "simuleren" via CSS filter-trick op de parent */
.icon-link:hover .icon,
.icon-link:focus-visible .icon {
  /* ietsje groter voor 'lift' */
  transform: translateY(-1px);
}

/* Toegankelijk: duidelijke focusring voor keyboard */
.icon-link:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

/* Accessibility helpers */
.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */

/* Small screens */
@media (width <= 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .cta {
    justify-content: center;
    width: 100%;
  }

  .nav-trigger {
    font-size: 0.875rem;
    padding: 0.5rem 0.7rem;
  }

  .card {
    padding: 1.5rem;
  }

  /* Mobile header optimizations */
  .nav__logo-img,
  .logo img {
    width: 36px;
    height: 36px;
  }

  .nav,
  .hdr {
    padding: 0.5rem 0;
    gap: 1rem;
  }

  .logo .brand {
    font-size: 1rem;
  }
}

/* Extra small screens - very compact header */
@media (width <= 360px) {
  .nav__logo-img,
  .logo img {
    width: 32px;
    height: 32px;
  }

  .nav,
  .hdr {
    padding: 0.4rem 0;
    gap: 0.75rem;
  }

  .logo .brand {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
  }

  /* Hide dropdown icons on very small screens */
  .nav__dropdown .nav__icon {
    display: none;
  }

  /* Compact navigation toggle */
  .nav__toggle {
    padding: 0.4rem;
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Mobile Menu System
   ========================================================================== */

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  background-color: rgb(255 255 255 / 10%);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--accent-primary, #6b21a8);
  outline-offset: 2px;
}

/* Force mobile menu visibility on small screens */
@media (width <= 768px) {
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
  }
}

/* Hamburger lines */
.hamburger-line {
  display: block !important;
  width: 28px !important;
  height: 3px !important;
  background-color: var(--fg, #e2e8f0) !important;
  margin: 3px 0 !important;
  transition: all 0.3s ease;
  border-radius: 2px;
  opacity: 1 !important;
  visibility: visible !important;
}

[data-theme="light"] .hamburger-line {
  background-color: var(--fg, #1e293b) !important;
}

/* Animated hamburger to X */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1),
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2),
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3),
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile navigation menu */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgb(15 20 25 / 98%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgb(255 255 255 / 10%);
  z-index: 999;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
}

[data-theme="light"] .mobile-nav {
  background: rgb(255 255 255 / 98%);
  border-top: 1px solid rgb(0 0 0 / 10%);
}

.mobile-nav:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav[aria-hidden="false"] {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-content {
  padding: 1.5rem;
}

.mobile-nav-section {
  margin-bottom: 2rem;
}

.mobile-nav-section:last-child {
  margin-bottom: 0;
}

.mobile-nav-section h3 {
   font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

[data-theme="light"] .mobile-nav-section h3 {
  border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.mobile-nav-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-section li {
  margin-bottom: 0.5rem;
}

.mobile-nav-section a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.mobile-nav-section a:hover {
  background-color: rgb(255 255 255 / 10%);
  color: var(--accent-primary);
  transform: translateX(4px);
}

[data-theme="light"] .mobile-nav-section a:hover {
  background-color: rgb(0 0 0 / 5%);
}

/* Show mobile menu on small screens */

/* Show mobile menu on small screens */
@media (width <= 768px) {
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1002 !important;
  }

  .desktop-nav,
  .site-nav {
    display: none !important;
  }

  /* Show only hamburger menu on mobile, hide logo */
  .logo {
    display: none !important;
  }

  /* Make header relative for mobile nav positioning */
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .hdr {
    justify-content: center;
    position: relative;
  }

  /* Ensure proper layout - center hamburger */
  .container.hdr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
  }

  /* Ensure hamburger lines are visible */
  .hamburger-line {
    background-color: var(--fg) !important;
    opacity: 1 !important;
  }

  [data-theme="light"] .hamburger-line {
    background-color: #1e293b !important;
  }
} /* Animation keyframes */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .icon use,
  .icon,
  .footer-socials .icon-btn {
    transition: none;
  }
}

/* Print styles */
@media print {
  .footer-socials,
  .footer-toplink {
    display: none !important;
  }
}

/* ==========================================================================
   CTA Button Icon Override - FINAL AUTHORITY
   Must be at end of CSS to override SVG enhancer
   ========================================================================== */

/* Icons turn white on hover - comprehensive targeting */
.cta:hover svg,
.cta:hover svg *,
.cta:hover svg use,
.cta:hover svg path,
.cta:hover svg g,
.cta:hover svg circle,
.cta:hover svg rect,
.cta:hover svg polygon,
.cta:hover .enhanced-icon,
.cta:hover .enhanced-icon *,
.cta:hover .enhanced-icon use,
.cta:hover [role="img"],
.cta:hover [aria-labelledby],
.nav__link:hover svg,
.nav__link:hover svg *,
.nav__link:hover svg use,
.nav__link:hover svg path,
.nav__link:hover svg g,
.nav__link:hover svg circle,
.nav__link:hover svg rect,
.nav__link:hover svg polygon,
.nav__link:hover .enhanced-icon,
.nav__link:hover .enhanced-icon *,
.nav__link:hover .enhanced-icon use,
.nav__link:hover [role="img"],
.nav__link:hover [aria-labelledby],
.dropdown__link:hover svg,
.dropdown__link:hover svg *,
.dropdown__link:hover svg use,
.dropdown__link:hover svg path,
.dropdown__link:hover svg g,
.dropdown__link:hover svg circle,
.dropdown__link:hover svg rect,
.dropdown__link:hover svg polygon,
.dropdown__link:hover .enhanced-icon,
.dropdown__link:hover .enhanced-icon *,
.dropdown__link:hover .enhanced-icon use,
.dropdown__link:hover [role="img"],
.dropdown__link:hover [aria-labelledby] {
  fill: white !important;
  color: white !important;
  background: transparent !important;
  background-image: none !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

/* ==========================================================================
   Newsletter form improvements for accessibility
   ========================================================================== */
#newsletter input[type="email"] {
  color: var(--fg) !important;
  background: var(--card) !important;
  border: 2px solid #6b7280 !important;
}

[data-theme="light"] #newsletter input[type="email"] {
  color: #1f2937 !important;
  background: #fff !important;
  border: 2px solid #6b7280 !important;
}

#newsletter input[type="email"]::placeholder {
  color: #9ca3af !important;
}

[data-theme="light"] #newsletter input[type="email"]::placeholder {
  color: #6b7280 !important;
}

/* ==========================================================================
   Enhanced Footer styles
   ========================================================================== */
.enhanced-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 0;
  background: #ffffff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 0;
  position: relative;
}

/* Dark mode for enhanced footer */
[data-theme="dark"] .enhanced-footer {
  background: #1a202c !important;
  border: 1px solid #2d3748 !important;
}

[data-theme="dark"] .enhanced-footer {
  background: rgb(0 0 0 / 10%);
  border: 3px solid #fff !important;
}

[data-theme="light"] .enhanced-footer {
  background: rgb(255 255 255 / 81%);
  border: 3px solid #000 !important;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Central Brand Section */
.footer-brand-section {
  text-align: center;
  padding: 2rem 0 3rem;
  border-bottom: 2px solid rgb(255 255 255 / 10%);
  margin-bottom: 3rem;
}

.footer-brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.footer-brand-link:hover {
  transform: translateY(-5px);
  text-decoration: none;
}

.footer-logo-figure {
  margin: 0 0 1rem;
}

.footer-logo-enhanced {
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgb(107 33 168 / 30%),
    0 4px 16px rgb(107 33 168 / 20%);
  transition: all 0.3s ease;
}

.footer-logo-enhanced:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow:
    0 12px 48px rgb(107 33 168 / 40%),
    0 6px 24px rgb(107 33 168 / 30%);
}

.footer-brand-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin: 0;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

/* Mission Section */
.footer-mission {
  margin: 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-mission-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--fg);
}

.mission-icon {
  fill: url("#icon-gradient");
  flex-shrink: 0;
}

.footer-mission-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* Social Media Enhanced */
.footer-social-enhanced {
  margin: 2rem 0 0;
}

.footer-social-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: var(--fg);
}

.footer-social-title svg {
  fill: url("#icon-gradient");
}

.footer-socials-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  text-decoration: none;
  color: var(--fg);
  transition: all 0.3s ease;
  min-width: 80px;
}

.social-btn:hover {
  transform: translateY(-5px);
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 10px 30px rgb(107 33 168 / 30%);
  text-decoration: none;
  color: white;
}

.social-btn:hover svg {
  fill: white;
}

.social-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Content Grid */
.footer-content-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
  grid-template-columns: 1fr;
}

@media (width >= 640px) {
  .footer-content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (width >= 1024px) {
  .footer-content-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* Footer Sections */
.footer-section {
  background: rgb(255 255 255 / 3%);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgb(255 255 255 / 10%);
  height: fit-content;
  min-height: auto;
}

/* Unified Footer (new) */
.footer-unified {
  margin-top: 2.5rem;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.footer-unified-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start;
}

.footer-block-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-links-grid {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.footer-link-group-title {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0 0 .5rem;
  color: var(--text-muted, #ccc);
}

.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
  font-size: .9rem;
}

.footer-link-list a {
  color: #fff;
  text-decoration: none;
  opacity: .85;
  transition: opacity .2s;
}

.footer-link-list a:hover,
.footer-link-list a:focus-visible { opacity: 1; }

.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .9rem;
}

.footer-social-list a {
  color: #fff;
  text-decoration: none;
  opacity: .85;
}
.footer-social-list a:hover { opacity: 1; }

.footer-detail-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  border-top: 1px solid rgb(255 255 255 / 8%);
  padding-top: 2.5rem;
}

.footer-detail-block {
  font-size: .9rem;
  line-height: 1.5;
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}

.footer-contact-list a {
  color: #fff;
  text-decoration: none;
}
.footer-contact-list a:hover { text-decoration: underline; }

.footer-address { font-style: normal; }

@media (width <= 720px) {
  .footer-unified-grid { grid-template-columns: 1fr 1fr; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
  .footer-detail-grid { grid-template-columns: 1fr; }
}

@media (width <= 520px) {
  .footer-unified-grid { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
}

.footer-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-icon {
  fill: url("#icon-gradient");
  flex-shrink: 0;
}

/* Contact Cards */
.contact-cards {
  display: grid;
  gap: 1.5rem;
}

.contact-card {
  background: rgb(255 255 255 / 2%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / 5%);
  transition: all 0.3s ease;
}

.contact-card:hover {
  background: rgb(255 255 255 / 5%);
  border-color: rgb(255 255 255 / 20%);
  transform: translateY(-2px);
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-icon {
  fill: url("#icon-gradient");
  flex-shrink: 0;
}

.contact-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
  background: none;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

.contact-details {
  display: grid;
  gap: 0.5rem;
}

.enhanced-footer .contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enhanced-footer .contact-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* Enhanced contact email styling for new footer */
.enhanced-footer .contact-email {
  color: rgb(255 255 255 / 80%) !important;
  font-size: 0.9em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-detail-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.enhanced-footer .contact-email:hover {
  color: white !important;
  text-decoration: none;
}

/* Policies Section */
.policies-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (width >= 540px) {
  .policies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.policy-category {
  background: rgb(255 255 255 / 2%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / 5%);
}

.policy-category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--fg);
}

.policy-category-title svg {
  fill: url("#icon-gradient");
}

.policy-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.policy-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.policy-link:hover {
  background: rgb(255 255 255 / 5%);
  color: var(--accent);
  text-decoration: none;
}

.policy-link svg {
  fill: currentcolor;
  flex-shrink: 0;
}

/* Company Section */
.company-address {
  font-style: normal;
}

.address-card {
  background: rgb(255 255 255 / 2%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgb(255 255 255 / 5%);
  margin-bottom: 1.5rem;
}

.address-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.address-icon {
  fill: url("#icon-gradient");
}

.address-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.address-details {
  display: grid;
  gap: 0.5rem;
}

.address-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-info {
  display: grid;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgb(255 255 255 / 2%);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 5%);
  transition: all 0.3s ease;
}

.contact-method:hover {
  background: rgb(255 255 255 / 5%);
  border-color: rgb(255 255 255 / 20%);
}

.contact-method-icon {
  fill: url("#icon-gradient");
  flex-shrink: 0;
}

.contact-method-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-method-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 2px solid rgb(255 255 255 / 10%);
  padding: 2rem 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright-section {
  flex: 1;
}

.copyright-text {
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--fg);
}

.company-name {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.legal-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-top-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.scroll-top-btn:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgb(107 33 168 / 30%);
}

.scroll-top-btn:hover svg {
  fill: white;
}

.scroll-top-text {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* Enhanced footer dark mode specific adjustments */
[data-theme="dark"] .enhanced-footer .contact-link {
  color: #b205b9;
}

[data-theme="dark"] .enhanced-footer .contact-link:hover {
  color: #d946ef;
}

[data-theme="dark"] .enhanced-footer .contact-email {
  color: white !important;
}

/* Additional utility classes for inline style removal */
.nav-dropdown-svg {
  display: inline-block;
  vertical-align: middle;
}

.hero-stats-section {
  margin-top: 1rem;
}

.hero-cta-section {
  margin-top: 2rem;
}

.portfolio-grid-section {
  margin-top: 1rem;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.contact-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-form-style {
  margin-top: 1rem;
}

.contact-address {
  margin-top: 2rem;
}

.contact-footer-style {
  margin-top: 1rem;
}

.newsletter-container {
  margin-top: 3rem;
  margin-bottom: 4rem;
  display: flex;
  justify-content: center;
}

.newsletter-card {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.newsletter-subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-input {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--fg);
}

.newsletter-message {
  margin-top: 1rem;
}

.cta-group-centered {
  text-align: center;
  margin: 2rem 0;
}

.grid-margin-top {
  margin-top: 1rem;
}

.portfolio-section-centered {
  margin-top: 2rem;
  text-align: center;
}

.portfolio-note {
  margin-bottom: 1.5rem;
}

[data-theme="light"] .enhanced-footer .contact-link {
  color: #7c3aed;
}

[data-theme="light"] .enhanced-footer .contact-link:hover {
  color: #8b5cf6;
}

[data-theme="light"] .enhanced-footer .contact-email {
  color: #000 !important;
}

/* Mobile responsiveness for enhanced footer */
@media (width <= 768px) {
  .footer-container {
    padding: 2rem 1rem 1rem;
  }

  .footer-brand-section {
    padding: 1.5rem 0 2rem;
  }

  .footer-brand-title {
    font-size: 2rem;
  }

  .footer-socials-grid {
    gap: 1rem;
  }

  .footer-content-grid {
    gap: 2rem;
    grid-template-columns: 1fr;
  }

  .footer-section {
    padding: 1.5rem;
  }

  .policies-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}

@media (width <= 480px) {
  .footer-container {
    padding: 1.5rem 1rem 1rem;
  }

  .footer-section {
    padding: 1rem;
  }

  .footer-brand-title {
    font-size: 1.75rem;
  }

  .footer-socials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .social-btn {
    padding: 0.75rem;
    min-width: auto;
  }
}

/* Footer layout utility classes */
.footer-centered {
  text-align: center;
}

.footer-spaced {
  margin-bottom: 2rem;
}

/* Enhanced footer centering for better visual alignment */
.footer-content-grid.footer-centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}

.footer-content-grid.footer-centered .footer-section {
  flex: 0 1 auto;
  max-width: 400px;
  text-align: center;
}

.contact-cards.footer-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-cards.footer-centered .contact-card {
  max-width: 300px;
  text-align: center;
}

.address-details.footer-centered,
.contact-info.footer-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive footer centering */
@media (width <= 768px) {
  .footer-content-grid.footer-centered {
    flex-direction: column;
    align-items: center;
  }

  .footer-content-grid.footer-centered .footer-section {
    max-width: 100%;
    width: 100%;
  }

  .contact-cards.footer-centered {
    width: 100%;
  }
}

/* ==========================================================================
   Footer Redesign - Centered Layout with Enhanced Visual Hierarchy
   ========================================================================== */

/* Reset existing footer styles for redesign */
.redesigned-footer {
  background: #ffffff;
  border-top: 1px solid rgb(0 0 0 / 10%);
  margin-top: 4rem;
  padding: 0;
  position: relative;
}

/* Dark theme override */
[data-theme="dark"] .redesigned-footer {
  background: #1a202c !important;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

/* Light theme override */
[data-theme="light"] .redesigned-footer {
  background: #ffffff !important;
  border-top: 1px solid rgb(0 0 0 / 10%);
}

.footer-container-redesigned {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1rem;
}

/* Header Section - Branding and Social */
.footer-header-section {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  margin-bottom: 3rem;
}

.footer-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-brand-link-redesigned {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.footer-brand-link-redesigned:hover {
  transform: translateY(-3px);
}

.footer-logo-figure-redesigned {
  margin: 0 0 1rem;
}

.footer-logo-redesigned {
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgb(107 33 168 / 25%),
    0 4px 16px rgb(107 33 168 / 15%);
  transition: all 0.3s ease;
}

.footer-logo-redesigned:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow:
    0 12px 48px rgb(107 33 168 / 35%),
    0 6px 24px rgb(107 33 168 / 25%);
}

.footer-brand-title-redesigned {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

/* Company Address - Compact Design */
.company-address-redesigned {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.875rem;
}

.address-card-redesigned {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.address-header-redesigned {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}

.address-details-redesigned {
  text-align: center;
  line-height: 1.4;
}

.contact-info-redesigned {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.contact-method-redesigned {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.875rem;
}

.contact-method-redesigned:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Social Media - Redesigned */
.footer-social-redesigned {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-social-title-redesigned {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.footer-socials-redesigned {
  display: flex;
  gap: 1rem;
}

.social-btn-redesigned {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-btn-redesigned:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Main Navigation Grid */
.footer-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-section-redesigned {
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.footer-section-title-redesigned {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--fg);
}

.footer-section-title-redesigned svg {
  fill: var(--accent);
}

/* Navigation Links - Simplified */
.policies-nav-redesigned {
  width: 100%;
}

.nav-links-redesigned {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-category {
  text-align: left;
}

.nav-category-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.nav-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Contact Section */
.footer-contact-section {
  margin-bottom: 3rem;
}

.contact-cards-redesigned {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Footer Bottom */
.footer-bottom-redesigned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  text-align: center;
  flex: 1;
}

.copyright-text-redesigned {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.legal-text-redesigned {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  opacity: 0.7;
}

.footer-scroll-top {
  flex-shrink: 0;
}

.scroll-top-btn-redesigned {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.scroll-top-btn-redesigned:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Responsive Design */
@media (width <= 768px) {
  .footer-container-redesigned {
    padding: 2rem 1rem 1rem;
  }

  .footer-header-section {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .contact-info-redesigned {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-bottom-redesigned {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .contact-cards-redesigned {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (width <= 480px) {
  .footer-brand-title-redesigned {
    font-size: 1.75rem;
  }

  .footer-socials-redesigned {
    gap: 0.75rem;
  }

  .social-btn-redesigned {
    width: 36px;
    height: 36px;
  }
}

/* ============= THEME-SPECIFIC OVERRIDES ============= */

/* Light mode header navigation - black color */
[data-theme="light"] .nav-trigger {
  color: #000;
  border-color: rgb(0 0 0 / 10%);
  background: rgb(0 0 0 / 5%);
}

[data-theme="light"] .nav-trigger:hover {
  color: #000;
  background: rgb(0 0 0 / 10%);
}

/* Light mode footer - bold black titles */
[data-theme="light"] .nav-category-title {
  color: #000;
  font-weight: 700;
}

[data-theme="light"] .contact-title {
  color: #000;
  text-align: center;
  font-weight: 700;
}

/* Dark mode footer - bold white titles */
[data-theme="dark"] .nav-category-title {
  color: #fff;
  font-weight: 700;
}

[data-theme="dark"] .contact-title {
  color: #fff;
  text-align: center;
  font-weight: 700;
}

/* ==========================================================================
   Critical CSS Variables and Base Styles from Bundler CSS for Forum
   ========================================================================== */

/* Essential CSS Variables for Forum Components */
:root {
  /* Surfaces - Enhanced */
  --bg-primary: #fff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --card-bg: #fff;

  /* Text Colors - Enhanced */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Brand & Accent Colors */
  --brand: #3b82f6;
  --brand-strong: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Borders & Shadows */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ring: #60a5fa;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 6%), 0 1px 3px rgb(0 0 0 / 8%);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 8%);
  --shadow-lg: 0 12px 28px rgb(0 0 0 / 14%);

  /* Radius System */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Spacing Scale (4px base) */
  --s-1: 0.25rem; /* 4px */
  --s-2: 0.5rem;  /* 8px */
  --s-3: 0.75rem; /* 12px */
  --s-4: 1rem;    /* 16px */
  --s-5: 1.25rem; /* 20px */
  --s-6: 1.5rem;  /* 24px */
  --s-8: 2rem;    /* 32px */
  --s-12: 3rem;   /* 48px */
}

/* Dark theme variables */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --card-bg: #0b1220;
  --text-primary: #e5edf8;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #374151;
  --border-strong: #475569;
  --brand: #60a5fa;
  --brand-strong: #3b82f6;
  --ring: #60a5fa;
}

/* Dark Mode Forum Specific Styling */
[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] .main-content,
[data-theme="dark"] .container {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Dark mode forum headers and text */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800 {
  color: var(--text-secondary);
}

/* Dark mode cards and backgrounds */
[data-theme="dark"] .bg-white {
  background-color: var(--card-bg) !important;
}

[data-theme="dark"] .rounded-lg,
[data-theme="dark"] .shadow-md,
[data-theme="dark"] .bg-white.rounded-lg.shadow-md {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
}

/* Dark mode forum navigation tabs */
[data-theme="dark"] .border-blue-500 {
  border-color: var(--brand) !important;
}

[data-theme="dark"] .text-blue-600 {
  color: var(--brand) !important;
}

[data-theme="dark"] .text-blue-500 {
  color: var(--brand) !important;
}

/* Dark mode buttons */
[data-theme="dark"] button,
[data-theme="dark"] .btn {
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] .hover\\:bg-gray-100:hover {
  background-color: var(--bg-tertiary) !important;
}

/* Dark mode form inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Essential Container System */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--s-4);
  max-width: 80rem; /* 1280px */
}

/* Essential Grid System */
.grid {
  display: grid;
  gap: var(--s-6);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (width <= 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (width <= 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Essential Flexbox System */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }

.flex-wrap {
  display: flex;
  flex-wrap: wrap;
}

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--s-2); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }

/* Essential Spacing Utilities */
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-8 { margin-bottom: var(--s-8); }
.p-2 { padding: var(--s-2); }
.p-3 { padding: var(--s-3); }
.p-4 { padding: var(--s-4); }
.p-6 { padding: var(--s-6); }
.px-1 { padding-inline: var(--s-1); }
.px-2 { padding-inline: var(--s-2); }
.px-3 { padding-inline: var(--s-3); }
.px-4 { padding-inline: var(--s-4); }
.px-6 { padding-inline: var(--s-6); }
.py-2 { padding-block: var(--s-2); }
.py-3 { padding-block: var(--s-3); }
.py-4 { padding-block: var(--s-4); }
.py-8 { padding-block: var(--s-8); }

/* Essential Width and Height Utilities */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-12 { width: 3rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-12 { height: 3rem; }
.h-full { height: 100%; }
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }

/* Essential Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-2xl {
  font-size: 1.5rem;
  line-height: 1.2;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 1.1;
}

/* Essential Font Weight */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Essential Color Utilities */
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-white { color: #fff; }
.text-red-500 { color: #ef4444; }

.bg-white { background-color: #fff; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-red-500 { background-color: #ef4444; }

/* Essential Border Utilities */
.border {
  border-width: 1px;
  border-style: solid;
  border-color: var(--border);
}

.border-2 {
  border-width: 2px;
  border-style: solid;
  border-color: var(--border);
}

.border-b-2 {
  border-bottom-width: 2px;
  border-bottom-style: solid;
}
.border-transparent { border-color: transparent; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-500 { border-color: #3b82f6; }
.border-dashed { border-style: dashed; }

/* Essential Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* Essential Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Essential Card System */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Essential Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.neg-top-1 { top: -0.25rem; }
.neg-right-1 { right: -0.25rem; }

/* Essential Display Utilities */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* User authentication display elements */
.nav-user-name:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.nav-user-avatar:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.user-dropdown:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force show when explicitly shown via JS */
.nav-user-name[style*="display: flex"],
.nav-user-avatar[style*="display: flex"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Enhanced user avatar styling */
.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--secondary-color, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.user-avatar-circle:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .user-avatar-circle {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .user-avatar-circle:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.hidden { display: none !important; }

/* Essential Spacing Between Children */
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 2rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* Essential Transition Utilities */
.transition { transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); }

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-duration: 150ms;
}
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Essential Hover States */

.hover-bg-gray-100:hover { background-color: #f3f4f6; }
.hover-text-gray-700:hover { color: #374151; }

/* Essential Focus States */

.focus-outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus-ring-2:focus { box-shadow: 0 0 0 3px rgb(59 130 246 / 50%); }
.focus-ring-blue-500:focus { box-shadow: 0 0 0 3px rgb(59 130 246 / 50%); }
.focus-border-transparent:focus { border-color: transparent; }

/* Essential Responsive Utilities */
@media (width >= 640px) {
  .sm-inline { display: inline; }
}

@media (width >= 1024px) {
  .lg-mb-8 { margin-bottom: 2rem; }

  .lg-px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .lg-px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .lg-py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .lg-space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 2rem; }
  .lg-text-base { font-size: 1rem; }
}

/* Essential Additional Utilities */
.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }
.resize-vertical { resize: vertical; }

/* ==========================================================================
   Modal System for User Settings and Auth Modals
   ========================================================================== */

/* Base Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #0f172a);
  width: min(500px, 90vw);
  max-height: 90vh;
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.25s ease-out;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__header {
  padding: 1.5rem;
  background: var(--bg-secondary, #f8fafc);
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.modal__close {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm, 6px);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover {
  background: var(--bg-tertiary, #f1f5f9);
  color: var(--text-primary, #0f172a);
}

.modal__content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  padding: 1.5rem;
  background: var(--bg-secondary, #f8fafc);
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* User Settings Modal Specific */
#settings-modal {
  z-index: 10000;
}

#settings-modal .modal__panel {
  max-width: 500px;
}

/* Auth Modal Specific */
#auth-modal {
  z-index: 10000;
}

#auth-modal .modal__panel {
  max-width: 450px;
}

/* Settings Form Styles */
.settings-section {
  margin-bottom: 2rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h3 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  flex: 1;
  margin: 0;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
}

.setting-control {
  margin-left: 1rem;
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border, #e5e7eb);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle-switch:checked {
  background: var(--brand, #3b82f6);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.toggle-switch:checked::after {
  transform: translateX(20px);
}

/* Auth Form Styles */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: var(--text-secondary, #334155);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
  color: var(--brand, #3b82f6);
  border-bottom-color: var(--brand, #3b82f6);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #0f172a);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand, #3b82f6);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--brand, #3b82f6);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-strong, #2563eb);
}

.btn-secondary {
  background: var(--bg-tertiary, #f1f5f9);
  color: var(--text-primary, #0f172a);
  border: 1px solid var(--border, #e5e7eb);
}

.btn-secondary:hover {
  background: var(--bg-secondary, #f8fafc);
}

.btn-google {
  background: white;
  color: var(--text-primary, #0f172a);
  border: 1px solid var(--border, #e5e7eb);
  width: 100%;
}

.btn-google:hover {
  background: var(--bg-secondary, #f8fafc);
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  color: var(--text-muted, #64748b);
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border, #e5e7eb);
}

.auth-divider span {
  background: var(--bg-primary, #fff);
  padding: 0 1rem;
  position: relative;
}

.auth-link {
  color: var(--brand, #3b82f6);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Dark mode support for modals */
[data-theme="dark"] .modal__panel {
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #e5edf8);
}

/* UserSettings modal dark mode border */
[data-theme="dark"] #settingsModal .modal__panel {
  border: 3px solid var(--border-color, #334155);
}

/* Profile Modal Styles */
.profile-modal {
  max-width: 600px;
  width: 90vw;
}

.profile-form {
  display: grid;
  gap: 2rem;
}

.profile-avatar-section {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.profile-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #3b82f6), var(--secondary-color, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  border: 4px solid var(--bg-card, #ffffff);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-avatar-large:hover {
  transform: scale(1.05);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-fields-section {
  display: grid;
  gap: 1.5rem;
}

.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-input, #ffffff);
  color: var(--text-primary, #1f2937);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  min-height: 80px;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  font-style: italic;
}

.profile-file-input {
  display: none;
}

/* Dark mode profile modal */
[data-theme="dark"] .profile-modal {
  border: 3px solid var(--border-color, #334155);
}

[data-theme="dark"] .profile-avatar-large {
  border-color: var(--bg-primary, #0f172a);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .form-textarea {
  background: var(--bg-input, #1e293b);
  border-color: var(--border-color, #334155);
  color: var(--text-primary, #e5edf8);
}

[data-theme="dark"] .form-textarea:focus {
  border-color: var(--primary-color, #60a5fa);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .form-help {
  color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .modal__header,
[data-theme="dark"] .modal__footer {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .form-input {
  background: var(--bg-tertiary, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text-primary, #e5edf8);
}

[data-theme="dark"] .btn-google {
  background: var(--bg-tertiary, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text-primary, #e5edf8);
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-tertiary, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text-primary, #e5edf8);
}

[data-theme="dark"] .auth-divider span {
  background: var(--bg-primary, #0f172a);
}

/* Modal System */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 50%);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  background: var(--bg-primary, #fff);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-lg, 0 25px 50px -12px rgb(0 0 0 / 25%));
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  z-index: 1001;
  animation: modal-enter 0.3s ease;
}

.modal__content {
  padding: 2rem;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.modal__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  margin: 0;
}

.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm, 4px);
  transition: background-color 0.2s;
}

.modal__close:hover {
  background: var(--bg-tertiary, #f1f5f9);
}

.modal__footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* Modal Animations */
@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Hide modals by default */
.modal:not(.show) {
  display: none !important;
}

/* Specific modal sizes */
.settings-modal .modal__panel {
  width: 600px;
  max-width: 90vw;
}

.auth-modal .modal__panel {
  width: 400px;
  max-width: 90vw;
}

/* ==========================================================================
   Forum Categories Styling - Dutch Police Theme
   ========================================================================== */

.forum-categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Expert Verification System */
.verified-experts,
.verified-professionals {
  color: #10b981 !important;
  font-weight: 600;
}

.verified-experts i,
.verified-professionals i {
  color: #10b981;
}

.expert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.journalist-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-size: 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.professional-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  color: white;
  font-size: 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.verified-user-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.verification-tooltip {
  position: relative;
}

.verification-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 0.25rem;
}

/* Public Data Section Styling */
.public-data-section {
  transition: all 0.3s ease;
}

.data-category {
  transition: all 0.3s ease;
  cursor: pointer;
}

.data-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.data-category:hover .fas.fa-arrow-right {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

.verification-panel {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.verification-stat {
  padding: 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.verification-stat:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.02);
}

/* Dark mode adjustments for public data section */
[data-theme="dark"] .verification-panel {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(30, 64, 175, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .verification-stat {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .verification-stat:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Data dashboard specific styling */
.data-dashboard-modal .modal-content {
  max-width: 95vw;
  max-height: 95vh;
}

.document-card {
  transition: all 0.3s ease;
}

.document-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* File type indicators */
.file-type-pdf { color: #dc2626; }
.file-type-excel { color: #16a34a; }
.file-type-dashboard { color: #2563eb; }

/* Status badges */
.status-toegekend { background-color: #dcfce7; color: #166534; }
.status-gedeeltelijk { background-color: #fef3c7; color: #92400e; }
.status-afgewezen { background-color: #fee2e2; color: #991b1b; }

/* Dark mode status badges */
[data-theme="dark"] .status-toegekend { background-color: rgba(22, 101, 52, 0.2); color: #4ade80; }
[data-theme="dark"] .status-gedeeltelijk { background-color: rgba(146, 64, 14, 0.2); color: #fbbf24; }
[data-theme="dark"] .status-afgewezen { background-color: rgba(153, 27, 27, 0.2); color: #f87171; }

/* Enhanced Navigation Styling */
.quick-navigation {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-pill:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.nav-pill.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-select {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(209, 213, 219, 1);
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid rgba(209, 213, 219, 1);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background: #f8fafc;
  border-color: #3b82f6;
}

/* Compact view styling */
.forum-categories.compact-view .category {
  margin-bottom: 1rem;
}

.forum-categories.compact-view .forum-section {
  padding: 0.75rem;
}

.forum-categories.compact-view .forum-stats {
  display: none;
}

.forum-categories.compact-view .forum-latest {
  display: none;
}

/* Responsive navigation */
@media (max-width: 768px) {
  .quick-navigation {
    padding: 1rem;
  }

  .nav-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .nav-pill i {
    display: none;
  }

  .nav-select, .nav-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Touch interactions */
.touch-active {
  background-color: rgba(59, 130, 246, 0.1) !important;
  transform: scale(0.98);
}

/* Category filtering animations */
.category {
  transition: all 0.3s ease;
}

.category.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop hover effects */
.desktop-hover-effects:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Skip links for accessibility */
.skip-links {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pull to refresh hint */
.pull-to-refresh-hint {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile .pull-to-refresh-hint {
  opacity: 1;
}

/* Favorites mode */
.favorites-mode .category:not(.favorite) {
  opacity: 0.5;
  pointer-events: none;
}

/* Dark mode navigation */
[data-theme="dark"] .quick-navigation {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(67, 56, 202, 0.1));
  border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .nav-pill {
  background: rgba(0, 0, 0, 0.3);
  color: #d1d5db;
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .nav-pill:hover {
  background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .nav-select,
[data-theme="dark"] .nav-button {
  background: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

[data-theme="dark"] .nav-select:focus,
[data-theme="dark"] .nav-button:hover {
  border-color: #3b82f6;
}

[data-theme="dark"] .pull-to-refresh-hint {
  color: #9ca3af;
}

/* Enhanced Data Dashboard Styling */
.flash-update {
  animation: flashGlow 1s ease-in-out;
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

@keyframes flashGlow {
  0% { box-shadow: 0 0 0 rgba(59, 130, 246, 0); }
  50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
  100% { box-shadow: 0 0 0 rgba(59, 130, 246, 0); }
}

.animate-fade-in {
  animation: fadeInSlide 0.5s ease-out;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard Statistics Cards */
.dashboard-stat-card {
  position: relative;
  overflow: hidden;
}

.dashboard-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.dashboard-stat-card:hover::before {
  left: 100%;
}

/* Live indicator pulse */
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: livePulse 2s infinite;
}

/* Interactive Chart Bars */
#activityChart div {
  background: linear-gradient(to top, #3b82f6, #60a5fa);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

#activityChart div:hover {
  background: linear-gradient(to top, #2563eb, #3b82f6);
  transform: scaleY(1.05);
}

#activityChart div::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10;
}

#activityChart div:hover::after {
  opacity: 1;
}

/* Progress bars in category distribution */
.progress-bar {
  transition: width 1s ease-out;
}

/* Activity feed items */
.activity-item {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.activity-item:hover {
  border-left-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.05);
}

/* Dashboard controls */
.dashboard-controls select,
.dashboard-controls button {
  transition: all 0.3s ease;
}

.dashboard-controls button:active {
  transform: scale(0.95);
}

/* Status indicators */
.status-online {
  color: #10b981;
}

.status-warning {
  color: #f59e0b;
}

.status-error {
  color: #ef4444;
}

/* Responsive dashboard adjustments */
@media (max-width: 768px) {
  #dataDashboardModal .grid {
    grid-template-columns: 1fr;
  }

  #dataDashboardModal .sticky {
    position: relative;
  }

  .dashboard-stat-card {
    padding: 1rem;
  }

  .dashboard-stat-card .text-3xl {
    font-size: 1.5rem;
  }

  #activityChart {
    height: 200px;
  }
}

/* Dark mode enhancements for dashboard */
[data-theme="dark"] #activityChart div {
  background: linear-gradient(to top, #1e40af, #3b82f6);
}

[data-theme="dark"] #activityChart div:hover {
  background: linear-gradient(to top, #1d4ed8, #2563eb);
}

[data-theme="dark"] .activity-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .flash-update {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Forum Statistics Styling */
.stat-item {
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.stat-item:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}

.stat-updated {
  animation: statGlow 1s ease-in-out;
}

@keyframes statGlow {
  0% {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1);
  }
  50% {
    background-color: rgba(59, 130, 246, 0.2);
    transform: scale(1.02);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

/* Platform status indicators */
.platform-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

.status-operational {
  background-color: #10b981;
}

.status-warning {
  background-color: #f59e0b;
}

.status-error {
  background-color: #ef4444;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Enhanced statistics grid */
.statistics-grid {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .statistics-grid {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
  border: 1px solid rgba(75, 85, 99, 0.8);
}

/* Performance indicators */
.performance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.performance-excellent {
  background-color: #dcfce7;
  color: #166534;
}

.performance-good {
  background-color: #dbeafe;
  color: #1e40af;
}

.performance-fair {
  background-color: #fef3c7;
  color: #92400e;
}

.performance-poor {
  background-color: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .performance-excellent {
  background-color: rgba(22, 101, 52, 0.2);
  color: #4ade80;
}

[data-theme="dark"] .performance-good {
  background-color: rgba(30, 64, 175, 0.2);
  color: #60a5fa;
}

[data-theme="dark"] .performance-fair {
  background-color: rgba(146, 64, 14, 0.2);
  color: #fbbf24;
}

[data-theme="dark"] .performance-poor {
  background-color: rgba(153, 27, 27, 0.2);
  color: #f87171;
}

/* Mobile optimizations for statistics */
@media (max-width: 768px) {
  .statistics-grid {
    padding: 1rem;
  }

  .stat-item {
    padding: 0.75rem 0.5rem;
  }

  .stat-item .text-2xl {
    font-size: 1.5rem;
  }

  .platform-status {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Exit button styling */
.dashboard-exit-btn {
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-exit-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.1);
}

[data-theme="dark"] .dashboard-exit-btn:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

/* Scrollbar styling for activity feed */
#activityFeed::-webkit-scrollbar {
  width: 6px;
}

#activityFeed::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

#activityFeed::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#activityFeed::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

[data-theme="dark"] #activityFeed::-webkit-scrollbar-track {
  background: #374151;
}

[data-theme="dark"] #activityFeed::-webkit-scrollbar-thumb {
  background: #6b7280;
}

[data-theme="dark"] #activityFeed::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.category {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.category:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
  color: white;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  font-size: 18px;
}

.category-header i {
  transition: transform 0.3s ease;
}

.category-header:hover i {
  transform: rotate(180deg);
}

.category-body {
  display: none;
  padding: 0;
}

.category-body[style*="display: block"] {
  display: block !important;
}

.forum-section {
  border-bottom: 1px solid #e5e7eb;
}

.forum-section:last-child {
  border-bottom: none;
}

.forum-section-link {
  display: flex;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.forum-section-link:hover {
  background-color: #f8fafc;
  transform: translateX(4px);
}

.forum-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.forum-icon i {
  color: white;
  font-size: 24px;
}

.forum-content {
  flex: 1;
  min-width: 0;
  margin-right: 16px;
}

.forum-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.forum-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.forum-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.forum-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 13px;
}

.forum-stat i {
  font-size: 12px;
}

.forum-latest {
  flex-shrink: 0;
  text-align: right;
  min-width: 120px;
}

.latest-post {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.3;
}

.latest-time {
  font-size: 12px;
  color: #9ca3af;
}

/* Pagination Styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination-btn.active {
  background: #1e40af;
  color: white;
  border-color: #1e40af;
}

.pagination-btn i {
  font-size: 12px;
}

/* Dark mode styles for forum categories */
[data-theme="dark"] .category {
  background: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .category-header {
  background: linear-gradient(135deg, #3730a3 0%, #581c87 100%);
}

[data-theme="dark"] .forum-section-link {
  color: #f9fafb;
}

[data-theme="dark"] .forum-section-link:hover {
  background-color: #374151;
}

[data-theme="dark"] .forum-title {
  color: #f9fafb;
}

[data-theme="dark"] .forum-description {
  color: #d1d5db;
}

[data-theme="dark"] .forum-stat {
  color: #9ca3af;
}

[data-theme="dark"] .latest-post {
  color: #e5e7eb;
}

[data-theme="dark"] .latest-time {
  color: #9ca3af;
}

[data-theme="dark"] .pagination-btn {
  background: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

[data-theme="dark"] .pagination-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
}

[data-theme="dark"] .pagination-btn.active {
  background: #1e40af;
  border-color: #1e40af;
}

/* Responsive design */
@media (max-width: 768px) {
  .forum-categories {
    padding: 16px;
  }

  .forum-section-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .forum-latest {
    text-align: left;
    min-width: auto;
    width: 100%;
  }

  .forum-stats {
    gap: 12px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }

  .pagination-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Advanced Forum Article System - September 24, 2025
   ========================================================================== */

/* Article List Styling */
.article-list {
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(249, 250, 251, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.article-list::-webkit-scrollbar {
    width: 6px;
}

.article-list::-webkit-scrollbar-track {
    background: transparent;
}

.article-list::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.article-list::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

.dark .article-list {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(75, 85, 99, 0.5);
}

.article-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(229, 231, 235, 0.3);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    position: relative;
}

.article-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.article-item:last-child {
    margin-bottom: 0;
}

.dark .article-item {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .article-item:hover {
    background: rgba(55, 65, 81, 1);
    border-color: rgba(59, 130, 246, 0.3);
}

.article-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.article-item h4 a {
    color: rgb(30, 64, 175);
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.article-item h4 a:hover {
    color: rgb(29, 78, 216);
    text-decoration: underline;
}

.dark .article-item h4 a {
    color: rgb(96, 165, 250);
}

.dark .article-item h4 a:hover {
    color: rgb(147, 197, 253);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgb(107, 114, 128);
}

.dark .article-meta {
    color: rgb(156, 163, 175);
}

.article-meta time {
    color: rgb(75, 85, 99);
    font-weight: 500;
}

.dark .article-meta time {
    color: rgb(209, 213, 219);
}

.article-meta span[itemprop="author"] {
    font-weight: 500;
    color: rgb(59, 130, 246);
}

.dark .article-meta span[itemprop="author"] {
    color: rgb(96, 165, 250);
}

/* SEO Enhancement Indicators */
.seo-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    background: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
    border-radius: 0.25rem;
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-left: 0.5rem;
}

.dark .seo-indicator {
    background: rgba(34, 197, 94, 0.15);
    color: rgb(74, 222, 128);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Article Count Badge */
.article-count {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: rgb(34, 197, 94);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.dark .article-count {
    background: rgb(74, 222, 128);
    color: rgb(17, 24, 39);
}

/* Responsive Adjustments for Articles */
@media (max-width: 768px) {
    .article-list {
        max-height: 300px;
        padding: 0.25rem;
    }

    .article-item {
        padding: 0.5rem;
    }

    .article-item h4 {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
