/*
Theme Name: Power Up Electrical
Theme URI: https://powerupelectrical.co.nz/
Author: Power Up Electrical
Description: Clean standalone WordPress theme recreating the Power Up Electrical website (Waikato industrial, commercial, domestic, and rural electrical services) with bundled galleries, native WordPress contact form, and Customizer settings.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: powerup-electrical
*/

:root {
  --navy: #001a4e;
  --navy-deep: #021b4b;
  --top-blue: #2ea3f2;
  --accent-cyan: #00aded;
  --link-blue: #236ed1;
  --body-text: #333333;
  --white: #ffffff;
  --input-bg: #eeeeee;
  --input-placeholder: #999999;
  --footer-bg: #1f1f1f;
  --footer-text: #666666;
  --header-offset: 132px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8em;
  color: var(--body-text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* Account for WordPress Admin Bar when logged in */
body.admin-bar #top-header {
  top: 32px;
}

body.admin-bar #main-header {
  top: 63px;
}

@media screen and (max-width: 782px) {
  body.admin-bar #top-header {
    top: 46px;
  }

  body.admin-bar #main-header {
    top: 77px;
  }
}

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

a {
  color: var(--link-blue);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.container {
  width: 80%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ==========================================================================
   Top Utility Bar & Sticky Main Header
   ========================================================================== */

#top-header {
  position: sticky;
  top: 0;
  z-index: 1001;
  background-color: var(--top-blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.top-header-inner {
  padding: 7px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.contact-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  transition: opacity 0.2s ease;
}

.contact-bar-item:hover {
  opacity: 0.85;
  color: var(--white);
}

.icon-svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

.icon-fb-top {
  width: 14px;
  height: 14px;
}

#main-header {
  position: sticky;
  top: 31px;
  z-index: 1000;
  background-color: var(--navy);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.header-inner {
  height: 101px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

#logo {
  max-height: 100%;
  height: 101px;
  width: auto;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

#top-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}

#top-menu a {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 0;
  display: inline-block;
}

#top-menu a:hover,
#top-menu a.active {
  color: var(--accent-cyan);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--accent-cyan);
}

.search-svg {
  width: 18px;
  height: 18px;
}

.header-fb-svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Search Overlay */
.search-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  z-index: 10;
  display: flex;
  align-items: center;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-search-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

#site-search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 4px;
  outline: none;
}

#site-search-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.search-status {
  color: var(--accent-cyan);
  font-size: 13px;
  white-space: nowrap;
}

.search-close-btn {
  font-size: 30px;
  line-height: 1;
  padding: 4px 8px;
}

/* Mobile Menu Button & Dropdown */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav {
  background-color: var(--navy);
  border-top: 3px solid var(--top-blue);
  padding: 12px 0 18px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
  display: block;
  padding: 12px 6px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
}

.mobile-nav a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  background-image: url('images/SWITCHBOARD.jpg');
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.27);
  background-blend-mode: multiply;
  padding: 179px 0 203px;
}

.hero-title {
  margin: 0 auto;
  max-width: 69%;
  text-align: center;
  color: var(--white);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1em;
  text-shadow: 0em 0.1em 0.1em rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Two-Column Shared Grid
   ========================================================================== */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5%;
  align-items: start;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
  background-color: var(--navy);
  padding: 54px 0 80px;
}

.about-text {
  color: var(--white);
  font-size: 19px;
  line-height: 1.8em;
}

.about-text p {
  margin: 0 0 1.2em;
}

.about-text p:last-of-type {
  margin-bottom: 28px;
}

.about-cta-wrap {
  text-align: center;
}

.btn-outline-white {
  display: inline-block;
  color: var(--white);
  border: 4px solid var(--white);
  border-radius: 3px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.45em 1.2em;
  background: transparent;
}

.btn-outline-white:hover {
  background-color: var(--white);
  color: var(--navy);
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  background-color: var(--white);
  padding: 54px 0 64px;
}

.section-heading {
  margin: 0 0 20px;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1em;
  color: var(--navy);
}

.navy-divider {
  border: none;
  background-color: var(--navy-deep);
  height: 5px;
  margin: 27px 0;
}

.service-row {
  padding: 27px 0;
}

.service-title {
  margin: 0 0 22px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1em;
  color: var(--navy-deep);
}

.service-copy p {
  margin: 0 0 1.1em;
  font-size: 16px;
  line-height: 1.8em;
  color: var(--body-text);
}

.service-copy p:last-child {
  margin-bottom: 0;
}

/* Gallery & Single Photos */
.media-col {
  width: 100%;
}

.single-photo img {
  width: 100%;
  height: auto;
  filter: saturate(90%) brightness(117%) contrast(110%);
  cursor: zoom-in;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(90%) brightness(117%) contrast(110%);
  cursor: zoom-in;
}

