/* --- Property Page Enhancements --- */

/* Highlights Grid */
.highlights-grid {
  display: grid;
  gap: 1.5rem;
}

.highlight-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.gallery-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

  .gallery-item[style*="grid-column: span 2"] {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  transition: background-color 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background-color: var(--color-gold) !important;
  transform: scale(1.2);
}

/* Lightbox (Simple) */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

/* Rich Amenities (Signature Spaces) */
.property-amenities-section {
  padding: var(--space-md) 0;
}

.amenity-rich-card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.amenity-rich-card:hover {
  transform: translateX(10px);
}

.amenity-rich-card i {
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.amenity-rich-card:hover i {
  transform: scale(1.1) rotate(-5deg);
  opacity: 0.6 !important;
}

.amenity-rich-card h4 {
  position: relative;
  padding-bottom: 0.5rem;
}

.amenity-rich-card h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.amenity-rich-card:hover h4::after {
  width: 60px;
}

/* Earn From Section */
.earn-from-list li {
  transition: color 0.3s ease;
}

.earn-from-list li:hover {
  color: var(--color-forest) !important;
}

/* Enquiry CTA Section (Full-Width) */
.enquiry-cta-section {
  background-color: var(--color-parchment);
  border-top: 1px solid rgba(197, 160, 89, 0.2);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  position: relative;
  overflow: hidden;
}

.enquiry-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(197, 160, 89, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.enquiry-cta-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.enquiry-cta-section .enquiry-form {
  background: var(--color-white);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 160, 89, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  margin-top: var(--space-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.enquiry-cta-section .form-group {
  margin-bottom: 0;
  /* Handled by grid gap */
}

.cta-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.cta-actions .btn-outline {
  flex: 0 1 200px;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .property-grid-wrapper {
    grid-template-columns: 1fr !important;
  }

  .property-sidebar {
    margin-top: var(--space-lg);
  }

  .property-sidebar {
    display: none;
    /* Hide sidebar completely when moving to CTA section */
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn-outline {
    flex: 1;
  }
}

/* Breadcrumbs Default Styling */
.breadcrumb a {
  color: var(--color-forest);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.breadcrumb a:hover {
  color: var(--color-gold);
}

.breadcrumb .separator {
  color: #ccc;
}

.breadcrumb .current {
  color: var(--color-gold);
}

/* --- Dark Mode Overrides for Property Page --- */
body.theme-night h1,
body.theme-night h2,
body.theme-night h3,
body.theme-night h4,
body.theme-night h5,
body.theme-night .section-title {
  color: var(--color-white) !important;
}

body.theme-night .text-muted,
body.theme-night .small.text-muted {
  color: #999 !important;
}

body.theme-night .property-lifestyle,
body.theme-night .property-roi-section {
  background: #1a2c21 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: var(--space-md) !important;
  border-radius: var(--radius-md) !important;
  margin-top: 1rem;
}

body.theme-night .roi-item,
body.theme-night .highlight-card,
body.theme-night .amenity-simple-item,
body.theme-night .p-faq-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ccc !important;
}

body.theme-night .roi-item {
  border-bottom: 3px solid var(--color-gold) !important;
}

body.theme-night .roi-value {
  color: var(--color-gold) !important;
}

body.theme-night .breadcrumb a {
  color: var(--color-sage) !important;
}

body.theme-night .breadcrumb .separator {
  color: rgba(255, 255, 255, 0.3) !important;
}

body.theme-night .property-description,
body.theme-night .earn-from-list li,
body.theme-night .lifestyle-item p,
body.theme-night .roi-label,
body.theme-night .section-header p,
body.theme-night .amenity-rich-card p,
body.theme-night .timeline-item p,
body.theme-night .p-faq-answer,
body.theme-night .connectivity-item {
  color: #b0b0b0 !important;
}

body.theme-night .p-faq-question {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--color-white) !important;
}

body.theme-night .p-faq-answer {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-night .connectivity-item {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

body.theme-night .connectivity-item:first-child {
  border-top: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

body.theme-night .enquiry-cta-section {
  background-color: #0f1813 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Global Enquiry Form & Modal Dark Mode Improvements */
body.theme-night .modal {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

body.theme-night .modal-content {
  background: #121d17 !important;
  border: 1px solid rgba(199, 158, 87, 0.3) !important;
  color: var(--color-parchment) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

body.theme-night .modal-content h2,
body.theme-night .modal-content h3 {
  color: var(--color-white) !important;
}

body.theme-night .enquiry-form label {
  color: var(--color-sage) !important;
  font-weight: 600;
}

body.theme-night .enquiry-form input,
body.theme-night .enquiry-form select,
body.theme-night .enquiry-form textarea {
  background: rgba(10, 17, 13, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--color-white) !important;
  transition: var(--transition-smooth);
}

body.theme-night .enquiry-form input::placeholder,
body.theme-night .enquiry-form textarea::placeholder {
  color: #666 !important;
}

body.theme-night .enquiry-form input:focus,
body.theme-night .enquiry-form select:focus,
body.theme-night .enquiry-form textarea:focus {
  border-color: var(--color-gold) !important;
  background: #0a110d !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(199, 158, 87, 0.2) !important;
}

body.theme-night .enquiry-form .btn-primary {
  background: var(--color-gold) !important;
  color: #121d17 !important;
  border: none !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1rem !important;
}

body.theme-night .enquiry-form .btn-primary:hover {
  background: #e5bd7c !important;
  transform: translateY(-2px);
}

body.theme-night .close-modal {
  color: var(--color-sage) !important;
}

/* Specific Section Adjustments for Dark Mode */
body.theme-night .enquiry-cta-section {
  background-color: #0d1410 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

body.theme-night .enquiry-cta-section .enquiry-form {
  background: #1a2c21 !important;
  border-color: rgba(199, 158, 87, 0.1) !important;
}

body.theme-night .enquiry-cta-section .section-title,
body.theme-night .enquiry-cta-section p {
  color: var(--color-parchment) !important;
}

body.theme-night #property-map {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* Checkbox Pills Styling */
.checkbox-pill {
    cursor: pointer;
    user-select: none;
    margin-bottom: 5px;
}

.checkbox-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-pill span {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 25px;
    border: 1px solid var(--color-gold);
    background: var(--color-white);
    color: var(--color-forest);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-pill:hover span {
    background: rgba(183, 150, 93, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.checkbox-pill input:checked + span,
.checkbox-pill span.active {
    background: var(--color-forest) !important;
    color: white !important;
    border-color: var(--color-forest) !important;
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.2);
}

body.theme-night .checkbox-pill span {
    background: #1a2c21;
    color: #ccc;
    border-color: rgba(199, 158, 87, 0.3);
}

body.theme-night .checkbox-pill input:checked + span,
body.theme-night .checkbox-pill span.active {
    background: var(--color-gold) !important;
    color: #121d17 !important;
    border-color: var(--color-gold) !important;
}