:root {
  --primary: #183c7a;
  --secondary: #111827;
  --accent: #facc15;
  --bg: #f8fafc;
  --text: #111827;
  --muted: #4b5563;
  --radius: 16px;
  --font-heading: 'Sora';
  --font-body: 'Manrope';
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body), sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading), sans-serif;
  letter-spacing: -0.01em;
}

a {
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
  border-color: color-mix(in srgb, var(--primary) 88%, black);
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(8px);
}

.logo-badge {
  background: var(--secondary);
  color: #fff;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 700;
}

.logo-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-text {
  font-weight: 700;
  color: var(--text);
}

.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hero-slider {
  position: relative;
  height: clamp(420px, 72vh, 760px);
  min-height: 72vh;
  max-height: 760px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  user-select: none;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15, 23, 42, 0.85) 8%, rgba(15, 23, 42, 0.42) 50%, rgba(15, 23, 42, 0.58) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 660px;
  color: #fff;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0.75rem 0;
}

.hero-sub {
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  opacity: 0.96;
}

.hero-note {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 640px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 4;
}

.hero-nav:hover {
  transform: translateY(-50%) scale(1.06);
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 2vw;
}

.hero-next {
  right: 2vw;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 5;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 28px;
  background: var(--accent);
}

.section {
  padding: 4.8rem 0;
}

.section-home {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.section-bg-a {
  background: linear-gradient(180deg, #f7fbfb 0%, #f2f9f8 100%);
}

.section-bg-b {
  background: linear-gradient(180deg, #fdfefe 0%, #f4f8ff 100%);
}

.section-bg-c {
  background: linear-gradient(180deg, #f8fcf9 0%, #eef6f3 100%);
}

.pattern-dots .section::before,
.pattern-grid .section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.theme-soft .btn-primary {
  box-shadow: 0 12px 26px rgba(24, 60, 122, 0.28);
}

.theme-bold .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1f2937;
}

.intro-card {
  margin-top: -2.2rem;
  background: #fff;
  border-radius: calc(var(--radius) + 6px);
  padding: 1.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.intro-stat {
  display: flex;
  gap: 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.3rem;
}

.card-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 270px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-item:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

.card-title-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  background: rgba(17, 24, 39, 0.56);
  color: #fff;
  backdrop-filter: blur(3px);
  z-index: 2;
}

.card-title {
  margin: 0;
  font-size: 1.03rem;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.13) 30%, rgba(15, 23, 42, 0.88) 100%);
  color: #fff;
  padding: 1rem;
  display: flex;
  align-items: end;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.card-item:hover .card-overlay {
  opacity: 1;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.2rem;
}

.team-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.35rem;
  text-align: center;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.team-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.85rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.team-phone-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}

.team-phone-link:hover {
  text-decoration: underline;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.3rem;
}

.blog-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.blog-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.blog-card .card-body {
  padding: 1.25rem;
}

.companies-showcase {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 255, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: calc(var(--radius) + 8px);
  padding: 1.2rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 1rem;
  align-items: stretch;
}

.companies-brand-panel {
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.95), rgba(235, 243, 248, 0.95));
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: calc(var(--radius) + 2px);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
}

.companies-main-logo {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.14));
}

.companies-main-logo-fallback {
  width: 100%;
  min-height: 150px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  color: #0f172a;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.companies-content-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
}

.companies-quote {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.companies-marquee {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.8rem 0;
}

.companies-marquee::before,
.companies-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52px;
  z-index: 1;
  pointer-events: none;
}

.companies-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.companies-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.companies-track {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: max-content;
  animation: companies-marquee-scroll 26s linear infinite;
  will-change: transform;
}

.companies-marquee:hover .companies-track {
  animation-play-state: paused;
}

.company-logo-chip {
  min-width: 164px;
  height: 78px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.company-logo-chip img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.company-logo-chip span {
  color: #334155;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

@keyframes companies-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
}

.quick-search-card {
  background: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.2rem;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.featured-listings-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.4rem;
}

.featured-listings-scroller::-webkit-scrollbar {
  height: 7px;
}

.featured-listings-scroller::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
}

