/* ─────────────────────────────────────────────────────────────
   plot-layout.css — Plot availability map styles
   Fixes applied:
   - Local :root token block removed — tokens are defined globally
     in header-footer.css; local redefinition masked future changes
   - All decorative section comment dividers removed
   - Version comment removed (belongs in git, not source)
───────────────────────────────────────────────────────────── */

/* Section label */
.section-label {
  font-family: var(--font-accent, 'Cormorant Garamond', Georgia, serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold, #c8a45d);
  display: block;
  margin-bottom: 12px;
}

/* Section heading */
.section-heading {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 18px;
}

.section-heading em {
  font-style: italic;
  color: var(--gold, #c8a45d);
}

/* Gold rule */
.gold-rule {
  width: 44px;
  height: 1px;
  background: var(--gold, #c8a45d);
  margin-bottom: 22px;
}

/* Scroll reveal base states */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-delay="1"] { transition-delay: .1s; }
[data-delay="2"] { transition-delay: .2s; }

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Page base */
.plot-main {
  background: #0b0d0e;
  color: #fff;
  min-height: 100vh;
}

/* Header section */
.plot-header-section {
  padding: 110px 0 40px;
  background: #080a0c;
  border-bottom: 1px solid rgba(200, 164, 93, .1);
}

.plot-header-top { margin-bottom: 28px; }

.plot-header-sub {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, .42);
  line-height: 1.8;
  max-width: 500px;
}

/* Project tabs */
.plot-project-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.plot-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 24px;
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .55);
  background: transparent;
  transition: all .25s ease;
  cursor: pointer;
  text-decoration: none;
}

