/**
 * TrueBlue Clean — responsive polish layer.
 * Brand colors and Plus Jakarta Sans stay locked.
 * Tokens come from the Tailwind config in header.php.
 */

:root {
  --tbc-header: 116px;
  --tbc-dock: 0px;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.admin-bar header.tbc-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar header.tbc-header {
    top: 0;
  }
}

/* Offset anchored sections under the fixed header */
section[id],
#instant-quote {
  scroll-margin-top: calc(var(--tbc-header) + 16px);
}

/* Fluid type using the existing mobile / desktop tokens */
@media (max-width: 639px) {
  .px-gutter {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .py-space-xl {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .mb-space-xl {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 767px) {
  :root {
    --tbc-header: 96px;
    --tbc-dock: 76px;
  }

  .font-display.text-display {
    font-size: 32px !important;
    line-height: 40px !important;
    letter-spacing: -0.02em !important;
  }

  .font-headline-lg.text-headline-lg {
    font-size: 26px !important;
    line-height: 34px !important;
  }

  .font-price-hero.text-price-hero {
    font-size: 32px !important;
    line-height: 36px !important;
  }

  .font-body-lg.text-body-lg {
    font-size: 16px !important;
    line-height: 24px !important;
  }

  main.tbc-main {
    padding-top: var(--tbc-header);
    padding-bottom: var(--tbc-dock);
  }

  footer.tbc-footer {
    padding-bottom: calc(2rem + var(--tbc-dock));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .font-display.text-display {
    font-size: 40px !important;
    line-height: 48px !important;
  }
}

/* Header */
.tbc-header {
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.tbc-header.is-scrolled {
  box-shadow: 0 8px 28px rgba(0, 95, 106, 0.10);
}

.tbc-topbar {
  overflow: hidden;
}

@media (max-width: 639px) {
  .tbc-topbar-track {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    animation: tbc-marquee 22s linear infinite;
  }

  .tbc-brand-name {
    font-size: 16px !important;
    line-height: 20px !important;
  }
}

@keyframes tbc-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tbc-topbar-track {
    animation: none;
    white-space: normal;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Logo row */
.tbc-logo-row {
  min-height: 64px;
}

@media (max-width: 767px) {
  .tbc-logo-row {
    min-height: 60px;
    height: auto;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
}

/* Buttons */
.tbc-btn,
a.tbc-btn {
  min-height: 44px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tbc-btn:hover {
  transform: translateY(-1px);
}

.tbc-btn:active {
  transform: translateY(0);
}

.tbc-btn-primary {
  box-shadow: 0 8px 20px rgba(0, 122, 135, 0.22);
}

.tbc-btn-primary:hover {
  box-shadow: 0 10px 24px rgba(0, 122, 135, 0.28);
}

/* Cards */
.tbc-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .tbc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(19, 27, 46, 0.08);
  }
}

/* Hero */
.tbc-hero {
  min-height: auto;
}

@media (min-width: 1024px) {
  .tbc-hero {
    min-height: 640px;
  }
}

.tbc-hero-badge {
  max-width: 100%;
}

.tbc-hero-badge span:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Calculator */
.tbc-calc select,
.tbc-calc input {
  min-height: 48px;
}

.tbc-calc select:focus,
.tbc-calc input:focus {
  outline: 2px solid #007a87;
  outline-offset: 1px;
}

/* Mobile drawer */
.tbc-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 27, 46, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}

.tbc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(86vw, 360px);
  background: #ffffff;
  box-shadow: -16px 0 40px rgba(19, 27, 46, 0.12);
  transform: translateX(110%);
  transition: transform 0.28s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
}

body.tbc-nav-open {
  overflow: hidden;
}

body.tbc-nav-open .tbc-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.tbc-nav-open .tbc-drawer {
  transform: translateX(0);
}

.tbc-drawer a.tbc-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  color: #131b2e;
  font-weight: 600;
  font-size: 15px;
}

.tbc-drawer a.tbc-drawer-link.is-current,
.tbc-drawer a.tbc-drawer-link:hover {
  background: #e2e7ff;
  color: #005f6a;
}

.tbc-menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f3ff;
  color: #005f6a;
  border: 0;
  cursor: pointer;
}

.tbc-menu-btn:focus-visible {
  outline: 2px solid #007a87;
  outline-offset: 2px;
}

/* Mobile dock */
.tbc-dock {
  display: none;
}

@media (max-width: 767px) {
  .tbc-dock {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0.6rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: rgba(250, 248, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 -8px 24px rgba(0, 95, 106, 0.10);
  }

  .tbc-dock a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.01em;
  }
}

/* Forms / menus rendered by WP */
.tbc-footer .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tbc-footer .menu a {
  color: inherit;
}

.tbc-footer .menu a:hover {
  color: #005f6a;
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #007a87;
  outline-offset: 2px;
}

/* WordPress embeds / images */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* Keep long ABN / phone strings from blowing the top bar */
.tbc-nowrap {
  white-space: nowrap;
}

/* Interior pages */
.tbc-map {
  width: 100%;
  height: 360px;
  background: #eaedff;
}

@media (min-width: 768px) {
  .tbc-map {
    height: 460px;
  }
}

.tbc-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 48px;
  border: 0;
  border-radius: 0.75rem;
  background: #f2f3ff;
  color: #131b2e;
  padding: 0.7rem 0.85rem;
  font-size: 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
}

textarea.tbc-input {
  min-height: 120px;
  resize: vertical;
}

.tbc-prose h2 {
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
  color: #131b2e;
  margin: 1.4rem 0 0.5rem;
}

.tbc-prose p,
.tbc-prose li {
  font-size: 16px;
  line-height: 26px;
  color: #3e494a;
  margin: 0 0 0.75rem;
}

.tbc-prose a {
  color: #005f6a;
  font-weight: 700;
}

.leaflet-container {
  font-family: "Plus Jakarta Sans", sans-serif;
}
