/* ==========================================================================
   Kay1 Electric Ltd - 21st.dev Inspired 3D & Modern Engineering Stylesheet
   Color Palette: Deep Obsidian (#09090B / #121217) + High-Voltage Amber (#F59E0B)
   ========================================================================== */

:root {
  --bg-dark: #09090B;
  --bg-card: rgba(18, 18, 24, 0.75);
  --bg-card-hover: rgba(24, 24, 32, 0.9);
  --bg-elevated: #16161D;
  --amber-primary: #F59E0B;
  --amber-light: #FBBF24;
  --amber-dark: #D97706;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --cyan-neon: #06B6D4;
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-amber: rgba(245, 158, 11, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 35px -5px rgba(245, 158, 11, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Semantic theme surfaces */
  --header-bg: rgba(9, 9, 11, 0.85);
  --topbar-bg: #000000;
  --dropdown-bg: #111116;
  --heading-color: #FFFFFF;
  --card-inner-bg: #111116;
  --code-box-bg: rgba(9, 9, 11, 0.6);
  --input-bg: rgba(14, 14, 18, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-text: #FFFFFF;
  --input-focus-bg: rgba(20, 20, 26, 0.95);
  --form-label-color: #E2E8F0;
  --nav-link-color: #CBD5E1;
  --nav-link-hover-bg: rgba(255, 255, 255, 0.08);
  --mobile-bar-bg: rgba(9, 9, 11, 0.95);
  --footer-bg: #060608;
  --canvas-opacity: 0.85;
}

/* Modern, Clean & High-Contrast Light Mode */
[data-theme="light"],
html.theme-light {
  --bg-dark: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-elevated: #F1F5F9;
  --amber-primary: #D97706;
  --amber-light: #B45309;
  --amber-dark: #78350F;
  --amber-glow: rgba(217, 119, 6, 0.16);
  --cyan-neon: #0284C7;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-subtle: #64748B;
  --border-subtle: #E2E8F0;
  --border-highlight: #CBD5E1;
  --border-amber: rgba(217, 119, 6, 0.4);
  --shadow-glow: 0 0 35px -5px rgba(217, 119, 6, 0.15);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  
  --header-bg: rgba(255, 255, 255, 0.94);
  --topbar-bg: #0F172A;
  --dropdown-bg: #FFFFFF;
  --heading-color: #0F172A;
  --card-inner-bg: #FFFFFF;
  --code-box-bg: #F1F5F9;
  --input-bg: #FFFFFF;
  --input-border: #CBD5E1;
  --input-text: #0F172A;
  --input-focus-bg: #FFFFFF;
  --form-label-color: #334155;
  --nav-link-color: #334155;
  --nav-link-hover-bg: rgba(15, 23, 42, 0.05);
  --mobile-bar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: #0B0F19;
  --canvas-opacity: 0.25;
}

/* Smooth Transition Class for Theme Toggle */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease !important;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

/* Background Texture & Canvas */
#electric-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: var(--canvas-opacity, 0.85);
  transition: opacity 0.3s ease;
}

.ambient-radial-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.14) 0%, rgba(6, 182, 212, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ambient-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
  position: relative;
  z-index: 2;
}

.header-container {
  max-width: 1480px;
  padding-left: 28px;
  padding-right: 28px;
}

.container-narrow {
  max-width: 1200px;
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
  position: relative;
}

.section-sm {
  padding-top: 56px;
  padding-bottom: 56px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color, #FFFFFF);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: var(--amber-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--amber-light);
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, #E2E8F0 60%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 21st.dev Badges & Chips */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber-light);
  backdrop-filter: blur(8px);
}

.badge-pill.cyan {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
  color: #67E8F9;
}

.badge-pill.emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6EE7B7;
}

.radar-ping {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--amber-primary);
  position: relative;
}

.radar-ping::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--amber-primary);
  animation: radarPulse 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000000;
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -2px rgba(245, 158, 11, 0.55);
  color: #000000;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

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

.btn-emergency {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 18px -2px rgba(239, 68, 68, 0.45);
}

.btn-emergency:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -2px rgba(239, 68, 68, 0.6);
  color: #FFFFFF;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 34px;
  font-size: 1.05rem;
}

