/* Apartment units area styles */
.apartment-units {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.apartment-units .btn-outline-secondary {
  border-color: #b85c38;
  color: #b85c38;
  background: #ffffff;
  font-weight: bold;
  box-shadow: none;
  transition: box-shadow 0.2s, background 0.2s;
}

.apartment-units .btn-outline-secondary:hover,
.apartment-units .btn-outline-secondary:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px #b85c38;
  color: #b85c38;
  border-color: #b85c38;
}

.apartment-units .btn-for-rent {
  border-color: #dc3545;
  color: #ffffff;
  background: #dc3545;
  font-weight: bold;
  box-shadow: none;
  transition: box-shadow 0.2s, background 0.2s;
}

.apartment-units .btn-for-rent:hover,
.apartment-units .btn-for-rent:focus {
  background: #c82333;
  box-shadow: 0 0 0 3px #dc3545;
  color: #ffffff;
  border-color: #c82333;
}

.units-label {
  font-weight: bold;
  color: #b85c38;
  margin-right: 8px;
}

/* Address link styling */
.apartment-location a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.apartment-location a:hover {
  color: #b85c38;
  text-decoration: underline;
}

/* Apartments page mock listing styles */
.apartments-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 60px 0;
  min-height: 60vh;
}

.apartments-section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apartments-title {
  color: #b85c38;
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 32px;
  text-align: center;
}

.apartments-list {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 40px;
  justify-items: center;
  align-items: stretch;
  box-sizing: border-box;
  padding: 0 4vw 0 4vw;
}

.apartment-card {
  background: #222;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(184, 92, 56, 0.08);
  overflow: hidden;
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.2s;
  color: #fff;
  padding: 32px 28px;
  position: relative;
}

.for-rent-badge {
  position: absolute;
  top: 42px;
  right: 28px;
  background-color: #dc3545;
  color: #fff;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 0.9em;
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.apartment-card:hover {
  box-shadow: 0 4px 24px rgba(184, 92, 56, 0.18);
}

.apartment-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.apartment-info {
  padding: 20px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apartment-name {
  font-size: 1.3em;
  color: #b85c38;
  font-weight: bold;
  margin: 0 0 4px 0;
}

.apartment-location {
  color: #FFFFFF;
  font-size: 1em;
  margin-bottom: 8px;
}

.apartment-details {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  color: #FFFFFF;
  font-size: 0.98em;
}

.apartment-details li {
  margin-bottom: 2px;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #fff8f2;
}

body,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

/* --- CUSTOM BANNER NAVIGATION BAR --- */
.custom-banner-nav {
  background: #b85c38;
  padding: 0;
  width: 100%;
  position: relative;
  z-index: 100;
}

.banner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100px;
  padding: 0 2vw;
  box-sizing: border-box;
}

/* Logo on the left */
.banner-logo-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  max-width: 100px;
}

.logo-image {
  max-height: 100px;
  width: auto;
  height: auto;
}

/* Title in the center */
.banner-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 20px;
}

.banner-company-name {
  font-size: 2.8em;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  text-align: center;
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.1;
}

/* Hamburger menu on the right */
.hamburger-menu {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6em;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex: 0 0 auto;
}

.hamburger-menu:hover {
  color: #ffd6a0;
}

/* Dropdown Navigation Banner */
.dropdown-nav {
  background: #b85c38;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  z-index: 99;
  position: relative;
  border-top: 3px solid #232323;
}

.dropdown-nav.active {
  max-height: 100px;
}

.dropdown-nav-links {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: stretch;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

.dropdown-nav-link {
  color: #fff;
  text-decoration: none;
  padding: 8px 1vw;
  font-size: 1.1em;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  border-right: 2px solid #232323;
}

.dropdown-nav-link:last-child {
  border-right: none;
}

.dropdown-nav-link:hover,
.dropdown-nav-link:focus {
  background: rgba(255, 214, 160, 0.12);
  color: #ffd6a0;
  text-decoration: none;
}

/* Responsive adjustments for banner */
@media (max-width: 768px) {
  .banner-flex {
    height: 80px;
  }

  .banner-logo-left {
    max-width: 80px;
  }

  .logo-image {
    max-height: 80px;
  }

  .banner-company-name {
    font-size: 1.8em;
    letter-spacing: 2px;
  }

  .hamburger-menu {
    font-size: 1.4em;
  }

  .dropdown-nav.active {
    max-height: 100px;
  }

  .dropdown-nav-link {
    font-size: 0.95em;
    padding: 6px 0.5vw;
  }
}

@media (max-width: 480px) {
  .banner-flex {
    height: 70px;
    padding: 0 1vw;
  }

  .banner-logo-left {
    max-width: 70px;
  }

  .logo-image {
    max-height: 70px;
  }

  .banner-company-name {
    font-size: 1.2em;
    letter-spacing: 1px;
  }

  .hamburger-menu {
    font-size: 1.2em;
    padding: 5px;
  }

  .dropdown-nav.active {
    max-height: 80px;
  }

  .dropdown-nav-link {
    font-size: 0.85em;
    padding: 4px 0.3vw;
  }
}

.footer {
  padding: 20px 0;
  background-color: #b85c38;
  color: #fff;
  font-size: 2em;
  font-weight: 900;
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.copyright {
  margin: 15px 0 0;
}

.logo-placeholder img {
  max-height: 50px;
  width: auto;
}

/* ── Unit Detail Modal ─────────────────────────────────────────────── */
body.modal-open-unit {
  overflow: hidden;
}

.unit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.unit-modal-overlay.active {
  display: flex;
}

.unit-modal {
  background: #1a1a1a;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6), 0 0 0 2px #b85c38;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 32px 28px 28px 28px;
  box-sizing: border-box;
  color: #fff;
  scrollbar-width: thin;
  scrollbar-color: #b85c38 #222;
}

.unit-modal::-webkit-scrollbar {
  width: 6px;
}

.unit-modal::-webkit-scrollbar-track {
  background: #222;
  border-radius: 3px;
}

.unit-modal::-webkit-scrollbar-thumb {
  background: #b85c38;
  border-radius: 3px;
}

.unit-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.8em;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  z-index: 10;
}

.unit-modal-close:hover {
  color: #fff;
  background: rgba(184, 92, 56, 0.18);
}

.unit-modal-for-rent {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 0.85em;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.35);
}