.featured-listing-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.featured-listing-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.listings-page .filter-panel {
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 90px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.listing-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.listing-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.listing-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.listing-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.detail-gallery {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.detail-gallery-main {
  position: relative;
  min-height: 420px;
  background: #0f172a;
}

.detail-gallery-slide {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 0;
  cursor: zoom-in;
}

.detail-gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.detail-gallery-slide img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 4;
}

.detail-gallery-nav.prev {
  left: 14px;
}

.detail-gallery-nav.next {
  right: 14px;
}

.detail-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem;
  background: #fff;
}

.detail-gallery-thumbs .thumb {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  min-width: 88px;
  width: 88px;
  height: 64px;
  background: transparent;
}

.detail-gallery-thumbs .thumb.active {
  border-color: var(--primary);
}

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

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
}

.similar-listings-wrap {
  background: linear-gradient(180deg, #f8fcff 0%, #f2f7ff 100%);
}

.similar-slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.4rem;
}

.similar-slider::-webkit-scrollbar {
  height: 7px;
}

.similar-slider::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.24);
  border-radius: 999px;
}

.similar-card {
  flex: 0 0 320px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--bg) 72%, #ffffff) 100%);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, #ffffff);
}

.similar-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.similar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.similar-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 22%, #ffffff);
  color: color-mix(in srgb, var(--secondary) 92%, #000000);
}

.similar-price {
  color: var(--primary);
  font-size: 0.98rem;
}

.similar-location {
  color: var(--muted);
}

.similar-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
}

.listing-spec-table {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.listing-spec-table .table th,
.listing-spec-table .table td {
  padding: 0.45rem 0.6rem;
  font-size: 0.88rem;
  vertical-align: middle;
}

.listing-spec-table .table th {
  width: 20%;
  color: var(--muted);
  font-weight: 600;
  background: rgba(15, 23, 42, 0.02);
}

.company-sidebar {
  position: sticky;
  top: 92px;
}

.spec-box {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-block;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.site-footer {
  background: #0f172a;
  color: #fff;
  padding: 3rem 0 2rem;
}

.site-footer .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.footer-links a,
.footer-social a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-social {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 1.8rem;
  padding-top: 1rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.content p {
  color: var(--muted);
}

.admin-body {
  background: #f3f6fb;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.admin-sidebar {
  background: #0f172a;
  color: #e5e7eb;
  padding: 1.2rem 1rem;
}

.admin-sidebar .brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.admin-sidebar a {
  color: #cdd6ea;
  text-decoration: none;
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

.admin-content {
  padding: 1.8rem;
}

.stat-card {
  background: #fff;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.upload-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.upload-row .preview,
.preview,
.preview-og {
  width: 130px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
}

.feature-grid {
  max-height: 200px;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
}

.listing-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.listing-image-item {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  padding: 0.4rem;
}

.listing-image-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.listing-image-item .image-delete-btn {
  margin-top: 0.35rem;
  width: 100%;
}

@media (max-width: 992px) {
  .hero-slider {
    min-height: 52vh;
  }

  .hero-copy {
    max-width: 100%;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-gallery-main,
  .detail-gallery-slide img {
    min-height: 320px;
  }

  .hero-prev {
    left: 0.6rem;
  }

  .hero-next {
    right: 0.6rem;
  }
}

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

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .hero-nav {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .intro-card {
    margin-top: 1rem;
  }

  .section {
    padding: 3.2rem 0;
  }

  .companies-showcase {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .companies-brand-panel {
    min-height: 160px;
  }

  .companies-main-logo {
    max-height: 100px;
  }

  .companies-quote {
    font-size: 0.95rem;
    letter-spacing: 0.045em;
  }

  .company-logo-chip {
    min-width: 142px;
    height: 68px;
  }

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

  .featured-listings-scroller {
    grid-auto-columns: minmax(240px, 86vw);
  }

  .company-sidebar {
    position: static;
  }

  .detail-gallery-main,
  .detail-gallery-slide img {
    min-height: 240px;
  }

  .similar-slider {
    gap: 0.8rem;
  }

  .similar-card {
    flex: 0 0 86vw;
  }
}