/* Glassmorphic Cards (21st.dev Style) */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-amber);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

/* Animated Border Beam */
.beam-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1px;
  overflow: hidden;
}

.beam-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, transparent, transparent, var(--amber-primary));
  animation: rotateBeam 4s linear infinite;
  z-index: 1;
}

.beam-card-inner {
  position: relative;
  background: var(--card-inner-bg, #111116);
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 32px;
  z-index: 2;
  height: 100%;
}

@keyframes rotateBeam {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--header-bg, rgba(9, 9, 11, 0.85));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar {
  background: var(--topbar-bg, #000000);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.top-bar .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.top-bar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94A3B8;
  white-space: nowrap;
}

.top-bar-badge svg {
  color: var(--amber-primary);
}

.top-bar-sep {
  color: rgba(255, 255, 255, 0.18);
  user-select: none;
}

.top-bar-phone {
  color: var(--amber-light);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.top-bar-phone:hover {
  color: #FDE68A;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1C1917 0%, #292524 100%);
  border: 1px solid var(--border-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-text-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--heading-color, #FFFFFF);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-text-name span {
  color: var(--amber-primary);
}

.brand-text-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--nav-link-color, #CBD5E1);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: var(--nav-link-hover-bg, rgba(255, 255, 255, 0.08));
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
}

.dropdown-arrow {
  transition: transform 0.25s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  background: var(--dropdown-bg, #111116);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 110;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
  padding-left: 16px;
}

.dropdown-item svg {
  color: var(--amber-primary);
  flex-shrink: 0;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.header-phone-pill:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #FDE68A;
  transform: translateY(-1px);
}

.phone-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  display: inline-block;
  flex-shrink: 0;
  animation: radarPulse 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.header-cta-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  gap: 6px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #FFFFFF;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding-top: 100px;
  padding-bottom: 120px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #94A3B8;
  margin-bottom: 36px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 48px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 40%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-number span {
  -webkit-text-fill-color: initial;
  color: var(--amber-primary);
}

.hero-stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Hero 3D Card / Visual */
.hero-visual-card {
  position: relative;
}

.hero-visual-card .glass-card {
  padding: 36px;
  position: relative;
  z-index: 2;
}

.electrical-flow-box {
  background: rgba(9, 9, 11, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.flow-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.flow-step:last-child {
  border-bottom: none;
}

/* Division Switcher Tabs (21st.dev Style) */
.division-tabs {
  display: inline-flex;
  padding: 6px;
  background: #111116;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 40px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.tab-btn {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-btn.active {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* Service Card Styles */
.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-primary);
  margin-bottom: 22px;
  transition: all 0.3s ease;
}

.glass-card:hover .service-icon-box {
  background: var(--amber-primary);
  color: #000000;
  transform: scale(1.08);
}

.service-card-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--amber-primary);
  margin-top: 18px;
  white-space: nowrap;
}

.service-card-link svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.glass-card:hover .service-card-link svg {
  transform: translateX(6px);
}

/* Blog Card Styles (21st.dev Glass & Grid Alignment) */
.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px;
}

.blog-card-thumb {
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
  background: #111116;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}

.blog-card-date {
  font-size: 0.78rem;
  color: var(--amber-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  white-space: nowrap;
}

.blog-card-title {
  font-size: 1.18rem;
  margin-bottom: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: var(--amber-light);
}

.blog-card-excerpt {
  font-size: 0.92rem;
  color: #94A3B8;
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.blog-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--amber-primary);
  white-space: nowrap;
}

.blog-card-readmore svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.blog-card:hover .blog-card-readmore svg {
  transform: translateX(4px);
}

.blog-card-reading-time {
  font-size: 0.8rem;
  color: #64748B;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Accordion FAQ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
}

.accordion-item:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.accordion-header {
  width: 100%;
  padding: 22px 28px;
  background: transparent;
  border: none;
  color: var(--heading-color, #FFFFFF);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.accordion-chevron {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--amber-primary);
  flex-shrink: 0;
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 28px;
}

.accordion-item.active .accordion-body {
  padding: 0 28px 24px 28px;
}

/* Form Styles */
.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group-full {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--form-label-color, #E2E8F0);
  margin-bottom: 8px;
}

.form-control,
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--input-bg, rgba(14, 14, 18, 0.8));
  border: 1px solid var(--input-border, var(--border-subtle));
  border-radius: var(--radius-md);
  color: var(--input-text, #FFFFFF);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-input:focus {
  outline: none;
  border-color: var(--amber-primary);
  box-shadow: 0 0 0 3px var(--amber-glow);
  background: var(--input-focus-bg, rgba(20, 20, 26, 0.95));
}

textarea.form-control,
textarea.form-input {
  min-height: 110px;
  resize: vertical;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--card-inner-bg, #121217);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* Floating Sticky Mobile Bar */
.mobile-sticky-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--mobile-bar-bg, rgba(9, 9, 11, 0.95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-amber);
  padding: 12px 18px;
  z-index: 99;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
}

.mobile-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

/* Footer */
.site-footer {
  background: var(--footer-bg, #060608);
  border-top: 1px solid var(--border-subtle);
  padding-top: 80px;
  padding-bottom: 40px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--amber-primary);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-subtle);
}

/* Content & Article Styling */
.article-container {
  max-width: 1200px;
  margin: 0 auto;
}

.article-content {
  color: #CBD5E1;
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.article-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
  color: #F1F5F9;
}

.article-content p {
  margin-bottom: 24px;
}

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

.article-content li {
  margin-bottom: 10px;
  color: #CBD5E1;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 32px 0;
  border: 1px solid var(--border-subtle);
}

.article-content blockquote {
  border-left: 4px solid var(--amber-primary);
  padding: 16px 24px;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 32px 0;
  font-style: italic;
  color: #E2E8F0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(12, 12, 16, 0.6);
}

@media (max-width: 768px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Let cells wrap so 2-3 column tables fit the screen; very wide tables still scroll */
  .article-content th, .article-content td {
    white-space: normal !important;
    min-width: 110px;
    padding: 10px 12px !important;
    font-size: 0.9rem;
  }
  .article-meta-sep { display: none; }
}

@media (max-width: 600px) {
  /* Article cards use inline padding: 48px 40px, which leaves ~265px for text on phones */
  article.article-content.glass-card { padding: 28px 18px !important; }
  .article-content th, .article-content td { min-width: 90px; }
}

.article-content th, .article-content td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.article-content th {
  background: rgba(245, 158, 11, 0.08);
  color: #FFFFFF;
  font-weight: 700;
  border-bottom: 1px solid var(--border-amber);
}

.article-content tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Media Queries & Responsiveness */
@media (max-width: 1360px) {
  .top-bar-badge, .top-bar-sep {
    display: none;
  }
}

@media (max-width: 1140px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-dark, #09090B);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 24px 32px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
    z-index: 1000;
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-item-dropdown {
    width: 100%;
  }
  .nav-item-dropdown > .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
  }
  .nav-item-dropdown .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 4px;
    padding: 0 10px;
    box-shadow: none;
    min-width: 100%;
  }
  .nav-item-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 650px;
    padding: 10px;
  }
  .nav-item-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mobile-nav-actions {
    display: block;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
  }
  .mobile-nav-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mobile-theme-toggle {
    width: 100% !important;
    height: auto !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    border-radius: var(--radius-sm);
  }
  .mobile-theme-label {
    font-size: 0.92rem;
    font-weight: 600;
  }
  .mobile-lang-switch {
    width: 100% !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }
}

