/* Public site shell — index.php + home tracking layout */
:root {
  --site-bg: #e8f1f8;
  --site-bg-soft: #f4f8fb;
  --site-surface: #ffffff;
  --site-text: #1a2b3c;
  --site-muted: #5c6b7a;
  --site-border: #d5e3ef;
  --site-primary: #c41e3a;
  --site-primary-hover: #a01830;
  --site-accent: #1e5a8a;
  --site-shadow: 0 8px 28px rgba(26, 43, 60, 0.08);
  --site-radius: 14px;
  --site-max: 1180px;
}

.public-site-body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--site-text);
  background:
    radial-gradient(1200px 420px at 50% -80px, rgba(196, 30, 58, 0.08), transparent 60%),
    linear-gradient(180deg, #eef5fb 0%, var(--site-bg-soft) 42%, #e9f0f6 100%);
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

.public-site-body .wrapper,
.public-site-body .content,
.public-site-body .container-fluid,
.public-site-body .site-header,
.public-site-body .site-topbar,
.public-site-body .site-footer,
.public-site-body .site-main {
  max-width: 100%;
  overflow-x: hidden;
}

/* Top address bar */
.site-topbar {
  background: #16324a;
  color: #f2f7fb;
  font-size: 0.82rem;
  line-height: 1.4;
  width: 100%;
}

.site-topbar__inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
}

.site-topbar__copy {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.15rem 0.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.site-topbar__copy:hover,
.site-topbar__copy:focus {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.site-topbar__copy > i {
  margin-top: 0.2rem;
  color: #9ec9ef;
  flex: 0 0 auto;
}

.site-topbar__address {
  margin: 0;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  line-height: 1.4;
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-topbar__copy-hint,
.site-topbar__copied {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}

.site-topbar__copied {
  color: #9dffb5;
}

.site-hotline__line {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.site-hotline__line:hover,
a.site-hotline__line:focus {
  color: var(--site-primary);
  text-decoration: underline;
}

/* Header */
.site-header {
  z-index: 1030;
  background: transparent;
}

.site-header__pin {
  position: sticky;
  top: 0;
  z-index: 1031;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--site-border);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(26, 43, 60, 0.05);
}

.site-header__pin-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
}

.site-header__body {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--site-border);
}

.site-header__inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0.65rem 1rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem 1.25rem;
}

.site-brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}

.site-brand__logo {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  object-fit: contain;
}

.site-header__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  flex: 0 1 auto;
  width: 100%;
}

.site-hotline {
  text-align: right;
  line-height: 1.4;
}

.site-hotline__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin-bottom: 0.12rem;
}

.site-hotline__numbers {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--site-text);
}

.site-btn-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border: 2px solid var(--site-primary);
  border-radius: 999px;
  background: var(--site-surface);
  color: var(--site-primary);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.site-btn-portal:hover,
.site-btn-portal:focus {
  background: var(--site-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(196, 30, 58, 0.28);
  outline: none;
}

.site-btn-portal:active {
  transform: translateY(1px);
}

/* Main */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.site-main .content {
  padding: 0 0 2rem;
}

.site-main .container-fluid {
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Tracking hero — centered composition */
.track-page {
  padding-top: 0.75rem;
}

.track-hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  padding: 0.75rem 0 0.35rem;
}

.track-hero__panel {
  width: 100%;
  max-width: 640px;
  text-align: center;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) + 4px);
  box-shadow: var(--site-shadow);
  padding: 1.25rem 1.25rem 1.15rem;
  position: relative;
  overflow: visible;
}

.track-hero__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: calc(var(--site-radius) + 4px) calc(var(--site-radius) + 4px) 0 0;
  background: linear-gradient(90deg, var(--site-primary), #e85a6f 55%, var(--site-accent));
}

.track-hero__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--site-accent);
}

.track-hero__title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--site-text);
  line-height: 1.2;
}

.track-hero__subtitle {
  margin: 0 auto 0.9rem;
  max-width: 28rem;
  font-size: 0.9rem;
  color: var(--site-muted);
  line-height: 1.45;
}

.track-search {
  width: 100%;
}

