/* RealHomes palette and typography applied to SagarHomeReal markup */
:root {
  --brand-primary: #1f2937; /* navy */
  --brand-primary-dark: #0f172a; /* deeper navy */
  --brand-secondary: #caa25a; /* gold accent */
  --brand-indigo: #4f46e5; /* indigo */
  --brand-accent: #caa25a; /* gold accent */
  --brand-gold: #caa25a; /* subtle gold accent */
  --text-color: #303030;
  --text-muted: #808080;
  --bg-light: #f7f7f7;
  --border: #e5e9f2;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}

html, body {
  font-family: 'Inter', 'Playfair Display', serif;
  color: var(--text-color);
  background-color: #fff;
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section.white { background: #fff; }
.section.alt { background: linear-gradient(180deg, rgba(31,41,55,.05), rgba(202,162,90,.05)); }
.section-header { text-align: center; margin-bottom: 24px; }
.section-header .lead { color: var(--text-muted); }
.section-divider { width: 72px; height: 3px; background: var(--brand-primary); margin: 14px auto 0; border-radius: 2px; }

/* Typography scale */
h1 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 40px; line-height: 1.2; }
h2 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 32px; line-height: 1.25; }
h3 { font-weight: 600; font-size: 20px; }
p { font-size: 16px; line-height: 1.6; }

a { color: var(--brand-primary); }
a:hover { color: var(--brand-primary-dark); }

.nav a { color: var(--text-color); }
.nav a:hover { color: var(--brand-secondary); }
.site-header .nav::after { content:""; display:block; height:3px; background: linear-gradient(90deg, rgba(203,163,92,0.85), rgba(203,163,92,0.55)); }
.nav-toggle { color: var(--text-color); }

/* Header / Nav */
.site-header .nav { position: sticky; top: 0; background: #111; border-bottom: 1px solid var(--border); z-index: 20; }
.site-header .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }
.site-header .brand { font-weight: 700; color: #fff; }
.nav-links { display: flex; gap: 14px; }
.nav-links a { padding: 8px 10px; border-radius: 6px; }
.nav-links a:hover { background: var(--bg-light); }
/* Desktop: ensure contrast on dark header */
@media (min-width: 721px) {
  .site-header .nav-links a { color: #fff; }
  .site-header .nav-links a:hover { color: var(--brand-secondary); }
}
.nav-links .sub-menu { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: none; box-shadow: var(--shadow); }
.nav-links .has-sub:hover .sub-menu { display: block; }

.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
.btn-primary {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(31,41,55,.18);
}
.btn-primary:hover { filter: brightness(0.95); box-shadow: 0 6px 16px rgba(31,41,55,.22); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
}
.btn-outline:hover {
  background: var(--brand-primary);
  color: #fff;
}

.hero { position: relative; min-height: var(--hero-height, 520px); }
.hero { background: none !important; }
.hero-bg .slide:first-child { opacity: 1; }
.hero-overlay { background: linear-gradient(to bottom, rgba(0,0,0, var(--hero-overlay-top, 0.25)), rgba(0,0,0, var(--hero-overlay-bottom, 0.18))); }
.hero .btn-primary { background-color: var(--brand-accent); border-color: var(--brand-accent); }
/* Hero chips overlay (price, beds, baths, area) */
.hero-chips { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 8px 12px; }
.hero-chips .chip { background: rgba(255,255,255,0.92); color: #111; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,0.12); border: 1px solid rgba(0,0,0,0.08); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.hero-chips .chip i { color: var(--brand-primary); }
.hero-chips .chip:hover { filter: brightness(1.03); transform: translateY(-1px); }

/* Entrance animation */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease-out both; }
.fade-up-delayed { animation: fadeUp .4s ease-out both; animation-delay: .08s; }
.fade-up-delayed-2 { animation: fadeUp .4s ease-out both; animation-delay: .16s; }

/* Intro collage */
.intro-collage .container.grid { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.wintro-media, .intro-collage .media { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.intro-collage .media { position: relative; }
.intro-collage .media .caption { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.92); border-radius: 999px; padding: 6px 10px; }
.intro-collage .media .caption i { color: var(--brand-primary); }

/* Category grid */
.categories .container.grid.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.category-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.category-info { padding: 10px; }
.category-title { font-weight: 600; }
.category-sub { color: var(--text-muted); font-size: 14px; }

/* Mobile stacking for intro collage and categories grid */
@media (max-width: 900px) {
  .intro-collage { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .categories .container.grid.grid-4 { grid-template-columns: 1fr !important; }
}
/* Fallback for potential alternate class name */
.wintro-media { display: block; }

/* CTA banner */
.cta-banner { position: relative; overflow: hidden; }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cta-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,166,154,.12), rgba(234,114,61,.12)); }

.card, .listing, .panel { background: #fff; border: 1px solid #e9e9e9; border-radius: 6px; }
.badge-primary { background: var(--brand-primary); color: #fff; }
.text-muted { color: var(--text-muted); }

/* Utility */
.bg-light { background-color: var(--bg-light); }
.text-primary { color: var(--brand-primary); }
.border-primary { border-color: var(--brand-primary) !important; }

/* Property detail polish */
.hero-photo { width: 100%; max-height: 480px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); border: 2px solid rgba(31,41,55,.12); }
.thumbs { display: grid; grid-template-columns: repeat(14, 1fr); gap: 8px; }
.thumbs .thumb { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; opacity: .9; }
.thumbs .thumb:hover { opacity: 1; outline: 2px solid var(--brand-primary); }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: #fff; }
.footer-cta { position: relative; background: var(--bg-light); padding: 24px 0; }
.footer-cta .cta-inner { position: relative; }
.footer-cta .cta-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31,41,55,.12), rgba(202,162,90,.12)); border-radius: 8px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; padding: 24px 0; }
.footer-links h4 { margin: 0 0 8px; }
.footer-links a { display: block; color: var(--text-muted); margin: 4px 0; }
.footer-links a:hover { color: var(--brand-primary); }
.subfooter { border-top: 1px solid var(--border); padding: 12px 0; color: var(--text-muted); }
.subfooter-inner { display: flex; align-items: center; justify-content: space-between; }

