/* ADW Developments: custom styles */

/* Scroll fade-in utility */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Article prose styles */
.article-body h2 {
  font-family: 'Aptos Display', 'Aptos', Calibri, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e429b;
  margin: 2rem 0 0.75rem;
}

.article-body h3 {
  font-family: 'Aptos Display', 'Aptos', Calibri, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e429b;
  margin: 1.75rem 0 0.75rem;
}

/* The editor gives each picture a fixed pixel width, which would run off a
   phone screen. Never wider than the text, and the height follows. */
.article-body img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.article-body p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: #494646;
}

.article-body ul,
.article-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: #494646;
  line-height: 1.75;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body strong {
  color: #1e429b;
  font-weight: 600;
}

.article-body a {
  color: #a77046;
  text-decoration: underline;
}

.article-body a:hover {
  color: #bf8558;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-body table thead tr {
  background: #1e429b;
  color: #fff;
}

.article-body table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #2d5bc0;
  font-weight: 600;
}

.article-body table tbody tr:nth-child(even) {
  background: #f8f6f1;
}

.article-body table tbody td {
  padding: 0.75rem 1rem;
  border: 1px solid #e0dcd4;
  vertical-align: top;
}

/* Bold header text would otherwise take the blue of .article-body strong
   and vanish into the blue header row. */
.article-body table th strong,
.article-body table th b {
  color: inherit;
}

/* A table wider than a phone scrolls inside the article card rather than
   pushing the whole page sideways. */
@media (max-width: 768px) {
  .article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Service cards expanded content */
.service-full {
  display: none;
}

.service-card.open .service-full {
  display: block;
}

.service-card.open .icon-chevron {
  transform: rotate(180deg);
}

/* Stats counter */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Testimonial carousel */
.testimonial-track {
  transition: transform 0.4s ease;
}

/* Nav scroll shadow */
#main-nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Client logo marquee carousel */
.logo-ticker-wrapper {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  padding: 1rem 0;
}

.logo-ticker {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: logo-scroll 50s linear infinite;
}

.logo-ticker:hover {
  animation-play-state: paused;
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.logo-ticker-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  padding: 0 28px;
  height: 60px;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo-ticker-item:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.logo-ticker-item img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.25));
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .logo-ticker {
    gap: 1.5rem;
    animation-duration: 40s;
  }
  .logo-ticker-item {
    padding: 0 20px;
    height: 52px;
  }
  .logo-ticker-item img {
    height: 40px;
    max-width: 160px;
  }
}

/* Mobile landscape / small tablet (≤768px) */
@media (max-width: 768px) {
  .logo-ticker-wrapper {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  }
  .logo-ticker {
    gap: 1.25rem;
    animation-duration: 30s;
  }
  .logo-ticker-item {
    padding: 0 14px;
    height: 46px;
  }
  .logo-ticker-item img {
    height: 34px;
    max-width: 140px;
  }
}

/* Mobile portrait (≤480px) */
@media (max-width: 480px) {
  .logo-ticker {
    gap: 1rem;
    animation-duration: 24s;
  }
  .logo-ticker-item {
    padding: 0 10px;
    height: 40px;
  }
  .logo-ticker-item img {
    height: 28px;
    max-width: 120px;
  }
}

/* Text fallback for clients without a logo */
.logo-ticker-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Reverse-direction row: compound selector ensures higher specificity than .logo-ticker */
.logo-ticker.logo-ticker--reverse {
  animation-name: logo-scroll;
  animation-direction: reverse;
}

.trust-logo-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 3rem;
}

@media (max-width: 1024px) {
  .trust-logo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .trust-logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .trust-logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.trust-card {
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: card-float 4s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * 0.15s);
}

.trust-card.hidden {
  transform: scale(0) rotate(8deg);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

@keyframes card-float {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-5px);
  }
}

.trust-card-inner {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1rem;
  overflow: hidden;
  transition: all 0.35s ease;
}