.track-search__group {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.track-search__group.input-group {
  flex-wrap: nowrap;
}

.track-search__input,
.track-search__input.form-control,
.track-search__input.form-control-sm {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  height: 2.85rem;
  margin: 0;
  border: 1.5px solid #b8c9d8 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  padding: 0.65rem 0.95rem !important;
  font-size: 1rem !important;
  color: var(--site-text) !important;
  -webkit-appearance: none;
  appearance: none;
}

.track-search__input::placeholder {
  color: #8093a5 !important;
  opacity: 1;
}

.track-search__input:focus {
  outline: none;
  border-color: var(--site-accent) !important;
  box-shadow: 0 0 0 3px rgba(30, 90, 138, 0.15) !important;
  background: #fff !important;
}

.track-search__group .input-group-append {
  display: flex;
  margin: 0;
}

.track-search__btn,
.track-search__btn.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0 !important;
  border-radius: 10px !important;
  min-height: 2.85rem;
  height: 2.85rem;
  padding: 0 1.15rem;
  background: var(--site-primary) !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.track-search__btn:hover,
.track-search__btn:focus {
  background: var(--site-primary-hover) !important;
  color: #fff !important;
}

.track-results {
  margin-top: 0.75rem;
  width: 100%;
  overflow-x: hidden;
}

/* Compact timeline spacing on public track page */
.track-page .timeline {
  margin: 0 0 1rem;
  overflow-x: hidden;
}

.track-page .timeline > div {
  margin-bottom: 0.55rem;
  margin-right: 0;
}

.track-page .timeline > div > .timeline-item {
  margin-right: 0.25rem;
  padding: 0.35rem 0.65rem 0.55rem !important;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.track-page .timeline > div > .timeline-item > .time {
  padding: 0.35rem 0.25rem;
}

.track-page .timeline img,
.track-page .attachment-img {
  max-width: min(100%, 180px) !important;
  height: auto !important;
}

/* Footer — simple copyright */
.site-footer {
  flex-shrink: 0;
  background: var(--site-primary);
  color: #fff;
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
}

.site-footer__inner {
  max-width: var(--site-max);
  margin: 0 auto;
  text-align: center;
}

.site-footer__copy {
  margin: 0;
  opacity: 0.95;
}

.site-footer__copy strong,
.site-footer__copy b {
  font-weight: 700;
}

/* Tablet / desktop: logo + contact in one sticky bar */
@media (min-width: 992px) {
  .site-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: none;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--site-border);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 14px rgba(26, 43, 60, 0.05);
    padding: 0;
  }

  .site-header__pin,
  .site-header__body {
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
  }

  .site-header__pin {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header__pin-inner {
    max-width: none;
    margin: 0;
    padding: 0.75rem 0 0.75rem 1rem;
    justify-content: flex-start;
  }

  .site-header__body {
    flex: 0 0 auto;
  }

  .site-header__inner {
    max-width: none;
    margin: 0;
    padding: 0.75rem 1rem 0.75rem 0;
    justify-content: flex-end;
    min-height: 0;
  }

  .site-header__aside {
    width: auto;
  }

  /* Constrain full header content width */
  .site-header {
    padding-left: max(0px, calc((100% - var(--site-max)) / 2));
    padding-right: max(0px, calc((100% - var(--site-max)) / 2));
  }

  .site-header__pin-inner {
    padding-left: 1rem;
  }

  .site-header__inner {
    padding-right: 1rem;
  }
}

/* Tablet */
@media (max-width: 991.98px) {
  .site-brand__logo {
    max-width: 180px;
  }

  .site-header__pin-inner {
    padding: 0.45rem 0.85rem;
    justify-content: center;
  }

  .site-header__aside {
    width: 100%;
    justify-content: flex-start;
    flex: none;
  }

  .site-header__inner {
    padding: 0.55rem 0.85rem 0.7rem;
  }

  .track-hero {
    min-height: 0;
    padding-top: 0.5rem;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .site-topbar__inner {
    padding: 0.4rem 0.75rem;
    align-items: flex-start;
  }

  .site-topbar__address {
    text-align: left;
    font-size: 0.76rem;
  }

  .site-topbar__copy {
    width: 100%;
  }

  .site-topbar__copy-hint {
    margin-left: auto;
  }

  .site-topbar__copy-hint span,
  .site-topbar__copy-hint {
    font-size: 0.68rem;
  }

  /* Only logo stays pinned — hotline/login scroll away */
  .site-header {
    position: static;
  }

  .site-header__pin {
    position: sticky;
    top: 0;
  }

  .site-header__pin-inner {
    padding: 0.4rem 0.75rem;
    justify-content: center;
  }

  .site-brand {
    justify-content: center;
    flex: none;
  }

  .site-brand__logo {
    max-width: min(100%, 170px);
    margin: 0 auto;
  }

  .site-header__aside {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.45rem;
    width: 100%;
    flex: none;
  }

  .site-hotline {
    text-align: center;
    background: var(--site-bg-soft);
    border: 1px solid var(--site-border);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
  }

  .site-hotline__numbers {
    font-size: 0.88rem;
  }

  .site-btn-portal {
    width: 100%;
    padding: 0.65rem 1rem;
  }

  .track-page {
    padding-top: 0.45rem;
  }

  .track-hero__panel {
    padding: 1rem 0.85rem 0.95rem;
    border-radius: 12px;
  }

  .track-hero__subtitle {
    margin-bottom: 0.75rem;
    font-size: 0.86rem;
  }

  .track-search__group {
    flex-direction: column;
    gap: 0.45rem;
  }

  .track-search__group .input-group-append {
    width: 100%;
    display: block;
  }

  .track-search__input,
  .track-search__input.form-control,
  .track-search__btn,
  .track-search__btn.btn {
    width: 100%;
    min-height: 2.75rem;
    height: 2.75rem;
  }

  .track-results {
    margin-top: 0.55rem;
  }

  .track-page .timeline > div {
    margin-bottom: 0.45rem;
  }

  .site-main .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .site-main .content {
    padding-bottom: 1.25rem;
  }
}
