/* Custom styles for Handwoven Industries site refresh */

/* Client Logos Scroller */
#clients {
  background: #ffffff;
  box-shadow: 0 6em 0 #ffffff;
}

#clients .inner {
  padding-bottom: 1em;
  padding-top: 1em;
}

#clients h2.major {
  color: #2e3141;
}

#clients h2.major::after {
  background-color: #4c5c96;
}

#clients {
  margin: 6em 0;
}

#clients::before,
#clients::after {
  height: 6em;
}

#clients::before {
  top: -6em;
  background: linear-gradient(to bottom left, #3d4051 50%, #ffffff 50%);
  transform: none;
}

#clients::after {
  bottom: -6em;
  background: linear-gradient(to bottom right, #ffffff 50%, #2e3141 50%);
  transform: none;
}

.logo-scroller {
  overflow: hidden;
  width: 100%;
  padding-bottom: 3em;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 3em;
  width: max-content;
  animation: scroll-logos 60s linear infinite;
}

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

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.client-logo {
  max-width: 180px;
  max-height: 75px;
  width: auto;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Client Modal Styles */
.client-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.client-modal-overlay.active {
  display: flex;
}

.client-modal {
  background: #ffffff;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.client-modal-close {
  position: absolute;
  top: 0.25em;
  right: 0.5em;
  background: none;
  border: none;
  color: #4c5c96 !important;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
  box-shadow: none;
  height: 1em;
  font-size: 3em;
  line-height: 1em;
  padding: 0 !important;
}

.client-modal-close:hover {
  opacity: 1;
}

.client-modal-logo {
  text-align: center;
  padding: 1em 0 1.5em;
}

.client-modal-logo img {
  max-width: 200px;
  max-height: 100px;
}

.client-modal h3 {
  margin: 0 0 0.5em;
  color: #2e3141;
  font-size: 1.5em;
}

.client-modal .year {
  color: rgba(46, 49, 65, 0.5);
  font-size: 0.9em;
  margin-bottom: 1em;
}

.client-modal p {
  color: rgba(46, 49, 65, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5em;
}

.client-modal .btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  background: #4c5c96;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.client-modal .btn:hover {
  background: #5e6fad;
}

/* Service Modal Styles (dark theme) */
.service-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.service-modal-overlay.active {
  display: flex;
}

.service-modal {
  background: #2e3141;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.service-modal-close {
  position: absolute;
  top: 0.25em;
  right: 0.5em;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
  box-shadow: none;
  height: 1em;
  font-size: 3em;
  line-height: 1em;
  padding: 0 !important;
}

.service-modal-close:hover {
  opacity: 1;
}

.service-modal-icon {
  text-align: center;
  padding: 1em 0 1.5em;
}

.service-modal-icon .icon {
  font-size: 4em;
  color: #8be9fd;
}

.service-modal h3 {
  margin: 0 0 0.5em;
  color: #fff;
  font-size: 1.5em;
}

.service-modal p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5em;
}

.service-modal .btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  background: #4c5c96;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.service-modal .btn:hover {
  background: #5e6fad;
}

/* Project Tags */
.tags {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8be9fd;
  margin-top: 0.5em;
}


/* Services icon sizing */
#services .features article .icon {
  font-size: 3em;
  color: #8be9fd;
  display: block;
  margin-bottom: 0.5em;
}

/* Testimonials - disable logo links */
#testimonials .testimonial a.image {
  pointer-events: none;
  cursor: default;
}

/* Why Us section list styling */
#why-us ul.alt li {
  padding: 0.75em 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#why-us ul.alt li:last-child {
  border-bottom: none;
}

#why-us ul.alt li strong {
  color: #fff;
}

/* Work section - fixed aspect ratio image cards */
#work .features article .image {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  display: block;
}

#work .features article .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive adjustments */
@media screen and (max-width: 736px) {
  .client-logos {
    gap: 1.5em;
  }

  .client-logo {
    max-width: 150px;
    max-height: 65px;
  }

  #clients {
    margin: 6em 0;
  }

  .logo-track {
    gap: 2em;
  }
}
