/* SkillForage design system — extends Bootstrap 5 */

:root {
  /* Brand */
  --color-primary:        #2D6A4F;
  --color-primary-light:  #52B788;
  --color-accent:         #D4841A;
  --color-accent-warm:    #F2A83B;

  /* Neutrals */
  --color-bg:             #FAF7F2;
  --color-surface:        #F3EDE3;
  --color-border:         #D6CBBA;
  --color-text:           #1C1C1A;
  --color-text-secondary: #6B6456;
  --color-text-muted:     #A89F94;

  /* Semantic */
  --color-success:        #40916C;
  --color-warning:        #E07B39;
  --color-error:          #C0392B;
  --color-info:           #5B8DB8;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;

  /* Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 999px;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Bootstrap overrides */
  /* Bootstrap 5.3's generic focus-ring variable defaults to Bootstrap
     blue (rgba(13,110,253,.25)) and isn't tied to --bs-primary -- left
     alone, it leaks through on any control (secondary buttons, form
     checks, etc.) that doesn't set its own component-scoped focus
     shadow, which is what was causing the blue hover/focus glow. */
  --bs-focus-ring-color:   rgba(45, 106, 79, 0.25);
  --bs-primary:            #2D6A4F;
  --bs-primary-rgb:        45, 106, 79;
  /* Bootstrap's default a/a:hover color is plain blue and nothing above
     touches it -- any link (including a .text-muted one, e.g. "←
     Previous" links throughout the class wizard) falls back to it on
     hover, since a:hover's specificity beats a single class selector
     like .text-muted. */
  --bs-link-color:         #2D6A4F;
  --bs-link-color-rgb:     45, 106, 79;
  --bs-link-hover-color:   #52B788;
  --bs-link-hover-color-rgb: 82, 183, 136;
  --bs-success:            #40916C;
  --bs-success-rgb:        64, 145, 108;
  --bs-warning:            #E07B39;
  --bs-warning-rgb:        224, 123, 57;
  --bs-danger:             #C0392B;
  --bs-danger-rgb:         192, 57, 43;
  --bs-info:               #5B8DB8;
  --bs-info-rgb:           91, 141, 184;
  --bs-body-bg:            #FAF7F2;
  --bs-body-color:         #1C1C1A;
  --bs-body-font-family:   'Inter', system-ui, -apple-system, sans-serif;
  --bs-border-color:       #D6CBBA;
  --bs-border-radius:      12px;
  --bs-border-radius-sm:   6px;
  --bs-border-radius-lg:   20px;
  --bs-card-bg:            #F3EDE3;
  --bs-card-border-color:  #D6CBBA;
}

/* ---- Base ---- */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--color-text);
}

/* ---- Navbar ---- */
.sf-beta-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 130px;
  height: 130px;
  overflow: hidden;
  display: block;
}

.sf-beta-ribbon span {
  position: absolute;
  top: 30px;
  left: -40px;
  width: 175px;
  transform: rotate(-45deg);
  background-color: var(--color-accent);
  color: #fff;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: background-color 0.15s ease;
}

.sf-beta-ribbon:hover span {
  background-color: var(--color-accent-warm);
}

/* Smaller and tucked tighter into the corner on mobile — at the
   desktop size it eats too much of a small screen's top-left, and can
   sit close enough to real content to be mistaken for part of it. */
@media (max-width: 576px) {
  .sf-beta-ribbon {
    width: 88px;
    height: 88px;
  }

  .sf-beta-ribbon span {
    top: 21px;
    left: -27px;
    width: 118px;
    font-size: 0.5rem;
    letter-spacing: 0.03em;
    padding: 2px 0;
  }
}

.sf-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background-color: var(--color-text);
  color: #fff;
  padding: 16px 20px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}

.sf-cookie-banner p {
  color: #fff;
  font-size: 0.85rem;
}

.sf-cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

.sf-cookie-banner__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Bootstrap's .table defaults to a plain white background — stands out
   against the page's off-white everywhere it isn't already inside a
   card with its own background set. */
