/* ==========================================================================
   TotalBoater Design System  (theme.css)
   Loaded site-wide after bootstrap.min.css. Defines brand tokens, overrides
   Bootstrap 5.3 variables, and styles the shared navbar + footer.
   ========================================================================== */

:root {
  /* Brand palette */
  --tb-primary: #0066cc;
  --tb-primary-dark: #004f9e;
  --tb-primary-soft: #e8f1fc;
  --tb-accent: #0ea5b7;
  --tb-accent-soft: #e2f6f8;
  --tb-navy: #0b1f3a;
  --tb-navy-2: #10284a;
  --tb-ink: #0f172a;
  --tb-muted: #64748b;
  --tb-line: #e2e8f0;
  --tb-surface: #f6f8fb;
  --tb-white: #ffffff;

  /* Shape + depth */
  --tb-radius-sm: 8px;
  --tb-radius: 14px;
  --tb-radius-lg: 22px;
  --tb-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --tb-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --tb-shadow-lg: 0 24px 60px rgba(11, 31, 58, 0.18);
  --tb-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Legacy aliases used by older page CSS */
  --main-color: var(--tb-primary);
  --sub-color: hsla(138, 9%, 37%, 0.49);
  --menu-select: hsla(208, 16%, 43%, 0.49);

  /* Bootstrap 5.3 overrides */
  --bs-primary: var(--tb-primary);
  --bs-primary-rgb: 0, 102, 204;
  --bs-link-color: var(--tb-primary);
  --bs-link-color-rgb: 0, 102, 204;
  --bs-link-hover-color: var(--tb-primary-dark);
  --bs-link-hover-color-rgb: 0, 79, 158;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--tb-ink);
  --bs-body-bg: var(--tb-surface);
  --bs-border-color: var(--tb-line);
  --bs-border-radius: var(--tb-radius-sm);
  --bs-border-radius-lg: var(--tb-radius);
}

html { scroll-behavior: smooth; }

