/* Project Detail Page Styles */

/* Markdown content styling for neighborhood summary */
.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4, 
.markdown-content h5, 
.markdown-content h6 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #333;
  font-weight: 600;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.4rem; }
.markdown-content h3 { font-size: 1.3rem; }
.markdown-content h4 { font-size: 1.2rem; }
.markdown-content h5 { font-size: 1.1rem; }
.markdown-content h6 { font-size: 1rem; }

.markdown-content p {
  margin-bottom: 0.8em;
  line-height: 1.5;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content ul {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.markdown-content li {
  margin-bottom: 0.5em;
  line-height: 1.5;
}

/* Core container styles */
.property-detail-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 30px;
  flex: 1;
  background-color: var(--white);
  box-sizing: border-box;
}

/* Project Detail Header - matches main index page header */
.main-header {
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background-color: var(--white);
  border-bottom: 1px solid var(--medium-grey);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  z-index: 200;
}

.main-header .logo {
  display: flex;
  align-items: center;
}

.main-header .logo-img {
  height: 24px;
  margin-right: 8px;
}

.main-header .header-controls {
  display: flex;
  gap: 10px;
}

/* Back button styling */
.btn-back {
  padding: 8px 15px;
  background-color: var(--xburg-purple);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-back:hover {
  background-color: var(--xburg-dark-purple);
  color: white;
  text-decoration: none;
}

/* Redesigned Project Title Banner - Full width and compact */
.project-title-banner {
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid var(--medium-grey);
  background-color: var(--white);
}

.project-title-content {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.project-title-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 14px;
  white-space: nowrap;
  margin-left: 20px;
}

.project-location i {
  color: var(--xburg-purple);
}

.project-description {
  width: 100%;
  margin-top: 10px;
  font-size: 14px;
  color: #555;
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  font-weight: 400;
}

/* Project status tag styles */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  color: white;
  background-color: #4CAF50; /* Default - completed */
  text-transform: lowercase;
}

.status-tag.planned {
  background-color: #FF9800;
}

.status-tag.in-progress, .status-tag.under-construction {
  background-color: #2196F3;
}

/* Responsive styles */
@media (max-width: 992px) {
  /* Switch to single column for main content on tablets */
  .property-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Adjust gallery height for better viewing */
  .main-image {
    height: 300px;
  }
  
  /* Make project details grid 1 column on smaller screens */
  .project-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Further adjustments for mobile */
  .property-detail-container {
    padding: 0 15px 20px;
  }
  
  .project-title-section {
    padding: 15px;
  }
  
  .project-title-section h1 {
    font-size: 24px;
  }
  
  .project-meta {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .main-image {
    height: 250px;
  }
  
  .thumbnail {
    height: 60px;
  }
  
  .features-list {
    grid-template-columns: 1fr;
  }
  
  .amenities-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  /* Mobile optimization for project title section */
  .project-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .project-title-main {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .project-title-main h1 {
    margin-bottom: 0;
    width: 100%;
  }
  
  .project-location {
    margin-left: 0;
    width: 100%;
    white-space: normal;
  }
  
  .project-location i {
    display: none;
  }
  
  .status-tag {
    align-self: flex-start;
  }
  
  /* Stack analysis cards vertically on mobile */
  .analysis-row {
    flex-direction: column;
    gap: 15px;
  }
}

/* Project Team Grid */
.project-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

/* Project Details Grid - Two Column Layout */
.project-details-grid {
 display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

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

.detail-label {
  font-size: 0.85rem;
  color: #666;
}

.detail-value {
  font-weight: 700;
  color: var(--primary-color);
}

/* Main content layout - two columns */
.property-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 25px;
  margin-top: 20px;
}

/* Gallery styles */
.property-gallery {
  width: 100%;
}

.main-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

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

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.prev-arrow {
  left: 10px;
}

.next-arrow {
  right: 10px;
}

.thumbnail-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.thumbnail {
  width: calc(25% - 6px);
  height: 70px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.thumbnail:hover img {
  opacity: 0.8;
}

/* Property details panel */
.property-details-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.property-price-card {
  border-radius: 8px;
  background-color: var(--xburg-purple);
  color: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.price {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 5px 0;
}

.price-per-sqm {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
}

.floor-info {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.completion-label {
  font-size: 12px;
  opacity: 0.9;
}

.completion-value {
  font-weight: 700;
  font-size: 16px;
}

.view-listings-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background-color: white;
  color: var(--xburg-purple);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.view-listings-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

/* Location Grid Layout */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-top: 15px;
}

.location-details {
  padding-right: 15px;
}

.project-map {
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
}

/* Analysis cards layout improvements */
.property-analysis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 30px;
}

/* Ensure direct children of .property-analysis take the full width of the column */
.property-analysis > * {
  grid-column: 1 / -1; /* Makes the item span from the first to the last grid line */
}

.analysis-card, .insight-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--light-grey);
}

.analysis-card h3, .insight-card h3 {
  font-size: 18px;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  color: var(--xburg-purple);
  font-weight: 600;
}

.analysis-card h3 i, .insight-card h3 i {
  margin-right: 8px;
}

.analysis-card p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Styles for property-analysis reorganization */
.analysis-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.analysis-row .analysis-card {
  flex: 1;
}

/* Features list styling */
.features-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.features-list li {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--light-grey);
}

.features-list li::before {
  content: '✓';
  display: inline-block;
  margin-right: 8px;
  color: var(--xburg-purple);
  font-weight: bold;
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #f8f8f8;
  border-radius: 6px;
}

.amenity-item svg {
  color: var(--primary-color);
}

/* Floor Plans Grid */
.floor-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.floor-plan-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.floor-plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.floor-plan-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.floor-plan-details {
  padding: 12px;
}

.floor-plan-title {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.floor-plan-specs {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

.team-item {
  margin-bottom: 8px;
}

.team-role {
  color: #666;
  font-size: 14px;
  margin-bottom: 4px;
}

.team-name {
  font-weight: 500;
  color: #333;
}

/* Features list styling */
.features-list {
  padding-left: 20px;
  margin-top: 15px;
}

.features-list li {
  margin-bottom: 8px;
  position: relative;
}

.features-list li::marker {
  color: var(--primary-color);
}

/* Amenities grid styling */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f5f5f5;
  padding: 8px 12px;
  border-radius: 6px;
}

.amenity-icon {
  color: var(--primary-color);
}

/* Project map */
.project-map {
  height: 300px;
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Location info */
.location-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.location-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: #444;
}

.location-info p {
  margin: 0;
  color: #333;
}

/* Floor plans grid */
.floor-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.floor-plan-card {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.floor-plan-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.floor-plan-details {
  padding: 12px;
  background-color: white;
}

.floor-plan-title {
  font-weight: 500;
  margin-bottom: 5px;
}

.floor-plan-info {
  font-size: 14px;
  color: #666;
}

/* Completion date */
.completion-label {
  font-size: 14px;
  color: #666;
}

.completion-value {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-top: 3px;
}

/* Price per sqm */
.price-per-sqm {
  font-size: 14px;
  color: #666;
  margin-top: -5px;
  margin-bottom: 10px;
}

/* Back link */
.back-link {
  display: block;
  margin: 20px 0;
}

.back-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .property-content {
    flex-direction: column;
  }
  
  .property-gallery,
  .property-details-panel {
    width: 100%;
    max-width: 100%;
  }
  
  .location-info,
  .project-team-grid {
    grid-template-columns: 1fr;
  }
}
