:root {
  --primary: #6630be;
  --accent: #f36a38;
  --bg: #f5f3ff;
  --text: #1f1f1f;
  --muted: #777;
  --card-bg: #ffffff;
  --border-radius: 10px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.leaflet-attribution-flag { display: none !important; }

/* Layout basics */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;;
  
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--primary));
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.nav a:hover {
  color: var(--primary);
}

/* Hero + search */

.hero {
  padding: 2.5rem 0 2rem;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 0.98rem;
}

.search-bar {
  margin: 1.5rem auto 0;
  max-width: 500px;
  display: flex;
  gap: 0.5rem;
  background: #fff;
  padding: 0.4rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.search-bar input[type="text"] {
  flex: 1;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  outline: none;
}

.search-bar button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.search-bar button:hover {
  filter: brightness(1.03);
}

.search-bar {
  position: relative;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(15, 50, 110, 0.15);
  overflow: hidden;
  z-index: 2000;
}

.suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.suggestion-list li + li {
  border-top: 1px solid #e2e8f0;
}

.suggestion-list a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #0f172a;
}

.suggestion-list a:hover {
  background: #eef2ff;
}

.status {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.status-success {
  background: #dcfce7;
  color: #14532d;
}

.status-error {
  background: #fee2e2;
  color: #991b1b;
}

/* Section headings */

.section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
}

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

/* Cards */

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

/* City cards */

.city-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  min-height: 150px;
  background: #ddd;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}

.city-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* filter: brightness(0.7); */
  transition: transform 0.3s ease;
}

.city-card:hover img {
  transform: scale(1.05);
}

.city-card-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  font-size: 1rem;
  font-weight: 600;
}

/* Hostel cards (list/grid) */

.hostel-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.hostel-card-media {
  position: relative;
  height: 170px;
  background: #ddd;
}

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

.hostel-card-body {
  padding: 0.85rem 1rem 1rem;
}

.hostel-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.hostel-card-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hostel-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.hostel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(132, 94, 194, 0.08);
  color: var(--primary);
  font-size: 0.75rem;
}

/* Location page specifics */

.page-header {
  padding: 1.8rem 0 1rem;
}

.page-title {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Hostel list for location page */

.hostel-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hostel-card-horizontal {
  display: flex;
  flex-direction: row;
}

.hostel-card-horizontal .hostel-card-media {
  flex: 0 0 180px;
}

.hostel-card-horizontal .hostel-card-body {
  flex: 1;
}

.hostel-card-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* Hostel detail page */

.hostel-layout {
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hostel-main h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.hostel-location-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.hostel-hero {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.hostel-hero img {
  width: 100%;
  /* height: 320px; */
  object-fit: cover;
  display: block;
}

.hostel-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.hostel-info-box {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.hostel-info-box dl {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 0.4rem;
  column-gap: 0.8rem;
  margin: 0;
}

.hostel-info-box dt {
  font-weight: 600;
}

.hostel-info-box dd {
  margin: 0;
}

.hostel-description {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.gallery img {
  width: 100%;
  /* height: 200px; */
  object-fit: cover;
  border-radius: 10px;
}

/* Map + side */

.hostel-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
      margin-top: 1.5rem;
}

.map-box {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.map-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, rgba(132, 94, 194, 0.15), rgba(255, 150, 113, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.hostel-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-box-header {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.book-box {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1.2rem;
  /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-block {
  width: 100%;
  text-align: center;
  margin-top: 0.7rem;
}

/* Image gallery */

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

.gallery img {
  width: 100%;
  /* height: 130px; */
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* Reviews & forms */

.section-block {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}

.section-block h2 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.review-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding-bottom: 0.6rem;
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.stars {
  color: #f3b431;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* Footer */

.footer {
  margin-top: auto;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--primary);
}

/* Responsive */

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

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .hostel-card-horizontal {
    flex-direction: column;
  }

  .hostel-card-horizontal .hostel-card-media {
    flex: initial;
    height: 160px;
  }

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

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    align-items: center;
  }
}