.plot-tab i { font-size: 11px; color: var(--gold, #c8a45d); }
.plot-tab:hover { border-color: var(--gold, #c8a45d); color: var(--gold, #c8a45d); }
.plot-tab.active { background: var(--gold, #c8a45d); border-color: var(--gold, #c8a45d); color: #000; }
.plot-tab.active i { color: #000; }

/* Map section */
.plot-availability-section {
  padding: 50px 0 90px;
  background: #0b0d0e;
}

/* Meta header — title + legend row */
.availability-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.availability-title {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  color: #fff;
}

/* Legend */
.legend-container {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, .025);
  padding: 9px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .06);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .8);
}

.legend-color { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.legend-color.available { background: #3a8c3f; box-shadow: 0 0 6px rgba(58, 140, 63, .5); }
.legend-color.reserved  { background: #e65100; box-shadow: 0 0 6px rgba(230, 81, 0, .5); }
.legend-color.sold      { background: #c62828; box-shadow: 0 0 6px rgba(198, 40, 40, .5); }

/* Map viewport — scroll container */
.map-viewport-wrapper {
  border-radius: 14px;
  border: 1px solid rgba(200, 164, 93, .14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  overflow: hidden;
}

/* Scroll hint bar — visible only on mobile */
.map-scroll-hint {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: rgba(200, 164, 93, .1);
  color: var(--gold, #c8a45d);
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 7px;
  border-bottom: 1px solid rgba(200, 164, 93, .12);
}

/* Map inner container — grass background, padding, scroll on mobile */
.map-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  background-image: url('../images/grass_background.png');
  background-repeat: repeat;
  background-size: 250px 250px;
  padding: 24px;
  border-radius: 14px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* SVG fills container width at desktop; fixed width on mobile for scrollability */
#plotSvg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

/* Developable land bands — dark wash behind plots so they read over the grass background */
.svg-land {
  fill: #1b1f22;
  stroke: rgba(200, 164, 93, .12);
  stroke-width: 1px;
}

/* Plot groups */
.svg-plot-group {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .18s ease;
}

.svg-plot-group[data-status="marker"] {
  cursor: default;
  pointer-events: none;
}

/* Plot fill states */
.svg-plot {
  transition: fill .18s ease, stroke .18s ease, filter .18s ease;
  stroke-width: 1px;
  fill-opacity: .93;
}

.svg-plot.status-available { fill: #1e4d22; stroke: rgba(60, 140, 65, .65); }
.svg-plot.status-reserved  { fill: #6b2600; stroke: rgba(230, 81, 0, .65); }
.svg-plot.status-sold      { fill: #5a0a0a; stroke: rgba(198, 40, 40, .65); }
.svg-plot.status-marker    { fill: #0a130b; stroke: rgba(200, 164, 93, .18); }

/* Hover state — scale up and highlight with gold stroke */
.svg-plot-group:not([data-status="marker"]):hover {
  transform: scale(1.05);
}

.svg-plot-group:not([data-status="marker"]):hover .svg-plot {
  fill-opacity: 1;
  stroke: var(--gold, #c8a45d);
  stroke-width: 1.5px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6));
}

/* Selected state — white stroke with gold glow */
.svg-plot-group.plot-selected .svg-plot {
  stroke: #fff !important;
  stroke-width: 2px !important;
  filter: drop-shadow(0 0 10px rgba(200, 164, 93, .8)) !important;
}

/* Plot number label */
.plot-label {
  fill: rgba(255, 255, 255, .82);
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.svg-plot-group:hover .plot-label { fill: #fff; }
.svg-plot-group[data-status="marker"] .plot-label { fill: rgba(255, 255, 255, .45); }

/* Amenity shapes */
.svg-amenity {
  stroke-width: 1.5px;
  fill-opacity: .88;
  transition: fill-opacity .2s;
}

.svg-amenity.clubhouse  { fill: url(#clubhouseGrad); stroke: rgba(200, 164, 93, .5); }
.svg-amenity.commonplot { fill: url(#gardenGrad);    stroke: rgba(60, 140, 65, .4); }
.svg-amenity:hover      { fill-opacity: .96; }

.amenity-label {
  fill: #fff;
  font-weight: 600;
  pointer-events: none;
  letter-spacing: .06em;
}

/* Roads */
.svg-road {
  fill: #1b1f22;
  stroke: #111417;
  stroke-width: .5px;
}

/* Dashed centre divider for dual-carriageway roads */
.svg-road-divider {
  stroke: rgba(255, 255, 255, .35);
  stroke-width: 1px;
  stroke-dasharray: 10, 14;
}

.svg-road-label {
  fill: rgba(255, 255, 255, .25);
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .11em;
  pointer-events: none;
  text-anchor: middle;
}

/* Pinpoint popup card — positioned by JS via top/left */
#plotPopupCard {
  position: fixed;
  z-index: 9999;
  width: 252px;
  background: linear-gradient(150deg, #13171a 0%, #0e1214 100%);
  border: 1px solid rgba(200, 164, 93, .3);
  border-radius: 14px;
  padding: 20px 18px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .78), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  display: none;
  animation: cardPop .22s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

@keyframes cardPop {
  from { opacity: 0; transform: scale(.88) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Arrow pseudo-element — direction toggled by .arrow-top / .arrow-bottom class */
#plotPopupCard::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #13171a;
  border-left: 1px solid rgba(200, 164, 93, .3);
  border-top:  1px solid rgba(200, 164, 93, .3);
  border-radius: 2px 0 0 0;
}

/* Card is below the click — arrow points upward */
#plotPopupCard.arrow-top::before {
  top: -7px;
  left: 22px;
  transform: rotate(45deg);
}

/* Card is above the click — arrow points downward */
#plotPopupCard.arrow-bottom::before {
  bottom: -7px;
  left: 22px;
  top: auto;
  transform: rotate(225deg);
  border-radius: 0 0 2px 0;
}

/* Close button */
.popup-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .5);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  padding: 0;
  line-height: 1;
}

.popup-close-btn:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

/* Popup header */
.popup-header {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 8px;
}

.popup-plot-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold, #c8a45d);
  background: rgba(200, 164, 93, .1);
  border: 1px solid rgba(200, 164, 93, .25);
  padding: 2px 7px;
  border-radius: 4px;
}

.popup-plot-number {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* Status row */
.popup-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.popup-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.popup-status-dot.dot-available { background: #4caf50; box-shadow: 0 0 7px rgba(76, 175, 80, .6); }
.popup-status-dot.dot-reserved  { background: #ff7043; box-shadow: 0 0 7px rgba(255, 112, 67, .6); }
.popup-status-dot.dot-sold      { background: #ef5350; box-shadow: 0 0 7px rgba(239, 83, 80, .6); }

.popup-status-text {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
}

/* Area details grid */
.popup-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}

.popup-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.popup-detail-label {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
}

.popup-detail-value {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.popup-detail-value span {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, .35);
  margin-left: 2px;
}

/* Action button row */
.popup-action-row {
  display: flex;
  gap: 7px;
}

.popup-btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 7px;
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: none;
  display: inline-block;
  transition: all .2s ease;
}

.popup-btn-enquire {
  background: transparent;
  border: 1px solid var(--gold, #c8a45d);
  color: var(--gold, #c8a45d);
}

.popup-btn-enquire:hover { background: rgba(200, 164, 93, .1); }

.popup-btn-book {
  background: linear-gradient(135deg, #c8a45d 0%, #a07c3a 100%);
  color: #000;
}

.popup-btn-book:hover {
  background: linear-gradient(135deg, #d4b06e 0%, #c8a45d 100%);
  box-shadow: 0 4px 14px rgba(200, 164, 93, .3);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────
   Responsive breakpoints
───────────────────────────────────────────────────────── */

@media (max-width: 991px) {
  .plot-header-section { padding: 90px 0 32px; }

  .availability-meta-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
  }

  .legend-container {
    width: 100%;
    justify-content: space-between;
    padding: 9px 16px;
  }
}

@media (max-width: 768px) {
  .plot-header-section { padding: 80px 0 28px; }
  .plot-header-sub     { max-width: 100%; font-size: 13px; }

  .plot-tab {
    padding: 9px 16px;
    font-size: 11px;
    letter-spacing: .09em;
  }

  .plot-availability-section { padding: 36px 0 60px; }

  /* Show scroll hint at mobile widths */
  .map-scroll-hint { display: flex; }

  /* Allow horizontal scrolling so plots stay tappable at intended size */
  .map-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border-radius: 10px;
  }

  /* SVG fixed width — preserves plot tap targets; height auto keeps aspect ratio */
  #plotSvg {
    width: 1400px;
    min-width: 1400px;
    height: auto;
  }

  .legend-container { gap: 14px; }
  .legend-item      { font-size: 11px; gap: 6px; }
  .legend-color     { width: 9px; height: 9px; }

  #plotPopupCard    { width: 220px; }
  .popup-plot-number { font-size: 1.8rem; }
}

@media (max-width: 576px) {
  .plot-header-section { padding: 72px 0 24px; }
  .plot-header-top     { margin-bottom: 20px; }
  .plot-header-sub     { font-size: 13px; }

  .plot-project-tabs { gap: 8px; }
  .plot-tab {
    padding: 8px 14px;
    font-size: 10px;
    letter-spacing: .08em;
    border-radius: 3px;
  }

  .availability-title { font-size: 1.25rem; }

  .legend-container {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 14px;
    border-radius: 14px;
  }

  .legend-item { font-size: 11px; }

  .plot-availability-section { padding: 28px 0 48px; }

  .map-scroll-hint { font-size: 10px; padding: 8px; gap: 6px; }

  #plotPopupCard {
    width: 210px;
    padding: 16px 14px 13px;
    border-radius: 12px;
  }

  .popup-plot-number  { font-size: 1.65rem; }
  .popup-detail-value { font-size: 13px; }
  .popup-btn          { font-size: 9px; padding: 8px 5px; }
  .popup-details      { gap: 10px; }
}

@media (max-width: 400px) {
  .plot-header-section { padding: 68px 0 20px; }

  .plot-tab { padding: 7px 11px; font-size: 10px; }

  .legend-container { gap: 8px 12px; padding: 9px 12px; }
  .legend-item       { font-size: 10px; gap: 5px; }
  .legend-color      { width: 8px; height: 8px; }

  #plotPopupCard {
    width: calc(100vw - 32px);
    max-width: 280px;
    padding: 15px 13px 12px;
    border-radius: 11px;
  }

  /* Arrow stays aligned to left edge at all card widths */
  #plotPopupCard.arrow-top::before    { left: 18px; }
  #plotPopupCard.arrow-bottom::before { left: 18px; }

  .popup-plot-number  { font-size: 1.5rem; }
  .popup-plot-badge   { font-size: 8px; }
  .popup-detail-value { font-size: 13px; }
  .popup-detail-label { font-size: 8px; }
  .popup-btn          { font-size: 9px; padding: 8px 4px; border-radius: 6px; }

  .map-scroll-hint { font-size: 10px; }
  .map-container   { padding: 8px; }
}