/* =============================================================================
   Rentoria — Pages Stylesheet
   Page-specific styles for homepage, browse, details, list-property, etc.
   ============================================================================= */

/* ============================================================
   HOMEPAGE
   ============================================================ */

/* === Hero Section === */
.hero-section {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  padding-block: var(--space-16) var(--space-12);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(224,90,43,0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(45,106,79,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: var(--color-primary-subtle);
  border: 1px solid rgba(224,90,43,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-display);
  width: fit-content;
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text-primary);
}

.hero-title-accent {
  color: var(--color-primary);
  position: relative;
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 480px;
}

/* Hero Search Box */
.hero-search-box {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--color-border);
  padding: var(--space-3);
  max-width: 560px;
}

.hero-search-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.hero-search-field {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-search-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-display);
}

.hero-search-select,
.hero-search-input-text {
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  padding: 0;
  width: 100%;
}

.hero-search-select option { color: var(--color-text-primary); }

.hero-search-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border);
  flex-shrink: 0;
}

.hero-search-btn {
  border-radius: var(--radius-lg);
  margin-left: var(--space-2);
  flex-shrink: 0;
  padding: 12px 20px;
  gap: var(--space-2);
}

.hero-cta-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Hero Illustration */
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(26,20,16,0.08));
}

/* === Trust Strip Section === */
.trust-strip-section {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

/* === Areas Chip Row === */
.areas-chip-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.areas-loading {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.chip-skeleton {
  height: 40px;
  width: 120px;
  background: var(--color-bg-2);
  border-radius: var(--radius-full);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === Properties Grid === */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.skeleton-card {
  height: 340px;
  background: var(--color-bg-2);
  border-radius: var(--radius-lg);
  animation: pulse 1.5s ease-in-out infinite;
}

/* === Background Alt === */
.bg-alt {
  background: var(--color-bg-2);
}

/* === How It Works Section === */
.how-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: var(--space-10);
}

.how-card {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.how-card-arrow {
  padding: 0 var(--space-4);
}

.how-arrow {
  width: 40px;
  opacity: 0.5;
}

.how-step-number {
  width: 52px;
  height: 52px;
  background: var(--color-primary-subtle);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
}

.how-illustration {
  width: 80px;
  height: 80px;
}

.how-illustration svg {
  width: 100%;
  height: 100%;
}

.how-step-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text-primary);
}

.how-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 220px;
}

.how-owner-strip {
  background: var(--color-primary-subtle);
  border: 1.5px solid rgba(224,90,43,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.how-owner-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

/* === Plans Grid (Homepage info) === */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.plan-info-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.plan-info-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.plan-info-featured {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.plan-info-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
}

.plan-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-info-icon svg {
  width: 28px;
  height: 28px;
}

.plan-icon-basic  { background: var(--color-bg-2);       color: var(--color-text-secondary); }
.plan-icon-online { background: #E8F4FD;                  color: #1A6FA8; }
.plan-icon-physical { background: var(--color-accent-subtle); color: var(--color-accent); }

.plan-info-name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text-primary);
}

.plan-info-price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
}

.plan-info-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================================
   BROWSE PROPERTIES PAGE
   ============================================================ */

.browse-page-header {
  padding-block: var(--space-6) var(--space-4);
  background: var(--color-bg);
}

/* Sticky wrapper — only sticks header height */
.browse-filter-sticky {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

/* Desktop: full padding above the filter bar */
.browse-filter-sticky > .container {
  padding-block: var(--space-4);
}

/* Mobile topbar: always visible — search + toggle button side by side */
.filter-mobile-topbar {
  display: none; /* Hidden on desktop; shown on mobile via media query */
}

/* Filter apply button: shown only in mobile panel */
.filter-apply-btn {
  display: none;
}

/* Active filter count badge on toggle button */
.filter-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Backdrop: dark overlay under the open filter panel on mobile */
.filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,20,16,0.45);
  z-index: 49; /* below sticky bar (z-index:50) */
  animation: fadeIn 200ms ease;
}

.filter-backdrop.visible {
  display: block;
}

