@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* Font Awesome Compatibility Mappings for Font Awesome 7 */
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('/assets/plugins/fontawesome/webfonts/fa-solid-900.woff2') format('woff2'),
       url('/assets/plugins/fontawesome/webfonts/fa-solid-900.ttf') format('truetype');
}

@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/plugins/fontawesome/webfonts/fa-regular-400.woff2') format('woff2'),
       url('/assets/plugins/fontawesome/webfonts/fa-regular-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('/assets/plugins/fontawesome/webfonts/fa-solid-900.woff2') format('woff2'),
       url('/assets/plugins/fontawesome/webfonts/fa-solid-900.ttf') format('truetype');
}

@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/plugins/fontawesome/webfonts/fa-regular-400.woff2') format('woff2'),
       url('/assets/plugins/fontawesome/webfonts/fa-regular-400.ttf') format('truetype');
}

:root {
  --font-sans: 'Be Vietnam Pro', sans-serif;
  --font-title: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Lora', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-accent: 'Montserrat', sans-serif;

  /* Dark mode defaults (overridden in .light-mode below) */
  --bg-main: #090d16;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-surface-hover: rgba(31, 41, 55, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(6, 182, 212, 0.2);

  --color-primary: #06b6d4;
  --color-secondary: #a855f7;
  --color-accent: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #111827;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
}

/* ── Light mode CSS variable overrides ──────────────────────── */
.light-mode {
  --bg-main: #e8edf2;
  --bg-surface: #f4f7fa;
  --bg-surface-hover: #e8edf2;
  --border-color: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(6, 182, 212, 0.25);

  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-dark: #111827;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.1);
}

* {
  box-sizing: border-box;
}

/* ── Body base ──────────────────────────────────────────────── */
/* Let style.css handle body in light mode; only apply our dark bg in dark mode */
body {
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

.dark-mode body {
  background-color: #090d16 !important;
  color: #f3f4f6 !important;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
}

.light-mode body {
  background-color: var(--bg-main) !important;
  color: #1f2937 !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Typography styling */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* Light mode heading: dark text */
.light-mode h1:not([class*="text-"]),
.light-mode h2:not([class*="text-"]),
.light-mode h3:not([class*="text-"]),
.light-mode h4:not([class*="text-"]),
.light-mode h5:not([class*="text-"]),
.light-mode h6:not([class*="text-"]) {
  color: #111827;
}

/* Grid & Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphism style */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: var(--shadow-glow);
}

/* Header styling */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark-mode header {
  background: rgba(9, 13, 22, 0.85);
}

.light-mode header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  -webkit-text-fill-color: initial;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: #0d9488;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
}

/* Footer styling */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: #05070c;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: #ffffff;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background: var(--color-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-muted);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Main Content Styles */
main {
  flex-grow: 1;
  padding: 2.5rem 0;
}

.hero {
  text-align: center;
  padding: 4rem 0 5rem;
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.badge-primary {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Grid System for Products, Docs, and services */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Product Card */
.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 12px 30px -10px rgba(6, 182, 212, 0.25), var(--shadow-glow);
}

.product-image-wrapper {
  aspect-ratio: 1.2;
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.06);
}

.product-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(9, 13, 22, 0.3) 100%);
}

.product-category {
  font-size: 0.725rem;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.product-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
}

.product-title:hover {
  color: var(--color-primary);
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: #ffffff;
}

.product-price-row [style*="color: var(--color-danger)"] {
  background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.original-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.35rem;
}

/* File Dropzone Style (for Gerber uploads) */
.dropzone-container {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: var(--transition-normal);
}

.dropzone-container:hover {
  border-color: var(--color-primary);
  background: rgba(6, 182, 212, 0.04);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* Alert styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* Chat Styles */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0891b2 100%);
  color: #ffffff;
  border-bottom-right-radius: 0;
}

.chat-bubble.received {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 0;
}

.chat-input-row {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
}

/* Specs configurator layout (PAGE 3) */
.specs-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

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

/* Custom Banner Heading Style to fix light/dark mode visibility */
.banner-section-two h1 {
  color: #0f172a !important;
  /* Dark text in light mode */
}

.dark-mode .banner-section-two h1 {
  color: #ffffff !important;
  /* White text in dark mode */
}