.sf-classes-table,
.sf-classes-table > :not(caption) > * > * {
  background-color: var(--color-bg);
}

.sf-nav {
  background-color: var(--color-primary);
  padding: 12px 0;
  box-shadow: 0 1px 4px rgba(28,28,26,0.12);
}

.sf-nav .navbar-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sf-nav .nav-link {
  color: rgba(255,255,255,0.88);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.sf-nav .nav-link:hover {
  color: #fff;
  background-color: rgba(255,255,255,0.12);
}

.sf-nav .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}

.sf-nav .navbar-toggler-icon {
  filter: invert(1);
}

.sf-nav-toggler-icon {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.sf-nav-toggler-icon--open {
  display: none;
}

.sf-nav-toggler[aria-expanded="true"] .sf-nav-toggler-icon--closed {
  display: none;
}

.sf-nav-toggler[aria-expanded="true"] .sf-nav-toggler-icon--open {
  display: inline-block;
}

.sf-nav-cta {
  background-color: var(--color-accent) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  padding: 6px 18px !important;
  font-weight: 600 !important;
}

.sf-nav-cta:hover {
  background-color: var(--color-accent-warm) !important;
}

/* Mobile hamburger menu (navbar-expand-md collapses below 768px) — both
   nav-link lists stack vertically here, but Bootstrap's own me-auto/
   ms-auto (a row-layout left/right push) and the default block-level
   <li> alignment both leave every item pinned to the left edge instead
   of centered under the toggler. */
@media (max-width: 767.98px) {
  .sf-nav .navbar-collapse {
    text-align: center;
  }
  .sf-nav .navbar-nav {
    align-items: center;
  }
  .sf-nav .navbar-nav.me-auto,
  .sf-nav .navbar-nav.ms-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Taken out of the flex row and pinned instead — otherwise, once the
     expanded menu makes the row tall, flexbox's vertical centering drags
     the toggler button down away from its closed-state position instead
     of leaving it as a stable, obvious "tap here to collapse" target. */
  .sf-nav .container {
    position: relative;
  }
  .sf-nav .navbar-toggler {
    position: absolute;
    top: 50%;
    right: var(--bs-gutter-x, 0.75rem);
    transform: translateY(-50%);
    z-index: 1050;
  }
}

/* ---- Buttons ---- */
.btn-primary,
.sf-btn-primary {
  /* Bootstrap's own CSS-variable theming hooks (5.2+) — overriding
     these instead of fighting .btn-primary:active/:focus's specificity
     directly is what actually replaces Bootstrap's default blue
     press/focus flash (--bs-btn-focus-shadow-rgb, --bs-btn-active-bg)
     with the app's green everywhere a .btn-primary/.sf-btn-primary
     renders, without needing !important. */
  --bs-btn-hover-bg: var(--color-primary-light);
  --bs-btn-hover-border-color: var(--color-primary-light);
  --bs-btn-focus-shadow-rgb: 45, 106, 79;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-primary-light);
  --bs-btn-active-border-color: var(--color-primary-light);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 8px 22px;
  font-weight: 600;
  font-size: var(--text-sm);
}

.btn-primary:hover,
.sf-btn-primary:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
  color: #fff;
}

.sf-btn-google {
  background-color: #74C69D;
  border-color: #74C69D;
  color: #fff;
}
.sf-btn-google:hover,
.sf-btn-google:active {
  background-color: #40916C;
  border-color: #40916C;
  color: #fff;
}

.sf-btn-facebook {
  background-color: #1877F2;
  border-color: #1877F2;
  color: #fff;
}
.sf-btn-facebook:hover,
.sf-btn-facebook:active {
  background-color: #1464cc;
  border-color: #1464cc;
  color: #fff;
}

