/* ========================================
   ElectroTech Energy Solutions - Main Stylesheet
   High-performance, mobile-first CSS for nginx static hosting
   ======================================== */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  /* Colors - Based on ElectroTech Brand Guidelines */
  --color-primary: #2b3d6d;        /* Deep Navy - Primary Brand */
  --color-primary-dark: #1d2333;   /* Darker Navy */
  --color-primary-light: #3d5aa8;  /* Lighter Navy for hover */
  --color-accent: #ec3547;         /* Vibrant Red - Accent/Action */
  --color-accent-dark: #c02838;    /* Darker Red */
  --color-accent-light: #feeaea;   /* Light Red for backgrounds */
  --color-secondary: #135da8;      /* Medium Blue */
  --color-gold: #fbbf24;           /* Gold accent */

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #f8fafc;      /* Slate 50 */
  --color-light-gray: #f1f3f7;     /* Light gray backgrounds */
  --color-medium-gray: #e2e6ee;    /* Borders, dividers */
  --color-text: #1a202c;           /* Primary text */
  --color-text-light: #4a5568;     /* Secondary text */
  --color-text-muted: #7e89a6;     /* Muted text */
  --color-text-inverse: #ffffff;   /* Text on dark backgrounds */

  /* Semantic Colors */
  --color-success: #059669;
  --color-success-light: #d1fae5;
  --color-warning: #d97706;
  --color-warning-light: #fef3c7;
  --color-error: #dc2626;
  --color-error-light: #fee2e2;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.1;
  --line-height-snug: 1.375;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */

  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(26, 32, 44, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(26, 32, 44, 0.1), 0 2px 4px -1px rgba(26, 32, 44, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(26, 32, 44, 0.1), 0 4px 6px -2px rgba(26, 32, 44, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(26, 32, 44, 0.1), 0 10px 10px -5px rgba(26, 32, 44, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(26, 32, 44, 0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* Container */
  --container-max: 1280px;
  --container-padding: 1.5rem;

  /* Header Height */
  --header-height: 72px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: var(--z-tooltip);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl)); }
h2 { font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl)); }
h3 { font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-3xl)); }
h4 { font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-2xl)); }

p {
  line-height: var(--line-height-relaxed);
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: block;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-3xl) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

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

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
.gap-3xl { gap: var(--space-3xl); }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-accent:hover:not(:disabled) {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--font-size-lg);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
}

.nav-cta {
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--font-size-sm);
}

/* ========================================
   Forms
   ======================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.required {
  color: var(--color-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  border: 2px solid var(--color-medium-gray);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(43, 61, 109, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Form validation states */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--color-error);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
  box-shadow: 0 0 0 3px var(--color-error-light);
}

.form-error {
  display: none;
  font-size: var(--font-size-sm);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

.form-group input.error + .form-error,
.form-group select.error + .form-error,
.form-group textarea.error + .form-error {
  display: block;
}

/* Success message */
.form-success {
  background: var(--color-success-light);
  color: var(--color-success);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-medium-gray);
  z-index: var(--z-fixed);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  text-decoration: none;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-weight-extrabold);
  font-size: var(--font-size-sm);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.nav-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background-color: rgba(43, 61, 109, 0.08);
}

.nav-cta {
  margin-left: var(--space-md);
  display: none;
}

@media (min-width: 769px) {
  .nav-cta {
    display: inline-flex;
  }
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: var(--z-modal);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* Mobile Nav Overlay */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-white);
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: var(--z-fixed);
    overflow-y: auto;
  }

  body.nav-open .nav {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .nav-link {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    text-align: center;
  }

  .nav-cta {
    display: block;
    margin-top: var(--space-lg);
    width: 100%;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 32, 44, 0.5);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    transition: opacity var(--transition-base);
  }

  .nav-overlay.visible {
    display: block;
    opacity: 1;
  }
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  background: linear-gradient(180deg, var(--color-off-white) 0%, var(--color-white) 100%);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--space-md);
}