body.tb-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--tb-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.tb-body > main,
body.tb-body > .main-content { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--tb-ink);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn { font-weight: 600; border-radius: 999px; padding: 0.6rem 1.25rem; transition: transform 0.18s var(--tb-ease), box-shadow 0.18s var(--tb-ease), background-color 0.18s, border-color 0.18s, color 0.18s; }
.btn:active { transform: translateY(1px); }
.btn-primary { --bs-btn-bg: var(--tb-primary); --bs-btn-border-color: var(--tb-primary); --bs-btn-hover-bg: var(--tb-primary-dark); --bs-btn-hover-border-color: var(--tb-primary-dark); --bs-btn-active-bg: var(--tb-primary-dark); --bs-btn-active-border-color: var(--tb-primary-dark); --bs-btn-focus-shadow-rgb: 0, 102, 204; box-shadow: 0 6px 16px rgba(0, 102, 204, 0.28); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(0, 102, 204, 0.34); transform: translateY(-1px); }
.btn-outline-primary { --bs-btn-color: var(--tb-primary); --bs-btn-border-color: var(--tb-primary); --bs-btn-hover-bg: var(--tb-primary); --bs-btn-hover-border-color: var(--tb-primary); --bs-btn-active-bg: var(--tb-primary-dark); --bs-btn-active-border-color: var(--tb-primary-dark); }
.btn-success { --bs-btn-bg: #0f9d6b; --bs-btn-border-color: #0f9d6b; --bs-btn-hover-bg: #0b7f56; --bs-btn-hover-border-color: #0b7f56; --bs-btn-active-bg: #0b7f56; --bs-btn-active-border-color: #0b7f56; }
.btn-outline-success { --bs-btn-color: #0f9d6b; --bs-btn-border-color: #0f9d6b; --bs-btn-hover-bg: #0f9d6b; --bs-btn-hover-border-color: #0f9d6b; --bs-btn-active-bg: #0b7f56; --bs-btn-active-border-color: #0b7f56; }
.btn-light-glass { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32); color: #fff; backdrop-filter: blur(6px); }
.btn-light-glass:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-control, .form-select { border-radius: var(--tb-radius-sm); border-color: var(--tb-line); }
.form-control:focus, .form-select:focus { border-color: var(--tb-primary); box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.15); }
.form-floating > label { color: var(--tb-muted); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card { border: 1px solid var(--tb-line); border-radius: var(--tb-radius); }
.card.shadow, .card.shadow-sm { border: 0; }
.card.shadow { box-shadow: var(--tb-shadow) !important; }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.tb-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.25s var(--tb-ease), background-color 0.25s;
}
.tb-navbar.is-scrolled { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
/* Glass effect only on desktop: backdrop-filter would trap the fixed-position mobile offcanvas inside the bar. */
@media (min-width: 992px) {
  .tb-navbar { background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
  .tb-navbar.is-scrolled { background: rgba(255, 255, 255, 0.96); }
}
.tb-navbar .header-container { max-width: 1320px; }
.tb-navbar .navbar-brand img { display: block; height: 32px; width: auto; }

.tb-navbar .nav-link {
  position: relative;
  color: var(--tb-ink);
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  transition: color 0.18s, background-color 0.18s;
}
.tb-navbar .nav-link:hover, .tb-navbar .nav-link:focus-visible { color: var(--tb-primary); background: var(--tb-primary-soft); }
.tb-navbar .nav-link.active { color: var(--tb-primary); }
.tb-navbar .nav-link svg { vertical-align: -3px; }

.tb-navbar .nav-cta {
  background: var(--tb-primary);
  color: #fff !important;
  padding: 0.55rem 1.15rem;
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.28);
}
.tb-navbar .nav-cta:hover, .tb-navbar .nav-cta:focus-visible { background: var(--tb-primary-dark) !important; color: #fff !important; }
.tb-navbar .nav-ghost { border: 1.5px solid var(--tb-line); }
.tb-navbar .nav-ghost:hover { border-color: var(--tb-primary); }
@media (min-width: 992px) {
  /* Filled gray pill so "Sign in" reads clearly as a button */
  .tb-navbar .nav-ghost { margin-right: 0.75rem; padding: 0.55rem 1.15rem; background: #eef0f3; border-color: #cfd5dd; color: #1e293b; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 23, 42, 0.08); }
  .tb-navbar .nav-ghost:hover, .tb-navbar .nav-ghost:focus-visible { background: #e2e6eb; border-color: #b8c0cb; color: #0f172a; }
}

.tb-navbar .navbar-toggler { border: 0; padding: 0.35rem 0.5rem; }
.tb-navbar .navbar-toggler:focus { box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.2); }

/* State mega-dropdown */
.tb-navbar .dropdown-menu {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-lg);
  min-width: 420px;
}
.tb-state-menu-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.75rem 0.65rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--tb-line);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tb-muted);
}
.tb-state-menu-title a { font-size: 0.8rem; letter-spacing: 0; text-transform: none; font-weight: 600; }
.tb-state-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; list-style: none; margin: 0; padding: 0; }
.tb-state-grid .dropdown-item { border-radius: var(--tb-radius-sm); padding: 0.5rem 0.75rem; font-size: 0.9rem; font-weight: 500; color: var(--tb-ink); }
.tb-state-grid .dropdown-item:hover, .tb-state-grid .dropdown-item:focus { background: var(--tb-primary-soft); color: var(--tb-primary); }
.tb-state-grid .dropdown-item.disabled { color: var(--tb-muted); }

