/* Applied Electrical — Mobile-first styles */

:root {
  --navy: #0C2340;
  --blue: #1E6CB6;
  --cyan: #3BA8D8;
  --amber: #E8952F;
  --white: #FFFFFF;
  --off-white: #F5F7FA;
  --light-gray: #E2E8F0;
  --text: #1E293B;
  --text-light: #475569;
  --text-on-dark: #CBD5E1;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(12,35,64,0.08);
  --shadow-lg: 0 8px 24px rgba(12,35,64,0.12);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER / NAV — mobile first
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo span {
  display: none;
}

/* Desktop nav links — hidden on mobile */
.nav-links {
  display: none;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.active {
  color: var(--white);
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 2px;
}

/* Phone CTA in nav */
.nav-phone {
  display: none;
}

.nav-phone a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Hamburger toggle — visible on mobile */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  z-index: 99;
  padding: 32px 24px;
  flex-direction: column;
  gap: 0;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  display: block;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu .mobile-phone {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: none;
  padding: 20px 0;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12,35,64,0.92) 0%,
    rgba(12,35,64,0.7) 40%,
    rgba(12,35,64,0.3) 70%,
    rgba(12,35,64,0.15) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,168,216,0.2);
  border: 1px solid rgba(59,168,216,0.4);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  color: var(--white);
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 540px;
}

.hero p {
  color: var(--text-on-dark);
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  min-height: 48px;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--amber);
  color: var(--navy);
}

.btn-primary:hover {
  background: #D4841F;
  color: var(--navy);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

/* ============================================================
   SECTIONS — generic
   ============================================================ */

section {
  padding: 64px 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-heading {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 40px;
}

.bg-off-white { background: var(--off-white); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy .section-label { color: var(--cyan); }
.bg-navy .section-heading { color: var(--white); }
.bg-navy .section-sub { color: var(--text-on-dark); }

/* ============================================================
   SERVICES OVERVIEW (homepage)
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.service-card-img {
  height: 200px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  padding: 24px 20px;
}

.service-card-body h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.service-card-body p {
  color: var(--text-light);
  font-size: 0.925rem;
  margin-bottom: 12px;
}

.service-card-body .card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.service-card-body .card-link::after {
  content: '\2192';
}

/* ============================================================
   WHY SECTION — differentiators
   ============================================================ */

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(30,108,182,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-item h3 { font-size: 1rem; margin-bottom: 4px; }
.why-item p { color: var(--text-light); font-size: 0.925rem; margin-bottom: 0; }

/* ============================================================
   REVIEWS
   ============================================================ */

.reviews-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--cyan);
}

.review-stars {
  color: var(--amber);
  font-size: 1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.review-card blockquote {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 16px;
  font-style: italic;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.review-source {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ============================================================
   TRUST BADGES
   ============================================================ */

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.trust-bar img {
  height: 48px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
  filter: grayscale(30%);
}

.trust-bar img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: var(--text-on-dark);
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn-primary {
  font-size: 1.125rem;
  padding: 16px 36px;
}

/* ============================================================
   SERVICES PAGE — detailed
   ============================================================ */

.service-detail {
  padding: 48px 0;
  border-bottom: 1px solid var(--light-gray);
}

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

.service-detail-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.service-detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.service-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-body h2 {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.service-detail-body p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.service-detail-body ul {
  list-style: none;
  margin: 16px 0;
}

.service-detail-body ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.service-detail-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-hero {
  position: relative;
  padding: 120px 0 64px;
  background: var(--navy);
}

.about-hero h1 { color: var(--white); font-size: 1.75rem; }
.about-hero p { color: var(--text-on-dark); }

.team-photo {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.team-photo img {
  width: 100%;
  height: auto;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.about-value {
  padding: 24px;
  background: var(--off-white);
  border-radius: var(--radius);
}

.about-value h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--blue);
}

.about-value p {
  font-size: 0.925rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.cert-list {
  list-style: none;
  margin: 24px 0;
}

.cert-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.95rem;
}

.cert-list li:last-child { border-bottom: none; }

.cert-list img {
  height: 36px;
  width: auto;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.contact-info-block {
  margin-bottom: 28px;
}

.contact-info-block h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.contact-info-block p,
.contact-info-block a {
  font-size: 0.95rem;
  color: var(--text-light);
}

.contact-info-block a {
  color: var(--blue);
  font-weight: 500;
}

.contact-phone-big {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.contact-form {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 32px 24px;
}

.contact-form h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
  min-height: 48px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,108,182,0.15);
}

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

.form-submit {
  width: 100%;
}

.form-success {
  display: none;
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: #065F46;
  font-weight: 500;
}

.form-success.visible { display: block; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */

.page-hero {
  background: var(--navy);
  padding: 88px 0 40px;
}

.page-hero + section {
  padding-top: 24px;
}

.page-hero + section .service-detail:first-child {
  padding-top: 16px;
}

.page-hero h1 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-on-dark);
  font-size: 1.05rem;
  max-width: 560px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-on-dark);
  line-height: 1.7;
}

.footer-col a:hover { color: var(--white); }

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

.footer-col ul li { margin-bottom: 8px; }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-badges {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-badges img {
  height: 40px;
  width: auto;
  opacity: 0.6;
}

/* ============================================================
   PRIVACY PAGE
   ============================================================ */

.legal-content {
  padding: 120px 0 64px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 24px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============================================================
   UTILITY
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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

/* ============================================================
   TABLET — 768px+
   ============================================================ */

@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.125rem; }

  .hero-actions {
    flex-direction: row;
  }

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

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

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

  .service-detail-inner {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail:nth-child(even) .service-detail-inner {
    direction: rtl;
  }

  .service-detail:nth-child(even) .service-detail-inner > * {
    direction: ltr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .page-hero h1 { font-size: 2.25rem; }
  .cta-banner h2 { font-size: 1.75rem; }
  .section-heading { font-size: 1.75rem; }
}

/* ============================================================
   DESKTOP — 1024px+
   ============================================================ */

@media (min-width: 1024px) {
  /* Show desktop nav, hide hamburger */
  .nav-links {
    display: flex;
  }

  .nav-phone {
    display: block;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }

  .hero h1 { font-size: 3rem; }

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

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

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

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

/* ============================================================
   LARGE DESKTOP — 1280px+
   ============================================================ */

@media (min-width: 1280px) {
  .container { padding: 0 40px; }
  .hero-content { padding: 0 40px 64px; }
  .nav-bar { padding: 0 40px; }
}
