/* Preserve the full 3:4 photographs on both desktop and mobile. */
.hero-visual,
.case-photo {
  position: relative;
  background: linear-gradient(145deg, #f4f9f8, #dce9eb);
}

.hero-visual {
  transform: none;
}

.hero-visual picture,
.case-photo picture {
  display: block;
}

.hero-visual img,
.case-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  padding: clamp(10px, 1.5vw, 18px);
  border-radius: 22px;
}

.cab-documents {
  background: #eaf3f4;
}

.cab-documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.cab-document {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(4, 29, 50, .09);
}

.cab-document-image {
  position: relative;
  display: block;
  flex: none;
  height: clamp(360px, 42vw, 540px);
  overflow: hidden;
  padding: 16px;
  background: linear-gradient(145deg, #f7faf9, #dce9eb);
}

.cab-document-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-visual .protected-badge,
.case-photo .protected-badge,
.cab-document-image .protected-badge {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  display: inline-block;
  max-width: calc(100% - 48px);
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(4, 29, 50, .76);
  color: #fff;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
  pointer-events: none;
}

.cab-document img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

.cab-document figcaption {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  gap: 3px;
  padding: 17px 20px 19px;
  border-top: 1px solid var(--line);
  background: #fff;
  line-height: 1.4;
}

.cab-document figcaption strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.cab-document figcaption span {
  color: var(--muted);
  font-size: .95rem;
  text-align: left;
}

.cab-swipe-hint {
  display: none;
}

.case-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: case-step;
}

.case-route li {
  position: relative;
  min-width: 0;
  padding: 10px 12px 10px 39px;
  border-radius: 12px;
  background: #e9f6f1;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.35;
  counter-increment: case-step;
}

.case-route li::before {
  position: absolute;
  top: 10px;
  left: 12px;
  color: #087c5c;
  font-weight: 800;
  content: counter(case-step, decimal-leading-zero);
}

.timing-note {
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.timing-note strong {
  color: var(--ink);
  font-size: .95rem;
}

.case-copy .timing-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .92rem;
}

/* Match the shared AutoTag FL footer on desktop and mobile. */
.site-footer {
  margin-top: 10px;
  padding: 34px 0;
  background: #061a36;
  color: #d1d5db;
}

.site-footer .container {
  width: min(1180px, calc(100% - 32px));
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  align-items: start;
  gap: 56px;
}

.site-footer .note {
  max-width: 520px;
  margin-top: 8px;
  color: #c9d8ef;
  font-size: .92rem;
  line-height: 1.55;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 14px 24px;
}

.site-footer .footer-links a {
  color: #e5eefc;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
  color: #fff;
}

@media (max-width: 1024px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .hero-visual .protected-badge,
  .case-photo .protected-badge,
  .cab-document-image .protected-badge {
    top: 18px;
    left: 18px;
  }

  .case-photo {
    order: 0;
  }

  .case-copy {
    order: 1;
  }

  .case-study,
  .cab-documents {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .cab-documents-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 88%);
    gap: 14px;
    overflow-x: auto;
    padding: 0 2px 12px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
  }

  .cab-document {
    scroll-snap-align: start;
  }

  .cab-document-image {
    height: min(90vw, 380px);
    padding: 12px;
  }

  .cab-swipe-hint {
    display: block;
    margin: 10px 2px 0;
    color: var(--muted);
    font-size: .9rem;
  }

  .case-route {
    grid-template-columns: 1fr;
  }
}

/* Match the WhatsApp control used across the AutoTag FL site. */
.whatsapp-float {
  position: fixed;
  z-index: 1050;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: #25d366;
  color: #06253a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.whatsapp-float:hover {
  background: #48e184;
  color: #06253a;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
}

.whatsapp-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.whatsapp-float svg {
  flex: none;
  width: 27px;
  height: 27px;
  fill: currentColor;
}

@media (max-width: 780px) {
  .whatsapp-float {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    justify-content: center;
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
  }

  .whatsapp-float span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
