:root{
  --thunder: #231f20;
  --cloud-burst: #203649;
  --lochmara: #0173c8;
  --science-blue: #046bb6;
  --venice-blue: #09609f;
  --chathams-blue: #114a75;
  --alto: #d8d7d7;
  --accent-primary: #046bb6;
  --accent-secondary: #09609f;
  --card-radius: 0;
}

html{scrollbar-gutter:stable}
body{
  font-family:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f1419 100%);
  color: #e0e0e0;
  position: relative;
}

body::before{
  content:'';
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
  z-index: 1;
}

main, section{position: relative; z-index: 2;}

img{image-rendering: crisp-edges}

/* NAVBAR */
.navbar{
  background: var(--thunder);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--cloud-burst);
}
.navbar.scrolled{
  background: rgba(35,31,32,0.95);
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
}
.brand{font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; font-size: 0.9rem;}
.nav-link{color: var(--alto)!important; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; transition: color 0.3s ease;}
.nav-link:hover{color: var(--lochmara)!important}
.nav-link.active{color: var(--science-blue)!important; font-weight: 700}

/* HERO SECTION */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--thunder) 0%, var(--cloud-burst) 100%);
}

.hero::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  pointer-events: none;
}

.hero-bg{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%) contrast(1.1) brightness(0.7);
  opacity: 0.4;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
  contain: paint;
}

/* ensure image is painted separately and avoids layout jank */
.hero-bg.parallax{ display:block; }

.hero-overlay{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(32,54,73,0.4) 0%, rgba(35,31,32,0.6) 100%);
  will-change: auto;
  transition: opacity 0.6s ease-out;
  opacity: 1;
}

.hero-content{
  position: relative;
  z-index: 3;
  text-align: left;
  max-width: 900px;
  padding: 60px 40px;
}

