@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  /* Colors */
  --obsidian: #0a0c10;
  --gold: #d89b3c;
  --gold-deep: #b98028;
  --white: #ffffff;
  --off-white: #f9f9f9;
  --line: #e2e4e8;
  --ink: #1a1a1a;
  --muted: #666666;
  
  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 90px;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  padding-top: var(--header-height);
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, .serif {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.uppercase { text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; font-weight: 700; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--white);
  z-index: 2000;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.topbar .inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img { height: 50px; width: auto; }

.nav { display: flex; gap: 32px; align-items: center; }
.nav a { 
  color: var(--ink); 
  font-weight: 600; 
  font-size: 14px; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
}
.nav a:hover, .nav a.active { color: var(--gold); }

.portal-icon-link {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.portal-icon-link:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.portal-icon-link img {
  width: 22px;
  height: 22px;
  display: block;
}

.topbar a.btn[href="/dashboard"] {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  font-size: 0 !important;
  color: transparent !important;
  background: #fff url('/website/assets/images/favicon.png') center / 22px 22px no-repeat !important;
}

.topbar a.btn[href="/dashboard"]:hover {
  border-color: var(--gold) !important;
  transform: translateY(-1px);
}

#mobile-menu a[href="/dashboard"] {
  min-height: 48px;
  font-size: 0 !important;
  color: transparent !important;
  background: url('/website/assets/images/favicon.png') left center / 28px 28px no-repeat;
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end; /* Align to bottom */
  justify-content: center;
  text-align: center;
  color: #fff;
  background: var(--obsidian);
  overflow: hidden;
  padding-bottom: 80px; /* Space from bottom */
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2;
}

.hero-content {
  max-width: 900px;
  padding: 0 24px;
  z-index: 3;
}

.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.1; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.hero p { font-size: 20px; margin: 24px 0 40px; text-shadow: 0 2px 5px rgba(0,0,0,0.2); }

/* Search Bar */
.search-container {
  background: var(--white);
  padding: 8px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  max-width: 800px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  outline: none;
  color: var(--ink);
}

.btn-search {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 0 40px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Sections */
section { padding: 100px 0; }
.section-head { text-align: center; margin-bottom: 60px; max-width: 800px; margin-left: auto; margin-right: auto; }
.section-head .eyebrow { color: var(--gold); margin-bottom: 16px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.2; margin: 0; }
.section-head p { font-size: 18px; color: var(--muted); margin-top: 20px; }

/* Property Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 40px;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

.property-card .img-wrap {
  position: relative;
  height: 300px;
  background: #f0f0f0;
  overflow: hidden;
}

.property-card .body {
  padding: 32px;
  background: #fff;
  flex: 1;
}

.property-card .price { 
  font-family: 'Playfair Display', serif; 
  font-size: 24px; 
  color: var(--ink); 
  font-weight: 700; 
  margin-bottom: 8px; 
}

.property-card h3 { 
  font-family: 'Inter', sans-serif; 
  font-size: 18px; 
  margin: 0; 
  font-weight: 600; 
  line-height: 1.4; 
}

.property-card .details { 
  font-size: 13px; 
  color: var(--muted); 
  margin-top: 16px; 
  display: flex; 
  gap: 20px; 
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Card Image Scroll Styles */
.card-img-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; 
}
.card-img-scroll::-webkit-scrollbar {
  display: none; 
}
.card-img-scroll img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 300px;
  object-fit: cover;
}

.img-wrap { position: relative; overflow: hidden; }
.img-wrap::after {
  content: 'Swipe to view more →';
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 12px;
  font-size: 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}
.property-card:hover .img-wrap::after { opacity: 1; }

@media (pointer: fine) {
  .img-wrap::after { display: none; } /* Hide swipe hint on desktop */
}

/* Carousel Nav Arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 18px;
}
.property-card:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: var(--gold); color: #fff; }
.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* Detail Page Layouts */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.detail-main-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Footer */
.footer {
  background: var(--obsidian);
  color: #fff;
  padding: 80px 0 40px;
}
.footer h4 { font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; margin-bottom: 24px; }
.footer a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer a:hover { color: var(--gold); }

/* Responsive */
@media (max-width: 1024px) {
  .detail-grid, .detail-main-layout {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  .container { padding: 0 24px; }
  .hero h1 { font-size: 38px; }
  .property-grid { grid-template-columns: 1fr; }
}

/* Responsive Grid Utilities */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-social { display: grid; grid-template-columns: 1fr 400px; gap: 60px; align-items: center; }

@media (max-width: 1024px) {
  .grid-2, .grid-social { grid-template-columns: 1fr !important; gap: 40px !important; }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; }
}

/* Team Styles */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin: 0 auto;
}
.team-card {
  width: 160px;
  text-align: center;
}
.team-card img {
  width: 160px;
  height: 160px;
  object-fit: cover !important;
  display: block;
  border-radius: 50%;
  margin: 0 auto 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 4px solid #fff;
  filter: contrast(1.02) brightness(1.02);
  image-rendering: -webkit-optimize-contrast; /* Sharpen on some browsers */
}

/* Video Aspect Ratio */
.video-aspect { padding-top: 56.25%; } /* 16:9 */
@media (max-width: 768px) {
  .video-aspect { padding-top: 100%; } /* Taller on mobile */
}

@media (max-width: 768px) {
  .nav { display: none; }
  .hero { min-height: 60vh; padding-bottom: 20px; } /* Reduced gap */
  .hero-search-bar { padding: 20px 0 !important; }
  .search-container { 
    flex-direction: column; 
    padding: 12px;
    width: 95%;
    margin: 0 auto;
  }
  .search-input { padding: 12px; text-align: center; }
  .btn-search { padding: 14px; width: 100%; }
  section { padding: 60px 0; }
  .grid-social { text-align: center; }
}
