@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import './variables.css';

* {
  box-sizing: border-box;
}



.aa-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aa-header__logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.aa-header__logo-icon img {
  width: 90%;
  height: 100%;
  object-fit: contain;
}

.aa-header__logo-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--aa-navy);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 33px;
  height: 33px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  background: linear-gradient(145deg, #163299, #081b67);
}

.brand-badge img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.main-nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 0.35rem 0.15rem;
  border-bottom: 3px solid transparent;
}

.main-nav a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f6f8fc;
  border: 1px solid #d9e0ec;
  border-radius: 999px;
  padding: 0.3rem 0.45rem 0.3rem 0.3rem;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.auth-btn--login {
  border: 1px solid #d9e0ec;
  background: #fff;
  color: var(--ink-soft);
}

.auth-btn--signup {
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 1.45rem;
}

.hero {
  position: relative;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: background-size 0.75s ease, background-position 0.75s ease;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 32, 122, 0.95), rgba(3, 9, 44, 0.55));
  opacity: 1;
  transition: opacity 0.45s ease;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -10% -15%;
  background:
    radial-gradient(circle at 14% 18%, rgba(253, 235, 158, 0.3), transparent 42%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.22) 6%, rgba(255, 255, 255, 0) 45%);
  mix-blend-mode: soft-light;
  opacity: 0.35;
  transform: translate3d(0, 10px, 0);
  transition: transform 0.65s ease, opacity 0.45s ease;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  transform: translateY(0);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero h1 {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 1rem auto 0;
  max-width: 640px;
  color: rgba(247, 249, 255, 0.9);
  font-size: 1.1rem;
}

@media (hover: hover) and (pointer: fine) {
  .hero:hover {
    background-size: 100%;
    background-position: center 44%;
  }

  .hero:hover::before {
    opacity: 0.8;
  }

  .hero:hover::after {
    opacity: 0.5;
    transform: translate3d(-1.5%, -2%, 0);
  }

  .hero:hover .hero-content {
    transform: translateY(-4px);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
  }
}

.search-card {
  position: relative;
  margin: -95px auto 3rem;
  z-index: 2;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 34px rgba(10, 30, 96, 0.16), 0 2px 0 #bec7e3;
  border: 1px solid #c1c7da;
  width: min(980px, calc(100% - 2rem));
  overflow: hidden;
}

.search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #a1acd0 100%  ;
}

.search-card.sticky-search-visible {
  position: fixed;
  top: 78px; /* height of header */
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 2rem));
  z-index: 49;
  margin: 0;
  box-shadow: 0 16px 34px rgba(10, 30, 96, 0.25), 0 2px 0 #bec7e3;
  animation: slideDown 0.3s ease-out forwards;
}

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

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem;
  border-bottom: 1px solid #ece5c6;
  background: #edeff5 100%;
}

.tab-btn {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.78rem;
  font-weight: 800;
  color: #4e5c80;
  background: transparent;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.tab-btn.active {
  color: #102877;
  border-color: #f1e1a4;
  background: rgba(255, 243, 194, 0.42);
  box-shadow: inset 0 -2px 0 #c9a537;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: #c1c7da;
}

.search-grid {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.search-grid--home {
  background: linear-gradient(180deg, #bebef353 0%, #e8e8ed53 100%);
}

.search-primary-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto auto;
  gap: 0.85rem;
  align-items: center;
}

.sort-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sort-select-icon {
  position: absolute;
  left: 0.8rem;
  width: 18px;
  height: 18px;
  color: #5f6f93;
  pointer-events: none;
}
.sort-select-wrap select {
  padding-left: 2.4rem;
}

.search-filters-panel {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #c1c7da;
  animation: slideDownPanel 0.25s ease-out forwards;
}

.search-filters-panel[hidden] {
  display: none !important;
}

@keyframes slideDownPanel {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  margin-bottom: 1.5rem;
}

.filter-group-title {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: #5f6f93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.filter-group-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px dashed #d1d8e8;
}

.btn-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #c1c7da;
  color: #40398e;
}

.btn-filter-toggle:hover,
.btn-filter-toggle.active {
  background: #f4f7fb;
  border-color: #8c9dc9;
  color: #163299;
}

.btn-search-icon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}

.search-input-wrap {
  position: relative;
  display: block;
}

.search-input-wrap .input {
  padding-left: 2.35rem;
}

.search-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #40398e;
  pointer-events: none;
}

.search-input-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.search-grid--home .input {
  background: #fff;
  border-color: #c1c7da;
}

.search-grid--home .input:focus {
  outline: 2px solid rgba(235, 212, 123, 0.38);
  border-color: #d8bf5f;
}

.search-grid--home .btn {
  min-height: 44px;
}

