/* ============================================
   York Electrical Services — Site Stylesheet
   ============================================ */

:root {
  --navy: #111b1e;
  --navy-2: #0d1517;
  --red: #d7141a;
  --red-dark: #b10f15;
  --blue: #003087;
  --blue-light: #1a56c4;
  --white: #ffffff;
  --gray-bg: #f3f4f6;
  --gray-text: #4b5160;
  --ink: #131722;
  --footer-dark: #22202b;
  --font-head: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Raleway', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
}

/* ---------- Top contact bar ---------- */
.topbar {
  display: flex;
  background: var(--blue);
}
.topbar .phone,
.topbar .cta {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.topbar .phone {
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.topbar .cta {
  background: var(--red);
  color: var(--white);
  transition: background 0.2s ease;
}
.topbar .cta:hover { background: var(--red-dark); }

/* ---------- Header / Nav ---------- */
header.site-header {
  background: var(--navy);
  padding: 14px 0;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo svg { width: 62px; height: 68px; }
.logo-text {
  font-family: var(--font-head);
  color: var(--white);
  line-height: 1.05;
}
.logo-text .top { font-size: 12px; letter-spacing: 4px; color: #9fb3d8; display:block; }
.logo-text .main { font-size: 20px; font-weight: 800; display:block; }
.logo-text .sub { font-size: 10px; letter-spacing: 2px; color: var(--red); display:block; font-weight:600;}

nav.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
}
nav.main-nav a {
  color: var(--white);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.3px;
  position: relative;
  padding: 6px 0;
}
nav.main-nav a:hover { color: var(--red); }
nav.main-nav .dropdown { position: relative; }
nav.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-2);
  min-width: 220px;
  padding: 8px 0;
  border-top: 3px solid var(--red);
  z-index: 20;
}
nav.main-nav .dropdown:hover .dropdown-menu { display: block; }
nav.main-nav .dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-weight: 500;
}
nav.main-nav .dropdown-menu a:hover { background: rgba(255,255,255,0.05); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--white);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,26,0.75), rgba(10,14,26,0.55));
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; max-width: 780px; }
.hero-text-slide { display: none; }
.hero-text-slide.active { display: block; animation: heroFade 0.6s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hero .eyebrow {
  color: var(--blue-light);
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 15px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 12px;
}
.hero h1 .accent { color: var(--blue-light); }
.hero p {
  font-size: 17px;
  color: #e4e7ee;
  max-width: 560px;
  margin: 0 auto 26px;
}

/* simple hero page banner (interior pages) */
.page-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(0deg, rgba(10,14,26,0.85), rgba(10,14,26,0.3)), var(--navy);
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding-bottom: 30px;
}
.page-hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 15px 34px;
  border: none;
  cursor: pointer;
  font-size: 14.5px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn.outline {
  background: transparent;
  border: 2px solid var(--white);
}
.btn.outline:hover { background: var(--white); color: var(--navy); }

