/* ===== J Drake Customs — base ===== */

:root {
  --white: #ffffff;
  --navy-dark: #2c3e50;
  --navy-light: #5b7c99;
  --silver: #c7ccd1;
  --black: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--white);
  color: var(--black);
  font-family: Cambria, Georgia, "Times New Roman", Times, serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

/* ===== Logo header ===== */

.logo-header {
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.main-logo {
  width: 100%;
  max-width: 640px;
  height: auto;
}

/* ===== Services section ===== */

.services {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.divider {
  display: block;
  width: 100%;
  height: 8px;
  margin: 0 0 2rem;
}

.divider path {
  fill: var(--black);
}

.services .divider:last-of-type {
  margin: 2rem 0 0;
}

.service-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.service-card {
  flex: 1 1 200px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--black);
  border: 1px solid var(--silver);
  background-color: #f7f8f9;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover,
.service-card:focus {
  box-shadow: 0 6px 16px rgba(26, 26, 26, 0.18);
  transform: translateY(-3px);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.service-card h2 {
  margin: 0;
  padding: 1rem 0.75rem 1.25rem;
  font-size: 1.25rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-dark);
}

/* ===== Contact lines ===== */

.contact-line {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 1.05rem;
}

.phone-line {
  text-align: center;
  margin: 0.5rem 0 0;
  font-size: 1.6rem;
}

.phone-line a {
  display: inline-block;
  color: var(--navy-dark);
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.phone-line a:hover,
.phone-line a:focus {
  transform: translateY(-3px);
}

/* ===== Secondary logo ===== */

.secondary-logo {
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.secondary-logo img {
  width: 100%;
  max-width: 320px;
  height: auto;
}

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

.footer-text {
  text-align: center;
  font-style: italic;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  color: var(--navy-dark);
}

/* =====================================================
   Collage — full-bleed "justified rows" gallery.
   Each row is a flex container stretched edge-to-edge with
   zero gaps; flex-grow on every image fills remaining space
   on the last row too. Slightly varied flex-basis values
   (set per image below) keep the sprawl from looking like a
   uniform grid.
   ===================================================== */

.collage {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  width: 100%;
  margin: 2.5rem 0 0;
  padding: 0;
  border: 0;
}

.collage img {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  flex-grow: 1;
  height: 220px;
  object-fit: cover;
}

.collage img.collage-clickable {
  cursor: pointer;
}

.collage img.collage-clickable:hover,
.collage img.collage-clickable:focus-visible {
  opacity: 0.85;
}

.collage img.collage-clickable:focus-visible {
  outline: 3px solid var(--navy-light);
  outline-offset: -3px;
}

/* Slight aspect-ratio variation, cycling every 8 images, so rows don't
   read as a uniform grid no matter how many photos are in the collage */
.collage img:nth-child(8n+1) { flex-basis: 320px; }
.collage img:nth-child(8n+2) { flex-basis: 220px; }
.collage img:nth-child(8n+3) { flex-basis: 380px; }
.collage img:nth-child(8n+4) { flex-basis: 260px; }
.collage img:nth-child(8n+5) { flex-basis: 300px; }
.collage img:nth-child(8n+6) { flex-basis: 210px; }
.collage img:nth-child(8n+7) { flex-basis: 340px; }
.collage img:nth-child(8n+8) { flex-basis: 240px; }

/* =====================================================
   Lightbox — full-image viewer opened by clicking a
   collage thumbnail. Hidden by default; JS toggles the
   "is-open" class to show it.
   ===================================================== */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background-color: rgba(18, 24, 31, 0.92);
  padding: 2rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  background-color: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  font-family: Georgia, serif;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

.lightbox-prev {
  left: 1.25rem;
}

.lightbox-next {
  right: 1.25rem;
}

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

@media (max-width: 767px) {
  .collage img {
    height: 140px;
  }

  .service-cards {
    flex-direction: column;
    align-items: stretch;
  }

  .service-card {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .main-logo {
    max-width: 90%;
  }

  .phone-line {
    font-size: 1.4rem;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}
