/* =====================================================================
   Design tokens — plum + magenta "spa" palette
   ===================================================================== */
:root {
  --ink:         #2B1B2E;
  --ink-soft:    #6E5A72;
  --primary:     #E0158C;   /* magenta/pink — nav bar, links, CTAs */
  --primary-dark:#B8106F;
  --primary-tint:#FBE1F0;
  --forest:      #6B2C91;   /* secondary deep purple */
  --forest-dark: #2E1035;   /* darkest plum — topbar, footer */
  --sun:         #F2B705;   /* gold accent on dark backgrounds */
  --green:       #3E8E41;   /* search / confirm actions */
  --green-dark:  #2E6B31;
  --cream:       #FFF6FB;
  --cream-alt:   #FBE9F3;
  --white:       #FFFFFF;
  --border:      #F3D6E9;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:    14px;
  --radius-sm: 8px;
  --max-width: 1180px;
  --shadow:    0 12px 30px rgba(46,16,53,0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-dark);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; max-width: 68ch; color: var(--ink-soft); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Buttons & form fields
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  border: 1px solid var(--primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(181,80,42,0.28); }
.btn--outline { background: transparent; color: var(--forest-dark); border-color: var(--border); }
.btn--outline:hover { background: var(--forest-dark); color: var(--white); border-color: var(--forest-dark); box-shadow: none; }
.btn--small { padding: 0.5em 1.1em; font-size: 0.85rem; }
.btn--full { width: 100%; justify-content: center; text-align: center; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--ink-soft); }
.btn--ghost:hover { background: #F8E2DF; border-color: #b3413a; color: #8a2c22; box-shadow: none; }

.field { margin-bottom: 1.15em; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4em; font-size: 0.92rem; color: var(--forest-dark); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--primary); }
.field-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.35em; }
.field-error { border-color: #b3413a !important; }
.field-error-text { color: #b3413a; font-size: 0.85rem; margin-top: 0.3em; }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 520px;
  margin: 48px auto;
  box-shadow: var(--shadow);
}
.form-card--wide { max-width: 780px; }

/* =====================================================================
   Header — dark plum topbar + magenta icon nav bar
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ---- Topbar: logo + login/avatar + hamburger ---- */
.topbar { background: var(--forest-dark); }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.brand:hover { color: var(--sun); }
.brand__mark {
  width: 38px; height: 38px;
  background: var(--sun);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--forest-dark);
  flex: none;
}
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.01em; }
.brand--footer { color: var(--white); margin-bottom: 12px; }
.brand--footer .brand__mark { background: var(--sun); color: var(--forest-dark); }

.topbar__account { display: flex; align-items: center; gap: 14px; }
.account-chip { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 600; font-size: 0.92rem; }
.account-chip:hover { color: var(--sun); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex: none;
  overflow: hidden;
}
.avatar--icon { background: rgba(255,255,255,0.15); padding: 6px; }
.avatar--icon svg { width: 100%; height: 100%; }
.topbar__logout { display: none; color: rgba(255,255,255,0.75); font-size: 0.85rem; }

.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; flex: none; }
.nav-toggle span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; }

/* ---- Main nav: collapses to a dropdown panel on mobile, magenta bar on desktop ---- */
.site-nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--white);
  flex-direction: column;
  padding: 10px 20px 20px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 40;
}
.site-nav.is-open { display: flex; }
.site-nav__link,
.site-nav a { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 500; }
.site-nav__link svg, .site-nav a svg { width: 17px; height: 17px; flex: none; color: var(--primary); }
.site-nav a:hover, .site-nav__link:hover { color: var(--primary); }
.site-nav .btn { margin-top: 12px; text-align: center; justify-content: center; }
.site-nav__cities { position: relative; }
.site-nav__cities > span { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 500; }
.site-nav__cities-menu { padding-left: 14px; display: flex; flex-direction: column; }
.site-nav__cities-menu a { border-bottom: none; padding: 8px 0; color: var(--ink-soft); font-size: 0.92rem; }

@media (min-width: 900px) {
  .topbar__logout { display: inline; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--primary);
    border: none;
    box-shadow: none;
    padding: 12px 20px;
    gap: 26px;
    max-width: var(--max-width);
    margin: 0 auto;
  }
  .site-nav__link, .site-nav a { padding: 0; border: none; color: var(--white); font-size: 0.94rem; }
  .site-nav__link svg, .site-nav a svg { color: var(--white); }
  .site-nav a:hover, .site-nav__link:hover { color: var(--sun); }
  .site-nav .btn { margin-top: 0; }
  .site-nav__link--mobile-only { display: none; }
  .site-nav__cities { position: relative; }
  .site-nav__cities > span { padding: 0; border: none; cursor: default; color: var(--white); font-weight: 500; }
  .site-nav__cities-menu {
    display: none;
    position: absolute;
    top: 30px; left: -14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 0;
    min-width: 200px;
    box-shadow: var(--shadow);
  }
  .site-nav__cities:hover .site-nav__cities-menu,
  .site-nav__cities:focus-within .site-nav__cities-menu { display: block; }
  .site-nav__cities-menu a { color: var(--ink); padding: 8px 18px; display: block; }
  .site-nav__cities-menu a:hover { background: var(--cream-alt); color: var(--primary); }
}

