/* ==========================================================================
   Apartment Page Template – Samanity Theme
   Built on Bootstrap 5.3 utilities with custom overrides.
   ========================================================================== */

/* ---------- Section spacing ---------- */
.apartment-section {
  padding-block: 5rem;
}
.apartment-section--sm {
  padding-block: 3rem;
}

/* ---------- Hero ---------- */
.apartment-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}
.apartment-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Section backgrounds ---------- */
.apartment-bg-light {
  background-color: var(--samanity-section-light);
}
.apartment-bg-white {
  background-color: #fff;
}
.apartment-bg-dark {
  background-color: var(--samanity-dark);
  color: var(--samanity-text-on-dark);
}

/* ---------- Feature cards ---------- */
.apartment-feature-card {
  border: none;
  border-radius: 0.75rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.apartment-feature-card:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.apartment-feature-card .card-body {
  padding: 2rem 1.75rem;
}

/* ---------- Image + text split ---------- */
.apartment-split {
  overflow: hidden;
}
.apartment-split__img {
  min-height: 400px;
  object-fit: cover;
}
@media (min-width: 992px) {
  .apartment-split__img {
    min-height: 500px;
  }
}

/* ---------- Banner / panoramic image ---------- */
.apartment-banner {
  position: relative;
  min-height: 360px;
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}
@media (min-width: 768px) {
  .apartment-banner {
    min-height: 480px;
    background-attachment: fixed;
  }
}
.apartment-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
}

/* ---------- Gallery grid ---------- */
.apartment-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .apartment-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
.apartment-gallery__item {
  border-radius: 0.5rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.apartment-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.apartment-gallery__item:hover img {
  transform: scale(1.04);
}

/* ---------- Detail list ---------- */
.apartment-details dt {
  font-weight: 600;
  color: var(--samanity-dark);
}
.apartment-details dd {
  margin-bottom: 1rem;
  color: var(--samanity-text-muted);
}

/* ---------- CTA / contact strip ---------- */
.apartment-cta {
  background-color: var(--samanity-dark);
  color: var(--samanity-text-on-dark);
}
.apartment-cta .btn {
  min-width: 180px;
}

/* ---------- Footer ---------- */
.apartment-footer {
  background-color: var(--samanity-footer-bg);
  color: var(--samanity-text-on-dark);
}
.apartment-footer a {
  color: var(--samanity-text-on-dark);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.2s;
}
.apartment-footer a:hover {
  opacity: 1;
}

/* =========================================================================
   Apartment page – template-specific components
   ========================================================================= */

/* ---------- Main image ---------- */
.apt-main-img {
  border-radius: 25px;
  max-height: 560px;
}

/* ---------- Video embed ---------- */
.apt-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 25px;
  overflow: hidden;
}
.apt-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Video placeholder ---------- */
.apt-video-placeholder {
  background: #d9d9d9;
  border-radius: 25px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.apt-video-placeholder p {
  color: #757575;
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Gallery thumbnail ---------- */
.apt-gallery-thumb {
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  cursor: pointer;
}
.apt-gallery-thumb img {
  max-height: 270px;
  display: block;
}
.apt-gallery-thumb__badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ---------- Gallery empty state ---------- */
.apt-gallery-empty {
  background: #d9d9d9;
  border-radius: 6px;
  height: 30pt;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.apt-gallery-empty span {
  color: #757575;
  font-size: 0.9rem;
}

/* ---------- Apartment title ---------- */
.apartment-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #444444;
}

/* ---------- Features list ---------- */
#apartment-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 25px;
  row-gap: 0;
}
#apartment-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #484848;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400 !important;
}
#apartment-features .apt-feat-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

/* ---------- Description ---------- */
.apt-description {
  color: #444444;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- Amenities section ---------- */
.header-highlighter {
  display: block;
  text-transform: uppercase;
  color: #898989;
}
.apt-amenities-heading {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #444444;
}
.apt-amenity-box {
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  background: #f6f6f6;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 0 10px;
  box-sizing: border-box;
  gap: 10px;
  flex-shrink: 0;
}
.apt-amenity-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background: #ffffff;
  border-radius: 5px;
  flex-shrink: 0;
}
.apt-amenity-icon-wrap i {
  font-size: 14px;
  line-height: 1;
}
.apt-amenity-label {
  font-size: 13px;
  color: #484848;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Gallery lightbox modal ---------- */
#aptGalleryModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.apt-gallery-modal__close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.apt-gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apt-gallery-modal__prev { left: 20px; }
.apt-gallery-modal__next { right: 20px; }
.apt-gallery-modal__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
}
.apt-gallery-modal__counter {
  color: #ccc;
  margin-top: 12px;
  font-size: 0.9rem;
}

/* Review cards */
.apt-review-card {
  background: #F6F6F6;
  border: 1px solid #F0F0F0;
  border-radius: 25px;
  padding: 24px;
}

.apt-review-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.apt-review-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apt-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apt-review-avatar svg {
  width: 100%;
  height: 100%;
}

.apt-review-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.apt-review-name {
  font-size: 14px;
  font-weight: 600;
  color: #2B2B2B;
  line-height: 1.3;
}

.apt-review-stars {
  display: flex;
  gap: 2px;
}

.apt-review-stars .filled {
  color: #FFB800;
  font-size: 14px;
  line-height: 1;
}

.apt-review-stars .empty {
  color: #ddd;
  font-size: 14px;
  line-height: 1;
}

.apt-review-date {
  font-size: 12px;
  color: #8C8C8C;
  line-height: 1.3;
}

.apt-review-text {
  font-size: 14px;
  color: #070707;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Apartment Inquiry Form  — custom overrides on top of Bootstrap 5
   ========================================================================== */

/* Sticky wrapper — only sticky on large screens where the sidebar layout applies */
.apt-inquiry-wrap {
  border: 1px solid #EEEEEE;
  border-radius: 25px;
}
@media (min-width: 992px) {
  .apt-inquiry-wrap {
    position: sticky;
    top: 2rem;
  }
}

/* Card shell */
.apt-inquiry-card {
  border-radius: 25px;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Card heading */
.apt-inquiry-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--samanity-dark);
  margin-bottom: 1.5rem;
}

/* Rounded inputs / textarea to match theme design language */
.apt-inquiry-card .form-control,
.apt-inquiry-card .input-group-text {
  border-radius: 10px;
}

/* Input group: flatten the inner radius where parts meet */
.apt-inquiry-date-group .input-group-text {
  border-radius: 10px 0 0 10px;
}
.apt-inquiry-date-group .form-control {
  border-radius: 0 10px 10px 0;
}

/* Focus ring — use theme dark colour instead of Bootstrap blue */
.apt-inquiry-card .form-control:focus {
  border-color: var(--samanity-dark);
  box-shadow: 0 0 0 0.2rem rgba(11, 11, 11, 0.08);
}

/* Submit button */
.apt-inquiry-submit {
  height: 40px !important;
  font-size: 1rem !important;
  padding-block: 0 !important;
}

/* Feedback messages */
.apt-inquiry-feedback {
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
  min-height: 1.2em;
}
.apt-inquiry-feedback--success { color: #15803d; font-weight: 600; }
.apt-inquiry-feedback--error   { color: #b91c1c; font-weight: 600; }
.apt-inquiry-feedback--info    { color: #6b7280; }