.btn-outline-primary {
  /* Bootstrap bakes --bs-btn-focus-shadow-rgb as a literal blue rgb
     tuple per variant at build time -- it doesn't follow --bs-primary
     automatically, same reason .btn-primary above needs its own
     override. Without this, focus/active on an outline button still
     shows Bootstrap's stock blue ring. */
  --bs-btn-focus-shadow-rgb: 45, 106, 79;
  /* Same story for the active/pressed (:active, on-click) state --
     Bootstrap bakes these as literal blue values per variant too. */
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-primary-light);
  --bs-btn-active-border-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  font-weight: 600;
  font-size: var(--text-sm);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Bootstrap's stock --bs-btn-focus-shadow-rgb for these variants is a
   blue-leaning gray -- pin it to a brand-neutral tone so hover/focus
   doesn't read as blue. Pressed/:active state uses light green, same
   as every other button, for one consistent press color site-wide. */
.btn-secondary,
.btn-outline-secondary {
  --bs-btn-focus-shadow-rgb: 107, 100, 86;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-primary-light);
  --bs-btn-active-border-color: var(--color-primary-light);
}

/* ---- Form checks (checkboxes/radios, incl. .btn-check pills) ---- */
/* Same story as .btn-primary/.btn-outline-primary above: Bootstrap
   bakes a literal blue into .form-check-input:checked's background/
   border (not a CSS variable), so a checked checkbox or radio -- e.g.
   the "Days of the week" checkboxes on the class scheduling step --
   renders Bootstrap's stock blue instead of the brand green unless
   overridden directly here. */
.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.form-check-input:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 .25rem rgba(45, 106, 79, 0.25);
}

/* ---- Cards ---- */
.card {
  background-color: var(--color-surface);
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 4px rgba(28,28,26,0.05);
}

/* ---- Business calendar ---- */
.sf-calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  font-size: 0.8rem;
}

.sf-calendar-day--muted {
  color: var(--color-text-muted);
}

.sf-calendar-day--today .sf-calendar-day-num {
  color: var(--color-primary);
  font-weight: 700;
}

.sf-calendar-day--has-events {
  cursor: pointer;
  background-color: var(--color-surface);
  border-color: var(--color-border);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sf-calendar-day--has-events:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

.sf-calendar-day--has-events:hover .sf-calendar-day-num,
.sf-calendar-day--has-events:hover .sf-calendar-day-count {
  color: #fff;
}

.sf-calendar-day-num {
  font-weight: 600;
}

.sf-calendar-day-count {
  font-size: 0.65rem;
  color: var(--color-primary);
}

/* ---- Class cards ---- */
.sf-class-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  display: block;
  color: inherit;
  /* Hard backstop: a narrow mobile column (row-cols-2) can be tighter
     than a title/business name/date+skill-chip row's natural width —
     without this, that content overflows the card's own box and visibly
     spills across the card next to it instead of wrapping or clipping
     inside its own boundary. */
  overflow: hidden;
}

.sf-class-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(28,28,26,0.1);
  color: inherit;
}

.sf-class-card .card-img-top {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  height: 180px;
  object-fit: cover;
  background-color: var(--color-border);
}

.sf-class-card__placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 2.5rem;
}

/* ---- Price ---- */
.sf-price {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-xl);
}

/* ---- Stars ---- */
.sf-stars {
  color: var(--color-accent-warm);
  font-size: var(--text-sm);
}

/* ---- Share icon buttons (class/business detail pages) ---- */
.sf-share-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
}

/* ---- Badges ---- */
.sf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

.sf-badge-verified {
  color: var(--color-success);
  background-color: rgba(64, 145, 108, 0.12);
}

.sf-badge-facebook {
  background-color: #1877F2;
  color: #fff;
}

.sf-badge-pending {
  color: var(--color-text-muted);
  background-color: rgba(168,159,148,0.15);
}

.sf-badge-failed {
  color: var(--color-error);
  background-color: rgba(192, 57, 43, 0.1);
}

.sf-badge-flagged {
  color: var(--color-warning);
  background-color: rgba(224, 123, 57, 0.12);
}

/* ---- Forms ---- */
.form-control,
.form-select {
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #fff;
  color: var(--color-text);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
  background-color: #fff;
}