/* position:relative + z-index:1 is intentional:
   Keeps property card stacking contexts (from hover transform) below the sticky
   filter bar (z-index:50), preventing cards from painting over the bar on scroll. */
.browse-results-area {
  padding-block: var(--space-8);
  position: relative;
  z-index: 1;
}

/* Desktop: search group gets 2x flex-grow so it's wider than the compact dropdowns */
.filter-search-desktop {
  flex: 2 !important;
}

.browse-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
  flex-wrap: wrap;
}

.browse-results-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.browse-properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  min-height: 300px;
}

.load-more-btn-wrapper {
  text-align: center;
  margin-top: var(--space-10);
}

/* ============================================================
   PROPERTY DETAILS PAGE
   ============================================================ */

.property-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-8);
  padding-block: var(--space-8);
  align-items: start;
}

/* Gallery */
.property-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-2);
  aspect-ratio: 16/9;
  position: relative;
}

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

.property-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.gallery-nav {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.gallery-dot.active {
  background: white;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.gallery-prev { left: var(--space-3); }
.gallery-next { right: var(--space-3); }
.gallery-prev:hover, .gallery-next:hover { background: white; box-shadow: var(--shadow-md); }

/* Property Info */
.property-info-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-5);
}

.property-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.property-detail-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.property-detail-rent {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

.property-detail-rent span {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
}

.property-detail-location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.property-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.property-spec-item {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  border: 1px solid var(--color-border-light);
}

.property-spec-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}

.property-spec-value {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  font-family: var(--font-display);
}

.property-description-section h3 {
  margin-bottom: var(--space-3);
}

.property-description-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

/* Contact Card (Sticky Sidebar) */
.property-contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.contact-owner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-owner-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text-primary);
}

.contact-owner-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.contact-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-trust-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.property-id-display {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

.report-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  padding: 0;
  transition: color var(--transition-fast);
}

.report-btn:hover {
  color: var(--color-danger);
}

/* Similar Properties */
.similar-section {
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-border-light);
}

/* ============================================================
   LIST PROPERTY PAGE (Multi-Step Form)
   ============================================================ */

.list-property-page {
  padding-block: var(--space-10);
  min-height: 80vh;
}

.list-property-container {
  max-width: 720px;
  margin-inline: auto;
}

.list-property-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.list-property-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-warning-subtle);
  border: 1px solid rgba(233,196,106,0.4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #6B4F0A;
  margin-top: var(--space-4);
  justify-content: center;
}

/* Step Indicator (page-level, with labels below) */
.listing-step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-6);
}

/* Form Steps */
.listing-form-step {
  display: none;
}

.listing-form-step.active {
  display: block;
  animation: stepFadeIn 250ms ease;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.listing-form-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-5);
}

.listing-form-section-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.listing-form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border-light);
}

/* Caretaker toggle section */
.caretaker-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
}

.caretaker-details {
  display: none;
  margin-top: var(--space-4);
}

.caretaker-details.visible {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* Photo Upload Area */
.photo-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.photo-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.photo-upload-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  color: var(--color-primary);
}

.photo-upload-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.photo-upload-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.photo-preview-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--color-bg-2);
}

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

.photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Plan Selection */
.listing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