.trust-card:hover .trust-card-inner {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(167, 112, 70, 0.45);
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 16px 48px rgba(167, 112, 70, 0.12),
    0 0 0 1px rgba(167, 112, 70, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.trust-card img {
  height: 36px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: all 0.35s ease;
}

.trust-card:hover img {
  opacity: 1;
  transform: translateY(-6px) scale(1.05);
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

/* Label reveal on hover */
.trust-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px 6px;
  text-align: center;
  background: linear-gradient(to top, rgba(167, 112, 70, 0.35), transparent);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trust-card:hover .trust-card-label {
  transform: translateY(0);
}

.trust-card-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trust-card-cat {
  font-size: 9px;
  color: rgba(212, 165, 116, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Client Roster ─────────────────────────────────────────────────────── */
.trust-roster {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.trust-roster-group {}

.trust-roster-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
}

.trust-roster-line {
  display: inline-block;
  width: 16px;
  height: 1px;
  background: rgba(167, 112, 70, 0.5);
}

.trust-roster-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trust-name {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  transition: all 0.25s ease;
  cursor: default;
}

.trust-name:hover {
  background: rgba(167, 112, 70, 0.12);
  border-color: rgba(167, 112, 70, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(167, 112, 70, 0.1);
}

/* ─── Divider ───────────────────────────────────────────────────────────── */
.trust-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.trust-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 112, 70, 0.3), transparent);
}

.trust-divider-text {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(167, 112, 70, 0.6);
  white-space: nowrap;
}

/* ─── Testimonial Stage ─────────────────────────────────────────────────── */
.trust-testimonial {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 1rem;
}

.trust-quote-deco {
  position: absolute;
  top: -40px;
  left: -10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 200px;
  line-height: 1;
  color: rgba(167, 112, 70, 0.06);
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.trust-stage {
  position: relative;
  min-height: 200px;
  z-index: 1;
}

.trust-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trust-slide.active {
  position: relative;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.trust-quote-text {
  font-size: 1.35rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  margin: 0 0 2rem;
  padding: 0;
  border: none;
}

@media (min-width: 640px) {
  .trust-quote-text {
    font-size: 1.5rem;
  }
}

/* Author row */
.trust-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trust-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(167, 112, 70, 0.4), rgba(167, 112, 70, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-avatar span {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 2;
}

.trust-avatar-ring {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
}

.trust-avatar-ring circle {
  stroke: rgba(167, 112, 70, 0.5);
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  stroke-linecap: round;
  transform-origin: center;
  animation: ring-draw 2s ease forwards;
}

@keyframes ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.trust-author-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.trust-author-role {
  font-size: 12px;
  color: rgba(167, 112, 70, 0.7);
}

.trust-stars {
  display: flex;
  gap: 2px;
  color: #a77046;
  margin-left: auto;
}

/* ─── Controls: Progress + Counter + Nav ────────────────────────────────── */
.trust-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  justify-content: center;
}

.trust-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.trust-nav-btn:hover {
  border-color: rgba(167, 112, 70, 0.5);
  color: #a77046;
  background: rgba(167, 112, 70, 0.08);
  transform: scale(1.1);
}

.trust-progress {
  flex: 1;
  max-width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.trust-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a77046, #d4a574);
  border-radius: 2px;
  animation: progress-fill 6s linear forwards;
}

@keyframes progress-fill {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

.trust-counter {
  font-family: 'Aptos Display', 'Aptos', Calibri, sans-serif;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.trust-counter-current {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.trust-counter-sep {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

.trust-counter-total {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
}
/* -- Client Logo Carousel Styles ------------------------------------------ */
.client-carousel-container {
  position: relative;
  width: 100%;
}

.client-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .logo-ticker,
  .trust-card,
  .trust-avatar-ring circle,
  .trust-progress-bar {
    animation: none !important;
  }

  .testimonial-track,
  .client-carousel-track {
    transition: none;
  }
}

.client-carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 0 1rem;
}

.client-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 100px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.client-logo-card:hover {
  background: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.client-logo {
  width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(0%);
  transition: filter 0.3s ease;
}

.client-logo-card:hover .client-logo {
  filter: grayscale(0%);
}

/* Carousel Navigation */
.carousel-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Carousel Dots */
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
  background: rgba(167, 112, 70, 1);
  width: 24px;
  border-radius: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .client-logo-card {
    padding: 1rem;
    min-height: 80px;
  }
  
  .client-logo {
    max-height: 50px;
  }
  
  .carousel-nav-btn {
    width: 36px;
    height: 36px;
  }
}
