/* New World Electrical Services — corrected shared styles */
:root {
  --navy: #0D1B33;
  --navy-light: #162846;
  --navy-dark: #081321;
  --orange: #F26A00;
  --orange-dark: #CF5700;
  --orange-light: #FF8730;
  --black: #000000;
  --dark: var(--navy-dark);
  --charcoal: var(--navy-light);
  --light: #f4f4f4;
  --white: #fff;
  --gold: var(--orange);
  --gold-dark: var(--orange-dark);
  --focus: #8CC8FF;
  --content-width: 1200px;
  --header-main-height: 78px;
  --header-total-height: 140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--navy); color: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 10000; padding: 0.65rem 1rem; background: var(--gold); color: var(--navy); font-weight: 700; transform: translateY(-150%); transition: transform 0.2s ease; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: var(--navy-dark); box-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.header-inner { min-height: var(--header-main-height); max-width: 1600px; margin: 0 auto; padding: 0.65rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.logo { flex: 0 0 auto; }
.logo img { height: 54px; width: auto; }

.navbar { margin-left: 0.5rem; }
.navbar ul, .mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.navbar > ul { display: flex; align-items: center; gap: 0.2rem; }
.navbar li { position: relative; }
.navbar a, .navbar .dropdown-toggle { display: block; border: 0; background: transparent; color: var(--white); padding: 0.75rem 0.7rem; text-decoration: none; white-space: nowrap; }
.navbar a:hover, .navbar .dropdown-toggle:hover, .navbar a[aria-current="page"], .dropdown-menu a[aria-current="page"] { color: var(--gold); }
.dropdown-toggle i { margin-left: 0.25rem; font-size: 0.75em; transition: transform 0.2s ease; }
.dropdown.open > .dropdown-toggle i, .dropdown-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; padding: 0.45rem; background: var(--navy-light); border-radius: 0 0 0.6rem 0.6rem; box-shadow: 0 12px 24px rgba(0,0,0,0.35); }
.dropdown-menu a { padding: 0.7rem 0.8rem; border-radius: 0.35rem; text-decoration: none; }
.dropdown-menu a:hover { background: #20385f; }
.navbar .dropdown:hover > .dropdown-menu, .navbar .dropdown:focus-within > .dropdown-menu, .navbar .dropdown.open > .dropdown-menu { display: block; }

.desktop-phone { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem; color: var(--gold); font-weight: 700; text-decoration: none; white-space: nowrap; }
.desktop-phone:hover { text-decoration: underline; }
.desktop-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.55rem 0.9rem; border-radius: 0.4rem; background: var(--gold); color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap; }
.desktop-cta:hover { background: var(--gold-dark); }
.mobile-phone, .hamburger-icon { display: none; }