/* =====================================================================
   Flash messages
   ===================================================================== */
.flash-stack { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 13px 18px; border-radius: var(--radius-sm); font-size: 0.92rem; border-left: 4px solid; }
.flash--success { background: #EAF3E7; border-color: var(--forest); color: #2f4a2c; }
.flash--error { background: #F8E8E6; border-color: #b3413a; color: #6e2921; }

/* =====================================================================
   Hero — gradient banner with floating search card
   ===================================================================== */
.hero {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 55%, var(--primary) 130%);
  color: var(--cream);
  padding: 56px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -8%; top: -30%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(242,183,5,0.22) 0%, rgba(242,183,5,0) 70%);
}
.hero::after {
  content: "";
  position: absolute;
  left: -10%; bottom: -40%;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(224,21,140,0.3) 0%, rgba(224,21,140,0) 70%);
}
.hero .wrap { position: relative; }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero__eyebrow-word { color: var(--sun); font-family: var(--font-display); font-style: italic; }
.hero p.hero__lede { color: rgba(252,246,236,0.85); font-size: 1.1rem; max-width: 56ch; }

/* ---- Search card: "Select a Location" / "Select Your Area" + Search ---- */
.city-search {
  margin-top: 28px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 620px;
  box-shadow: 0 20px 40px rgba(46,16,53,0.35);
}
.select-field {
  position: relative;
  flex: 1 1 220px;
  display: block;
}
.select-field__icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--primary-dark);
  pointer-events: none;
}
.select-field select {
  width: 100%;
  padding: 0.85em 1em 0.85em 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
.select-field select:disabled { color: var(--ink-soft); background: var(--cream-alt); }
.select-field::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.btn--search {
  flex: 0 0 auto;
  background: var(--green);
  border-color: var(--green);
  padding: 0.85em 2.2em;
  font-weight: 700;
  font-size: 1rem;
}
.btn--search:hover { background: var(--green-dark); border-color: var(--green-dark); box-shadow: 0 8px 18px rgba(46,107,49,0.35); }
@media (max-width: 480px) {
  .select-field, .btn--search { flex: 1 1 100%; }
  .btn--search { justify-content: center; }
}

/* =====================================================================
   Sections + tile grids (home page)
   ===================================================================== */
.section { padding: 60px 0; }
.section--muted { background: var(--cream-alt); }
.section__head { margin-bottom: 32px; max-width: 62ch; }

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.city-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.city-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.city-tile__badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.city-tile__name { font-family: var(--font-display); font-size: 1.2rem; color: var(--forest-dark); font-weight: 600; }
.city-tile__state { color: var(--ink-soft); font-size: 0.88rem; }

/* =====================================================================
   Listing cards — grid of vertical cards with photo on top
   ===================================================================== */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.listing-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-alt);
}
.listing-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.listing-card__name { margin-bottom: 3px; }
.listing-card__name a { color: var(--forest-dark); }
.listing-card__meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.listing-card__tagline { font-size: 0.94rem; margin-bottom: 10px; flex: 1; }
.listing-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.78rem;
  padding: 4px 11px;
  background: var(--cream-alt);
  border-radius: 999px;
  color: var(--forest-dark);
  transition: background 0.15s ease, color 0.15s ease;
}
a.tag:hover { background: var(--forest); color: var(--white); }
.tag--active, a.tag--active, a.tag--active:hover { background: var(--primary); color: var(--white); }
.listing-card__actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--white);
}

/* =====================================================================
   City intro + "show more / show less" truncation
   ===================================================================== */
.city-intro { max-width: 74ch; }
.truncate-text__body { max-width: 74ch; color: var(--ink-soft); white-space: pre-line; }
.truncate-text__toggle {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  font-size: 0.92rem;
  font-family: var(--font-body);
}
.truncate-text__toggle:hover { color: var(--primary); text-decoration: underline; }

.phone-banner {
  background: var(--forest-dark);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 20px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 34px;
}
.phone-banner .text-muted { color: rgba(252,246,236,0.7); }
.phone-banner strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--white); }

