/* =========================================================
   ANCOR Homepage Projects Carousel V2
   ========================================================= */

.ahpc-section {
  position: relative;
  overflow: hidden;
  padding-top: 65px !important;
  padding-bottom: 65px !important;
  background:
    radial-gradient(
      circle at 12% 15%,
      rgba(199, 155, 82, 0.075),
      transparent 25%
    ),
    #FCFCFC;
}

.ahpc-section .section-inner {
  width: min(1420px, calc(100% - 58px)) !important;
  max-width: 1420px !important;
}

.ahpc-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 27px;
}

.ahpc-title {
  max-width: 720px;
}

.ahpc-title .section-kicker {
  display: block;
  margin-bottom: 7px;
  color: #b78840;
  font-size: 10px;
  font-weight: 900;
}

.ahpc-title h2 {
  margin: 0 0 8px !important;
  color: #0e2336;
  font-size: clamp(31px, 3.8vw, 49px) !important;
  font-weight: 900;
  line-height: 1.18;
}

.ahpc-title p {
  max-width: 620px;
  margin: 0 !important;
  color: #212121;
  font-size: 12px !important;
  line-height: 1.8 !important;
}

.ahpc-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.ahpc-arrows {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ahpc-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  padding: 0;
  border: 1px solid rgba(16, 40, 63, 0.13);
  border-radius: 50%;
  outline: none;
  background: #FCFCFC;
  color: #212121;
  box-shadow: 0 8px 22px rgba(16, 40, 63, 0.06);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.ahpc-arrow:hover {
  border-color: #957A56;
  background: #957A56;
  color: #FCFCFC;
  transform: translateY(-2px);
}

.ahpc-arrow svg {
  display: block;
  width: 18px;
  height: 18px;
}

.ahpc-all-projects {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid #212121;
  border-radius: 10px;
  color: #212121;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.ahpc-all-projects:hover {
  background: #212121;
  color: #FCFCFC;
}

/* Carousel */

.ahpc-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ahpc-track {
  display: flex;
  gap: 19px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 0 24px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  direction: ltr;
  touch-action: pan-x pan-y;
}

.ahpc-track::-webkit-scrollbar {
  display: none;
}

.ahpc-slide {
  flex: 0 0 57%;
  min-width: 0;
  scroll-snap-align: start;
  direction: rtl;
}

.ahpc-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(16, 40, 63, 0.105);
  border-radius: 22px;
  background: #FCFCFC;
  box-shadow:
    0 16px 43px rgba(16, 40, 63, 0.075);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.ahpc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(199, 155, 82, 0.5);
  box-shadow:
    0 24px 54px rgba(16, 40, 63, 0.13);
}

.ahpc-card-media {
  position: relative;
  flex: 0 0 56%;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, #212121, #34566d);
}

.ahpc-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      0deg,
      rgba(6, 19, 29, 0.47),
      transparent 50%
    );
}

.ahpc-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.ahpc-card:hover .ahpc-card-media img {
  transform: scale(1.055);
}

.ahpc-card-status {
  position: absolute;
  z-index: 3;
  top: 15px;
  right: 15px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 25, 39, 0.66);
  color: #FCFCFC;
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(9px);
}

.ahpc-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 28px 25px 23px;
}

.ahpc-card-index {
  display: block;
  margin-bottom: 25px;
  color: #957A56;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ahpc-card-body h3 {
  overflow: hidden;
  margin: 0 0 10px;
  color: #212121;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ahpc-card-description {
  display: -webkit-box;
  overflow: hidden;
  min-height: 65px;
  margin: 0 0 17px !important;
  color: #6f7c87 !important;
  font-size: 11px !important;
  line-height: 1.85 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ahpc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.ahpc-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3ecdf;
  color: #8f682d;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.ahpc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 40, 63, 0.08);
}

.ahpc-card-price {
  color: #212121;
  font-size: 12px;
  font-weight: 900;
}

.ahpc-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a77831;
  font-size: 10px;
  font-weight: 900;
}

.ahpc-card-link::before {
  content: "←";
  font-size: 15px;
  line-height: 1;
}

/* Loading and empty */

.ahpc-loading,
.ahpc-empty {
  width: 100%;
  padding: 45px 20px;
  border: 1px dashed rgba(16, 40, 63, 0.18);
  border-radius: 16px;
  color: #212121;
  text-align: center;
  direction: rtl;
}

/* Footer */

.ahpc-slider-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 25px;
  margin-top: 2px;
}

.ahpc-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
}

.ahpc-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 40, 63, 0.19);
  cursor: pointer;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.ahpc-dot.active {
  width: 27px;
  background: #957A56;
}

.ahpc-counter {
  color: #212121;
  font-size: 10px;
  font-weight: 850;
  direction: ltr;
}

.ahpc-legacy-grid {
  display: none !important;
}

/* Tablet */

@media (max-width: 1050px) {
  .ahpc-section .section-inner {
    width: calc(100% - 36px) !important;
  }

  .ahpc-slide {
    flex-basis: 72%;
  }

  .ahpc-card {
    min-height: 370px;
  }

  .ahpc-card-media img {
    min-height: 370px;
  }

  .ahpc-card-body h3 {
    font-size: 24px;
  }
}

/* Mobile */

@media (max-width: 700px) {
  .ahpc-section {
    padding-top: 39px !important;
    padding-bottom: 42px !important;
  }

  .ahpc-section .section-inner {
    width: calc(100% - 18px) !important;
  }

  .ahpc-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
    margin-bottom: 18px;
  }

  .ahpc-title h2 {
    font-size: 30px !important;
  }

  .ahpc-title p {
    font-size: 11px !important;
  }

  .ahpc-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .ahpc-arrow {
    width: 40px;
    height: 40px;
  }

  .ahpc-all-projects {
    min-height: 40px;
  }

  .ahpc-track {
    gap: 11px;
    padding-bottom: 17px;
  }

  .ahpc-slide {
    flex-basis: 91%;
  }

  .ahpc-card {
    display: block;
    min-height: auto;
    border-radius: 17px;
  }

  .ahpc-card-media {
    height: 225px;
  }

  .ahpc-card-media img {
    min-height: 225px;
    height: 225px;
  }

  .ahpc-card-body {
    padding: 18px 16px 16px;
  }

  .ahpc-card-index {
    margin-bottom: 12px;
  }

  .ahpc-card-body h3 {
    font-size: 22px;
  }

  .ahpc-card-description {
    min-height: auto;
  }
}