/* Confirmation Checkbox */
.confirm-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.confirm-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.confirm-checkbox-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Success State */
.listing-success-state {
  display: none;
  text-align: center;
  padding: var(--space-12) var(--space-8);
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.listing-success-state.visible {
  display: flex;
  animation: stepFadeIn 400ms ease;
}

.success-icon-circle {
  width: 80px;
  height: 80px;
  background: var(--color-accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.listing-success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
}

.listing-success-msg {
  color: var(--color-text-secondary);
  max-width: 400px;
  font-size: var(--text-base);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-hero {
  padding-block: var(--space-16);
  background: linear-gradient(135deg, var(--color-primary-subtle) 0%, var(--color-accent-subtle) 100%);
  text-align: center;
}

.about-content-section {
  padding-block: var(--space-12);
  max-width: 720px;
  margin-inline: auto;
}

.about-content-section h2 {
  margin-bottom: var(--space-4);
}

.about-content-section p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.team-card {
  text-align: center;
  padding: var(--space-6);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 auto var(--space-3);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  padding-block: var(--space-12);
  align-items: start;
}

.contact-info-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ============================================================
   LEGAL PAGES (T&C, PRIVACY)
   ============================================================ */

.legal-page {
  padding-block: var(--space-12);
  max-width: 720px;
  margin-inline: auto;
}

.legal-page h1 {
  margin-bottom: var(--space-2);
}

.legal-date {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

.legal-page h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-page p,
.legal-page li {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-3);
}

.legal-page ul {
  list-style: disc;
  padding-left: var(--space-5);
}

/* ============================================================
   404 PAGE
   ============================================================ */

.not-found-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
}

.not-found-content {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.not-found-code {
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  opacity: 0.15;
}

.not-found-title {
  font-size: var(--text-2xl);
  font-weight: 800;
}

.not-found-text {
  color: var(--color-text-secondary);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 1024px) {
  .hero-section .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-illustration {
    order: -1;
    max-height: 220px;
  }

  .hero-illustration svg {
    max-width: 280px;
  }

  .hero-search-box {
    max-width: 100%;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

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

  .property-detail-layout {
    grid-template-columns: 1fr;
  }

  .property-contact-card {
    position: static;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .how-card-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-search-inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }

  .hero-search-divider {
    width: 100%;
    height: 1px;
  }

  .plans-grid,
  .properties-grid,
  .browse-properties-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-team-grid {
    grid-template-columns: 1fr;
  }

  .caretaker-details.visible {
    grid-template-columns: 1fr;
  }

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

  /* ---- Browse page: tighter paddings on mobile ---- */
  .browse-page-header {
    padding-block: var(--space-4) var(--space-3);
  }

  .browse-results-area {
    padding-block: var(--space-5);
  }

  /* ---- Mobile Filter Panel ---- */

  /* Show the always-visible mobile topbar */
  .filter-mobile-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-block: var(--space-3);
  }

  /* Topbar: search takes all remaining space, min-width:0 overrides the width:100% base
     style so it doesn't push past the Filters toggle button on narrow screens */
  .filter-mobile-topbar .filter-search-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
  }

  /* Toggle button styling */
  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
  }

  .filter-toggle-btn[aria-expanded="true"] {
    background: var(--color-primary-subtle);
    border-color: var(--color-primary);
    color: var(--color-primary);
  }

  /* Hide the container padding block — mobile topbar has its own padding */
  .browse-filter-sticky > .container {
    padding-block: 0;
  }

  /* The collapsible filter panel — hidden by default on mobile */
  #filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms ease;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  /* When toggled open */
  #filter-panel.open {
    max-height: 600px; /* Large enough to show all filters */
    overflow: visible;
  }

  /* Panel inner content gets its own padding when open */
  #filter-panel .filter-row {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border-light);
  }

  /* Each filter group fills full width */
  #filter-panel .filter-group {
    width: 100%;
    min-width: 0;
  }

  /* Hide desktop-only search in the panel on mobile */
  .filter-search-desktop {
    display: none;
  }

  /* Show the Apply button only in mobile panel */
  .filter-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    margin-bottom: var(--space-4);
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .filter-apply-btn:hover {
    background: var(--color-primary-dark);
  }
}

@media (max-width: 480px) {
  /* ---- Hero: smaller font on very small phones ---- */
  .hero-title {
    font-size: var(--text-2xl); /* 30px — comfortable on 360px screens */
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  /* Hero search button full-width on tiny screens */
  .hero-search-btn {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  /* Hero search box: tighten padding */
  .hero-search-box {
    padding: var(--space-2);
  }

  /* ---- Trust bar: stack vertically instead of wrapping awkwardly ---- */
  .trust-bar {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  /* Remove the min-width constraint that causes overflow on 360px */
  .trust-item {
    min-width: unset;
    flex: none;
    width: 100%;
  }
}