.site-search-row { min-height: calc(var(--header-total-height) - var(--header-main-height)); display: flex; align-items: center; justify-content: center; padding: 0.45rem 1.25rem 0.6rem; border-top: 1px solid var(--navy-light); background: var(--navy-dark); }
.site-search { width: min(760px, 100%); display: flex; align-items: stretch; }
.site-search input { min-width: 0; flex: 1 1 auto; padding: 0.62rem 0.8rem; border: 1px solid #777; border-right: 0; border-radius: 0.4rem 0 0 0.4rem; color: var(--black); background: var(--white); }
.site-search button { display: inline-flex; align-items: center; gap: 0.45rem; border: 0; padding: 0.62rem 1rem; border-radius: 0 0.4rem 0.4rem 0; background: var(--gold); color: var(--navy); font-weight: 700; }
.site-search button:hover { background: var(--gold-dark); }

.mobile-nav { display: none; position: fixed; top: var(--header-total-height); left: 0; right: 0; max-height: calc(100vh - var(--header-total-height)); overflow-y: auto; z-index: 999; background: var(--navy-dark); box-shadow: 0 12px 25px rgba(0,0,0,0.45); }
.mobile-nav.active { display: block; }
.mobile-nav li { border-bottom: 1px solid #27405f; }
.mobile-nav a, .mobile-nav .dropdown-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; color: var(--white); padding: 0.95rem 1.25rem; text-align: left; text-decoration: none; }
.mobile-nav a[aria-current="page"] { color: var(--gold); font-weight: 700; }
.mobile-nav .dropdown-menu { position: static; min-width: 0; padding: 0; border-radius: 0; box-shadow: none; background: var(--navy-light); }
.mobile-nav .dropdown.open > .dropdown-menu { display: block; }
.mobile-nav .dropdown-menu a { padding-left: 2.2rem; }
.mobile-nav .mobile-cta-item { padding: 0.85rem 1rem; background: var(--navy-dark); }
.mobile-nav .mobile-request-service { justify-content: center; border-radius: 0.4rem; background: var(--gold); color: var(--navy); font-weight: 700; }
.mobile-nav .mobile-request-service:hover { background: var(--gold-dark); color: var(--navy); }

main { display: block; }
[id] { scroll-margin-top: calc(var(--header-total-height) + 1rem); }
.hero-section { position: relative; min-height: clamp(360px, 48vw, 560px); display: flex; align-items: center; background-size: cover; background-repeat: no-repeat; color: var(--white); isolation: isolate; }
.hero-section::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,19,33,0.86) 0%, rgba(13,27,51,0.58) 50%, rgba(13,27,51,0.18) 100%); }
.hero-content { width: min(680px, 92%); margin-left: max(4vw, 1.25rem); padding: 2rem; }
.hero-kicker { margin: 0 0 0.5rem; color: var(--gold); font-weight: 700; letter-spacing: 0.03em; }
.hero-content h1 { margin: 0 0 1.25rem; font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.12; text-wrap: balance; }
.hero-cta, .button-link { display: inline-block; padding: 0.75rem 1rem; border-radius: 0.4rem; background: var(--gold); color: var(--navy); font-weight: 700; text-decoration: none; transition: background 0.2s ease, transform 0.2s ease; }
.hero-cta:hover, .button-link:hover { background: var(--gold-dark); transform: translateY(-1px); }

.section-one-home { background-image: url("Pictures/Wooden House Lighting.jpg"); background-position: center 22%; }
.section-one-residential { background-image: url("Pictures/kitchen_no_stools_ladder_4000x1800.jpg"); background-position: center 10%; }
.section-one-commercial { background-image: url("Pictures/conduit_4in_4000x1800_web.jpg"); background-position: center 20%; }
.section-one-ev-charger { background-image: url("Pictures/EV Charger3.jpg"); background-position: center 75%; }
.section-one-generator { background-image: url("Pictures/backyard_no_brand_resized.jpg"); background-position: 80% 70%; }
.section-one-about { background-image: url("Pictures/Us.png"); background-position: center 50%; }
.section-one-service-area { background-image: url("Pictures/watauga-lake-4000x1800.jpg"); background-position: center 35%; }
.section-one-contact { background-image: url("Pictures/Contact Us Dusk Suburb.jpg"); background-position: right 75%; }
.section-one-projects { background-image: url("Pictures/Project-Family Home.jpg"); background-position: 20% 75%; }

