/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --color-primary: #1e3a5f;
  --color-secondary: #456b89;
  --color-grey: #5e5a59;
  --color-accent: #edac57;
  --color-bg: #ebeadc;
  --color-text: #1f2933;        /* dark, for body copy on the cream background */
  --color-text-light: #f5f5f5;  /* cream, for text sitting on dark backgrounds */
  --color-white: #ffffff;

  --font-heading: 'Roboto Slab', serif;
  --font-body: 'Roboto', sans-serif;

  --max-width: 1400px;
}

html {
  scroll-behavior: smooth;
}

/* Base */
body {
  text-align: left;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HERO
   full-width photo, content anchored lower-left, contact bar across the bottom */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 8rem 4rem 11rem;
  background-image:
    linear-gradient(rgba(12,20,30,0.85) 0%, rgba(12,20,30,0.55) 45%, rgba(12,20,30,0.35) 100%),
    url('images/IMG_8621.JPEG');
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 700px;
  color: var(--color-text-light);
}

.hero-eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-content p {
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 600px;
  color: #d5d8dc;
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.ghost-btn {
  color: var(--color-text-light);
  border: 1px solid rgba(255,255,255,0.35);
  /* 1px less padding than qte-btn to offset the border, so both end up the same height */
  padding: calc(1rem - 1px) 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  display: inline-block;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.ghost-btn:hover {
  border-color: var(--color-text-light);
  background: rgba(255,255,255,0.08);
}

/* contact bar - sits along the bottom edge of the hero */

.hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-primary);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-items: center;
  gap: 2.5rem;
  padding: 1.5rem 4rem;
}

.bar-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
}

.bar-cell svg {
  flex-shrink: 0;
}

.bar-cell small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8daac4;
  margin-bottom: 2px;
}

.bar-cell strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.3;
}

/* the phone number is the one thing here people actually act on */
.bar-phone strong {
  font-size: 1.45rem;
  font-weight: 700;
}

.bar-phone:hover strong {
  color: var(--color-accent);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg);
    color: rgb(255, 255, 255);
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    z-index: 10;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--color-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a{
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 16px;
}

.nav-links a:hover {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
}

/* hamburger button - hidden on desktop, shown in the mobile media query */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* the three bars turn into an X when the menu is open */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.accent-bar {
  background: var(--color-accent);
  height: 5px;
  width: 100%;
}

.btn-book {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.btn-book:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
}

.logo-img img {
  height: 55px;
  width:auto;
  border-radius: 16px;
}

.qte-btn {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 1rem 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-block;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.qte-btn:hover {
  background-color: var(--color-primary);
  transform: translateY(-5px);
  cursor: pointer;
}

.content-title {
  font-size: 2.5rem;
  margin: auto;
  max-width: var(--max-width);
  padding: 2rem;
  color: var(--color-primary);
  font-weight: 700;
  text-align: left;
  font-family: var(--font-heading);
}

/* SERVICES */

.service-grid-1 {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 1.25rem 2rem;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  
}

.service-grid-2 {
  max-width: 1000px;
  margin: 0 auto 16px;
  padding: 0 2rem 2rem 2rem;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


.service-card {
  background-color: var(--color-white);
  color: var(--color-primary);
  padding: 1.3rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 1rem;
  line-height: 1.6;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* extra emphasis for the service the customer wants highlighted */
.service-card.featured {
  border: 2px solid var(--color-accent);
}

.service-card.featured:hover {
  box-shadow: 0 4px 24px rgba(237, 172, 87, 0.35);
}

/* Atlas Copco distributor card */

.distributor-card {
  max-width: 1000px;
  margin: 1rem auto 0;
  padding: 2rem;
  background-color: var(--color-white);
  border-radius: 16px;
  border-left: 6px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.distributor-logo {
  flex-shrink: 0;
  width: 190px;
}

.distributor-text h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.distributor-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.distributor-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.distributor-text p.distributor-brands {
  font-size: 0.9rem;
  color: var(--color-grey);
  margin-bottom: 0;
}

/* ABOUT US */

.about-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about-photo img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.about-points {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.about-points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* the little orange dot in front of each point */
.about-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* GALLERY SLIDESHOW */

.slideshow {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* every slide is stacked in the same spot, only .active is visible */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 58, 95, 0.75);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.slide-arrow:hover {
  background: var(--color-accent);
}

.slide-arrow.prev { left: 1rem; }
.slide-arrow.next { right: 1rem; }

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1.25rem 0 3rem;
}

.slide-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #c3c2b6;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.slide-dots button.active {
  background: var(--color-accent);
}

/* CONTACT */

.contact-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: center;
}

.contact-details {
  padding-top: 0.5rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  color: var(--color-secondary);
  text-decoration: none;
}

.contact-row svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-row small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-grey);
  margin-bottom: 3px;
}