/* =====================================================================
   FAQ accordion
   ===================================================================== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
}
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--forest-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item__icon { position: relative; width: 16px; height: 16px; flex: none; }
.faq-item__icon::before, .faq-item__icon::after {
  content: ""; position: absolute; background: var(--primary);
  border-radius: 2px; transition: transform 0.2s ease;
}
.faq-item__icon::before { width: 16px; height: 2px; top: 7px; left: 0; }
.faq-item__icon::after { width: 2px; height: 16px; top: 0; left: 7px; }
.faq-item.is-open .faq-item__icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item__a { max-height: 0; overflow: hidden; padding: 0 20px; transition: max-height 0.25s ease, padding 0.25s ease; }
.faq-item.is-open .faq-item__a { max-height: 400px; padding: 0 20px 18px; }
.faq-item__a p { margin: 0; color: var(--ink-soft); }

/* =====================================================================
   Photo gallery (profile detail page)
   ===================================================================== */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery__main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cream-alt);
}
.gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery__thumb {
  width: 62px; height: 62px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: none;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--primary); }

/* Photo manager grid used on the provider dashboard + admin edit page */
.gallery-manage { margin-top: 26px; }
.gallery-manage__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 12px; }
.gallery-manage__item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.gallery-manage__item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-manage__cover-tag {
  position: absolute; top: 6px; left: 6px;
  background: var(--primary); color: var(--white);
  font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.gallery-manage__item form { position: absolute; top: 6px; right: 6px; margin: 0; }
.gallery-manage__remove {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(36,28,21,0.75); color: var(--white);
  border: none; cursor: pointer; line-height: 1; font-size: 1rem;
}
.gallery-manage__remove:hover { background: #b3413a; }

/* =====================================================================
   Profile detail page
   ===================================================================== */
.profile-header { display: grid; gap: 28px; margin-bottom: 34px; }
.profile-detail-list { list-style: none; padding: 0; margin: 0; }
.profile-detail-list li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.profile-detail-list li span:first-child { min-width: 120px; color: var(--ink-soft); font-size: 0.9rem; }

@media (min-width: 720px) {
  .profile-header { grid-template-columns: 340px 1fr; }
}

/* =====================================================================
   Dashboard / admin shared shell
   ===================================================================== */
.dash-shell { display: grid; gap: 24px; padding: 44px 0; }
.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.status-pill { display: inline-block; font-size: 0.78rem; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.status-pill--pending { background: #FBF0DC; color: #8a5a00; }
.status-pill--approved { background: #E4F0E0; color: #2f6b23; }
.status-pill--rejected { background: #F8E2DF; color: #a12b1c; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.admin-table th { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-scroll { overflow-x: auto; }

.admin-shell { display: grid; grid-template-columns: 1fr; gap: 20px; }
.admin-sidebar { background: var(--forest-dark); color: var(--cream); padding: 20px; border-radius: var(--radius); }
.admin-sidebar a { display: block; color: rgba(252,246,236,0.85); padding: 10px 10px; border-radius: var(--radius-sm); }
.admin-sidebar a:hover, .admin-sidebar a.is-active { background: rgba(255,255,255,0.1); color: var(--sun); }
@media (min-width: 860px) { .admin-shell { grid-template-columns: 230px 1fr; } }

.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.text-muted { color: var(--ink-soft); font-size: 0.88rem; }
.mt-0 { margin-top: 0; }
hr.rule { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* =====================================================================
   Footer — dark, gold nav links, social badges, pink copyright
   ===================================================================== */
.site-footer {
  background: #0D0710;
  color: rgba(255,255,255,0.85);
  padding: 44px 0 28px;
  text-align: center;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
  margin-bottom: 26px;
}
.site-footer__nav a {
  color: var(--sun);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(242,183,5,0.45);
}
.site-footer__nav a:hover { color: var(--white); border-color: var(--white); }

.site-footer__tagline strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #7CF2C0;
  margin-bottom: 6px;
}
.site-footer__tagline span { color: rgba(255,255,255,0.65); font-size: 0.94rem; }

.site-footer__divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: 900px;
  margin: 26px auto 0;
}

.site-footer__social { display: flex; justify-content: center; gap: 16px; padding: 24px 20px 10px; }
.social-badge {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex: none;
}
.social-badge svg { width: 18px; height: 18px; }
.social-badge:hover { transform: translateY(-2px); }
.social-badge--twitter   { background: #1DA1F2; }
.social-badge--instagram { background: linear-gradient(45deg, #fdf497 0%, #fd5949 45%, #d6249f 65%, #285AEB 100%); }
.social-badge--facebook  { background: #1877F2; }
.social-badge--youtube   { background: #FF0000; }

.site-footer__copy { color: var(--primary); font-size: 0.85rem; margin: 12px 0 0; }
