/* ==========================================================================
   StudentRoomInMechelen — student-facing marketplace
   Fresh, visual, friendly, mobile-first. Shares Kotbeheer brand palette.
   ========================================================================== */

:root {
  /* Core brand palette */
  --teal:        #0F766E;   /* primary */
  --teal-dark:   #134E4A;   /* primary dark / headings / footer */
  --amber:       #F59E0B;   /* accent / featured */
  --green:       #16A34A;   /* success / available */
  --orange:      #F97316;   /* warning / reserved */
  --red:         #DC2626;   /* error / unavailable */

  --bg:          #F8FAF7;   /* warm off-white */
  --card:        #FFFFFF;
  --line:        #E5E7EB;
  --ink:         #111827;   /* main text */
  --muted:       #6B7280;   /* secondary text */

  /* Light tints */
  --teal-tint:   #CCFBF1;
  --amber-tint:  #FEF3C7;
  --green-tint:  #DCFCE7;
  --red-tint:    #FEE2E2;
  --grey-tint:   #F3F4F6;

  --radius:      16px;
  --radius-btn:  11px;
  --radius-input:10px;
  --shadow-sm:   0 1px 2px rgba(17,24,39,.05), 0 1px 3px rgba(17,24,39,.05);
  --shadow:      0 6px 18px -6px rgba(17,24,39,.12), 0 2px 6px -2px rgba(17,24,39,.07);
  --shadow-lg:   0 24px 48px -18px rgba(15,118,110,.28), 0 8px 20px -8px rgba(17,24,39,.14);
  --container:   1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.section { padding: 64px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font); font-size: 1rem; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: var(--radius-btn); border: 1.5px solid transparent;
  cursor: pointer; transition: all .15s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-tint); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--grey-tint); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-available { background: var(--green-tint); color: #166534; }
.badge-featured  { background: var(--amber-tint); color: #92400e; }
.badge-reserved  { background: #ffedd5; color: #9a3412; }
.badge-unavailable { background: var(--grey-tint); color: var(--muted); }
.badge-verified  { background: var(--teal-tint); color: var(--teal-dark); }
.badge-neutral   { background: var(--grey-tint); color: var(--ink); }
.badge-price     { background: var(--teal-dark); color: #fff; font-size: .95rem; padding: 6px 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,250,247,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; }
.brand span b { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; padding: 8px 13px; border-radius: 9px; }
.nav-links a:hover { background: var(--grey-tint); text-decoration: none; }
.header-tools { display: flex; align-items: center; gap: 10px; }

/* Language switcher */
.lang-switch { display: flex; gap: 2px; background: var(--grey-tint); padding: 3px; border-radius: 999px; }
.lang-switch button {
  border: 0; background: transparent; font-family: var(--font); font-weight: 600; font-size: .8rem;
  color: var(--muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; text-transform: uppercase;
}
.lang-switch button.active { background: #fff; color: var(--teal-dark); box-shadow: var(--shadow-sm); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 44px; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 52ch; margin-bottom: 26px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 17px; height: 17px; color: var(--green); }

/* Search bar (hero) */
.searchbar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-top: 30px;
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .8rem; font-weight: 600; color: var(--ink); }
.field input, .field select {
  font-family: var(--font); font-size: .95rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-input); padding: 11px 12px; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }

/* ---------- Quick category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 9px 16px; font-size: .9rem; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); text-decoration: none; background: var(--teal-tint); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip svg { width: 16px; height: 16px; }

/* ---------- Grid + Room cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.room-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.room-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--grey-tint); }
.room-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.room-card:hover .room-media img { transform: scale(1.04); }
.room-media .badge-price { position: absolute; left: 12px; bottom: 12px; box-shadow: var(--shadow); }
.room-media .card-flags { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.room-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.room-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.room-loc { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .88rem; }
.room-loc svg { width: 15px; height: 15px; }
.room-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.fact-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--ink); background: var(--grey-tint); border-radius: 8px; padding: 4px 9px; }
.fact-pill svg { width: 14px; height: 14px; color: var(--teal); }
.room-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-updated { font-size: .76rem; color: var(--muted); }

/* ---------- Feature / why cards ---------- */
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.feature-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--teal-tint); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-ico svg { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { margin: 0; font-size: .93rem; }

.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: 8px; }

/* ---------- Listings page layout ---------- */
.listings-wrap { display: grid; grid-template-columns: 288px 1fr; gap: 30px; align-items: start; }
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: sticky; top: 88px; box-shadow: var(--shadow-sm);
}
.filters h3 { font-size: 1rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.filter-group { padding: 14px 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group > label { font-size: .85rem; font-weight: 700; display: block; margin-bottom: 9px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--ink); padding: 4px 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--teal); }
.range-row { display: flex; gap: 8px; align-items: center; }
.range-row input { width: 100%; }
.listings-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.results-count { font-weight: 700; color: var(--ink); }
.listings-toolbar .spacer { margin-left: auto; }
.sort-select { border: 1.5px solid var(--line); border-radius: var(--radius-input); padding: 9px 12px; font-family: var(--font); font-size: .9rem; background: #fff; color: var(--ink); }
.filters-btn-mobile { display: none; }
.empty-state { text-align: center; padding: 70px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state svg { width: 48px; height: 48px; color: var(--muted); margin-bottom: 12px; }

/* ---------- Room detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 34px; align-items: start; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.gallery .g-main { grid-row: 1 / 3; grid-column: 1; aspect-ratio: auto; }
.detail-header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin: 24px 0 6px; }
.detail-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; flex: 1; min-width: 260px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.facts-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts-table td { padding: 13px 16px; border-top: 1px solid var(--line); font-size: .94rem; }
.facts-table tr:first-child td { border-top: 0; }
.facts-table td:first-child { color: var(--muted); width: 45%; }
.facts-table td:last-child { font-weight: 600; color: var(--ink); }
.detail-section { margin-top: 34px; }
.detail-section h2 { font-size: 1.4rem; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: center; gap: 9px; font-size: .95rem; }
.feature-list svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

/* Sticky contact card */
.contact-card { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.owner-row { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.owner-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; }
.price-big { font-size: 1.9rem; font-weight: 800; color: var(--teal-dark); letter-spacing: -.02em; }
.price-big small { font-size: .95rem; font-weight: 500; color: var(--muted); }

/* Map placeholder */
.map-box { aspect-ratio: 16/8; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg,#e8f3f1,#d5ece8); position: relative; display: flex; align-items: center; justify-content: center; }
.map-box .pin { color: var(--teal); }
.map-box .pin svg { width: 42px; height: 42px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.map-note { position: absolute; bottom: 12px; left: 12px; background: rgba(255,255,255,.92); border-radius: 8px; padding: 6px 11px; font-size: .82rem; color: var(--ink); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .85rem; font-weight: 600; }
.form-field .req { color: var(--red); }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font); font-size: .95rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-input); padding: 11px 12px; width: 100%;
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.form-success { display: none; background: var(--green-tint); border: 1px solid #86efac; color: #166534; border-radius: var(--radius); padding: 16px 18px; margin-top: 6px; font-size: .95rem; }
.form-note { font-size: .8rem; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; margin-top: 4px; }
.form-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; font-family: var(--font); font-size: 1.02rem; font-weight: 600; color: var(--ink); padding: 17px 20px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.faq-q svg { width: 20px; height: 20px; color: var(--teal); transition: transform .2s; flex: none; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 20px 18px; margin: 0; }
.faq-item.open .faq-a { max-height: 400px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: #fff; border-radius: var(--radius); padding: 52px 40px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 48ch; margin: 0 auto 24px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); padding: 18px 0 4px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: rgba(255,255,255,.8); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding: 52px 0 30px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.8); font-size: .9rem; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand .logo { width: 32px; height: 32px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .82rem; color: rgba(255,255,255,.6); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { display: none; }

/* ---------- Similar rooms scroll ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.carousel .room-card { scroll-snap-align: start; }

/* ---------- Fallback / translation note ---------- */
.trans-note { background: var(--amber-tint); color: #92400e; border-radius: 10px; padding: 10px 14px; font-size: .85rem; display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.trans-note svg { width: 17px; height: 17px; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .searchbar { grid-template-columns: 1fr 1fr; }
  .listings-wrap { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 100; border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; top: 0; }
  .filters.open { transform: translateX(0); }
  .filters-btn-mobile { display: inline-flex; }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 120px; }
  .gallery .g-main { grid-column: 1 / 3; grid-row: 1; }
  .gallery img:nth-child(n+4) { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 12px; gap: 2px; box-shadow: var(--shadow); }
  .nav-links.open a { padding: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
  .nav-toggle svg { width: 22px; height: 22px; }
  .searchbar { grid-template-columns: 1fr; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .cta-band { padding: 40px 22px; }
  .sticky-cta {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; gap: 12px;
    background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px -6px rgba(17,24,39,.18); align-items: center;
  }
  .sticky-cta .price-mini { font-weight: 800; color: var(--teal-dark); font-size: 1.05rem; }
  .sticky-cta .btn { margin-left: auto; }
  body.has-sticky { padding-bottom: 78px; }
}
