/* =========================================================
   Reusable components
   ========================================================= */

/* ---------- Home hero (background video) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, calc(100vh - var(--header-height)), 820px);
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-black);
}

.hero__media,
.hero__media video,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media video {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero__media video.is-playing {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.2) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-block: 80px;
}

.hero__title {
  font-size: 58px;
  font-weight: 600;
  line-height: 1.15;
}

.hero__text {
  margin: 20px 0 36px;
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.hero__toggle {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-white);
  font-size: 14px;
}

.hero__toggle[hidden] {
  display: none;
}

.hero__toggle .icon--pause {
  display: block;
  width: 12px;
  height: 14px;
  border-inline: 4px solid currentColor;
}

.hero__toggle[aria-pressed="true"] .icon--pause {
  display: none;
}

.hero__toggle .icon--play {
  display: none;
}

.hero__toggle[aria-pressed="true"] .icon--play {
  display: block;
}

/* ---------- Page intro (title block) ---------- */
.page-intro {
  padding: 6% 0 4%;
  text-align: center;
}

.page-intro__text {
  max-width: 900px;
  margin: 12px auto 0;
  font-size: 20px;
  line-height: 1.5;
}

.page-intro__text--narrow {
  max-width: 640px;
  font-size: 18px;
}

/* ---------- Intro / statement section ---------- */
.statement {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.statement p {
  margin: 20px 0 32px;
  font-size: 20px;
  line-height: 1.5;
}

/* ---------- Project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 400px;
  padding: 24px 16px 28px;
  overflow: hidden;
  border-radius: var(--radius-card);
  color: var(--color-white);
  text-align: center;
  isolation: isolate;
}

.project-card__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.51) 50%, #000 100%);
  opacity: 0.77;
}

.project-card:hover .project-card__img,
.project-card:focus-visible .project-card__img {
  transform: scale(1.05);
}

.project-card:hover .link-btn .icon,
.project-card:focus-visible .link-btn .icon {
  transform: rotate(0deg);
}

.project-card__name {
  font-size: 25px;
  font-weight: 700;
  line-height: 30px;
}

.project-card__meta {
  margin-top: 14px;
  color: var(--color-gold);
}

/* ---------- Tabs ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tabs__tab {
  padding: 13px 34px;
  border: 0;
  border-radius: 0;
  background: var(--color-light);
  color: var(--color-dark);
  font-size: 16px;
  font-weight: 600;
  transition: background-color var(--transition);
}

.tabs__tab[aria-selected="true"] {
  background: var(--color-gold);
}

.tabs__panel[hidden] {
  display: none;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion {
  max-width: 960px;
  margin-inline: auto;
}

.accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.accordion__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.accordion__item summary::-webkit-details-marker {
  display: none;
}

.accordion__item summary .icon {
  color: var(--color-gold);
  font-size: 14px;
  transition: transform var(--transition);
}

.accordion__item[open] summary .icon {
  transform: rotate(90deg);
}

.accordion__body {
  padding: 0 4px 24px;
  color: var(--color-grey);
  font-size: 17px;
  line-height: 30px;
}

/* ---------- Project gallery (main image + thumbnail strip) ---------- */
.gallery {
  margin-top: 30px;
  background: var(--color-light);
}

.gallery__stage {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: var(--color-light);
}

.gallery__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(1, 1, 1, 0.55);
  color: var(--color-white);
  font-size: 16px;
  transform: translateY(-50%);
  transition: background-color var(--transition);
}

.gallery__nav:hover,
.gallery__nav:focus-visible {
  background: var(--color-gold);
  color: var(--color-black);
}

.gallery__nav--prev {
  left: 15px;
}

.gallery__nav--next {
  right: 15px;
}

.gallery__count {
  position: absolute;
  left: 15px;
  bottom: 15px;
  z-index: 2;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: rgba(1, 1, 1, 0.55);
  color: var(--color-white);
  font-size: 14px;
}

.gallery__thumbs {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  list-style: none;
}

