/* Page: Chi tiết dự án - Tab Tiện ích */

.project-amenities-page {
  --pa-blue: #0767df;
  --pa-blue-dark: #0a2356;
  --pa-orange: #f47b13;
  --pa-green: #0db45f;
  --pa-muted: #627087;
  --pa-border: #dfe7f2;
  --pa-soft: #f6faff;
}

.project-amenities-page .project-detail-hero {
  min-height: 430px;
}

.project-amenities-page .project-detail-hero::after {
  background: linear-gradient(
    90deg,
    #fff 0%,
    rgba(255,255,255,.99) 35%,
    rgba(255,255,255,.75) 49%,
    rgba(255,255,255,.08) 78%
  );
}

.project-amenities-page .project-detail-hero__media {
  inset: 0 0 0 42%;
}

.project-amenities-page .project-detail-hero__media img {
  object-position: center right;
}

.project-amenities-page .project-detail-hero__content {
  max-width: 720px;
}

.project-amenities-page .project-detail-hero h1 {
  font-size: var(--font-page-title);
  line-height: 1.1;
}

.amenities-hero-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.amenities-hero-facts .is-green {
  color: var(--pa-green);
}

.project-amenities-page .project-key-stats__panel article div {
  display: flex;
  flex-direction: column;
}

.project-amenities-page .project-key-stats__panel strong {
  order: -1;
}

.project-amenities-page .project-key-stats__panel span.is-orange {
  color: var(--pa-orange);
  background: #fff5ea;
}

.project-amenities-overview {
  padding: 22px 0 16px;
}

.project-amenities-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.project-amenities-sidebar > p {
  margin-top: 14px;
  color: var(--pa-muted);
  font-size: var(--font-small);
  line-height: 1.7;
}

.amenity-filter {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.amenity-filter button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: #31415f;
  border: 1px solid var(--pa-border);
  border-radius: 999px;
  background: #fff;
  font-size: var(--font-small);
  font-weight: 600;
  text-align: left;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.amenity-filter button svg {
  width: 17px;
  height: 17px;
  color: var(--pa-blue);
}

.amenity-filter button:hover,
.amenity-filter button:focus-visible {
  border-color: #9fc5f6;
}

.amenity-filter button.is-active {
  color: #fff;
  border-color: var(--pa-blue);
  background: linear-gradient(90deg, #075bd7, #0b8df5);
  box-shadow: 0 8px 18px rgba(7, 103, 223, .18);
}

.amenity-filter button.is-active svg {
  color: #fff;
}

.project-amenities-map {
  margin: 0;
}

.project-amenities-map button {
  position: relative;
  width: 100%;
  min-height: 330px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--pa-border);
  border-radius: 16px;
  background: #edf4f8;
  box-shadow: 0 14px 34px rgba(27, 67, 119, .08);
}

.project-amenities-map img {
  width: 100%;
  min-height: 330px;
  height: 100%;
  object-fit: cover;
}

.project-amenities-map button > span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  color: #fff;
  border-radius: 8px;
  background: rgba(5, 33, 79, .82);
  font-size: var(--font-small);
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-amenities-map button:hover > span,
.project-amenities-map button:focus-visible > span {
  opacity: 1;
  transform: translateY(0);
}

.project-amenities-map button > span svg {
  width: 15px;
  height: 15px;
}

.amenity-list-section {
  padding: 4px 0 18px;
}

.amenity-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.amenity-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pa-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 66, 117, .06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.amenity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(29, 66, 117, .11);
}

.amenity-card[hidden] {
  display: none;
}

.amenity-card figure {
  position: relative;
  margin: 0;
}

.amenity-card figure img {
  width: 100%;
  aspect-ratio: 2.45 / 1;
  object-fit: cover;
}

.amenity-card__badge {
  position: absolute;
  left: 12px;
  bottom: -14px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .14);
}

.amenity-card__badge svg {
  width: 15px;
  height: 15px;
}