.contact-row strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

/* the address and hours are supporting detail, not the headline */
.contact-row strong.contact-address {
  font-size: 1.05rem;
  font-weight: 400;
}

.contact-phone:hover strong {
  color: var(--color-accent);
}

.contact-map {
  width: 100%;
  height: 340px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* BOOKING BANNER */

.book-banner {
  background: var(--color-accent);
  padding: 3rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.book-banner-text h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-white);
  margin-bottom: 0.35rem;
}

.book-banner-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
}

.banner-btn {
  background: var(--color-white);
  color: var(--color-accent);
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform 0.3s ease;
}

.banner-btn:hover {
  transform: translateY(-4px);
}

.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 2rem;
  font-size: 14px;
}

/* ============================================
   LARGE SCREENS - 1440px and up
   cap the hero height so tall monitors don't show a
   big empty stretch of photo above the content
   ============================================ */

@media (min-width: 1440px) {
  .hero {
    min-height: clamp(640px, 80vh, 960px);
    padding: 8rem 6rem 11rem;
    background-position: center 40%;
  }

  .hero-content {
    max-width: 900px;
  }

  .hero-content h1 {
    font-size: 4.25rem;
  }

  .hero-content p {
    max-width: 760px;
  }
}

/* ============================================
   TABLET - 1100px and under
   ============================================ */

@media (max-width: 1100px) {

  .service-grid-1 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
  }

  .hero {
    padding: 7rem 2.5rem 12rem;
  }

  .hero-content h1 {
    font-size: 3.8rem;
  }

  .hero-bar {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    padding: 1.25rem 2.5rem;
    justify-items: start;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ============================================
   MOBILE - 900px and under
   this is where the navbar turns into the hamburger
   ============================================ */

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  /* logo centered, hamburger pulled out of the flow and pinned right */
  .navbar {
    justify-content: center;
  }

  .nav-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  /* the menu drops down under the navbar instead of sitting in a row */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-top: 5px solid var(--color-primary);
    padding: 0 1.5rem;

    /* closed by default - max-height 0 plus hidden overflow makes it slide */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open {
    max-height: 400px;
    padding: 0.5rem 1.5rem 1.25rem;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  }

  .nav-links .btn-book {
    text-align: center;
    margin-top: 0.75rem;
    border-bottom: none;
    padding: 0.9rem 1.2rem;
  }

  /* the bar stops being pinned and just stacks under the photo */
  .hero {
    min-height: auto;
    padding: 8rem 1.5rem 3rem;
    display: block;
  }

  .hero-content {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btns a {
    text-align: center;
  }

  .hero-bar {
    position: static;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    justify-items: start;
    padding: 1.75rem 1.5rem;
    margin: 2rem -1.5rem -3rem;
  }

  .contact-map {
    height: 260px;
  }

  .qte-btn {
    font-size: 1.1rem;
    padding: 0.9rem 1.8rem;
  }

  .content-title {
    font-size: 2rem;
    padding: 2rem 1.5rem 1.5rem;
  }

  .service-grid-1,
  .service-grid-2 {
    grid-template-columns: 1fr;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* the atlas card stacks with the logo on top */
  .distributor-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    border-left: none;
    border-top: 6px solid var(--color-accent);
  }

  .about-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem 2rem;
  }

  .slideshow {
    margin: 0 1.5rem;
    border-radius: 12px;
  }

  .book-banner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
}

/* ============================================
   SMALL PHONES - 600px and under
   ============================================ */

@media (max-width: 600px) {

  .navbar {
    padding: 12px 1.25rem;
  }

  .logo-img img {
    height: 48px;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .content-title {
    font-size: 1.7rem;
  }

  .about-points {
    grid-template-columns: 1fr;
  }

  /* arrows get in the way on a small screen, dots are enough */
  .slide-arrow {
    display: none;
  }

  .book-banner-text h2 {
    font-size: 1.5rem;
  }
}

/* respect the reduced motion setting */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .slide,
  .qte-btn,
  .service-card,
  .banner-btn,
  .nav-links,
  .nav-toggle span {
    transition: none;
  }
}
