/* Core Styles */
:root {
  --primary-color: #336600;      /* Changed from #2c3e50 dark blue to light green --Mourning from green to black Green #336600*/
  --secondary-color: #3498db;   /* almost royal blue Btn color #3498db */
  --accent-color: #e74c3c;     /* orange Red */
  --text-dark: #2c3e50;       /* the main color is like dark blue more toward the greyblack side */
  --text-light: #ecf0f1;     /* grey */
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', 'Noto Sans Thai', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #f8f9fa;   /* on the blue tweak it to the left top corner became Grey */
  overflow-x: hidden;
}

/* Navigation Bar */
.navbar-nav {
  width: 100%;
}

.nav-item {
  text-align: center;
}
.navbar {
  background-color: var(--primary-color) !important;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-brand img {
  height: 40px;
}

.nav-link {
  color: var(--text-light) !important;
  transition: opacity var(--transition-speed) ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  opacity: 0.9;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-light);
  transition: width var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.hero {
  overflow: hidden;
}

.hero .carousel-item {
  height: 70vh;
  background: #F8F8FF;   /* Changed from #000 black to ghost white */
}

.hero .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* Main Content */
.main-content {
  padding: 2rem 0;
  min-height: calc(100vh - 150px);
}

/* Apartment Cards */
.apartment-card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform var(--transition-speed) ease;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.apartment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.apartment-card img {
  height: 250px;
  object-fit: cover;
}

.price-badge {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Features List */
.features-list {
  columns: 2;
  list-style: none;
  padding-left: 0;
}

.features-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.features-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--secondary-color);
}
/*img in Gallery Grid*/
.card-img-top {
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.gallery-img {
  border-radius: 0.5rem;
  overflow:hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-speed) ease;
}

.gallery-img:hover {
  transform: scale(1.02);
}

.gallery-img img {
  height: 200px;
  object-fit: cover;
}
/*.pswp__img {
  pointer-events: none !important;
}
.pswp__button--arrow {
  visibility: visible !important;
}
.gallery-grid a {
  display: block;
  position: relative;
  cursor: zoom-in;
}
.pswp__scroll-wrap {
  -webkit-overflow-scrolling: touch;
}*/
/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 0.5rem;
}

.lightbox-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  transition: background var(--transition-speed) ease;
}

.lightbox-control:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}
/* index map*/
.map-wrapper {
  display: flex;
  flex-wrap: wrap; 
  gap: 20px;
  max-width: 900px;
  margin: auto;
}

.map-container{
  flex: 1;
  /*min-width:300px;/*
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 20px; 
  max-width: 600px;*/
}

.map-frame {
  width: 100%;
  max-width: 400px;
  height: 300px;
  /*width: 300px;   */
  /*height: 200px; */
  border-radius: 10px;
  border: 0;
}
.location-details{
  flex: 1;
  font-size: 16px;
  /*min-width: 300px;*/
  /*flex-direction: column;*/
}
/* Footer */
.footer {
  background-color:  #2f4f28;/*var(--primary-color);*/
  color: var(--text-light);
  padding: 3rem 0;
  margin-top: auto;
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  word-wrap: break-word;
  padding-right: 10px;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .features-list {
    columns: 1;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .navbar-collapse {
    padding-top: 1rem;
  }

  .apartment-card img {
    height: 200px;
  }
}

@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
  /*prevent location details from self-wrapped*/
/*@media (max-width: 768px) {
  .map-container{
    flex-direction: column;
    align-items: center;
  }*/
@media (max-width: 768px) {
  .map-wrapper {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap; 
  }

  .map-container,
  .location-details {
    width: 100%;
    min-width: 0; 
  }
}
/* Utilities */
.bg-accent {
  background-color: var(--accent-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.shadow-soft {
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 25%,
    rgba(255,255,255,0.5) 50%,
    transparent 75%);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}