/* Offcanvas (mobile) */
@media (min-width: 992px) {
  #navOffcanvas { background: transparent !important; color: inherit; }
}
@media (max-width: 991.98px) {
  #navOffcanvas { --bs-offcanvas-width: min(84vw, 340px); background: linear-gradient(180deg, var(--tb-navy) 0%, var(--tb-navy-2) 100%); color: #fff; }
  #navOffcanvas .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  #navOffcanvas .offcanvas-title { color: #fff; font-weight: 700; }
  #navOffcanvas .navbar-nav { padding: 0.75rem; gap: 0.25rem; }
  #navOffcanvas .nav-link { color: #fff; font-size: 1.05rem; padding: 0.8rem 1rem; border-radius: var(--tb-radius-sm); }
  #navOffcanvas .nav-link:hover, #navOffcanvas .nav-link:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.10); }
  #navOffcanvas .nav-ghost { border-color: rgba(255, 255, 255, 0.28); margin-top: 0.5rem; text-align: center; }
  #navOffcanvas .nav-cta { text-align: center; margin-top: 0.35rem; }
  #navOffcanvas .dropdown-menu { position: static !important; transform: none !important; min-width: 0; margin: 0.25rem 0 0.5rem; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
  #navOffcanvas .tb-state-menu-title { color: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.12); }
  #navOffcanvas .tb-state-grid .dropdown-item { color: #fff; }
  #navOffcanvas .tb-state-grid .dropdown-item:hover, #navOffcanvas .tb-state-grid .dropdown-item:focus { background: rgba(255, 255, 255, 0.12); color: #fff; }
  #navOffcanvas .offcanvas-body { overflow-y: auto; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.tb-footer { margin-top: auto; color: rgba(255, 255, 255, 0.78); background: var(--tb-navy); }
.tb-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: color 0.15s; }
.tb-footer a:hover { color: #fff; }

.tb-footer-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--tb-primary) 0%, #0a8fd6 55%, var(--tb-accent) 100%);
  color: #fff;
}
.tb-footer-cta::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.tb-footer-cta h2 { color: #fff; font-size: clamp(1.35rem, 2.2vw, 1.85rem); margin: 0 0 0.25rem; }
.tb-footer-cta p { margin: 0; color: rgba(255, 255, 255, 0.86); }
.tb-footer-cta .btn-white { background: #fff; color: var(--tb-primary); border: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.tb-footer-cta .btn-white:hover { background: #f1f6fc; color: var(--tb-primary-dark); transform: translateY(-1px); }

.tb-footer-main { padding: 3.5rem 0 2.5rem; }
.tb-footer-brand img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.tb-footer-brand p { max-width: 36ch; margin: 1rem 0 0; font-size: 0.925rem; line-height: 1.6; }
.tb-footer h6 { color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.tb-footer ul { list-style: none; margin: 0; padding: 0; }
.tb-footer li { margin-bottom: 0.55rem; font-size: 0.925rem; }
.tb-footer-contact { display: flex; align-items: center; gap: 0.6rem; font-size: 0.925rem; }
.tb-footer-contact svg { flex: 0 0 18px; opacity: 0.8; }

.tb-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.10); padding: 1.1rem 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
.tb-footer-bottom a { color: rgba(255, 255, 255, 0.55); }
.tb-footer-bottom .tb-footer-legal { display: flex; flex-wrap: wrap; gap: 1.1rem; }

/* --------------------------------------------------------------------------
   Modals + utilities
   -------------------------------------------------------------------------- */
.modal { backdrop-filter: blur(5px); background: rgba(255, 255, 255, 0.5); }
.modal-content { border: 0; border-radius: var(--tb-radius); box-shadow: var(--tb-shadow-lg); }
.pointer { cursor: pointer; }
.color_back { background-color: #efefef; }
.color_top { background-color: var(--main-color); }
.color_bar { text-align: center; margin: 0 auto; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
.search_button:hover { background-color: var(--main-color); color: #fff; }
.filter-white { filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(90deg) brightness(90%) contrast(100%); }
.filter-white:hover { filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(90deg) brightness(100%) contrast(100%); }
.dropdown-item.map-search { background-color: var(--tb-primary) !important; color: #fff !important; text-decoration: none !important; }
.dropdown-item.map-search:hover, .dropdown-item.map-search:focus { background-color: var(--tb-primary-dark) !important; color: #fff !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tb-navbar, .tb-footer a { transition: none; }
}
