/* =============================================
   RESPONSE ELECTRICIANS — HEADER & FOOTER
   Dynamic transparent header with light/dark modes
   Minimal clean footer
   ============================================= */

/* ---------- SITE HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--header-height);
  transition: background .3s ease, box-shadow .3s ease;
}

/* Default: transparent over hero image */
.site-header {
  background: transparent;
}

/* Scrolled state: solid white with shadow */
.site-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 100%;
}

/* ---------- LOGO ---------- */
.header-logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 56px; width: auto; transition: opacity .3s; }

/* Default (transparent): show white logo, hide dark logo */
.logo-light { display: block; }
.logo-dark { display: none; }

/* When header-dark (no hero image): show dark logo */
.site-header.header-dark .logo-light { display: none; }
.site-header.header-dark .logo-dark { display: block; }

/* When scrolled: show dark logo */
.site-header.scrolled .logo-light { display: none; }
.site-header.scrolled .logo-dark { display: block; }

/* ---------- NAVIGATION ---------- */
.header-nav {
  display: flex; align-items: center; gap: 4px;
  height: 100%;
}

.header-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 8px 16px; border-radius: var(--clay-radius-sm);
  transition: color .2s, background .2s;
  text-decoration: none; white-space: nowrap;
}

/* Default: white text (over hero image) with shadow for readability */
.header-nav a { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.header-nav a:hover { color: #fff; background: rgba(255,255,255,0.15); text-shadow: 0 1px 6px rgba(0,0,0,0.5); }

/* Dark text mode (no hero image) */
.site-header.header-dark .header-nav a { color: var(--dark); text-shadow: none; }
.site-header.header-dark .header-nav a:hover { color: var(--cyan); background: rgba(0,164,228,0.06); text-shadow: none; }

/* Scrolled: always dark text */
.site-header.scrolled .header-nav a { color: var(--dark); text-shadow: none; }
.site-header.scrolled .header-nav a:hover { color: var(--cyan); background: rgba(0,164,228,0.06); text-shadow: none; }

/* Nav dropdown */
.nav-dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px; cursor: pointer;
  height: 100%;
}
.nav-dropdown-trigger svg {
  width: 12px; height: 12px; transition: transform .2s;
}
/* Default (light mode): white chevron */
.nav-dropdown-trigger svg { stroke: rgba(255,255,255,0.7); }
.site-header.header-dark .nav-dropdown-trigger svg { stroke: var(--dark); }
.site-header.scrolled .nav-dropdown-trigger svg { stroke: var(--dark); }

.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 260px; padding: 12px 0; margin-top: 0;
  background: #fff; border-radius: var(--clay-radius-sm);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 100;
}
/* Invisible bridge to prevent hover gap between trigger and menu */
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -20px; left: 0;
  width: 100%; height: 20px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu { display: block; }
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu a {
  display: block; padding: 10px 20px;
  font-size: 13px; font-weight: 600; color: #333 !important;
  border-radius: 0;
}
.nav-dropdown-menu a:hover { background: var(--cyan-light) !important; color: var(--cyan) !important; }

/* ---------- HEADER CTA ---------- */
.header-cta {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 800;
  padding: 10px 22px; border-radius: var(--clay-radius-sm);
  background: var(--cyan); color: #fff !important;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,164,228,0.35); }

/* ---------- MOBILE MENU TOGGLE ---------- */
.mobile-menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; position: relative; z-index: 1001;
}
.mobile-menu-toggle span {
  display: block; width: 24px; height: 2px;
  margin: 6px 0; transition: transform .3s, opacity .3s;
}
/* Default: white bars */
.mobile-menu-toggle span { background: #fff; }
.site-header.header-dark .mobile-menu-toggle span { background: var(--dark); }
.site-header.scrolled .mobile-menu-toggle span { background: var(--dark); }

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* When menu is active, always dark bars */
.mobile-menu-toggle.active span { background: var(--dark); }

/* ---------- MOBILE NAV ---------- */
.mobile-nav {
  display: none; position: fixed; inset: 0;
  background: #fff; z-index: 999;
  padding: calc(var(--header-height) + 20px) 24px 24px;
  overflow-y: auto;
  flex-direction: column; gap: 4px;
}
.mobile-nav.active { display: flex; }

.mobile-nav a {
  display: block; padding: 16px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--dark);
  text-decoration: none; border-radius: var(--clay-radius-sm);
  transition: background .2s;
}
.mobile-nav a:hover { background: var(--cyan-light); color: var(--cyan); }