.page-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   Section Header
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   Home Page - Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-off-white) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(43, 61, 109, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(236, 53, 71, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
  font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero p {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-medium-gray);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat-item {
  text-align: left;
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  max-width: 600px;
  height: 80vh;
  max-height: 600px;
  pointer-events: none;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .hero-visual {
    display: none;
  }

  .hero-content {
    max-width: 100%;
  }
}

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

/* ========================================
   Services Overview (Home)
   ======================================== */
.services-overview {
  background: var(--color-white);
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-medium-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

.service-card p {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.service-link:hover {
  color: var(--color-accent);
  gap: var(--space-sm);
}

/* ========================================
   Featured Project (Home)
   ======================================== */
.featured-project {
  background: var(--color-off-white);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-medium-gray);
}

.project-image {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.project-image svg {
  width: 100%;
  height: 100%;
}

.project-content {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-tag {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.project-content h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-md);
}

.project-client {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.highlight-item {
  background: var(--color-off-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.highlight-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.highlight-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

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

  .project-content {
    padding: var(--space-xl);
  }
}

/* ========================================
   Trust Indicators / CTA (Home)
   ======================================== */
.trust-indicators {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-3xl) 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.trust-item {
  padding: var(--space-md);
}

.trust-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.trust-label {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .trust-value {
    font-size: var(--font-size-3xl);
  }
}

/* ========================================
   About Page - Values
   ======================================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.value-card {
  background: var(--color-white);
  border: 1px solid var(--color-medium-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.value-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.value-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.value-icon svg {
  width: 28px;
  height: 28px;
}

/* Feature Icons (Why Choose ElectroTech - Home page) */
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.value-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.value-card p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}

/* Team Section */
.team-section {
  background: var(--color-off-white);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.team-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-medium-gray);
  transition: all var(--transition-base);
}

.team-card:hover {
  box-shadow: var(--shadow-lg);
}

.team-image {
  aspect-ratio: 1/1;
  background: var(--color-light-gray);
}

.team-image svg {
  width: 100%;
  height: 100%;
}

.team-info {
  padding: var(--space-lg);
  text-align: center;
}

.team-info h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-xs);
}

.team-role {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
  display: block;
}

.team-bio {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

/* Stats Section */
.stat-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   Services Page
   ======================================== */
.services {
  background: var(--color-white);
}

.service-category {
  background: var(--color-white);
}

.category-header h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-primary);
}

.service-list {
  list-style: none;
}

.service-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-medium-gray);
}

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

.service-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-off-white);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-info h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xs);
}

.service-info p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: var(--line-height-normal);
}

/* ========================================
   Infrared Scanning Section
   ======================================== */
.ir-section {
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.ir-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(236, 53, 71, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.ir-content {
  position: relative;
  z-index: 1;
}

.ir-section .section-header h2 {
  color: var(--color-white);
}

.ir-section .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

.ir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.ir-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.ir-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(236, 53, 71, 0.3);
  transform: translateY(-4px);
}

.ir-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(236, 53, 71, 0.2);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.ir-icon svg {
  width: 24px;
  height: 24px;
}

.ir-card h3 {
  color: var(--color-white);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.ir-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.ir-benefits {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}

.ir-benefits h4 {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-xl);
}

.ir-benefits ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.ir-benefits li {
  position: relative;
  padding-left: var(--space-lg);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.ir-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* ========================================
   Projects Page
   ======================================== */
.project-detail {
  background: var(--color-white);
}

.project-main-image {
  background: var(--color-light-gray);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.project-tag {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
  background: var(--color-off-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-medium-gray);
}

.project-category {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-md);
}

.project-detail h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-sm);
}

.project-client {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-medium-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--color-primary);
}

.faq-item h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.faq-item p {
  color: var(--color-text-light);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

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

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-brand .logo:hover {
  color: var(--color-white);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  max-width: 300px;
}

.footer-links h4 {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

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

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size-sm);
}

/* Social links in footer */
.social-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.social-links a:hover,
.social-links a:focus {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.social-links svg {
  width: 20px;
  height: 20px;
  display: block;
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ========================================
   Animations - Scroll Reveal
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for grids */
.animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.animate-on-scroll:nth-child(3) { transition-delay: 200ms; }
.animate-on-scroll:nth-child(4) { transition-delay: 300ms; }
.animate-on-scroll:nth-child(5) { transition-delay: 400ms; }
.animate-on-scroll:nth-child(6) { transition-delay: 500ms; }

/* ========================================
   Contact Methods
   ======================================== */
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.contact-method-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-method-icon svg {
  width: 24px;
  height: 24px;
}

.contact-method h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.contact-method p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

.contact-method a {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.contact-method a:hover {
  color: var(--color-accent);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .header,
  .footer,
  .btn,
  .contact-form-container,
  .hero-buttons {
    display: none !important;
  }

  .page-header {
    padding-top: 0;
  }

  body {
    font-size: 12pt;
  }

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

  .section {
    page-break-inside: avoid;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* ========================================
   IE11 Fallbacks (minimal)
   ======================================== */
@supports not (display: grid) {
  .grid-2,
  .grid-3,
  .grid-4 {
    display: flex;
    flex-wrap: wrap;
    margin: calc(-1 * var(--space-xl) / 2);
  }

  .grid-2 > *,
  .grid-3 > *,
  .grid-4 > * {
    flex: 1 0 calc(50% - var(--space-xl));
    margin: calc(var(--space-xl) / 2);
  }

  @media (max-width: 768px) {
    .grid-2 > *,
    .grid-3 > *,
    .grid-4 > * {
      flex: 1 0 100%;
    }
  }
}