/* Carousel */
.carousel { position: relative; overflow: hidden; --items-per: 3; --items-gap: 16px; }
.carousel-track { display: flex; gap: var(--items-gap); transition: transform .35s ease; will-change: transform; }
.carousel-item { flex: 0 0 calc((100% - (var(--items-gap) * (var(--items-per) - 1))) / var(--items-per)); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.95); color: var(--text-color); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-btn[disabled] { opacity: .5; cursor: default; }

/* Service & testimonial cards inside carousel */
.services .service-card, .testimonials .testimonial-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.testimonial-card .stars { color: var(--brand-accent); margin-bottom: 8px; }

/* Responsive items per view */
@media (max-width: 1024px) { .carousel { --items-per: 2; } }
@media (max-width: 640px) { .carousel { --items-per: 1; } }
.hero-bg .slide { overflow: hidden; opacity: 0; animation: heroFade var(--hero-cycle) infinite both; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); will-change: opacity; 
  background-image: var(--hero-img) !important; background-size: cover; background-position: center center; background-repeat: no-repeat; }
.hero-bg .slide::before { content: none !important; }
.hero-bg .slide::after { content: none !important; }

/* Ensure heroFade is available even if Royale CSS isn’t loaded */
@keyframes heroFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  40% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

/* Search bar in hero */
.search-bar { margin-top: 18px; }
.search-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: center; }
.search-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.95); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (max-width: 640px) {
  /* Stack search inputs and stretch button on small screens */
  .search-grid { grid-template-columns: 1fr; }
  .search-bar button { width: 100%; }
}