/* ==========================================================================
   Image Carousel
   ========================================================================== */

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-color: #f3f4f6;
}

.carousel-track {
  position: relative;
  width: 100%;
}

.carousel-slide {
  display: none;
  animation: fadeIn 0.45s ease;
}

.carousel-slide.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 26, 78, 0.55);
  color: var(--white);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(0, 26, 78, 0.88);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-dot.active {
  background: var(--white);
  transform: scale(1.25);
}

/* ==========================================================================
   Testimonial Section
   ========================================================================== */

.testimonial-section {
  background-color: var(--navy-deep);
  padding: 50px 0 70px;
}

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

.quote-mark-img {
  margin: 0 auto 24px;
  width: 135px;
  height: auto;
  filter: saturate(98%) brightness(200%) contrast(117%);
}

.testimonial-quote {
  margin: 0 auto;
  max-width: 780px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.8em;
  font-weight: 700;
  font-style: italic;
}

.testimonial-quote p {
  margin: 0 0 24px;
}

.testimonial-quote cite {
  font-style: italic;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ==========================================================================
   Contact & Find Us Section
   ========================================================================== */

.contact-section {
  background-color: var(--white);
  padding: 54px 0 80px;
}

.contact-row {
  padding: 25px 0 100px;
}

.contact-person {
  margin: 28px 0 36px;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.8em;
}

.contact-person p {
  margin: 0 0 18px;
}

.person-email a {
  color: var(--navy);
  font-weight: 700;
}

.person-email a:hover {
  color: var(--accent-cyan);
}

.btn-call {
  display: inline-block;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 17px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.35em 1em;
  background: transparent;
}

.btn-call:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* Contact Form */
.contact-form {
  width: 100%;
  position: relative;
}

.form-feedback {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}

.form-feedback.error {
  background-color: #fdecea;
  color: #9e1c1c;
  border: 1px solid #f5c2c0;
}

.form-feedback.success {
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}

.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background-color: var(--input-bg);
  border: none;
  border-radius: 0;
  padding: 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--body-text);
  outline: none;
  transition: box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--input-placeholder);
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
  display: block;
}

.form-bottom {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.captcha-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--body-text);
}

.captcha-wrap input {
  width: 52px;
  padding: 12px 8px;
  text-align: center;
  background-color: var(--input-bg);
  border: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--body-text);
  outline: none;
}

.captcha-wrap input:focus {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.btn-submit {
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 3px;
  background: transparent;
  font-family: inherit;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.35em 1.05em;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.btn-submit:hover {
  background-color: var(--navy);
  color: var(--white);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Find Us Row (1/3 + 2/3) */
.find-us-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5.5%;
  align-items: start;
  padding-top: 12px;
}

.workshop-address {
  margin-top: 28px;
  font-style: normal;
  font-size: 19px;
  line-height: 1.8em;
  color: var(--navy);
}

.map-wrap {
  width: 100%;
  height: 440px;
  background-color: #e5e3df;
  overflow: hidden;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */

#main-footer {
  background-color: var(--footer-bg);
  padding: 15px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-credit {
  color: var(--footer-text);
  font-size: 14px;
}

.social-icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-icons a {
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icons a:hover {
  color: var(--accent-cyan);
}

.fb-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--accent-cyan);
}

.search-hit {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 8px;
  border-radius: 4px;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 980px) {
  :root {
    --header-offset: 112px;
  }

  .container {
    width: 88%;
  }

  .header-inner {
    height: 80px;
  }

  #logo {
    height: 80px;
  }

  #top-menu-nav {
    display: none;
  }

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

  .hero-section {
    padding: 120px 0 135px;
  }

  .hero-title {
    max-width: 95%;
    font-size: 38px;
  }

  .two-col,
  .find-us-row {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .section-heading {
    font-size: 40px;
  }

  .service-title {
    font-size: 32px;
  }

  .contact-row {
    padding-bottom: 60px;
  }

  .map-wrap {
    height: 340px;
  }

  .carousel-arrow {
    opacity: 0.85;
  }
}

@media (max-width: 600px) {
  .container {
    width: 92%;
  }

  .top-header-inner {
    justify-content: center;
  }

  .hero-section {
    padding: 88px 0 100px;
  }

  .hero-title {
    font-size: 30px;
  }

  .section-heading {
    font-size: 34px;
  }

  .service-title {
    font-size: 26px;
  }

  .about-text,
  .contact-person,
  .workshop-address {
    font-size: 16px;
  }

  .btn-outline-white {
    font-size: 20px;
  }

  .btn-call {
    font-size: 22px;
  }

  .form-row-half {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-inner {
    flex-direction: column-reverse;
    text-align: center;
  }
}