/* ---------- Value props ---------- */
.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 60px 0;
}
.value-props .prop { text-align: center; }
.value-props .icon {
  width: 68px; height: 68px;
  background: var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--white);
  font-size: 26px;
  font-weight: 800;
}
.value-props h3 {
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.value-props p { color: var(--gray-text); font-size: 14.5px; }

/* ---------- About / feature blocks ---------- */
.section { padding: 70px 0; }
.section.bg-gray { background: var(--gray-bg); }
.section.bg-navy { background: var(--navy); color: var(--white); }

.section-title { text-align: center; margin-bottom: 40px; }
.section-title .eyebrow {
  display: block;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 8px;
}
.section-title h2 { font-size: clamp(24px, 4vw, 34px); }
.section-title h2 .accent { color: var(--blue); }
.section.bg-navy .section-title h2 .accent { color: var(--blue-light); }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.feature-row img { border: 4px solid var(--blue); }

.feature-blocks {
  display: grid;
  gap: 26px;
  margin-top: 30px;
}
.feature-block {
  border-left: 4px solid var(--red);
  background: var(--white);
  padding: 22px 26px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
}
.feature-block h3 {
  color: var(--blue);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.feature-block p { color: var(--gray-text); font-size: 14.5px; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.service-card {
  position: relative;
  height: 260px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
}
.service-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.55;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.service-card:hover img { transform: scale(1.06); opacity: 0.7; }
.service-card .label {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 15.5px;
  text-align: center;
}

/* Sidebar service list (interior service pages) */
.service-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
}
.service-sidebar {
  background: var(--gray-bg);
  padding: 30px 24px;
}
.service-sidebar h3 { text-align: center; margin-bottom: 20px; font-size: 17px; }
.service-sidebar li {
  text-align: center;
  padding: 14px 0;
  border-bottom: 1px dashed #cfd3da;
  font-weight: 600;
  font-size: 14.5px;
}
.service-sidebar li:last-child { border-bottom: none; }
.service-sidebar a:hover { color: var(--red); }

.service-content img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  margin-bottom: 26px;
}
.service-content h2 { margin-bottom: 16px; font-size: 26px; }
.service-content .two-col {
  columns: 2;
  column-gap: 40px;
  color: var(--gray-text);
  font-size: 15px;
}
@media (max-width: 720px) {
  .service-content .two-col { columns: 1; }
}

/* ---------- Specializations ---------- */
.specializations {
  text-align: center;
  padding: 50px 0;
}
.specializations p {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
}
.specializations .accent { color: var(--blue); }

/* ---------- Testimonials ---------- */
.testimonial-card {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 40px;
}
.stars { color: #f5b301; font-size: 20px; letter-spacing: 4px; margin: 10px 0; }
.testimonial-card p.quote { font-size: 18px; font-style: italic; margin: 16px 0; }
.testimonial-card .author { font-weight: 700; color: var(--blue-light); }
.testimonial-card .date { font-size: 13px; color: #9098aa; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-grid img:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
}
.contact-info .info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}
.contact-info .info-row .ic {
  width: 42px; height: 42px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.contact-info h4 { font-size: 14px; letter-spacing: 0.5px; margin-bottom: 4px; }
.contact-info p { color: var(--gray-text); font-size: 14.5px; }

form.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  margin: 16px 0 6px;
}
form.contact-form input,
form.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d7dae0;
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--white);
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
form.contact-form .btn { margin-top: 20px; }
.form-note {
  font-size: 12.5px;
  color: var(--gray-text);
  margin-top: 10px;
}

.map-embed {
  margin-top: 20px;
  height: 380px;
  width: 100%;
  border: 0;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy);
  color: #c7cbd6;
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid h4 {
  color: var(--white);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.footer-grid p, .footer-grid li { font-size: 14px; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--red); }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: #9098aa; }

.social-row { display: flex; gap: 12px; margin-top: 6px; }
.social-row a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background 0.2s ease;
}
.social-row a:hover { background: var(--red); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  color: #cfd2d6;
  background: var(--footer-dark);
}
.footer-bottom a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .value-props { grid-template-columns: 1fr; gap: 30px; }
  .feature-row { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .topbar { flex-direction: row; }
  .topbar .phone, .topbar .cta { font-size: 12.5px; padding: 12px 6px; }
nav.main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy-2);
    flex-direction: column;
    display: none;
    padding: 10px 0;
    z-index: 100;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 0; }
  nav.main-nav ul li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06); }
  nav.main-nav a { display: block; padding: 14px 24px; }
  nav.main-nav .dropdown-menu { position: static; border-top: none; background: rgba(0,0,0,0.2); display: none; }
  nav.main-nav .dropdown.open .dropdown-menu { display: block; }
  .menu-toggle { display: flex; }
  .nav-wrap { position: relative; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 2px;
}