.search-grid--home [data-home-search-btn] {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 50, 153, 0.24);
}

.search-grid--home [data-home-search-btn]:hover {
  filter: brightness(1.06);
}

.btn-filter-reset {
  border: 1px solid #e0ca79;
  color: #43380e;
  background: linear-gradient(180deg, #fdf2c4 0%, #ebd47b 100%);
}

.search-feedback {
  margin: 0;
  padding: 0 1.25rem 0.7rem;
  padding-top: 0.7rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: #4d5c8f;
}

.input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f7fb;
  padding: 0.82rem 0.9rem;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 0.78rem 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-brand {
  background: var(--brand-2);
  color: #fff;
}

.btn-primary {
  height: 40px;
  background: var(--brand);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #2e3303;
}

.stat-strip {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.2rem 0;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #f5eec2;
  font-weight: 800;
}

.stat h3 {
  margin: 0;
  font-size: 1.85rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.stat p {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 2.8rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-head h2 {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

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


.small-muted {
  color: var(--muted);
  font-size: 0.85rem;
}



.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.form-page {
  padding: 2rem 0 4rem;
}

.page-title {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.page-sub {
  color: var(--muted);
  margin-top: 0.35rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

.form-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.block-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf1f8;
  background: #fbfcff;
  font-weight: 800;
  color: var(--ink);
}

.block-body {
  padding: 1rem;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 0.9rem;
}

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

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

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

.choice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.95rem;
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
}

.choice.active {
  border-color: #113197;
  box-shadow: inset 0 0 0 1px #113197;
  color: var(--brand);
}

.actions {
  display: flex;
  justify-content: end;
  gap: 0.7rem;
}

.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100dvh - 78px);
  overflow: hidden;
}

.sidebar-chat {
  border-right: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-list {
  padding: 0.75rem;
  display: grid;
  gap: 0.28rem;
  overflow: hidden;
}

.conversation {
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  cursor: pointer;
}

.conversation.active {
  background: #f7f1d7;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.chat-log {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.bubble {
  position: relative;
  max-width: min(630px, 80%);
  padding: 0.9rem 1rem;
  border-radius: 14px;
  line-height: 1.5;
}

.bubble-file {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
}

.bubble-media {
  width: min(360px, 100%);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.bubble-file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bubble.incoming {
  background: #f3df82;
  color: #1f1f1f;
}

.bubble.outgoing {
  margin-left: auto;
  background: #09186d;
  color: #fff;
}

.chat-context-menu {
  position: fixed;
  z-index: 120;
  background: #fff;
  border: 1px solid #d8e0ef;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(8, 24, 70, 0.2);
  padding: 0.35rem;
}

.chat-context-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-weight: 800;
  text-align: left;
  border-radius: 8px;
  padding: 0.58rem 0.72rem;
  cursor: pointer;
}

.chat-context-menu button:hover {
  background: #fff3f2;
}

.chat-input {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.chat-input .input {
  min-width: 0;
}

.chat-attach-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #cfd8ea;
  border-radius: 12px;
  background: linear-gradient(150deg, #f9fbff 0%, #edf3ff 100%);
  color: #030d45;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 12px rgba(7, 21, 66, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.chat-attach-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(7, 21, 66, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  filter: brightness(1.02);
}

.chat-attach-btn svg {
  width: 20px;
  height: 20px;
}

.chat-attach-btn.has-files::after {
  content: attr(data-file-count);
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #102778;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0 0.18rem;
  border: 2px solid #fff;
}

.chat-input-field {
  min-height: 42px;
  max-height: 130px;
  resize: none;
}

.listing-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.add-listing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 210px;
}

.kpi-row {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.kpi h3 {
  margin: 0.25rem 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 2.1rem;
}

.filters {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 0.7rem;
}

.gallery-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.6rem;
}

.gallery-grid img {
  height: 210px;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-grid img:first-child {
  grid-row: 1 / span 2;
  height: 424px;
}

.gallery-grid--details img:not(:first-child) {
  height: 208px;
}

.gallery-grid--details.gallery-grid--count-1 {
  grid-template-columns: 1fr;
}

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

.gallery-grid--details.gallery-grid--count-3 {
  grid-template-columns: 1.45fr 1fr;
}

.gallery-grid--details.gallery-grid--count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid--details.gallery-grid--count-5 {
  grid-template-columns: 2fr 1fr 1fr;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-3,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid--details .gallery-item {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-grid--details .gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-grid--details .gallery-item video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-grid--details .gallery-item--main {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.gallery-grid--details .gallery-item--main img {
  height: 424px;
}

.gallery-grid--details .gallery-item--main video {
  height: 424px;
}

.gallery-grid--details.gallery-grid--count-1 .gallery-item img,
.gallery-grid--details.gallery-grid--count-1 .gallery-item video {
  height: 440px;
}

.gallery-grid--details.gallery-grid--count-1 .gallery-item--main {
  grid-column: 1;
  grid-row: auto;
}

.gallery-grid--details.gallery-grid--count-2 .gallery-item img,
.gallery-grid--details.gallery-grid--count-2 .gallery-item video {
  height: 320px;
}

.gallery-grid--details.gallery-grid--count-3 .gallery-item img,
.gallery-grid--details.gallery-grid--count-3 .gallery-item video {
  height: 215px;
}

.gallery-grid--details.gallery-grid--count-3 .gallery-item--main img,
.gallery-grid--details.gallery-grid--count-3 .gallery-item--main video {
  height: 440px;
}

.gallery-grid--details.gallery-grid--count-4 .gallery-item img,
.gallery-grid--details.gallery-grid--count-4 .gallery-item video {
  height: 250px;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item img,
.gallery-grid--details.gallery-grid--count-5 .gallery-item video {
  height: 208px;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item--main img,
.gallery-grid--details.gallery-grid--count-5 .gallery-item--main video {
  height: 424px;
}

.gallery-grid--details.gallery-grid--video-main .gallery-item--main {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2 .gallery-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2 .gallery-item:nth-child(2) img,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2 .gallery-item:nth-child(2) video {
  height: 424px;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item:not(.gallery-item--main) img,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item:not(.gallery-item--main) video,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:not(.gallery-item--main) img,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:not(.gallery-item--main) video {
  height: 208px;
}

.gallery-grid--details .gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-grid--details .gallery-item:hover video {
  transform: scale(1.04);
}

.gallery-grid--details .gallery-item--more img {
  filter: brightness(0.62);
}

.gallery-more-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(2, 7, 30, 0.08), rgba(2, 7, 30, 0.42));
}

.gallery-grid--details .gallery-extra {
  display: none;
}

.gallery-grid--details.gallery-grid--empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
}

.gallery-empty-state {
  width: min(560px, 100%);
  border-radius: 14px;
  padding: 1.4rem 1rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: #627399;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.86), transparent 40%),
    linear-gradient(140deg, #e8edf9 0%, #dde5f3 55%, #d0d9ec 100%);
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 11, 35, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.gallery-modal__frame {
  width: min(1100px, calc(100vw - 7.2rem));
  max-height: 90vh;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}

.gallery-modal__frame img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #090f2f;
}

.gallery-modal__frame video {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #090f2f;
}

.gallery-modal__frame p {
  margin: 0;
  color: #dce4ff;
  font-size: 0.92rem;
  text-align: center;
}

.gallery-modal__close,
.gallery-modal__nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  line-height: 1;
}

.gallery-modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

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

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

.gallery-grid--details.gallery-grid--count-3 .gallery-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--count-3 .gallery-item:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

.gallery-grid--details.gallery-grid--count-5 .gallery-item:nth-child(5) {
  grid-column: 3;
  grid-row: 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2 .gallery-item--main,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-3 .gallery-item--main {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item--main,
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item--main {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-2 .gallery-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-3 .gallery-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-3 .gallery-item:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item:nth-child(2),
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item:nth-child(3),
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:nth-child(3) {
  grid-column: 4;
  grid-row: 1;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-4 .gallery-item:nth-child(4),
.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.gallery-grid--details.gallery-grid--video-main.gallery-grid--count-5 .gallery-item:nth-child(5) {
  grid-column: 4;
  grid-row: 2;
}

.spec-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

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

.spec {
  background: #fff;
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(11, 25, 72, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.spec-grid + .panel {
  border: 1px solid #d3dced;
  box-shadow: 0 10px 24px rgba(10, 24, 70, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.amenities {
  background: #fff;
  border: 1px solid #d3dced;
  border-radius: 14px;
  padding: 1.35rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  box-shadow: 0 10px 24px rgba(10, 24, 70, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.amenities span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.detail-empty-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c8d4ee;
  border-radius: 8px;
  padding: 0.26rem 0.55rem;
  color: #7a88a8 !important;
  font-weight: 700;
  background: #f7f9ff;
}

.detail-map-link-empty {
  background: #e9edf7 !important;
  color: #6f7b95 !important;
  pointer-events: none;
}

[data-detail-gallery].panel {
  border: 1px solid #e8d782;
  box-shadow: 0 12px 24px rgba(15, 32, 94, 0.08), 0 0 0 2px rgba(243, 223, 130, 0.25);
}

[data-detail-gallery] .gallery-item--main::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(243, 223, 130, 0.08), rgba(10, 25, 77, 0.1));
}

[data-detail-mode] {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-weight: 800;
  color: #203169;
  background: linear-gradient(180deg, #fff8db 0%, #f5e8ab 100%);
  border: 1px solid #ebd47b;
}

[data-detail-price-period] {
  color: #7a641a;
  font-weight: 800;
  margin: 0.08rem 0 0;
  line-height: 1;
}

[data-detail-spec-grid] .spec {
  border: 1px solid #e2cf87;
}

[data-detail-features] span {
  border: 1px solid #edd98f;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(180deg, #fff9e1 0%, #fff3c6 100%);
}

[data-detail-map-link]:not(.detail-map-link-empty) {
  box-shadow: 0 0 0 2px rgba(243, 223, 130, 0.42);
}

.terms-layout {
  padding: 2rem 0 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
}

.toc,
.help-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
}

.toc a {
  display: flex;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 700;
}

.toc a.active {
  background: #f7f1d6;
  color: var(--brand);
}

.terms-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem;
}

.terms-section {
  padding: 1rem 0;
  border-bottom: 1px solid #ebf0f7;
}

.terms-section:last-child {
  border-bottom: 0;
}

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 0.65rem;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.faq-btn {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 0.95rem 1rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
}

.faq-body {
  display: none;
  padding: 0 1rem 0.95rem;
  color: var(--ink-soft);
}

.faq-item.open .faq-body {
  display: block;
}

.timeline {
  margin: 2rem auto;
  max-width: 700px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #d7dff2;
}

.time-item {
  position: relative;
  padding-left: 54px;
  margin-bottom: 1.2rem;
}

.time-dot {
  position: absolute;
  left: 8px;
  top: 0.2rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f7de75;
  border: 4px solid #101f73;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.team-avatar {
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #f3f5fa, #e6ebf8);
  display: grid;
  place-items: center;
  color: #9aa3bc;
  font-size: 3rem;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta {
  background: linear-gradient(130deg, #0d3d79, #0a1f76);
  color: #fff;
  border-radius: 16px;
  padding: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer {
  margin-top: 2rem;
  background: #06146a;
  color: #f2f6ff;
  padding: 2.5rem 0 1rem;
}

.site-footer .brand-badge {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(12, 26, 88, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
}

.footer-grid h4 {
  margin: 0 0 0.7rem;
}

.footer-grid p,
.footer-grid a {
  color: #cad4f0;
  font-size: 0.92rem;
  margin: 0.35rem 0;
  display: block;
}

.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(210, 220, 255, 0.22);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #b5c3ed;
  font-size: 0.85rem;
}

.footer-bottom__links {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.footer-admin-link {
  color: #f4de74;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-admin-link:hover {
  color: #fff2b1;
}

@media (max-width: 1120px) {
  .card-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-grid--home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-grid--home .search-input-wrap {
    grid-column: span 3;
  }

  .search-grid--home .btn {
    width: 100%;
  }

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

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: inline-block;
  }

  .main-nav {
    position: fixed;
    inset: 78px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 1.2rem;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav.open {
    display: flex;
  }

  .messages-layout,
  .terms-layout {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar-chat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kpi-row,
  .spec-grid,
  .amenities,
  .grid-4,
  .grid-3,
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .gallery-grid--details .gallery-item:nth-child(n + 2) {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-grid--details .gallery-item img {
    height: 180px;
  }

  .gallery-grid--details .gallery-item video {
    height: 180px;
  }

  .gallery-grid--details .gallery-item--main {
    grid-column: span 2;
    grid-row: auto;
  }

  .gallery-grid--details .gallery-item--main img {
    height: 240px;
  }

  .gallery-grid--details .gallery-item--main video {
    height: 240px;
  }

  .gallery-modal__frame {
    width: min(1000px, calc(100vw - 4.4rem));
  }

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

  .search-grid--home .search-input-wrap {
    grid-column: auto;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(var(--max), calc(100% - 1.2rem));
  }

  .card-grid,
  .team-grid,
  .grid-2,
  .filters,
  .kpi-row,
  .spec-grid,
  .amenities,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .listing-top,
  .section-head,
  .cta,
  .footer-bottom {
    flex-direction: column;
    align-items: start;
  }

  .profile-pill span:last-child {
    display: none;
  }

  .hero {
    min-height: 430px;
  }

  .search-card {
    margin-top: -70px;
  }

  .bubble {
    max-width: 95%;
  }
}

/* ─────────────────────────────────────────────
   VERIFICATION BADGES
   ───────────────────────────────────────────── */
.badge-verification {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-verified {
  background: #059669;
  color: #fff;
}
.badge-unverified {
  background: #dc2626;
  color: #fff;
}

  