fieldset legend {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

/* ---- Alerts ---- */
.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error,
.alert-danger {
  color: var(--color-error);
  background-color: rgba(192, 57, 43, 0.07);
  border-color: var(--color-error);
}

.alert-success {
  color: var(--color-success);
  background-color: rgba(64, 145, 108, 0.08);
  border-color: var(--color-success);
}

.alert-info {
  color: var(--color-info);
  background-color: rgba(91, 141, 184, 0.08);
  border-color: var(--color-info);
}

.alert-warning {
  color: var(--color-warning);
  background-color: rgba(224, 123, 57, 0.08);
  border-color: var(--color-warning);
}

/* ---- Status banner ---- */
.sf-status-banner {
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sf-status-banner--warning {
  background-color: rgba(224, 123, 57, 0.1);
  border: 1px solid rgba(224, 123, 57, 0.3);
  color: var(--color-warning);
}

.sf-status-banner--info {
  background-color: rgba(91, 141, 184, 0.1);
  border: 1px solid rgba(91, 141, 184, 0.3);
  color: var(--color-info);
}

.sf-status-banner--success {
  background-color: rgba(64, 145, 108, 0.1);
  border: 1px solid rgba(64, 145, 108, 0.3);
  color: var(--color-success);
}

/* ---- Section title ---- */
.sf-section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

/* ---- Hero ---- */
.sf-hero {
  background: linear-gradient(160deg, var(--color-primary) 0%, #1B4332 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.sf-hero h1 {
  color: #fff;
  font-size: var(--text-5xl);
  line-height: 1.1;
}

.sf-hero p {
  color: rgba(255,255,255,0.8);
  font-size: var(--text-lg);
}

/* ---- Dividers ---- */
hr {
  border-color: var(--color-border);
  opacity: 1;
}

/* ---- Skill level chips ---- */
.sf-skill-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background-color: rgba(45, 106, 79, 0.1);
  color: var(--color-primary);
}

/* ---- Session list ---- */
.sf-session-row {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Pagination ---- */
.page-link {
  color: var(--color-primary);
  border-color: var(--color-border);
}

.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ---- Sticky top offset for card sidebar ---- */
@media (min-width: 992px) {
  .sticky-top {
    top: 88px;
  }
}

/* ---- Hover utility ---- */
.hover-bg:hover {
  background-color: var(--color-surface);
}

/* ---- Table ---- */
.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(45,106,79,0.04);
}

/* ---- Allauth overrides: make login/signup forms look branded ---- */
.allauth .card,
.allauth form {
  max-width: 420px;
  margin: 0 auto;
}

/* ---- Rating stars: inline radio ---- */
.form-check.form-check-inline label {
  cursor: pointer;
}

/* ---- Rating stars: clickable SVG picker ---- */
.sf-star-rating-stars {
  display: flex;
  gap: 4px;
}
.sf-star-btn {
  background: none;
  border: none;
  padding: 2px;
  margin: 0;
  line-height: 0;
  cursor: pointer;
  color: var(--color-border, #dcdcdc);
  transition: color 0.1s ease, transform 0.1s ease;
}
.sf-star-btn:hover,
.sf-star-btn:focus-visible {
  transform: scale(1.08);
}
.sf-star-svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1;
  display: block;
}
.sf-star-btn.is-filled,
.sf-star-btn.is-preview {
  color: var(--color-accent-warm);
}

/* ---- Hero search bar ---- */
.sf-hero .form-control {
  background-color: rgba(255,255,255,0.95);
  border: none;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  padding-left: 20px;
  font-size: var(--text-base);
}

.sf-hero .form-control:focus {
  box-shadow: none;
  background-color: #fff;
}

.sf-hero .input-group .btn {
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sf-hero .btn-outline-light {
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 10px 22px;
}

/* ---- Booking session row ---- */
.sf-session-row + .sf-session-row {
  margin-top: var(--space-sm);
}

/* ---- Session calendar ---- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-header {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  user-select: none;
  color: var(--color-text);
}
.cal-day-past {
  color: var(--color-text-muted);
}
.cal-day-session {
  background: var(--color-primary-light);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.cal-day-session:hover {
  background: var(--color-primary);
}
.cal-day-selected {
  background: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}
.cal-day-full {
  color: var(--color-text-muted);
  text-decoration: line-through;
}
.cal-day-today {
  font-weight: 700;
}
.cal-day-today:not(.cal-day-session):not(.cal-day-full) {
  outline: 2px solid var(--color-primary-light);
  outline-offset: -2px;
}

.border-dashed { border-style: dashed !important; }

/* ============================================================
   Home — Hero (carousel bg + floating card)
   ============================================================ */
.sf-hero-wrap {
  position: relative;
  min-height: clamp(620px, 85vh, 980px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Carousel pinned to fill the entire hero */
.sf-hero-bg-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sf-hero-bg-carousel .carousel-inner,
.sf-hero-bg-carousel .carousel-item {
  height: 100%;
}

.sf-hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}

/* Top-to-bottom gradient to darken behind headline + search */
.sf-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(5, 18, 12, 0.55) 0%,
    rgba(5, 18, 12, 0.25) 45%,
    rgba(5, 18, 12, 0.15) 70%,
    rgba(5, 18, 12, 0.4) 100%
  );
  pointer-events: none;
}

/* Foreground: pinned to bottom, full width */
.sf-hero-foreground {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 0 2.5rem;
  text-align: center;
}

/* No card — just the stacked content */
.sf-hero-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sf-hero-headline {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  white-space: nowrap;
}

.sf-hero-sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

.sf-hero-search { margin-bottom: 0.75rem; }

.sf-hero-search-inner {
  display: flex;
  background: #fff;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

.sf-hero-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  background: transparent;
  color: var(--color-text);
}

.sf-hero-input::placeholder { color: #9b9287; }

.sf-hero-btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.sf-hero-btn:hover { background: var(--color-accent-warm); }

.sf-hero-near {
  display: inline-block;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-right: 0.4rem;
  backdrop-filter: blur(4px);
}

.sf-hero-near:hover {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

.sf-hero-inspire {
  display: inline-block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  margin: 0;
}

.sf-hero-inspire-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.sf-hero-inspire-link:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

/* Slide category label */
.sf-hero-slide-label {
  position: absolute;
  bottom: 2rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
}

/* Carousel controls above overlay */
.sf-hero-bg-carousel .carousel-control-prev,
.sf-hero-bg-carousel .carousel-control-next { z-index: 4; }

.sf-hero-bg-carousel .carousel-indicators {
  z-index: 4;
  margin-bottom: 0.75rem;
}

.sf-hero-bg-carousel .carousel-indicators [data-bs-slide-to] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  border: none;
}

.sf-hero-bg-carousel .carousel-indicators .active {
  background-color: #fff;
}

/* Home empty state */
.sf-home-empty {
  text-align: center;
  padding: 4rem 0;
}

.sf-home-empty-msg {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

/* Responsive */
@media (max-width: 767px) {
  .sf-hero-wrap {
    /* Aspect-ratio driven on mobile too: 4:3 gives more vertical height on narrow screens */
    min-height: clamp(380px, 90vw, 520px);
  }
  .sf-hero-foreground {
    padding: 0 0 1.5rem;
    text-align: left;
  }
  .sf-hero-inner { max-width: 100%; padding: 0 0.75rem; }
  /* Stronger bottom gradient on mobile so search stays readable */
  .sf-hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(5,18,12,0.25) 0%,
      rgba(5,18,12,0.1) 35%,
      rgba(5,18,12,0.45) 65%,
      rgba(5,18,12,0.72) 100%
    );
  }
  .sf-hero-headline { font-size: 1.6rem; margin-bottom: 0.35rem; white-space: normal; }
  .sf-hero-sub { display: none; } /* hide subtitle on mobile — keeps hero image dominant */
  .sf-hero-input { padding: 0.7rem 1rem; font-size: 0.9rem; }
  .sf-hero-btn { padding: 0.7rem 1rem; font-size: 0.85rem; }
  .sf-hero-near { font-size: 0.78rem; padding: 0.25rem 0.7rem; }
  .sf-hero-inspire { display: none; }
  .sf-hero-slide-label { bottom: auto; top: 1rem; right: 1rem; font-size: 0.75rem; }
}

@media (max-width: 400px) {
  .sf-hero-btn { padding: 0.7rem 0.8rem; }
}

/* -------------------------------------------------------------------------
   Dual-handle price range slider
------------------------------------------------------------------------- */
.sf-range-wrap {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.sf-range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  pointer-events: none;
}

.sf-range-fill {
  position: absolute;
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
}

.sf-range-input {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
}

.sf-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: pointer;
  pointer-events: all;
}

.sf-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: pointer;
  pointer-events: all;
}