.hero h1{
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 30px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero p{
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 40px;
  color: var(--alto);
  max-width: 600px;
}

.hero-cta{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary-cta{
  background: var(--science-blue);
  border: none;
  color: white;
  padding: 16px 48px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary-cta::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--lochmara);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn-primary-cta:hover::before{left: 0}
.btn-primary-cta:hover{text-decoration: none; color: white; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(4, 107, 182, 0.4)}

.btn-secondary-cta{
  background: transparent;
  border: 2px solid var(--chathams-blue);
  color: var(--chathams-blue);
  padding: 14px 44px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary-cta:hover{
  background: var(--chathams-blue);
  color: white;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(17, 74, 117, 0.3);
}

/* CONTENT SECTIONS */
.container{position: relative; z-index: 2;}

.content-wrap{
  padding: 80px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.section-title{
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 50px;
  color: #fff;
  position: relative;
}

.section-title::after{
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--science-blue), var(--venice-blue));
}

#propTitle.section-title::after{
  display: none;
}

.section-subtitle{
  font-size: 1.3rem;
  color: var(--alto);
  margin-bottom: 25px;
  font-weight: 500;
}

.text-muted{color: #a8a8a8!important}

/* PROPERTY CARDS GRID */
.card-estate{
  border: none;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  min-height: 520px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.card-estate-first{
  /* Top card is full row width, content edges match 2-column layout below */
  min-height: 520px;
  max-width: 94%;
  width: 100%;
}

.card-estate-first .card-content{
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.card-estate-first .estate-img{
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  display: block;
}

.card-content{
  padding: 28px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-action{
  margin-top: auto;
}

.card-title,
.card-subtitle{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.card-estate::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--science-blue), var(--venice-blue));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.card-estate:hover{
  transform: translateY(-20px);
  box-shadow: 0 24px 48px rgba(4, 107, 182, 0.2);
}

.card-estate:hover::before{opacity: 0.1}

.estate-img{
  aspect-ratio: 16/10;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background: var(--cloud-burst);
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.estate-img.list-img{
  filter: saturate(1) grayscale(0) !important;
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1), brightness 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-estate:hover .estate-img{filter: grayscale(70%) contrast(1.15) brightness(1.1)}

.card-estate:hover .list-img{
  filter: saturate(1.2) brightness(1.15) !important;
}

.card-content{
  padding: 28px;
  position: relative;
  z-index: 2;
}

.card-title{
  font-size: 1.3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: #fff;
}

.card-subtitle{
  font-size: 0.85rem;
  color: var(--science-blue);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.tech-specs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tech-spec{
  display: flex;
  flex-direction: column;
}

.spec-label{
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--chathams-blue);
  margin-bottom: 4px;
  font-weight: 700;
}

.spec-value{
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}

.card-action{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.card-action a{
  color: var(--science-blue);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-action a:hover{color: var(--lochmara)}

#prevBtn,
#nextBtn{
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  color: white !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 5 !important;
  opacity: 0.6 !important;
  transition: opacity 0.3s ease, background 0.3s ease !important;
  cursor: pointer !important;
}

#prevBtn:hover,
#nextBtn:hover{
  opacity: 1 !important;
  background: rgba(4, 107, 182, 0.8) !important;
  box-shadow: 0 0 30px rgba(4, 107, 182, 0.5), inset 0 0 20px rgba(255,255,255,0.1) !important;
}

#prevBtn{
  left: 15px !important;
}

#nextBtn{
  right: 15px !important;
}

/* CAROUSEL ARROW POSITIONING */
.carousel-control-prev,
.carousel-control-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  background: transparent !important;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  border: none;
  color: var(--science-blue);
  z-index: 5;
}

.carousel-control-prev{
  left: -70px;
}

.carousel-control-next{
  right: -70px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover{
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon{
  width: 40px;
  height: 40px;
  background-size: contain;
  filter: invert(1) brightness(1.5);
}

/* CAROUSEL FIXES */
.thumb-wrapper{
  position: relative;
  display: inline-block;
}

.thumb{
  aspect-ratio: 16/10;
  width: 160px;
  height: auto;
  border-radius: 0;
  cursor: pointer;
  object-fit: cover;
  background: #0f1419;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.thumb-caption{
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  padding: 4px 8px;
  z-index: 2;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: none;
}

.thumb:hover{border-color: var(--science-blue)}

.image-headline-overlay{
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 3px;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}

.gallery-strip{
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 16px 0 6px;
  margin: 0 -2px;
  /* Themed scrollbar (Firefox) */
  scrollbar-width: thick;
  scrollbar-color: var(--science-blue) var(--cloud-burst);
}
/* Themed scrollbar (Chrome, Safari, Edge) */
.gallery-strip::-webkit-scrollbar{
  height: 16px;
}
.gallery-strip::-webkit-scrollbar-track{
  background: var(--cloud-burst);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
}
.gallery-strip::-webkit-scrollbar-thumb{
  background: var(--chathams-blue);
  border-radius: 0;
  border: 2px solid var(--cloud-burst);
  min-width: 48px;
}
.gallery-strip::-webkit-scrollbar-thumb:hover{
  background: var(--science-blue);
}
.gallery-strip::-webkit-scrollbar-thumb:active{
  background: var(--lochmara);
}
.gallery-strip::-webkit-scrollbar-button{
  display: none;
}

.count-badge{
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(4, 107, 182, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.carousel-inner{
  padding: 0 !important;
  margin: 0 !important;
}

#aboutCarousel, #companyCarousel{
  background: transparent !important;
  padding: 0 !important;
}



.property-hero{
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  background: #0f1419;
  /* limit hero height so images never grow beyond viewport */
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.property-hero img{
  /* keep full image visible without cropping and never overflow container */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  /* vertical-align: middle; */ /* removed */
  filter: none;
  transition: filter 0.3s ease, transform 0.15s ease;
}

.property-hero img:hover{
  filter: brightness(1.1);
}

.property-info{
  background: linear-gradient(135deg, rgba(35,31,32,0.8) 0%, rgba(32,54,73,0.8) 100%);
  padding: 40px;
  border-radius: 0;
  margin-top: 30px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.property-info h5{
  text-transform: uppercase;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 20px;
}

.property-info h6{
  text-transform: uppercase;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--science-blue);
  margin: 20px 0 15px 0;
}

#propFacts{margin: 0}
#propFacts li{
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: flex-start;
}

#propFacts strong{
  color: #fff;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  display: block;
}

#propFacts span{
  word-break: break-word;
  line-height: 1.4;
  color: #e0e0e0;
}

#propDesc{
  white-space: pre-line;
  line-height: 1.8;
  margin-top: 15px;
  color: #a8a8a8;
  font-size: 0.95rem;
}

.nav-link-back{color: var(--science-blue); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.1em; transition: color 0.3s ease;}
.nav-link-back:hover{color: var(--lochmara)}

/* SCROLL REVEAL ANIMATIONS */
@keyframes revealUp{
  from{
    opacity: 0;
    transform: translateY(100px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealLeft{
  from{
    opacity: 0;
    transform: translateX(-60px);
  }
  to{
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-animate{
  animation: revealUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-element{
  opacity: 0;
}

/* CONTACT FORM */
.form-control{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 12px 16px;
  border-radius: 0;
  transition: all 0.3s ease;
}

.form-control::placeholder{color: rgba(255,255,255,0.4)}
.form-control:focus{
  background: rgba(255,255,255,0.08);
  border-color: var(--science-blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(4, 107, 182, 0.15);
}

/* RESPONSIVE */
/* Carousel button overlays */
.carousel-control-prev,
.carousel-control-next{
  background: transparent !important;
  opacity: 1 !important;
  transition: all 0.3s ease;
}

.carousel-control-prev::before,
.carousel-control-next::before{
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(4, 107, 182, 0.4) 0%, rgba(4, 107, 182, 0.1) 100%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(12px);
  box-shadow: 0 0 30px rgba(4, 107, 182, 0.3), inset 0 0 20px rgba(255,255,255,0.1);
}

.carousel-control-prev:hover::before,
.carousel-control-next:hover::before{
  opacity: 1;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer{
  0%, 100%{ box-shadow: 0 0 30px rgba(4, 107, 182, 0.3), inset 0 0 20px rgba(255,255,255,0.1); }
  50%{ box-shadow: 0 0 50px rgba(4, 107, 182, 0.6), inset 0 0 30px rgba(255,255,255,0.2); }
}

@keyframes slideDown{
  from{
    transform: translateY(-100%);
    opacity: 0;
  }
  to{
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp{
  from{
    transform: translateY(0);
    opacity: 1;
  }
  to{
    transform: translateY(-100%);
    opacity: 0;
  }
}

@media (max-width: 768px){
  .hero{min-height: 80vh; padding: 20px}
  .hero-content{padding: 40px 20px}
  .hero h1{font-size: 2rem}
  .hero p{font-size: 1rem}
  .hero-cta{flex-direction: column; gap: 12px}
  .btn-primary-cta, .btn-secondary-cta{width: 100%; text-align: center}
  .content-wrap{padding: 50px 0}
  .section-title{font-size: 2rem; margin-bottom: 30px}
  .tech-specs{grid-template-columns: 1fr}
  .estate-img{aspect-ratio: 4/3}
  .thumb{width: 120px}
}

@media (max-width: 575px){
  .hero h1{font-size: 1.75rem}
  .hero p{font-size: 0.9rem}
  .card-content{padding: 20px}
  .property-info{padding: 24px}
}
