/* ── Service pages ── */

.service-page .site-header:not(.at-top) {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(7, 27, 54, 0.08);
  backdrop-filter: none;
}

/* Shared section padding — horizontal handled by sp-inner */
.sp-detail,
.sp-how,
.sp-who,
.sp-assignments,
.sp-faq,
.sp-related {
  padding: clamp(28px, 3.5vw, 52px) 0;
}

.sp-intro {
  padding: clamp(20px, 2.5vw, 36px) 0;
}

/* Inner content wrapper */
.sp-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 76px);
}


/* Section label — identical to .eyebrow in styles.css */
.sp-label {
  margin: 0 0 16px;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* ── HERO — homepage style (gradient + background photo) ── */
.sp-hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  isolation: isolate;
}

.sp-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.92) 28%,
      rgba(255, 255, 255, 0.42) 46%,
      rgba(255, 255, 255, 0) 62%
    ),
    var(--sp-hero-photo, url('../assets/BG hull-machinery.png'));
  background-position: center center;
  background-size: cover;
}

.sp-hero-inner {
  padding: 0 clamp(20px, 4.5vw, 76px);
}

.sp-hero-content {
  width: min(520px, 100%);
  padding-top: 180px;
  padding-bottom: clamp(48px, 5vw, 72px);
}

.sp-hero-content h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.45rem, 3.25vw, 4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.03;
  letter-spacing: 0;
}

.sp-hero-content .gold-line {
  margin: 22px 0 16px;
}

.sp-hero-lead {
  max-width: 460px;
  margin: 0 0 28px;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: var(--ink);
  line-height: 1.6;
}

/* ── INTRO ── */
.sp-intro {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.sp-intro p {
  max-width: 720px;
  font-size: clamp(0.92rem, 1.1vw, 1.05rem);
  line-height: 1.75;
  color: var(--ink);
  text-align: center;
  margin: 0 auto;
}

/* ── SERVICES DETAIL ── */
.sp-detail {
  background: var(--white);
}

.sp-article {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0 clamp(32px, 4vw, 72px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.sp-article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sp-article h2 {
  font-family: var(--font-title);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0;
}

.sp-article p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.75;
  color: #2b3d54;
}

/* ── HOW WE WORK ── */
.sp-how {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.sp-steps li {
  padding-right: clamp(16px, 2.5vw, 40px);
  border-right: 1px solid var(--line);
}

.sp-steps li:last-child {
  border-right: none;
  padding-right: 0;
}

.sp-steps li + li {
  padding-left: clamp(16px, 2.5vw, 40px);
}

.sp-step-num {
  display: block;
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
  line-height: 1;
}

.sp-steps strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sp-steps p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── WHO WE WORK WITH ── */
.sp-who {
  background: var(--white);
}

.sp-who p {
  max-width: 820px;
  font-size: 0.86rem;
  line-height: 1.8;
  color: #2b3d54;
  margin: 0 0 12px;
}

.sp-vessel-note {
  color: var(--muted) !important;
  font-size: 0.8rem !important;
  font-style: italic;
}

/* ── RECENT ASSIGNMENTS ── */
.sp-assignments {
  background: var(--white);
  border-top: 1px solid var(--line);
}

/* Static grid — used by pages without a full carousel */
.sp-photo-grid {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sp-photo-grid figure {
  margin: 0;
  overflow: hidden;
}

.sp-photo-grid img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.sp-photo-grid figure:hover img {
  transform: scale(1.03);
}

.sp-photo-grid figcaption {
  padding: 8px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Carousel — same presentation as the homepage carousel */
.sp-carousel {
  position: relative;
  min-width: 0;
  margin-bottom: 0;
}

.sp-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.sp-carousel-track::-webkit-scrollbar { display: none; }

.sp-carousel-slide {
  position: relative;
  min-height: clamp(160px, 18vw, 240px);
  margin: 0;
  overflow: hidden;
  opacity: 0.72;
  transform: scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.sp-carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.sp-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(160px, 18vw, 240px);
  object-fit: cover;
}

.sp-carousel-slide figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(6, 31, 61, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.sp-carousel-controls {
  display: contents;
}

.sp-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: var(--font-ui);
  transform: translateY(-50%);
}

.sp-carousel-prev {
  left: -20px;
}

.sp-carousel-next {
  right: -20px;
}

.sp-carousel-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-carousel-dots button {
  background: rgba(6, 31, 61, 0.22);
}

.sp-carousel-dots button.active {
  background: var(--gold);
}

.sp-view-more {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.sp-view-more:hover { color: var(--gold); }

/* ── FAQ ── */
.sp-faq {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.sp-faq-list {
  margin: 0;
  max-width: 760px;
}

.sp-faq-item {
  border-bottom: 1px solid var(--line);
}

.sp-faq-item dt {
  padding: 18px 40px 18px 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  position: relative;
  user-select: none;
  line-height: 1.45;
}

.sp-faq-item dt::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  transition: transform 200ms ease;
}

.sp-faq-item.open dt::after {
  transform: translateY(-50%) rotate(45deg);
}

.sp-faq-item dd {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--muted);
}

.sp-faq-item.open dd {
  max-height: 400px;
  padding-bottom: 18px;
}

/* ── RELATED SERVICES ── */
.sp-related {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.sp-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.sp-related-list li {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.sp-related-list li:nth-child(2n) { border-right: none; }
.sp-related-list li:nth-last-child(-n+2) { border-bottom: none; }

.sp-related-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(12px, 1.5vw, 24px);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 180ms ease;
}

.sp-related-list a span {
  color: var(--gold);
  transition: transform 180ms ease;
}

.sp-related-list a:hover { background: var(--paper); }
.sp-related-list a:hover span { transform: translateX(4px); }

/* ── CTA BANNER — see .site-cta in styles.css ── */

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .sp-hero-content {
    padding-top: 130px;
  }

  .sp-article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sp-steps {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .sp-steps li {
    border-right: none;
    padding-right: 0;
  }

  .sp-steps li + li { padding-left: 0; }

  .sp-photo-grid { grid-template-columns: 1fr 1fr; }

  .sp-related-list { grid-template-columns: 1fr; }

  .sp-related-list li {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .sp-related-list li:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  .sp-hero {
    min-height: 560px;
  }

  .sp-hero-bg {
    background-image:
      linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.99) 0%,
        rgba(255, 255, 255, 0.96) 34%,
        rgba(255, 255, 255, 0.7) 52%,
        rgba(255, 255, 255, 0.18) 68%,
        rgba(255, 255, 255, 0) 78%
      ),
      var(--sp-hero-photo, url('../assets/BG hull-machinery.png'));
  }

  .sp-hero-inner {
    padding: 0 20px;
  }

  .sp-hero-content {
    width: min(220px, calc(60vw - 24px));
    max-width: calc(60vw - 24px);
    padding-top: 142px;
  }

  .sp-hero-content h1 {
    font-size: clamp(1.42rem, 6.4vw, 1.8rem);
    line-height: 1.06;
    overflow-wrap: anywhere;
  }

  .sp-hero-lead {
    max-width: 100%;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .sp-hero-content .primary-button {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    gap: 8px;
    justify-content: space-between;
    font-size: 0.62rem;
    line-height: 1.06;
    white-space: normal;
    text-align: left;
  }

  .sp-steps { grid-template-columns: 1fr; }
  .sp-photo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sp-carousel-track {
    grid-auto-columns: 100%;
  }

  .sp-carousel-slide {
    display: none;
  }

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

  .sp-carousel-prev {
    left: 10px;
  }

  .sp-carousel-next {
    right: 10px;
  }
}