.mobile-nav-divider { height: 1px; background: #e5e7eb; margin: 8px 0; }

.mobile-nav-cta {
  display: block; text-align: center; padding: 16px;
  background: var(--cyan); color: #fff !important; font-weight: 800;
  border-radius: var(--clay-radius-sm); margin-top: 12px;
  font-family: 'Montserrat', sans-serif; font-size: 16px;
}
.mobile-nav-phone {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; font-size: 18px; font-weight: 900;
  color: var(--cyan) !important; margin-top: 8px;
}

/* Mobile dropdown */
.mobile-dropdown-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 16px 20px; font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--dark);
  text-align: left; border-radius: var(--clay-radius-sm);
}
.mobile-dropdown-toggle svg { width: 16px; height: 16px; stroke: #999; transition: transform .2s; }
.mobile-dropdown-toggle.active svg { transform: rotate(180deg); }

.mobile-dropdown-items {
  display: none; padding-left: 20px;
}
.mobile-dropdown-items.active { display: block; }
.mobile-dropdown-items a {
  font-size: 14px; font-weight: 600; padding: 12px 20px;
  color: #555;
}

/* ---------- RESPONSIVE HEADER ---------- */
@media (max-width: 960px) {
  .header-nav { display: none; }
  .header-cta { display: none; }
  .mobile-menu-toggle { display: block; }
  .logo-img { height: 40px; }
}

@media (min-width: 961px) {
  .mobile-nav { display: none !important; }
  .mobile-menu-toggle { display: none !important; }
}

/* ---------- SITE FOOTER ---------- */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,0.7);
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; align-items: start;
}

/* Footer brand column */
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo-wrap { display: flex; align-items: center; gap: 10px; }
.footer-logo-icon { height: 40px; width: auto; }
.footer-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 14px;
  line-height: 1.15; letter-spacing: 0.5px;
  text-transform: uppercase; color: #fff;
}
.footer-tagline {
  font-size: 14px; font-weight: 500; line-height: 1.6;
  color: rgba(255,255,255,0.55); max-width: 320px;
}
.footer-licence {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 1px;
}

/* Footer contact column */
.footer-contact { display: flex; flex-direction: column; gap: 16px; }
.footer-contact-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 2px;
}
.footer-contact a {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7);
  text-decoration: none; transition: color .2s;
}
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--cyan); }

.footer-address {
  font-size: 13px; font-weight: 500; line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

/* Footer social column */
.footer-social-col { display: flex; flex-direction: column; gap: 16px; }
.footer-social-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 2px;
}
.footer-social-links { display: flex; gap: 12px; }
.footer-social-link {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.footer-social-link:hover { background: var(--cyan); transform: translateY(-2px); }
.footer-social-link svg { width: 18px; height: 18px; fill: #fff; }

.footer-awards {
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4);
  line-height: 1.6; margin-top: 8px;
}

/* Footer bottom bar */
.footer-bottom {
  max-width: 1140px; margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copyright {
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.35);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a {
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.35);
  text-decoration: none; transition: color .2s;
}
.footer-legal a:hover { color: rgba(255,255,255,0.6); }

/* ---------- FOOTER RESPONSIVE ---------- */
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .footer-legal { gap: 16px; }
}

/* ---------- PAGE BODY OFFSET FOR FIXED HEADER ---------- */
/* Applied to pages with hero images (transparent header overlays image) */
/* Pages WITHOUT hero images get padding-top via .page-body class */
.page-body { padding-top: var(--header-height); }