.section, .featured-products { padding: clamp(2.5rem, 5vw, 5rem) 1.25rem; }
.content-container { width: min(var(--content-width), 100%); margin: 0 auto; }
.content-container > h2, .prose-container > h2:first-child, .map-container > h2, .contact-form-container > h2 { margin-top: 0; }
.section h2, .featured-products h2 { text-align: center; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; }
.featured-products, .testimonials-section, .projects-section, .content-section { background: var(--navy); color: var(--white); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.service-card { display: flex; flex-direction: column; padding: 1.25rem; background: var(--charcoal); border-radius: 0.75rem; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.service-card h3 { margin: 0 0 1rem; color: var(--gold); text-align: center; font-size: 1.4rem; }
.service-card > p { flex-grow: 1; }
.service-card .button-link {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  line-height: 1.2;
  text-align: center;
}
.image-container { position: relative; overflow: hidden; border-radius: 0.55rem; }
.image-container img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-description { position: absolute; inset: auto 0 0; margin: 0; padding: 0.75rem; background: rgba(0,0,0,0.78); color: var(--white); transform: translateY(100%); transition: transform 0.2s ease; }
.image-container:hover .image-description, .image-container:focus-within .image-description { transform: translateY(0); }

.prose-container { width: min(820px, 100%); margin: 0 auto; font-size: 1.05rem; }
.prose-container h2 { margin: 2.6rem 0 0.9rem; color: var(--gold); }
.prose-container h3 { margin-bottom: 0.35rem; }
.prose-container p { margin-top: 0.5rem; }
.service-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; width: 100%; }
.check-list { margin: 0; padding: 1.15rem 1.15rem 1.15rem 2.6rem; background: var(--navy-light); border-radius: 0.65rem; }
.check-list li { margin: 0.45rem 0; padding-left: 0.15rem; }
.check-list li::marker { color: var(--gold); }
.single-column-list { width: 100%; }

.swiper { width: min(900px, 100%); margin: 0 auto; border-radius: 0.75rem; overflow: hidden; }
.testimonial-swiper { min-height: 290px; background: var(--light); }
.testimonial-card { min-height: 290px; padding: 2.25rem 4rem 3.2rem; display: flex; flex-direction: column; justify-content: center; color: var(--navy); background: var(--light); text-align: center; }
.testimonial-card blockquote { margin: 0; font-size: 1.05rem; }
.testimonial-author { margin: 1.2rem 0 0; font-weight: 700; }
.swiper-button-prev, .swiper-button-next { color: var(--navy); }
.swiper-pagination-bullet-active { background: var(--gold); }
.swiper-autoplay-toggle { display: block; margin: 1rem auto 0; padding: 0.55rem 0.9rem; border: 1px solid var(--gold); border-radius: 0.35rem; background: transparent; color: var(--gold); }
.swiper-autoplay-toggle:hover { background: var(--gold); color: var(--navy); }
.project-swiper { height: clamp(360px, 60vw, 720px); background: var(--navy-dark); }
.project-slide { margin: 0; display: flex; align-items: center; justify-content: center; background: var(--navy-dark); }
.project-slide img { width: 100%; height: 100%; object-fit: contain; }
.projects-section .swiper-button-prev, .projects-section .swiper-button-next { color: var(--navy); }
.projects-section .swiper-pagination-bullet { background: var(--white); opacity: 0.7; }
.projects-section .swiper-pagination-bullet-active { background: var(--gold); opacity: 1; }

.map-container, .contact-form-container { width: min(920px, 100%); margin: 0 auto; }
.map-container > p, .contact-form-container > p { text-align: center; }
#gmap { display: block; width: 100%; height: clamp(380px, 60vh, 600px); border: 0; border-radius: 0.75rem; }
.city-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin-top: 1.25rem; }
.city-links a { padding: 0.5rem 0.8rem; border: 1px solid #777; border-radius: 999px; color: var(--gold); text-decoration: none; }
.city-links a:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.form-open-external a, .contact-form-container > p a { color: var(--gold); }
.form-frame-wrap { overflow: hidden; border: 1px solid #555; border-radius: 0.75rem; background: var(--white); }
.form-frame { display: block; width: 100%; height: clamp(900px, 88vh, 1600px); border: 0; }

/* Site-wide search results */
.search-results-section { min-height: 62vh; background: var(--light); color: var(--navy); }
.search-results-container { width: min(980px, 100%); margin: 0 auto; }
.search-page-kicker { margin: 0 0 0.25rem; color: var(--orange-dark); font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; }
.search-results-container > h1 { margin: 0; text-align: center; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.15; }
.search-summary { margin: 0.75rem 0 1.5rem; text-align: center; color: #444; }
.search-suggestions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.55rem; margin: 1.5rem 0 2rem; }
.search-suggestions span { font-weight: 700; }
.search-suggestions button { padding: 0.45rem 0.7rem; border: 1px solid #777; border-radius: 999px; background: var(--white); color: var(--navy); }
.search-suggestions button:hover { border-color: var(--gold-dark); background: #fff0e5; }
.search-result-list { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.search-result-card { padding: 1.25rem 1.35rem; border: 1px solid #d4d4d4; border-left: 5px solid var(--gold-dark); border-radius: 0.55rem; background: var(--white); box-shadow: 0 4px 14px rgba(0,0,0,0.07); }
.search-result-page { margin: 0 0 0.2rem; color: var(--orange-dark); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.search-result-card h2 { margin: 0; text-align: left; font-size: 1.35rem; }
.search-result-card h2 a { color: var(--navy); text-decoration: none; }
.search-result-card h2 a:hover { text-decoration: underline; }
.search-result-card > p:not(.search-result-page) { margin: 0.55rem 0 0.7rem; color: #414141; }
.search-result-link { color: var(--orange-dark); font-weight: 700; text-decoration: none; }
.search-result-link:hover { text-decoration: underline; }
.search-empty-state { padding: 2rem; border: 1px solid #d2d2d2; border-radius: 0.65rem; background: var(--white); text-align: center; }
.search-empty-state h2 { margin-top: 0; }
.search-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1.25rem; }
.button-link-secondary { border: 2px solid var(--navy); background: var(--white); color: var(--navy); }
.button-link-secondary:hover { background: #e7e7e7; }

.site-footer { padding: 3rem 1.25rem 1rem; background: var(--navy-dark); color: var(--white); }
.footer-grid { width: min(var(--content-width), 100%); margin: 0 auto; display: grid; grid-template-columns: 1.25fr 0.8fr 1fr; gap: 2rem; }
.site-footer h2 { margin-top: 0; font-size: 1.35rem; }
.company-title { color: var(--gold); }
.site-footer address { font-style: normal; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0.45rem 0; }
.business-hours { margin: 0; }
.business-hours > div { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.5rem; padding: 0.2rem 0; }
.business-hours dt { font-weight: 700; }
.business-hours dd { margin: 0; }
.copyright { width: min(var(--content-width), 100%); margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid #29415f; text-align: center; font-size: 0.9rem; color: #ddd; }

@media (max-width: 1250px) {
  .desktop-phone span { display: none; }
  .desktop-phone { font-size: 1.15rem; }
  .navbar a, .navbar .dropdown-toggle { padding-inline: 0.5rem; }
  .header-inner { gap: 0.7rem; }
}

@media (max-width: 980px) {
  :root { --header-main-height: 68px; --header-total-height: 130px; }
  .navbar, .desktop-phone, .desktop-cta { display: none; }
  .header-inner { min-height: var(--header-main-height); }
  .logo img { height: 48px; }
  .mobile-phone { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 42px; height: 42px; color: var(--gold); font-size: 1.25rem; text-decoration: none; }
  .hamburger-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--white); font-size: 1.6rem; }
  .site-search-row { padding-inline: 0.75rem; }
  .site-search { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .header-inner { padding-inline: 0.75rem; }
  .site-search button span { display: none; }
  .site-search button { padding-inline: 0.9rem; }
  .hero-section { min-height: 430px; align-items: flex-end; background-position-x: center; }
  .hero-section::before { background: linear-gradient(0deg, rgba(8,19,33,0.9) 0%, rgba(13,27,51,0.58) 62%, rgba(13,27,51,0.2) 100%); }
  .hero-content { width: 100%; margin: 0; padding: 1.5rem 1.25rem 2.25rem; text-align: center; }
  .hero-content h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .section, .featured-products { padding-inline: 1rem; }
  .product-grid, .service-list-grid, .footer-grid { grid-template-columns: 1fr; }
  .service-card { padding: 1rem; }
  .testimonial-card { min-height: 360px; padding: 2rem 2.6rem 3.25rem; }
  .testimonial-swiper { min-height: 360px; }
  .project-swiper { height: min(72vh, 560px); }
  .business-hours > div { grid-template-columns: 6.7rem 1fr; }
  .section-one-home { background-position: 60% 20%; }
  .section-one-contact { background-position: 70% center; }
}

@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; }
}
