/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #f97316;
  --secondary-color: #3b82f6;
  --text-dark: #e5e7eb;
  --text-light: #9ca3af;
  --bg-dark: #111827;
  --bg-darker: #0f172a;
  --bg-card: #1f2937;
  --white: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--bg-darker);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: bold;
  flex-shrink: 0;
}

.logo img {
  width: 120px;
}

.nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  margin-left: 0;
}

.nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}

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

.header-cta {
  display: flex;
  gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1000;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: all 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #ea580c;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 8rem 0;
  border-bottom: 2px solid var(--primary-color);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.skid-steer-anim {
  position: absolute;
  bottom: -4px; /* Align with the border */
  left: 0;
  width: 150px;
  animation: skidSteerDrive 15s linear forwards;
  z-index: 10;
  will-change: transform;
}

.skid-steer-anim img {
  width: 100%;
  height: auto;
}

.hero-text-btn {
  position: absolute;
  bottom: 20px;
  left: 0;
  z-index: 11;
  animation: buttonSlide 15s linear forwards;
  white-space: nowrap;
  will-change: transform, opacity;

  /* Custom Styling */
  background: #22c55e; /* Bright Green */
  color: #ffffff;
  border: 3px solid #ffffff;
  border-radius: 50px;
  padding: 1rem 0;
  width: 280px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.hero-text-btn .mobile-text {
  display: none;
}

@keyframes skidSteerDrive {
  0% {
    transform: translateX(-420px); /* 30px Overlap start */
    animation-timing-function: ease-out;
  }
  20% {
    transform: translateX(calc(50vw - 260px)); /* 30px Overlap end */
    animation-timing-function: linear;
  }
  25% {
    transform: translateX(calc(50vw - 260px));
    animation-timing-function: ease-in-out;
  }
  30% {
    transform: translateX(calc(50vw - 390px)); /* Backup */
    animation-timing-function: linear;
  }
  35% {
    transform: translateX(calc(50vw - 390px));
    animation-timing-function: ease-in;
  }
  45% {
    transform: translateX(110vw);
  }
  100% {
    transform: translateX(110vw);
  }
}

@keyframes buttonSlide {
  0% {
    transform: translateX(-300px); /* Fixed start position for sync */
    opacity: 1;
    animation-timing-function: ease-out;
  }
  20% {
    transform: translateX(calc(50vw - 50%)); /* Center the button */
    opacity: 1;
  }
  100% {
    transform: translateX(calc(50vw - 50%));
    opacity: 1;
  }
}

.hero .container {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Saira Stencil One', sans-serif;
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  opacity: 1;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Sections */
section {
  padding: 4rem 0;
}

section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-size: 1.125rem;
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* About Section */
.about {
  background: var(--bg-darker);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.3);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* CTA Section */
.cta-section {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cta-section h3 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cta-section .btn-primary {
  background: var(--white);
  color: var(--primary-color);
}

.cta-section .btn-primary:hover {
  background: var(--text-dark);
  color: var(--white);
}

.cta-section .btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.cta-section .btn-secondary:hover {
  background: var(--white);
  color: var(--primary-color);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 2rem;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.step h3 {
  margin-bottom: 1rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

/* Reviews */
.reviews-preview {
  background: var(--bg-darker);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.review-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.stars {
  color: #fbbf24;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.review-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.reviewer {
  font-weight: 600;
  color: var(--text-dark) !important;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 2rem auto 0;
}

.faq-item {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.faq-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

/* Service Areas */
.service-areas {
  text-align: center;
  background: var(--bg-darker);
}

.service-areas p {
  font-size: 1.25rem;
  color: var(--text-light);
}

/* Footer */
.footer {
  background: var(--bg-darker);
  color: var(--white);
  padding: 3rem 0 1rem;
  border-top: 2px solid var(--primary-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  width: 80px;
  margin-bottom: 1rem;
}

.footer h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer a:hover {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
  opacity: 0.8;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Contact Page */
.contact-section {
  padding: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-methods {
  margin-top: 2rem;
}

.contact-method {
  margin-bottom: 2rem;
}

.contact-method h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.contact-method a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}

.contact-method a:hover {
  text-decoration: underline;
}

.quote-steps {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.quote-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.quote-step:last-child {
  margin-bottom: 0;
}

.quote-step .step-number {
  flex-shrink: 0;
}

.quote-step h3 {
  margin-bottom: 0.5rem;
}

.quote-step p {
  color: var(--text-light);
}

.quote-step .btn {
  margin-top: 0.5rem;
}

/* Services Page */
.services-page {
  padding: 4rem 0;
}

.services-page .service-card ul {
  list-style: none;
  margin-top: 1rem;
}

.services-page .service-card li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.services-page .service-card li:before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Reviews Page */
.reviews-page {
  padding: 4rem 0;
}

.review-service {
  font-size: 0.875rem;
  color: var(--primary-color) !important;
  font-style: italic;
}

.leave-review {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.leave-review h2 {
  margin-bottom: 0.5rem;
}

.review-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Gallery Full Page */
.gallery-full {
  padding: 4rem 0;
}

/* Service Detail Pages */
.service-detail {
  padding: 4rem 0;
}

.service-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.service-description h2 {
  text-align: left;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-description h3 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.service-description ul {
  list-style: none;
  margin: 1rem 0;
}

.service-description li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.service-description li:before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.service-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.service-info-box {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(249, 115, 22, 0.1);
}

.service-info-box h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.service-info-box p {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.service-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-links li {
  margin-bottom: 0.5rem;
}

.service-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.service-links a:hover {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .logo {
    flex-shrink: 0;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .header-cta {
    display: flex;
    flex-direction: row;
    margin-left: auto; /* Push to the right, but keep logo on left */
    align-items: center;
  }

  /* Specific fix for the CTA button spacing */
  .header-cta .btn-secondary {
    display: none;
  }

  .header-cta .btn-primary {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: var(--bg-darker);
    flex-direction: column;
    gap: 1rem;
    padding: 5rem 2rem 2rem;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
    transition: right 0.3s ease;
    z-index: 999;
    margin-left: 0;
    flex: none;
  }

  .nav.active {
    right: 0;
  }

  .nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
  }

  /* Ensure mobile toggle is visible */
  .mobile-menu-toggle {
    display: flex;
    margin-left: 1rem; /* Space between CTA and Hamburger */
  }

  .hero .container,
  .about-content,
  .contact-grid,
  .service-content {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  section h2 {
    font-size: 2rem;
  }

  .cta-buttons,
  .review-buttons,
  .service-cta {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}
@media (max-width: 768px) {
  .hero-text-btn {
    width: 160px; /* Smaller fixed width for mobile */
    padding: 0.8rem 0;
  }

  .hero-text-btn .desktop-text {
    display: none;
  }

  .hero-text-btn .mobile-text {
    display: inline;
  }

  /*
   * Mobile Geometry:
   * Button Width: 160px
   * Skid Steer Width: 150px
   * Sync Gap Reduction: 30px (Overlap)
   *
   * Button Start: -300px (Offscreen)
   * Skid Steer Start: -420px (30px into left of button - identical to desktop relative)
   *
   * Button End: Center (50vw)
   * Button Left Edge at End: 50vw - 80px
   * Skid Steer Right Edge Requirement: 50vw - 80px + 30px overlap = 50vw - 50px
   * Skid Steer Left Edge Target: (50vw - 50px) - 150px = 50vw - 200px
   *
   * Backup Distance: Same relative shift as desktop
   */
  @keyframes skidSteerDrive {
    0% {
      transform: translateX(-420px);
      animation-timing-function: ease-out;
    }
    20% {
      transform: translateX(calc(50vw - 200px));
      animation-timing-function: linear;
    }
    25% {
      transform: translateX(calc(50vw - 200px));
      animation-timing-function: ease-in-out;
    }
    30% {
      transform: translateX(calc(50vw - 330px)); /* Backup */
      animation-timing-function: linear;
    }
    35% {
      transform: translateX(calc(50vw - 330px));
      animation-timing-function: ease-in;
    }
    45% {
      transform: translateX(110vw);
    }
    100% {
      transform: translateX(110vw);
    }
  }
}