.mobile-nav-actions {
  display: none;
}

@media (max-width: 900px) {
  .top-bar {
    display: none;
  }
  .header-phone-pill {
    display: none;
  }
  /* Theme toggle and language switch are already duplicated inside the mobile
     hamburger menu (.mobile-theme-toggle / .mobile-lang-switch); hiding the
     header-row copies here is what keeps the mobile header from overflowing. */
  .header-actions > .theme-toggle-btn,
  .header-actions > .lang-switch-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .header-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .quote-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-group-full {
    grid-column: span 1;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mobile-sticky-action-bar {
    display: block;
  }
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); /* space for sticky bar */
  }
}

@media (max-width: 640px) {
  .header-cta-btn {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .lang-switch-btn {
    padding: 6px 8px;
  }
  .lang-switch-btn span:not(.lang-tag) {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero-badges {
    gap: 8px;
  }
  .badge-pill {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .brand-text-sub {
    display: none;
  }
  .brand-text-name {
    font-size: 1.1rem;
  }
  .logo-badge {
    width: 36px;
    height: 36px;
  }
  .brand-logo {
    gap: 8px;
  }
}

/* Large CTA buttons (hero / CTA-section "Call: <phone number>" links) carry an
   unbreakable phone number and, with the base .btn's white-space:nowrap, force
   their whole grid/flex column wider than very narrow phones (~360px and
   under), which is what makes the entire page look "zoomed in". Letting them
   wrap to two lines below 400px keeps every column at the true device width. */
@media (max-width: 400px) {
  /* Buttons and similar nowrap labels (e.g. "← Back to All Electrical
     Articles & Code Guides", "Explore Commercial Services ›") carry text
     long enough to outgrow a 320-400px phone screen once their grid/flex
     column is allowed to shrink to the true device width. Letting them
     wrap keeps every one of them fully visible instead of clipped. */
  .btn,
  .service-card-link,
  .blog-card-readmore {
    white-space: normal;
  }
  .btn-lg {
    text-align: center;
    line-height: 1.3;
  }
  /* A single-word stat value (e.g. "WorkSafeBC") can't break onto a second
     line, so on a 2-column mobile stats row it needs a smaller size to stay
     inside its own column instead of visually spilling past it. */
  .hero-stat-number {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Mobile Floating Sticky Conversion Bar
   ========================================================================== */
.mobile-sticky-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(9, 9, 11, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-amber);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.2);
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.mobile-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-action-grid .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.btn-emergency {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #FFFFFF !important;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.btn-emergency:hover, .btn-emergency:active {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Theme Switcher & Language Switcher Controls
   ========================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--border-amber);
  color: var(--amber-primary);
  transform: translateY(-1px);
}

.theme-icon-sun {
  display: block;
  color: #F59E0B;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-icon-moon {
  display: none;
  color: #D97706;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .theme-icon-sun,
html.theme-light .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon,
html.theme-light .theme-icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle-btn,
html.theme-light .theme-toggle-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

/* Language Switcher Badge */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .lang-switch-btn,
html.theme-light .lang-switch-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

.lang-switch-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--border-amber);
  color: var(--amber-primary);
  transform: translateY(-1px);
}

.lang-tag {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.72rem;
  border-radius: 4px;
  background: var(--amber-primary);
  color: #000000;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.top-bar-lang-toggle {
  color: var(--amber-light);
  font-weight: 700;
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.top-bar-lang-toggle:hover {
  background: var(--amber-primary);
  color: #000000;
}

/* Light Mode Overrides for Gradients & Cards */
[data-theme="light"] .text-gradient,
html.theme-light .text-gradient {
  background: linear-gradient(135deg, #0F172A 20%, #1E293B 60%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .text-gradient-amber,
html.theme-light .text-gradient-amber {
  background: linear-gradient(135deg, #B45309 0%, #D97706 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-stat-number,
html.theme-light .hero-stat-number {
  background: linear-gradient(135deg, #0F172A 40%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .badge-pill,
html.theme-light .badge-pill {
  background: #FEF3C7;
  border-color: #FCD34D;
  color: #92400E;
}

[data-theme="light"] .badge-pill.cyan,
html.theme-light .badge-pill.cyan {
  background: #E0F2FE;
  border-color: #BAE6FD;
  color: #0369A1;
}

[data-theme="light"] .badge-pill.emerald,
html.theme-light .badge-pill.emerald {
  background: #D1FAE5;
  border-color: #A7F3D0;
  color: #065F46;
}

[data-theme="light"] .header-phone-pill,
html.theme-light .header-phone-pill {
  color: var(--text-main);
  background: #F1F5F9;
  border-color: #CBD5E1;
}

[data-theme="light"] .mobile-nav-toggle,
html.theme-light .mobile-nav-toggle {
  color: var(--text-main);
  border-color: var(--border-subtle);
}

[data-theme="light"] [style*="rgba(12, 12, 16"],
html.theme-light [style*="rgba(12, 12, 16"] {
  background: var(--bg-elevated) !important;
}

[data-theme="light"] [style*="rgba(18, 18, 24"],
html.theme-light [style*="rgba(18, 18, 24"] {
  background: var(--bg-card) !important;
}

[data-theme="light"] [style*="rgba(9, 9, 11"],
html.theme-light [style*="rgba(9, 9, 11"] {
  background: var(--code-box-bg) !important;
}

[data-theme="light"] .btn-secondary,
html.theme-light .btn-secondary {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .btn-secondary:hover,
html.theme-light .btn-secondary:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

[data-theme="light"] .hero-subtitle,
html.theme-light .hero-subtitle {
  color: #475569;
}

[data-theme="light"] .division-tabs,
html.theme-light .division-tabs {
  background: #E2E8F0;
  border-color: #CBD5E1;
}

[data-theme="light"] .tab-btn,
html.theme-light .tab-btn {
  color: #475569;
}

[data-theme="light"] .tab-btn.active,
html.theme-light .tab-btn.active {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000000;
}

[data-theme="light"] .electrical-flow-box,
html.theme-light .electrical-flow-box {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

[data-theme="light"] .flow-step,
html.theme-light .flow-step {
  border-bottom-color: #E2E8F0;
}

[data-theme="light"] .blog-card-title a,
html.theme-light .blog-card-title a {
  color: #0F172A;
}

[data-theme="light"] .blog-card-title a:hover,
html.theme-light .blog-card-title a:hover {
  color: var(--amber-primary);
}

[data-theme="light"] .blog-card-excerpt,
html.theme-light .blog-card-excerpt {
  color: #475569;
}

[data-theme="light"] .blog-card-thumb,
html.theme-light .blog-card-thumb {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

[data-theme="light"] .blog-card-footer,
html.theme-light .blog-card-footer {
  border-top-color: #E2E8F0;
}

[data-theme="light"] .article-content,
html.theme-light .article-content {
  color: #334155;
}

[data-theme="light"] .article-content h1,
[data-theme="light"] .article-content h2,
[data-theme="light"] .article-content h3,
[data-theme="light"] .article-content h4,
html.theme-light .article-content h1,
html.theme-light .article-content h2,
html.theme-light .article-content h3,
html.theme-light .article-content h4 {
  color: #0F172A;
}

[data-theme="light"] .article-content p,
[data-theme="light"] .article-content li,
html.theme-light .article-content p,
html.theme-light .article-content li {
  color: #334155;
}

[data-theme="light"] .article-content table,
html.theme-light .article-content table {
  background: #FFFFFF;
}

[data-theme="light"] .article-content th,
html.theme-light .article-content th {
  background: #FEF3C7;
  color: #78350F;
}

[data-theme="light"] .article-content td,
html.theme-light .article-content td {
  border-bottom-color: #E2E8F0;
  color: #334155;
}

[data-theme="light"] .article-content blockquote,
html.theme-light .article-content blockquote {
  background: #FEF3C7;
  color: #78350F;
}

[data-theme="light"] .site-footer .footer-links a,
html.theme-light .site-footer .footer-links a {
  color: #94A3B8;
}

[data-theme="light"] .site-footer .footer-links a:hover,
html.theme-light .site-footer .footer-links a:hover {
  color: #F59E0B;
}

[data-theme="light"] .site-footer .footer-bottom,
html.theme-light .site-footer .footer-bottom {
  color: #64748B;
  border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .site-footer .footer-col-title,
html.theme-light .site-footer .footer-col-title {
  color: #FFFFFF;
}

[data-theme="light"] .interactive-calculator-widget,
html.theme-light .interactive-calculator-widget {
  background: #FFFFFF !important;
  border-color: rgba(217, 119, 6, 0.35);
}

[data-theme="light"] [style*="color: #CBD5E1"],
[data-theme="light"] [style*="color:#CBD5E1"],
html.theme-light [style*="color: #CBD5E1"],
html.theme-light [style*="color:#CBD5E1"] {
  color: var(--text-muted) !important;
}

[data-theme="light"] [style*="color: #94A3B8"],
[data-theme="light"] [style*="color:#94A3B8"],
html.theme-light [style*="color: #94A3B8"],
html.theme-light [style*="color:#94A3B8"] {
  color: var(--text-muted) !important;
}

[data-theme="light"] [style*="color: #FFFFFF"],
[data-theme="light"] [style*="color:#FFFFFF"],
html.theme-light [style*="color: #FFFFFF"],
html.theme-light [style*="color:#FFFFFF"] {
  color: var(--heading-color) !important;
}

[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.03)"],
html.theme-light [style*="background: rgba(255, 255, 255, 0.03)"] {
  background: #F1F5F9 !important;
}

/* ==========================================================================
   RTL & Persian (فارسی) Layout & Typography
   ========================================================================== */
[dir="rtl"],
html[lang="fa"] {
  font-family: 'Vazirmatn', var(--font-sans);
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .top-bar-left,
[dir="rtl"] .top-bar-right {
  direction: rtl;
}

[dir="rtl"] .nav-menu {
  padding-right: 0;
}

[dir="rtl"] .nav-item-dropdown .dropdown-menu {
  left: auto;
  right: 0;
  text-align: right;
}

[dir="rtl"] .dropdown-item {
  text-align: right;
  padding-right: 12px;
  padding-left: 12px;
}

[dir="rtl"] .dropdown-item:hover {
  padding-right: 16px;
  padding-left: 12px;
}

[dir="rtl"] .dropdown-arrow {
  margin-right: 4px;
  margin-left: 0;
}

[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}

[dir="rtl"] .article-content {
  text-align: right;
}

[dir="rtl"] .article-content blockquote {
  border-left: none;
  border-right: 4px solid var(--amber-primary);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

[dir="rtl"] .article-content ul,
[dir="rtl"] .article-content ol {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .article-content th,
[dir="rtl"] .article-content td {
  text-align: right;
}

[dir="rtl"] .form-control,
[dir="rtl"] .form-input {
  text-align: right;
}

[dir="rtl"] select.form-control,
[dir="rtl"] select.form-input {
  background-position: left 14px center;
}

[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] .btn,
[dir="rtl"] .nav-link,
[dir="rtl"] .tab-btn,
[dir="rtl"] .badge-pill {
  font-family: 'Vazirmatn', var(--font-sans);
}

[dir="rtl"] [dir="ltr"],
[dir="rtl"] .ltr-text,
[dir="rtl"] .phone-number-text,
[dir="rtl"] bdi {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

[dir="rtl"] .mobile-theme-toggle,
[dir="rtl"] .mobile-lang-switch {
  justify-content: flex-start !important;
  text-align: right;
}

[dir="rtl"] .accordion-header {
  text-align: right;
}

[dir="rtl"] .badge-pill {
  direction: rtl;
}

[dir="rtl"] .radar-ping {
  margin-left: 6px;
  margin-right: 0;
}

[dir="rtl"] .service-card-link svg {
  transform: rotate(180deg);
}

[dir="rtl"] .glass-card:hover .service-card-link svg {
  transform: rotate(180deg) translateX(6px);
}

[dir="rtl"] .modal-close-btn {
  right: auto;
  left: 24px;
}



/* Images with intrinsic width/height attributes keep their aspect ratio */
:where(img[width][height]) { height: auto; max-width: 100%; }

/* Header fits between 1141px and 1400px wide screens (was overflowing the viewport) */
@media (min-width: 1141px) and (max-width: 1400px) {
  .nav-row { gap: 10px; }
  .nav-menu { gap: 0; }
  .nav-link { padding: 8px 8px; font-size: 0.86rem; }
  .header-actions { gap: 8px; }
  .header-phone-pill { padding: 6px 10px; font-size: 0.82rem; }
  .header-cta-btn { padding: 8px 12px; font-size: 0.84rem; }
}
@media (max-width: 1300px) {
  .header-phone-pill { display: none; }
}