/* Ensure the banner title span behaves as a block element so the background image can stretch */
.banner-section-two h1 .banner-title {
  display: inline-block !important;
  position: relative !important;
  padding: 0 10px !important;
}

/* Stretch the red highlight banner image to cover the full text span */
.banner-section-two h1 .banner-title .title-bg {
  top: 10% !important;
  left: 0 !important;
  width: 100% !important;
  height: 85% !important;
  object-fit: fill !important;
}

/* =====================================================
   TinyMCE Content Styles (for user-facing display)
   ===================================================== */
.tinymce-content {
  line-height: 1.8;
  color: var(--text-main);
  font-size: 1rem;
}

.tinymce-content h1,
.tinymce-content h2,
.tinymce-content h3,
.tinymce-content h4,
.tinymce-content h5,
.tinymce-content h6 {
  color: var(--text-main);
  font-family: var(--font-title);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.tinymce-content h1 {
  font-size: 1.8rem;
}

.tinymce-content h2 {
  font-size: 1.5rem;
}

.tinymce-content h3 {
  font-size: 1.25rem;
}

.tinymce-content h4 {
  font-size: 1.1rem;
}

.tinymce-content p {
  margin-bottom: 1rem;
}

.tinymce-content ul {
  list-style-type: disc !important;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.tinymce-content ol {
  list-style-type: decimal !important;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.tinymce-content li {
  margin-top: 0 !important;
  margin-bottom: 0.35rem !important;
  padding: 0 !important;
}

.tinymce-content li p {
  margin: 0 !important;
  padding: 0 !important;
}

.tinymce-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tinymce-content a:hover {
  color: var(--color-secondary);
}

.tinymce-content strong,
.tinymce-content b {
  color: var(--text-main);
  font-weight: 700;
}

.tinymce-content em,
.tinymce-content i {
  font-style: italic;
}

.tinymce-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: rgba(6, 182, 212, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #94a3b8;
  font-style: italic;
}

.tinymce-content code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: #a5f3fc;
}

.tinymce-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.tinymce-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.tinymce-content img,
.tinymce-content iframe,
.tinymce-content video {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin: 1rem 0;
}

.tinymce-content img {
  height: auto;
}

.tinymce-content iframe,
.tinymce-content video {
  aspect-ratio: 16 / 9;
  height: auto;
}

.tinymce-content .tiktok-embed-container {
  position: relative;
  width: 100%;
  max-width: 325px;
  margin: 1.5rem auto;
  display: block;
}

.tinymce-content .tiktok-embed-container iframe,
.tinymce-content iframe.tiktok-embed-iframe {
  aspect-ratio: 9 / 16 !important;
  width: 100% !important;
  height: 580px !important;
  margin: 0 auto !important;
  display: block;
}

.tinymce-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.tinymce-content table th {
  background: rgba(6, 182, 212, 0.1);
  color: #ffffff;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.tinymce-content table td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  color: #94a3b8;
}

.tinymce-content table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.tinymce-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* ============================================================
   DARK MODE OVERRIDES
   All overrides scoped to .dark-mode (set by theme-script.js)
   so they don't affect light mode.
   ============================================================ */

.dark-mode body {
  background-color: #090d16;
  color: #f3f4f6;
}

/* Form controls */
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode textarea.form-control {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus,
.dark-mode textarea.form-control:focus {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2) !important;
  color: #f3f4f6 !important;
}

.dark-mode .form-control::placeholder,
.dark-mode textarea.form-control::placeholder {
  color: rgba(156, 163, 175, 0.7) !important;
}

.dark-mode .form-control:disabled,
.dark-mode .form-select:disabled {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
  color: #6b7280 !important;
}

.dark-mode .form-select option {
  background-color: #1e293b !important;
  color: #e5e7eb !important;
}

/* Native <select> elements that use .form-control class (not Bootstrap .form-select) */
.dark-mode select.form-control {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
  color-scheme: dark;
}

.dark-mode select.form-control:focus {
  background-color: #1e293b !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2) !important;
  color: #f3f4f6 !important;
}

.dark-mode select.form-control option {
  background-color: #1e293b !important;
  color: #e5e7eb !important;
}

.dark-mode select.form-control option:checked,
.dark-mode select.form-control option:hover {
  background-color: rgba(6, 182, 212, 0.2) !important;
  color: #06b6d4 !important;
}

/* Banner / inline search input */
.dark-mode .banner-form .form-control,
.dark-mode .subcribe-form .form-control {
  background-color: rgba(255, 255, 255, 0.07) !important;
  color: #f3f4f6 !important;
}

/* Dropdown menus */
.dark-mode .dropdown-menu {
  background-color: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .dropdown-item {
  color: #e5e7eb !important;
}

.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
  background-color: rgba(6, 182, 212, 0.1) !important;
  color: #06b6d4 !important;
}

/* Auth card */
.dark-mode .auth-card {
  background: rgba(17, 24, 39, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f3f4f6 !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.dark-mode .auth-title {
  color: #ffffff !important;
}

/* Form labels */
.dark-mode .form-label,
.dark-mode label {
  color: #d1d5db !important;
}

.dark-mode .form-check-label {
  color: #d1d5db !important;
}

/* Input group addons */
.dark-mode .input-group-text {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #9ca3af !important;
}

/* Accordion */
.dark-mode .accordion-item {
  background-color: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}

.dark-mode .accordion-button {
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: #f3f4f6 !important;
  box-shadow: none !important;
}

.dark-mode .accordion-button:not(.collapsed) {
  background-color: rgba(6, 182, 212, 0.1) !important;
  color: #06b6d4 !important;
}

.dark-mode .accordion-button::after {
  filter: invert(1) !important;
}

.dark-mode .accordion-body {
  background-color: transparent !important;
  color: #9ca3af !important;
}

/* Bootstrap cards */
.dark-mode .card {
  background-color: rgba(17, 24, 39, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e5e7eb !important;
}

.dark-mode .card-header,
.dark-mode .card-footer {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f3f4f6 !important;
}

/* Tables */
.dark-mode .table {
  color: #e5e7eb !important;
}

.dark-mode .table th {
  color: #f3f4f6 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode .table td {
  color: #d1d5db !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.dark-mode .table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(255, 255, 255, 0.02) !important;
  color: #d1d5db !important;
}

.dark-mode .table-hover>tbody>tr:hover>* {
  background-color: rgba(6, 182, 212, 0.05) !important;
  color: #f3f4f6 !important;
}

/* Modals */
.dark-mode .modal-content {
  background-color: #1a2236 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

.dark-mode .modal-header,
.dark-mode .modal-footer {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode .modal-title {
  color: #ffffff !important;
}

.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* List groups */
.dark-mode .list-group-item {
  background-color: rgba(17, 24, 39, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #d1d5db !important;
}

.dark-mode .list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #f3f4f6 !important;
}

/* Heading color class (used inline in HTML) */
.dark-mode .heading-color {
  color: #f3f4f6 !important;
}

/* .text-dark override for dark mode */
.dark-mode .text-dark {
  color: #e5e7eb !important;
}

/* Glass panels - dark mode background */
.dark-mode .glass-panel {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Text color fixes ──────────────────────────────────────────
   style.css overrides Bootstrap text utilities with CSS vars
   that flip in dark mode (--white → #0D0D0D, --dark → #D6DADE).
   Restore correct semantics inside .dark-mode.
   ────────────────────────────────────────────────────────────── */

.dark-mode .text-white {
  color: #ffffff !important;
}

.dark-mode .text-dark {
  color: #e5e7eb !important;
}

.dark-mode .text-black {
  color: #f3f4f6 !important;
}

.dark-mode .text-light {
  color: #d1d5db !important;
}

.dark-mode .text-muted {
  color: #9ca3af !important;
}

.dark-mode .text-secondary {
  color: #a5b4fc !important;
}

/* categories-item (service cards on homepage) */
.dark-mode .categories-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode .categories-item h5,
.dark-mode .categories-item h6,
.dark-mode .categories-item a {
  color: #ffffff !important;
}

.dark-mode .categories-item p,
.dark-mode .categories-item .text-muted {
  color: #9ca3af !important;
}

/* section-header text */
.dark-mode .section-header h2,
.dark-mode .section-header p {
  color: #f3f4f6 !important;
}

/* Benefits section */
.dark-mode .benefits-item h5,
.dark-mode .benefits-item .title {
  color: #ffffff !important;
}

.dark-mode .benefits-item p {
  color: #d1d5db !important;
}

/* General heading fix: h1-h6 inside dark-mode */
.dark-mode h1:not([style*="color"]),
.dark-mode h2:not([style*="color"]),
.dark-mode h3:not([style*="color"]),
.dark-mode h4:not([style*="color"]),
.dark-mode h5:not([style*="color"]),
.dark-mode h6:not([style*="color"]) {
  color: #ffffff;
}

/* General paragraph fix */
.dark-mode p:not([style*="color"]),
.dark-mode span:not([style*="color"]):not(.badge):not([class*="text-"]) {
  color: #d1d5db;
}

/* Links without explicit color */
.dark-mode a:not([style*="color"]):not(.btn):not([class*="text-"]) {
  color: #e5e7eb;
}

.dark-mode a:not([style*="color"]):not(.btn):not([class*="text-"]):hover {
  color: #06b6d4;
}

/* ============================================================
   .dark-section – Always-dark background sections
   Forces white text even in light mode (for sections that have
   hardcoded dark backgrounds like the Benefits section).
   ============================================================ */

.dark-section .text-white,
.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.dark-section h5,
.dark-section h6 {
  color: #ffffff !important;
}

.dark-section .text-light,
.dark-section p {
  color: #d1d5db !important;
}

.dark-section .text-muted {
  color: #9ca3af !important;
}

.dark-section .section-badge {
  color: #f3f4f6 !important;
}

/* ============================================================
   SERVICE CARDS – Equal height & visible border
   ============================================================ */

/* Make owl items stretch full height */
.category-carousel .owl-stage {
  display: flex !important;
  align-items: stretch !important;
}

.category-carousel .owl-item {
  display: flex !important;
}

.category-carousel .item {
  display: flex !important;
  flex: 1 !important;
}

/* Card stretches to fill item */
.service-card-equal {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  height: 100% !important;
  min-height: 180px;
}

/* Dark mode: strong visible border */
.dark-mode .service-card-equal {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.dark-mode .service-card-equal:hover {
  border-color: rgba(6, 182, 212, 0.5) !important;
  background: rgba(6, 182, 212, 0.05) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.12) !important;
}

/* Light mode: dark border, clear visibility */
.light-mode .service-card-equal {
  border-color: rgba(0, 0, 0, 0.14) !important;
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

.light-mode .service-card-equal:hover {
  border-color: rgba(6, 182, 212, 0.5) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.12) !important;
}

/* ============================================================
   LIGHT MODE OVERRIDES
   Fix components that hardcode dark colors or rely on dark vars
   ============================================================ */

/* ── Text utility fixes for light mode ──────────────────────
   style.css maps .text-white → var(--white) → #fff in light mode
   This makes text-white invisible on light backgrounds.
   Override to use sensible dark/light colors instead.
   ────────────────────────────────────────────────────────── */
.light-mode .text-white {
  color: #ffffff !important;
}

.light-mode .text-light {
  color: #b3c0d2 !important;
}

.light-mode .text-muted {
  color: #6b7280 !important;
}

.light-mode .text-dark {
  color: #111827 !important;
}

.light-mode .text-black {
  color: #111827 !important;
}

.light-mode .text-secondary {
  color: #7c3aed !important;
}

/* Service cards (categories-item) in light mode */
.light-mode .categories-item {
  background: var(--bg-surface) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

.light-mode .categories-item h5,
.light-mode .categories-item h6 {
  color: #111827 !important;
}

.light-mode .categories-item a {
  color: #111827 !important;
}

.light-mode .categories-item a:hover {
  color: #06b6d4 !important;
}

.light-mode .categories-item p {
  color: #6b7280 !important;
}

/* Glass panel in light mode */
.light-mode .glass-panel {
  background: var(--bg-surface) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  color: #1f2937 !important;
}

.light-mode .glass-panel:hover {
  border-color: rgba(6, 182, 212, 0.4) !important;
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.1) !important;
}

/* Footer in light mode */
.light-mode footer {
  background-color: #f1f5f9 !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

.light-mode .footer-col h4 {
  color: #111827 !important;
}

.light-mode .footer-col ul li a {
  color: #6b7280 !important;
}

.light-mode .footer-col ul li a:hover {
  color: #06b6d4 !important;
}

.light-mode .footer-bottom {
  color: #6b7280 !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* Nav links in light mode */
.light-mode .nav-links a {
  color: #374151 !important;
}

.light-mode .nav-links a:hover,
.light-mode .nav-links a.active {
  color: #06b6d4 !important;
}

/* Scrollbar in light mode */
.light-mode ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.light-mode ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Product cards in light mode */
.light-mode .product-card,
.light-mode .course-item-two {
  background: var(--bg-surface) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

.light-mode .product-title {
  color: #111827 !important;
}

.light-mode .product-price {
  color: #111827 !important;
}

/* Buttons in light mode */
.light-mode .btn-secondary {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #374151 !important;
}

.light-mode .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* Form controls in light mode */
.light-mode .form-control,
.light-mode .form-select,
.light-mode textarea.form-control {
  background-color: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1f2937 !important;
}

.light-mode .form-control:focus,
.light-mode .form-select:focus {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15) !important;
}

.light-mode .form-control::placeholder {
  color: #9ca3af !important;
}

.light-mode .form-label,
.light-mode label {
  color: #374151 !important;
}

/* Dropdown in light mode */
.light-mode .dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

.light-mode .dropdown-item {
  color: #374151 !important;
}

.light-mode .dropdown-item:hover {
  background-color: rgba(6, 182, 212, 0.08) !important;
  color: #06b6d4 !important;
}

/* Accordion in light mode */
.light-mode .accordion-item {
  background-color: var(--bg-surface) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1f2937 !important;
}

.light-mode .accordion-button {
  background-color: #f8fafc !important;
  color: #111827 !important;
}

.light-mode .accordion-button:not(.collapsed) {
  background-color: rgba(6, 182, 212, 0.06) !important;
  color: #0891b2 !important;
}

.light-mode .accordion-button::after {
  filter: none !important;
}

.light-mode .accordion-body {
  color: #4b5563 !important;
}

/* Table in light mode */
.light-mode .table {
  color: #1f2937 !important;
}

.light-mode .table th {
  color: #111827 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.light-mode .table td {
  color: #374151 !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Modal in light mode */
.light-mode .modal-content {
  background-color: var(--bg-surface) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1f2937 !important;
}

.light-mode .modal-title {
  color: #111827 !important;
}

.light-mode .btn-close {
  filter: none !important;
}

/* Banner form in light mode */
.light-mode .banner-form .form-control,
.light-mode .subcribe-form .form-control {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: #1f2937 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Auth card in light mode */
.light-mode .auth-card {
  background: var(--bg-surface) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #1f2937 !important;
  backdrop-filter: none !important;
}

.light-mode .auth-title {
  /* color: #e0e5f0 !important; */
}

/* section-header in light mode */
.light-mode .section-header h2 {
  color: #6b748b !important;
}

.light-mode .section-header p {
  color: #6b7280 !important;
}

/* Profile page tabs */
.light-mode .profile-tabs .nav-link {
  color: #6b7280;
}

.light-mode .profile-tabs .nav-link:hover {
  color: #111827;
  background: rgba(0, 0, 0, 0.04);
}

.light-mode .profile-tabs .nav-link.active {
  color: #0891b2;
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.2);
}

/* Input group in light mode */
.light-mode .input-group-text {
  background-color: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #6b7280 !important;
}

/* List group in light mode */
.light-mode .list-group-item {
  background-color: var(--bg-surface) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #374151 !important;
}

/* Additional system-wide font overrides */
.tinymce-content p, 
.tinymce-content li, 
.blog-detail-content p {
  font-family: var(--font-serif);
}

.badge, 
.btn, 
.product-price, 
.original-price, 
.product-category, 
.price,
.cart-summary,
.checkout-summary {
  font-family: var(--font-accent);
}

code, 
pre, 
kbd, 
samp, 
.font-monospace {
  font-family: var(--font-mono) !important;
}

/* Restore icon fonts inside buttons/badges to prevent inheritance layout issues */
.btn i, 
.badge i, 
.btn [class^="fa-"], 
.btn [class*=" fa-"], 
.badge [class^="fa-"], 
.badge [class*=" fa-"], 
.btn [class^="ti-"], 
.btn [class*=" ti-"], 
.badge [class^="ti-"], 
.badge [class*=" ti-"] {
  font-family: var(--_fa-family, "Font Awesome 7 Free") !important;
}

#btn-wishlist-toggle i,
#btn-wishlist-toggle svg {
  font-family: "Font Awesome 7 Free", "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-size: 22px !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-block !important;
  line-height: 1 !important;
}