.unit-modal-header {
  margin-bottom: 18px;
}

.unit-modal-title {
  font-size: 1.6em;
  font-weight: 900;
  color: #b85c38;
  margin: 0 0 4px 0;
}

.unit-modal-address {
  color: #ccc;
  font-size: 0.95em;
  margin: 0;
}

/* ── Carousel ── */
.unit-carousel {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
  border: 2px solid #333;
}

.carousel-track-wrap {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  height: 540px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* whole photo visible, no cropping */
  object-position: center;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 26, 26, 0.75);
  border: 2px solid #b85c38;
  color: #b85c38;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s, color 0.2s;
}

.carousel-arrow:hover {
  background: #b85c38;
  color: #fff;
}

.carousel-arrow-left {
  left: 12px;
}

.carousel-arrow-right {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 8px 0;
  background: #111;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: #b85c38;
  transform: scale(1.2);
}

.carousel-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: #b85c38;
  font-size: 1em;
  font-weight: 700;
}

.carousel-loading .fa {
  font-size: 2em;
}

.carousel-no-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: #666;
  font-size: 1em;
  font-weight: 700;
}

.carousel-no-images .fa {
  font-size: 2.5em;
  color: #444;
}

/* ── Description ── */
.unit-modal-description {
  color: #ddd;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 22px;
  padding: 0 2px;
}

/* ── Details grid ── */
.unit-modal-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}

.unit-detail-item {
  background: #262626;
  border-radius: 10px;
  border: 1px solid #333;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.unit-detail-icon {
  color: #b85c38;
  font-size: 1.2em;
}

.unit-detail-label {
  font-size: 0.78em;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unit-detail-value {
  font-size: 1.05em;
  font-weight: 700;
  color: #fff;
}

/* ── Inline beds / baths / sqft row ───────────────────────────────── */
/*
  When all three stats are present, they share a single grid row.
  We achieve this by switching the grid to 3 equal columns ONLY for
  those three cards, leaving rent and extras on the normal 2-col layout.
*/
.unit-modal-details.has-inline-stats {
  grid-template-columns: repeat(2, 1fr);
}

/* The three inline items span across a dedicated full-width sub-row */
.unit-detail-item.inline-stat {
  /* Remove them from normal flow so we can place them together */
  grid-column: 1 / -1;
  /* first: make them span full width … */
}

/*
  Actually lay them out side-by-side using a nested flex row.
  We group the three items by wrapping them in a shared row via CSS Grid
  subgrid trick — but since we want zero extra HTML we use a different
  approach: make each inline-stat a flex child of a pseudo-row.

  Simpler approach that works without extra HTML:
  Use a 3-column grid for the whole container and restrict rent/extras
  to always span all 3 columns.
*/
.unit-modal-details.has-inline-stats {
  grid-template-columns: repeat(3, 1fr);
}

/* Rent and Extras always span the full row in both grid modes */
#detailRentWrap,
#detailExtrasWrap {
  grid-column: 1 / -1;
}

/* Rent and Extras always span the full row */
.unit-modal-details.has-inline-stats #detailRentWrap,
.unit-modal-details.has-inline-stats #detailExtrasWrap {
  grid-column: 1 / -1;
}

/* Beds, Baths, Sqft each take one column */
.unit-modal-details.has-inline-stats .inline-stat {
  grid-column: auto;
}

#detailExtrasWrap .unit-detail-value {
  white-space: normal;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .unit-modal-details.has-inline-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}


@media (max-width: 600px) {
  .unit-modal {
    padding: 24px 16px 20px 16px;
    max-height: 95vh;
  }

  .carousel-slide {
    height: 300px;
  }

  .unit-modal-details {
    grid-template-columns: 1fr;
  }

  .unit-modal-title {
    font-size: 1.3em;
  }
}