.amenity-card__badge--green { background: #08b95f; }
.amenity-card__badge--orange { background: #f38a12; }
.amenity-card__badge--pink { background: #ee3b83; }
.amenity-card__badge--teal { background: #00a99d; }
.amenity-card__badge--blue { background: #1478e8; }
.amenity-card__badge--purple { background: #9a3be2; }
.amenity-card__badge--cyan { background: #04b7ca; }

.amenity-card__body {
  padding: 19px 14px 13px;
}

.amenity-card__body h3 {
  color: #0f1d3b;
  font-size: var(--font-small);
  line-height: 1.45;
}

.amenity-card__body > p {
  min-height: 46px;
  margin-top: 7px;
  color: var(--pa-muted);
  font-size: var(--font-small);
  line-height: 1.55;
}

.amenity-card__body > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: #45546f;
  font-size: var(--font-caption);
}

.amenity-card__body > div span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.amenity-card__body > div svg {
  width: 14px;
  height: 14px;
  color: var(--pa-blue);
}

.amenity-empty {
  padding: 28px 16px;
  color: var(--pa-muted);
  text-align: center;
  font-size: var(--font-small);
}

.amenities-ai-section {
  padding: 0 0 18px;
}

.amenities-ai-panel {
  padding: 15px 18px 18px;
  border: 1px solid #9fc3f0;
  border-radius: 16px;
  background: linear-gradient(105deg, #eff7ff 0%, #fbfdff 45%, #f3f7ff 100%);
}

.amenities-ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.amenities-ai-header h2 {
  color: var(--pa-blue-dark);
  font-size: var(--font-card-title-lg);
}

.amenities-ai-header h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  min-height: 21px;
  margin-left: 5px;
  padding: 2px 5px;
  color: #fff;
  border-radius: 5px;
  background: linear-gradient(135deg, #1645da, #873de5);
  font-size: var(--font-caption);
  vertical-align: middle;
}

.amenities-ai-header p,
.amenities-ai-header small {
  margin-top: 4px;
  color: #68758c;
  font-size: var(--font-caption);
}

.amenities-ai-grid {
  display: grid;
  grid-template-columns: 190px repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.amenities-score,
.amenities-ai-grid article {
  min-width: 0;
  min-height: 150px;
  padding: 14px;
  border: 1px solid #e0e8f3;
  border-radius: 11px;
  background: rgba(255,255,255,.9);
}

.amenities-score {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.amenities-score__gauge {
  width: 124px;
  height: 80px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 124px 124px 0 0;
  background: conic-gradient(from 270deg at 50% 100%, #0867dd 0deg, #12a6ed 105deg, #f27b13 160deg, #eef3f8 160deg 180deg);
}

.amenities-score__gauge::after {
  content: "";
  grid-area: 1 / 1;
  align-self: end;
  width: 88px;
  height: 58px;
  border-radius: 88px 88px 0 0;
  background: #fff;
}

.amenities-score__gauge strong {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  align-self: end;
  margin-bottom: 11px;
  color: #0a214f;
  font-size: var(--font-section-title);
  line-height: 1;
}

.amenities-score__gauge strong small {
  font-size: var(--font-caption);
}

.amenities-score > span {
  margin-top: 5px;
  color: #536179;
  font-size: var(--font-caption);
}

.amenities-score > em {
  margin-top: 7px;
  padding: 3px 9px;
  color: #0b9d50;
  border-radius: 999px;
  background: #e8f8ef;
  font-size: var(--font-caption);
  font-style: normal;
  font-weight: 700;
}

.amenities-ai-grid article > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: var(--pa-blue);
  border-radius: 10px;
  background: #edf6ff;
}

.amenities-ai-grid article > span svg {
  width: 21px;
  height: 21px;
}

.amenities-ai-grid article > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.amenities-ai-grid h3 {
  color: #15305f;
  font-size: var(--font-small);
}

.amenities-ai-grid article strong {
  color: #0b2c61;
  font-size: var(--font-body-sm);
}

.amenities-ai-grid article strong small {
  font-size: var(--font-caption);
}

.amenities-ai-grid article p {
  min-height: 46px;
  margin-top: 8px;
  color: #637087;
  font-size: var(--font-caption);
  line-height: 1.5;
}

.amenities-ai-grid article button {
  margin-top: 5px;
  padding: 0;
  color: var(--pa-blue);
  border: 0;
  background: transparent;
  font-size: var(--font-caption);
  font-weight: 700;
}

.amenity-access-section {
  padding: 0 0 12px;
}

.amenity-access-section h2 {
  margin-bottom: 10px;
  color: var(--pa-blue-dark);
  font-size: var(--font-body-lg);
}

.amenity-access-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.amenity-access-grid article {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--pa-border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(31, 67, 115, .04);
}

.amenity-access-grid article > svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--pa-blue);
}

.amenity-access-grid article:nth-child(4) > svg,
.amenity-access-grid article:nth-child(6) > svg {
  color: #983fe0;
}

.amenity-access-grid article:nth-child(5) > svg {
  color: var(--pa-orange);
}

.amenity-access-grid strong,
.amenity-access-grid span {
  display: block;
  font-size: var(--font-caption);
  line-height: 1.35;
}

.amenity-access-grid strong {
  color: #2b3b5a;
}

.amenity-access-grid span {
  margin-top: 2px;
  color: #5e6b82;
}

.amenity-gallery-section {
  padding: 0 0 28px;
}

.amenity-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.amenity-gallery-header h2 {
  color: var(--pa-blue-dark);
  font-size: var(--font-body-lg);
}

.amenity-gallery-header > div {
  display: flex;
  gap: 7px;
}

.amenity-gallery-header button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--pa-blue);
  border: 1px solid var(--pa-border);
  border-radius: 50%;
  background: #fff;
}

.amenity-gallery-header button svg {
  width: 14px;
  height: 14px;
}

.amenity-gallery-viewport {
  overflow: hidden;
}

.amenity-gallery-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  transition: transform 240ms ease;
}

.amenity-gallery-track button {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #eaf1f7;
}

.amenity-gallery-track img {
  width: 100%;
  aspect-ratio: 2.34 / 1;
  object-fit: cover;
  transition: transform 220ms ease;
}

.amenity-gallery-track button:hover img {
  transform: scale(1.035);
}

.amenity-gallery-track span {
  position: absolute;
  left: 10px;
  bottom: 8px;
  color: #fff;
  font-size: var(--font-caption);
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.65);
}

.project-amenities-page .project-media-modal__content img {
  max-height: 70vh;
  object-fit: contain;
}

@media (max-width: 1199px) {
  .amenities-hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-amenities-layout {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .amenity-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .amenities-ai-grid {
    grid-template-columns: 180px repeat(2, minmax(0, 1fr));
  }

  .amenity-access-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .project-amenities-page .project-detail-hero__media {
    inset: 0 0 0 30%;
  }

  .project-amenities-layout {
    grid-template-columns: 1fr;
  }

  .project-amenities-sidebar {
    max-width: 760px;
  }

  .amenity-filter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-amenities-map button,
  .project-amenities-map img {
    min-height: 300px;
  }

  .amenity-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amenities-ai-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amenities-score {
    grid-column: 1 / -1;
  }

  .amenity-gallery-track {
    display: flex;
  }

  .amenity-gallery-track button {
    flex: 0 0 calc((100% - 28px) / 3);
  }
}

@media (max-width: 767px) {
  .project-amenities-page .project-detail-hero {
    min-height: auto;
  }

  .project-amenities-page .project-detail-hero__media {
    inset: 0;
    opacity: .4;
  }

  .project-amenities-page .project-detail-hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,.88), #fff 82%);
  }

  .project-amenities-page .project-detail-hero h1 {
    font-size: var(--font-page-title);
  }

  .amenities-hero-facts {
    grid-template-columns: 1fr 1fr;
  }

  .amenity-filter {
    display: flex;
    overflow-x: auto;
    padding-bottom: 7px;
    scroll-snap-type: x mandatory;
  }

  .amenity-filter button {
    flex: 0 0 145px;
    scroll-snap-align: start;
  }

  .amenity-card-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .amenity-card {
    flex: 0 0 270px;
    scroll-snap-align: start;
  }

  .amenities-ai-header {
    display: grid;
  }

  .amenities-ai-grid {
    grid-template-columns: 1fr;
  }

  .amenities-score {
    grid-column: auto;
  }

  .amenity-access-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 7px;
    scroll-snap-type: x mandatory;
  }

  .amenity-access-grid article {
    flex: 0 0 190px;
    scroll-snap-align: start;
  }

  .amenity-gallery-track button {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 479px) {
  .project-amenities-page .project-detail-hero h1 {
    font-size: var(--font-section-title);
  }

  .amenities-hero-facts {
    grid-template-columns: 1fr;
  }

  .project-amenities-map button,
  .project-amenities-map img {
    min-height: 235px;
  }

  .amenity-gallery-track button {
    flex-basis: 100%;
  }
}
