/* B&Brother’s Modern Design System */
:root {
  /* Color Palette - Retaining original brand colors */
  --gold: #C99334;
  --gold-light: #dec085;
  --gold-dark: #a07428;

  --dark: #2A241E;
  --dark-soft: #38302A;

  --light: #FBF9F4;
  --light-alt: #F3EBD7;
  --white: #FFFFFF;

  --text-main: #1D1814;
  --text-muted: #6B5E52;
  --text-light: #F7F5E4;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', serif;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(42, 36, 30, 0.04);
  --shadow-md: 0 8px 24px rgba(42, 36, 30, 0.08);
  --shadow-lg: 0 20px 48px rgba(42, 36, 30, 0.12);
  --shadow-gold: 0 12px 32px rgba(201, 147, 52, 0.25);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--light);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--spacing-md);
  color: var(--dark);
}

p {
  margin: 0 0 var(--spacing-md);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Utilities */
.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 36, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--spacing-sm) 0;
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--light);
}

.logo-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.main-nav {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--light);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link-active::after {
  width: 100%;
}

.nav-link-active {
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #dbac4e);
  color: var(--dark);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(201, 147, 52, 0.35);
}

.btn-accent {
  background: var(--light);
  color: var(--dark);
  border: 1px solid var(--gold);
}

.btn-accent:hover {
  background: var(--light-alt);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: rgba(201, 147, 52, 0.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: rgba(201, 147, 52, 0.1);
  transform: translateY(-2px);
}

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 12px;
  font-size: 12px;
}

.btn-outline-sm:hover {
  background: rgba(201, 147, 52, 0.1);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: #1faf56;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35);
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(to bottom, var(--dark), #231d18);
  color: var(--light);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(201, 147, 52, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: var(--spacing-xxl);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: var(--spacing-md);
  background: rgba(201, 147, 52, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.hero h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  color: var(--light);
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-lg);
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  backdrop-filter: blur(10px);
}

.hero-card h2 {
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  color: var(--gold);
}

.hero-card ul {
  padding-left: 20px;
  margin-bottom: var(--spacing-lg);
  color: rgba(255, 255, 255, 0.8);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.hero-badges span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* Sections */
.section {
  padding: var(--spacing-xxl) 0;
}

.section-light {
  background: var(--light);
}

.section-alt {
  background: var(--light-alt);
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 147, 52, 0.3);
}

.listing-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.listing-badge-row {
  margin-bottom: var(--spacing-md);
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--light-alt);
  color: var(--text-muted);
}

.badge-strong {
  background: var(--gold);
  color: var(--white);
}

.listing-card h2,
.listing-card h3 {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
}

.listing-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: var(--spacing-lg);
  flex-grow: 1;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.rating {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  list-style: none;
  padding: 0;
}

.tags span,
.tags li {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Steps */
.steps-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.step-block {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.step-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--spacing-xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.footer-links {
  display: flex;
  gap: var(--spacing-md);
}

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

/* Mobile Nav & Responsiveness */
.nav-toggle {
  display: none;
}

.menu-toggle {
  display: none;
}

@media (max-width: 840px) {

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  .header-inner {
    padding: 0 16px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
    /* Slightly smaller for better fit */
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }

  .eyebrow {
    margin-left: auto;
    margin-right: auto;
  }

  /* Mobile Menu - Left Drawer */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 48px;
    /* Larger hit area */
    height: 48px;
    padding: 0;
    cursor: pointer;
    z-index: 201;
    /* Above drawer */
    order: -1;
    /* FORCE LEFT */
    border: none;
    background: transparent;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy hover */
  }

  .menu-toggle:active {
    transform: scale(0.9);
  }

  .menu-toggle-box {
    display: block;
    width: 24px;
    margin: 0 auto;
  }

  .menu-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--light);
    border-radius: 4px;
    /* Softer pill shape */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Advanced elastic bezier */
    position: relative;
    transform-origin: center;
  }

  .menu-toggle-line:nth-child(1) {
    margin-bottom: 6px;
  }

  .menu-toggle-line:nth-child(3) {
    margin-top: 6px;
  }

  .menu-toggle-text {
    display: none;
  }

  .main-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    /* Drawer Width */
    height: 100vh;
    background: var(--dark);
    padding: 80px var(--spacing-lg) var(--spacing-lg);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-lg);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    /* Off-canvas left */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
  }

  #nav-toggle:checked~.main-nav {
    transform: translateX(0);
    /* Slide in */
  }

  /* Hamburger to X animation - Premium Elastic */
  #nav-toggle:checked~.menu-toggle .menu-toggle-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--gold);
    /* Color accent on active */
  }

  #nav-toggle:checked~.menu-toggle .menu-toggle-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
    /* Fly out larger distance */
  }

  #nav-toggle:checked~.menu-toggle .menu-toggle-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--gold);
  }

  .nav-link {
    font-size: 18px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
  }

  /* Prevent iOS Zoom on inputs */
  input,
  select,
  textarea,
  .filter-input,
  .filter-select {
    font-size: 16px !important;
  }
}

/* Specific Page Styles */

/* Page Hero */
.page-hero {
  background: var(--dark);
  color: var(--light);
  padding: 60px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-hero h1 {
  color: var(--white);
  font-size: 32px;
}

.page-hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
}

/* Filter Bar */
.filter-bar {
  background: var(--white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.filter-input,
.filter-select {
  border: 1px solid #ddd;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  min-width: 200px;
  flex: 1;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 147, 52, 0.1);
}

/* Property Detail - FIXED */
.property-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.gallery-viewer {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  width: 100%;
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #38302A !important;
  width: 100% !important;
  max-width: 820px !important;
  margin: 0 auto !important;
  height: 480px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.gallery-main img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  border: none;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
  left: 16px;
}

.gallery-nav-next {
  right: 16px;
}

.gallery-thumbs {
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  width: 100%;
  max-width: 820px;
  /* Match main gallery width */
  margin: 0 auto;
  /* Center it */
}

.gallery-thumb {
  flex: 0 0 100px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  padding: 0;
  background: none;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb:hover,
.thumb-active {
  opacity: 1;
  border-color: var(--gold);
  transform: translateY(-2px);
}

.property-description {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.property-card {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 80px;
}

.property-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

/* Services Extra */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 147, 52, 0.3);
}

.service-card .card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: var(--spacing-sm);
}

.service-options {
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.service-options li {
  background: var(--light-alt);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-options li>div {
  flex: 1;
}

.service-options li strong {
  display: block;
  color: var(--dark);
  font-size: 15px;
}

.service-options li .small-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: auto;
  padding-top: var(--spacing-md);
}

/* Forms */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 147, 52, 0.1);
}

.contact-form label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

/* KPI / Metrics - FIXED COLLISION */
.two-cols .kpi-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.kpi-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0% 70%, #eee 70% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.kpi-ring-inner {
  width: 120px;
  height: 120px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.1;
}

.kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  line-height: 1.2;
}

.kpi-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot-main {
  background: var(--gold);
}

.legend-dot-free {
  background: #eee;
}

@media (max-width: 768px) {
  .property-layout {
    grid-template-columns: 1fr;
  }

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

  .gallery-main {
    height: 300px;
  }
}