/* ============================================================
   Home + About restructure additions — append to project.css
   ============================================================ */

/* ---- Category cards (home) — replaces inline styles/JS hover ---- */
.sf-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sf-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(28, 28, 26, 0.08);
  color: var(--color-text);
}

.sf-category-card__icon {
  font-size: 2.2rem;
  line-height: 1;
}

.sf-category-card__name {
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

/* ---- Hero trust line ---- */
.sf-hero-trust {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  margin-top: 0.6rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* ---- Step number circle (shared how-it-works partial) ---- */
.sf-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Review quotes (home, beside Highly rated) ---- */
.sf-quote {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent-warm);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.95rem;
  height: 100%;
}

.sf-quote footer {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ---- Host band (home, business-facing) ---- */
.sf-host-band {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
}

.sf-host-band__img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.sf-host-band__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.sf-host-band__lede {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-md);
}

.sf-host-band__prop-title {
  font-weight: 600;
  color: #fff;
  font-size: var(--text-sm);
}

.sf-host-band__prop-text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  margin-top: 2px;
}

.sf-host-band__btn {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  border-radius: var(--radius-full);
  padding: 10px 26px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.sf-host-band__btn:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

@media (max-width: 991px) {
  .sf-host-band__img {
    min-height: 200px;
    max-height: 240px;
  }
}

/* Site footer (base.html) — explicit left alignment for every column
   (logo/subscribe, Students, Businesses, Company, Legal), on both
   mobile (2-per-row) and desktop (5-per-row) grid layouts, rather than
   relying on Bootstrap's implicit default. */
footer .col,
footer .col ul {
  text-align: left;
}

/* ---- Email capture (home) — hidden until newsletter_enabled is passed ---- */
.sf-email-capture {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.sf-email-capture__form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
}

.sf-email-capture__input {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
  background: #fff;
}

.sf-email-capture__input:focus {
  border-color: var(--color-primary);
}

.sf-email-capture__input--zip {
  flex: 0 1 130px;
}

.sf-email-capture__btn {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.15s;
}

.sf-email-capture__btn:hover {
  background: var(--color-primary-light);
}

/* Compact footer variant — same newsletter:subscribe endpoint as
   .sf-email-capture above, stacked single-column instead of the wide
   centered row layout, to fit the footer's own logo/slogan column. */
.sf-footer-subscribe__form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 220px;
}

.sf-footer-subscribe__input {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
  background: #fff;
  width: 100%;
}

.sf-footer-subscribe__input:focus {
  border-color: var(--color-primary);
}

.sf-footer-subscribe__btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.15s;
}

.sf-footer-subscribe__btn:hover {
  background: var(--color-primary-light);
}

/* ---- Class material preview cards (day-of: ticket, verify, teacher preview) ---- */
.sf-material-preview-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sf-material-preview-card__thumb {
  display: block;
  height: 180px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.sf-material-preview-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-material-preview-card__thumb--frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.sf-material-preview-card__thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.sf-material-preview-card__body {
  padding: var(--space-md);
}

.sf-material-preview-card__type {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.sf-material-preview-card__title {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
}

.sf-remove-attendee {
  color: var(--bs-secondary-color, #6c757d);
  transition: color 0.15s ease;
}

.sf-remove-attendee:hover,
.sf-remove-attendee:focus {
  color: var(--bs-danger, #dc3545);
}
