.homeView {
  width: 100%;
}

.heroSection {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

.heroTitle {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary, #1a1612);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

.heroDescription {
  font-size: 1.1rem;
  color: var(--text-secondary, #5c564d);
  margin: 0 auto;
  max-width: 600px;
}

@media (max-width: 768px) {
  .heroTitle {
    font-size: 1.75rem;
  }
  .heroDescription {
    font-size: 1rem;
  }
}

.locationBannerWrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.locationBanner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-teal-bg);
  border: 1px solid rgba(45, 125, 125, 0.25);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--accent-teal, #2d7d7d);
  font-weight: 500;
}

.locationIcon {
  font-size: 1.25rem;
  color: var(--accent-teal, #2d7d7d);
}

/* View Toggle */
.viewToggle {
  display: flex;
  gap: 0.2rem;
  background: var(--bg-secondary, #f3ede4);
  padding: 0.2rem;
  border-radius: 6px;
}

.viewToggleBtn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-secondary, #5c564d);
  transition: all 0.2s ease;
}

.viewToggleBtn:hover {
  color: var(--text-primary, #1a1612);
}

.viewToggleBtn.active {
  background: var(--bg-card, white);
  color: var(--accent-coral, #e07256);
  box-shadow: 0 2px 4px rgba(26, 22, 18, 0.08);
}

.viewToggleBtn svg {
  flex-shrink: 0;
}

.results {
  margin-top: 1rem;
}

.mapViewResults {
  margin-top: 0;
}

/* Map View Layout */
.mapViewContainer {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  height: 480px;
}

.mapContainer {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e5dfd5);
  height: 100%;
}

.compactList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  height: 100%;
  padding-right: 0.375rem;
}

.compactList::-webkit-scrollbar {
  width: 6px;
}

.compactList::-webkit-scrollbar-track {
  background: var(--bg-secondary, #f3ede4);
  border-radius: 3px;
}

.compactList::-webkit-scrollbar-thumb {
  background: var(--border-color, #e5dfd5);
  border-radius: 3px;
}

.compactList::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #8a847a);
}

/* Compact School Item */
.compactItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.compactItem:hover {
  border-color: var(--accent-coral, #e07256);
  box-shadow: 0 2px 6px rgba(26, 22, 18, 0.05);
}

.compactItemContent {
  flex: 1;
  min-width: 0;
}

.compactItemHeader {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.125rem;
}

.compactItemName {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary, #1a1612);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compactItemName:hover {
  color: var(--accent-coral, #e07256);
}

.distanceBadge {
  flex-shrink: 0;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--accent-teal, #2d7d7d);
  color: white;
  border-radius: 3px;
}

.compactItemMeta {
  display: flex;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--text-secondary, #5c564d);
  margin-bottom: 0.25rem;
}

.compactItemMeta span:not(:last-child)::after {
  content: '·';
  margin-left: 0.375rem;
  color: var(--text-muted, #8a847a);
}

.compactItemStats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-secondary, #5c564d);
}

.compactStat strong {
  color: var(--text-primary, #1a1612);
}

.compactItemActions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}


.sectionHeader {
  margin-bottom: 1rem;
}

.sectionHeader h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #1a1612);
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

/* Decorative coral bar under section headings */
.sectionHeader h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--accent-coral, #e07256);
  border-radius: 1px;
  margin-top: 0.5rem;
}

.sectionDescription {
  font-size: 0.9375rem;
  color: var(--text-secondary, #5c564d);
  margin: 0;
  line-height: 1.5;
}

.schoolList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Staggered fade-in for rows */
.schoolList > *:nth-child(1) { animation-delay: 0ms; }
.schoolList > *:nth-child(2) { animation-delay: 30ms; }
.schoolList > *:nth-child(3) { animation-delay: 60ms; }
.schoolList > *:nth-child(4) { animation-delay: 90ms; }
.schoolList > *:nth-child(5) { animation-delay: 120ms; }
.schoolList > *:nth-child(6) { animation-delay: 150ms; }
.schoolList > *:nth-child(7) { animation-delay: 180ms; }
.schoolList > *:nth-child(8) { animation-delay: 210ms; }
.schoolList > *:nth-child(9) { animation-delay: 240ms; }
.schoolList > *:nth-child(n+10) { animation-delay: 270ms; }

.emptyState {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 10px;
}

.emptyStateTitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1a1612);
  margin-bottom: 0.375rem;
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

.emptyStateDescription {
  font-size: 0.9375rem;
  color: var(--text-secondary, #5c564d);
  max-width: 380px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .locationBannerWrapper {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0.75rem;
  }

  .locationBanner {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 6px;
  }

  .viewToggle {
    justify-content: center;
  }

  .mapViewContainer {
    grid-template-columns: 1fr;
    grid-template-rows: 260px auto;
    height: auto;
    gap: 0.75rem;
  }

  .mapContainer {
    height: 260px;
  }

  .compactList {
    height: auto;
    max-height: 350px;
    padding-right: 0;
  }

  .compactItem {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .compactItemActions {
    flex-direction: row;
  }

  .compactItemActions > * {
    flex: 1;
  }

  .emptyState {
    padding: 2rem 1.25rem;
  }
}

/* Highlighted List Item */
.highlightedItem .compactItem {
  border-color: var(--accent-teal, #2d7d7d);
  box-shadow: 0 0 0 1px var(--accent-teal, #2d7d7d);
  background: var(--bg-secondary, #f3ede4);
}

/* Mobile Bottom Sheet */
.bottomSheetWrapper {
  display: none;
}

@media (max-width: 768px) {
  .bottomSheetWrapper {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem;
    pointer-events: none;
  }

  .bottomSheet {
    position: relative;
    background: var(--bg-card, white);
    border-radius: 12px;
    box-shadow: 0 -4px 24px rgba(26, 22, 18, 0.15);
    pointer-events: auto;
    animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .bottomSheet .compactItem {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 1rem;
  }

  .bottomSheet .compactItem:hover {
    box-shadow: none;
  }

  .closeSheetBtn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 30px;
    height: 30px;
    background: var(--bg-card, white);
    border: 1px solid var(--border-color, #e5dfd5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary, #5c564d);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26, 22, 18, 0.1);
    z-index: 10;
  }

  @keyframes slideUpSheet {
    from {
      transform: translateY(120%);
    }
    to {
      transform: translateY(0);
    }
  }

  /* When map view on mobile, expand map and hide list */
  .mapViewContainer {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - 280px);
    min-height: 400px;
  }

  .mapContainer {
    height: 100%;
  }

  .compactList {
    display: none;
  }
}

.discoverySection {
  padding: 2rem var(--page-padding, 2rem);
  text-align: center;
}

.discoveryCount {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.discoveryCount strong {
  color: var(--text-primary);
  font-size: 1.25rem;
}

.discoveryHints {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.quickSearches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quickSearchLabel {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.quickSearchChip {
  padding: 0.375rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color, #e0ddd8);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.quickSearchChip:hover {
  background: var(--accent-coral);
  color: white;
  border-color: var(--accent-coral);
}

.resultsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 0 1rem;
}

.sortSelect {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-color, #e0ddd8);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
}

.activeFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filterChip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color, #e0ddd8);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chipRemove {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  transition: color var(--transition, 0.2s ease);
}

.chipRemove:hover {
  color: var(--text-primary);
}
