/* Affordable Well Repair — recreation of Dec 2021 archive
   Inspired by the OnePress WordPress theme used on aaawellrepair.com */

:root {
  --primary: #03c4eb;
  --primary-dark: #02a8c9;
  --text: #777777;
  --heading: #333333;
  --dark: #222222;
  --meta-bg: #f8f9f9;
  --border: #e9e9e9;
  --white: #ffffff;
  --header-h: 72px;
  --font-body: 'Open Sans', sans-serif;
  --font-heading: 'Raleway', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: var(--white);
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.custom-logo {
  display: block;
  width: 160px;
  height: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--heading);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -7px;
}

.nav-toggle-bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.onepress-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.onepress-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.onepress-menu a:hover,
.onepress-menu .current-menu-item > a {
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero-slideshow {
  position: relative;
  min-height: 72vh;
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1.12);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-container {
  position: relative;
  z-index: 2;
  padding-top: 10%;
  padding-bottom: 10%;
}

.hero__content {
  max-width: 900px;
}

.hero-large-text {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 0.4em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  min-height: 1.2em;
}

.js-rotating {
  display: inline-block;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.js-rotating.is-fading {
  opacity: 0;
  transform: translateY(12px);
}

.hero-small-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  margin-bottom: 1.75rem;
  max-width: 720px;
}

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

.hero__content .hero-large-text,
.hero__content .hero-small-text,
.hero__content .btn {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.55s linear, transform 0.55s linear;
}

.hero-slideshow.is-loaded .hero-large-text {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}

.hero-slideshow.is-loaded .hero-small-text {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}

.hero-slideshow.is-loaded .btn {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-lg {
  padding: 13px 32px;
  font-size: 14px;
}

.btn-theme-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn-theme-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-secondary-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.9);
  color: rgba(255, 255, 255, 0.95);
}

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

/* ---------- Sections ---------- */
.section-padding {
  padding: 70px 0;
}

.section-meta {
  background: var(--meta-bg);
}

.section-title-area {
  text-align: center;
  margin-bottom: 45px;
}

.section-subtitle {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0;
  position: relative;
  padding-bottom: 18px;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--primary);
  margin: 16px auto 0;
}

.section-desc {
  margin-top: 1.5rem;
}

.section-desc hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 1.25rem auto;
  max-width: 520px;
}

.call-now {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0;
}

.call-now a {
  color: var(--heading);
}

.call-now a:hover {
  color: var(--primary);
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

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

.feature-media {
  margin-bottom: 18px;
}

.icon-background {
  color: var(--primary);
}

.feature-icon {
  color: var(--white);
}

.feature-item h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

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

.about-col h1 {
  font-size: 1.75rem;
}

.about-truck {
  margin-top: 1rem;
  display: inline-block;
}

.map-embed {
  margin-top: 1rem;
}

.map-embed iframe {
  max-width: 100%;
  width: 400px;
  height: 350px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.form-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.form-field {
  margin-bottom: 1.1rem;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--heading);
  font-size: 13px;
}

.req {
  color: #e74c3c;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(3, 196, 235, 0.2);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: #e74c3c;
}

.field-error {
  min-height: 1.2em;
  margin: 4px 0 0;
  font-size: 12px;
  color: #e74c3c;
}

.form-success {
  margin-top: 1rem;
  color: #1e8449;
  font-weight: 600;
}

.contact-info h2 {
  font-size: 1.6rem;
}

.contact-info h4 {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.address-box h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.address-contact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.1rem;
}

.address-contact .fa-stack {
  flex-shrink: 0;
  font-size: 0.85em;
}

.address-contact .fa-circle {
  color: var(--primary);
}

.address-content {
  padding-top: 4px;
  line-height: 1.6;
}

.address-content a {
  color: var(--text);
}

.address-content a:hover {
  color: var(--primary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #111;
  color: #999;
  text-align: center;
}

.site-info {
  padding: 28px 0 32px;
  position: relative;
}

.site-info p {
  margin: 0;
  font-size: 13px;
}

.btt {
  margin-bottom: 10px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  font-size: 22px;
  animation: bttPulse 2s ease-in-out infinite;
}

.back-to-top:hover {
  color: var(--primary);
}

@keyframes bttPulse {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.55;
    transform: translateY(-4px);
  }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 767px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-navigation.is-open {
    max-height: 320px;
  }

  .onepress-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .onepress-menu li {
    border-top: 1px solid var(--border);
  }

  .onepress-menu a {
    padding: 14px 20px;
  }

  .hero-slideshow {
    min-height: 60vh;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .section-padding {
    padding: 50px 0;
  }

  .map-embed iframe {
    width: 100%;
    height: 280px;
  }
}