.gallery__thumb {
  flex: 0 0 auto;
  width: 104px;
  height: 78px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  opacity: 0.65;
  transition: opacity var(--transition), border-color var(--transition);
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumb:hover,
.gallery__thumb:focus-visible,
.gallery__thumb[aria-current="true"] {
  opacity: 1;
}

.gallery__thumb[aria-current="true"] {
  border-color: var(--color-gold);
}

/* ---------- Two-column split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 72px;
  align-items: start;
}

/* ---------- Check list ---------- */
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
  line-height: 30px;
}

.check-list li + li {
  margin-top: 6px;
}

.check-list .icon {
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--color-gold);
  font-size: 15px;
}

/* ---------- Project overview ---------- */
.overview__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
}

.overview__media img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.overview__body > * + * {
  margin-top: 20px;
}

.overview__body p {
  font-size: 17px;
  line-height: 32px;
}

.overview__spec {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: 26px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Price counter ---------- */
.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  color: var(--color-dark);
  font-size: 24px;
  font-weight: 500;
}

.price__value {
  font-size: 58px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Image pair (brochure pages) ---------- */
.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.image-pair figure {
  padding: 20px;
  background: var(--color-white);
}

.image-pair img {
  width: 100%;
}

/* ---------- Icon feature grid (amenities / proximity) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 20px 0 0;
  list-style: none;
}

.feature-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 24px 12px;
  border-left: 1px solid var(--color-gold);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.feature-grid__item:nth-child(5n + 1) {
  border-left: 0;
}

.feature-grid__item .icon {
  color: var(--color-black);
  font-size: 53px;
}

/* ---------- Amenity photo tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: 36% 1fr;
  gap: 20px;
  margin-top: 30px;
}

.tile {
  position: relative;
  min-height: 296px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--tall {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.tile--wide {
  grid-column: 1 / -1;
  min-height: 640px;
}

.tile__label {
  position: relative;
  display: inline-block;
  min-width: 51%;
  padding: 7px 18px;
  border-radius: var(--radius-lg);
  background: rgba(163, 140, 99, 0.72);
  color: var(--color-white);
  font-size: 20px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
  backdrop-filter: blur(2px);
}

.tile--tall .tile__label,
.tile--wide .tile__label {
  min-width: 0;
  padding-inline: 44px;
}

/* ---------- Custom villa CTA ---------- */
.cta-quote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--color-gold) 94%, #000 89%);
}

.cta-quote__media {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cta-quote__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-quote__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 7%;
}

.cta-quote__body p {
  font-size: 30px;
  font-weight: 500;
  line-height: 40px;
  color: var(--color-dark);
}

/* ---------- Contact panel (image + form) ---------- */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.contact-panel__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 24px;
}

.contact-panel__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-panel__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.contact-panel__media-title {
  position: relative;
  z-index: 1;
  max-width: 440px;
  color: var(--color-white);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.contact-panel__body {
  padding: 6%;
}

.contact-panel__intro {
  margin-bottom: 20px;
  color: var(--color-grey);
  font-size: 18px;
  line-height: 27px;
}

.contact-panel--narrow {
  max-width: 1100px;
  margin-inline: auto;
}

/* ---------- Forms ---------- */
.form__group {
  margin-bottom: 21px;
}

.form__label {
  display: block;
  color: var(--color-grey);
  font-size: 16px;
  line-height: 22px;
}

.form__label span[aria-hidden] {
  color: var(--color-error);
}

.form__control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid #77797c;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 22px;
  transition: border-color var(--transition);
}

textarea.form__control {
  min-height: 96px;
  resize: vertical;
}

.form__control:focus {
  outline: none;
  border-bottom-color: var(--color-dark);
  box-shadow: 0 1px 0 0 var(--color-dark);
}

.form__control[aria-invalid="true"] {
  border-bottom-color: var(--color-error);
}

.form__error {
  display: block;
  min-height: 0;
  margin-top: 6px;
  color: var(--color-error);
  font-size: 14px;
  line-height: 1.4;
}

.form__error:empty {
  display: none;
}

.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit {
  min-height: 44px;
  color: var(--color-dark);
  font-size: 14px;
  font-weight: 600;
}

.form__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form__submit .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.form__submit.is-loading .spinner {
  display: inline-block;
}

.form__submit.is-loading .icon {
  display: none;
}

.form__status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.5;
}

.form__status:empty {
  display: none;
}

.form__status--success {
  background: #e8f5ec;
  color: var(--color-success);
}

.form__status--error {
  background: #fdecea;
  color: var(--color-error);
}

.form__status a {
  text-decoration: underline;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Location ---------- */
.location__title {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.24;
}

.location__address {
  margin: 16px 0 24px;
  font-style: normal;
  font-size: 17px;
  line-height: 32px;
}

.location__map {
  position: relative;
  margin-top: 48px;
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e5e5e5;
}

.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Facility boxes ---------- */
.box-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.box {
  padding: 50px 48px;
  background: var(--color-white);
}

.box .check-list li {
  font-size: 16px;
}

/* ---------- Landmarks ---------- */
.landmarks__body > * + * {
  margin-top: 16px;
}

.landmarks__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.landmarks__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Testimonials slider ---------- */
.slider {
  position: relative;
}

.slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view, 1) - 1) * 20px) / var(--per-view, 1));
  gap: 20px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  list-style: none;
}

.slider__track::-webkit-scrollbar {
  display: none;
}

.slider--3 {
  --per-view: 3;
}

.slider__slide {
  scroll-snap-align: start;
}

.slider__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-dark);
  font-size: 18px;
  transform: translateY(-50%);
}

.slider__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.slider__nav--prev {
  left: -56px;
}

.slider__nav--next {
  right: -56px;
}

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
}

.testimonial--gold {
  border-color: var(--color-gold);
  border-radius: var(--radius-md);
}

.testimonial__stars {
  display: flex;
  gap: 5px;
  margin-bottom: 24px;
  color: var(--color-star);
  font-size: 14px;
}

.testimonial__text {
  flex: 1;
  min-height: 150px;
  color: var(--color-grey);
  font-size: 18px;
  line-height: 30px;
}

.testimonial__author {
  margin-top: 28px;
  padding-right: 40px;
}

.testimonial__name {
  display: block;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.testimonial__role {
  display: block;
  color: var(--color-grey);
  font-size: 14px;
}

.testimonial__mark {
  position: absolute;
  right: 30px;
  bottom: 30px;
  color: var(--color-gold);
  font-size: 30px;
}

/* Single featured quote (About page) */
.quote-card {
  padding: 7% 21%;
  border-radius: var(--radius-sm);
  background: var(--color-quote-bg);
  text-align: center;
}

.quote-card blockquote p {
  font-size: 28px;
  line-height: 48px;
}

.quote-card figcaption {
  margin-top: 30px;
}

.quote-card__name {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

.quote-card__role {
  display: block;
  font-size: 14px;
  color: var(--color-grey);
}

/* ---------- About: hero ---------- */
.about-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 506px;
  padding-bottom: 4%;
  overflow: hidden;
  color: var(--color-white);
  text-align: center;
}

.about-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 55%);
}

.about-hero__content {
  position: relative;
  z-index: 1;
}

.about-hero__name {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}

.about-hero__role {
  font-size: 20px;
  line-height: 30px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1140px;
  margin: 40px auto 0;
}

.stat {
  padding: 40px 10%;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.stat__number {
  font-size: 60px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat__unit {
  font-size: 32px;
  font-weight: 500;
  line-height: 48px;
}

.stat__label {
  margin-top: 14px;
  color: var(--color-grey);
  font-size: 18px;
}

/* ---------- Value boxes ---------- */
.values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1140px;
  margin: 40px auto 0;
}

.value {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 6px;
}

.value img {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
}

.value h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
}

.value p {
  color: var(--color-grey);
  font-size: 18px;
  line-height: 27px;
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Page-specific spacing ---------- */
.page-intro .price {
  margin-top: 40px;
}

.amenities__sub {
  margin-top: 8px;
}

.commitment__text {
  max-width: 900px;
  margin: 32px auto 0;
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 55vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found p {
  margin: 16px 0 32px;
}

.not-found .btn {
  margin: 6px;
}
