/* Homepage — BidWinner opportunity hub
 * docs/ai_planning/homepage_redesign/
 */

.home-page {
  --home-ink: #1a2332;
  --home-muted: #5a6577;
  --home-accent: #0b6e4f;
  --home-accent-soft: #e6f4ef;
  --home-warn: #b45309;
  --home-line: #d8dee8;
  --home-bg: #f3f5f8;
  --home-surface: #ffffff;
  --home-display: 'Be Vietnam Pro', 'Segoe UI', Tahoma, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  color: var(--home-ink);
}

.home-section {
  margin-top: 48px;
}

.home-section__title {
  font-family: var(--home-display);
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--home-ink);
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding-bottom: 12px;
}

.home-section__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.75rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--home-accent), rgba(11, 110, 79, 0.25));
}

.home-section__sub {
  margin: 0 0 22px;
  color: var(--home-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  max-width: 42rem;
}

.center-align .home-section__title,
.home-pricing .home-section__title {
  display: inline-block;
}

.center-align .home-section__title::after,
.home-pricing .home-section__title::after {
  left: 50%;
  transform: translateX(-50%);
}

.center-align .home-section__sub,
.home-pricing .home-section__sub {
  margin-left: auto;
  margin-right: auto;
}

/* Hero */
.home-hero {
  background:
    linear-gradient(135deg, rgba(11, 110, 79, 0.08), rgba(26, 35, 50, 0.04)),
    var(--home-surface);
  border-bottom: 1px solid var(--home-line);
  margin: 0 -12px;
  padding: 36px 16px 40px;
}

.home-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.home-hero__brand {
  font-family: var(--home-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--home-accent);
  margin: 0 0 12px;
}

.home-hero__title {
  font-family: var(--home-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.home-hero__sub {
  color: var(--home-muted);
  margin: 0 0 22px;
  font-size: 1rem;
}

.home-hero__search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.home-hero__search-field {
  flex: 1 1 280px;
  margin: 0;
  text-align: left;
  background: var(--home-surface);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 4px 12px 4px 8px;
}

.home-hero__search-field input {
  margin: 0 !important;
  border-bottom: none !important;
  box-shadow: none !important;
  height: 2.6rem !important;
}

.home-hero__search-field .prefix {
  top: 0.55rem;
  color: var(--home-muted);
}

.home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.home-chip-label {
  font-size: 0.85rem;
  color: var(--home-muted);
}

.home-chip {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--home-line);
  border-radius: 4px;
  color: var(--home-ink);
  background: var(--home-surface);
  font-size: 0.85rem;
  text-decoration: none;
}

.home-chip:hover {
  border-color: var(--home-accent);
  color: var(--home-accent);
}

.home-hero__cta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.home-btn {
  background-color: var(--home-accent) !important;
  border-radius: 4px;
}

.home-btn-outline {
  color: var(--home-accent) !important;
  border: 1px solid var(--home-accent);
  border-radius: 4px;
}

/* Pulse */
.home-pulse__grid .home-stat {
  background: var(--home-surface);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 12px;
}

.home-stat__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--home-accent);
}

.home-stat__label {
  font-size: 0.8rem;
  color: var(--home-muted);
  margin-top: 4px;
}

/* Feed */
.home-feed__col-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.home-feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-feed__item {
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: var(--home-surface);
  margin-bottom: 10px;
  padding: 12px 14px;
}

.home-feed__item--urgent {
  border-left: 3px solid var(--home-warn);
}

.home-feed__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-feed__link:hover .home-feed__name {
  color: var(--home-accent);
}

.home-feed__name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.home-feed__meta,
.home-feed__deadline {
  display: block;
  font-size: 0.8rem;
  color: var(--home-muted);
}

.home-feed__empty {
  color: var(--home-muted);
  font-size: 0.9rem;
}

.home-feed__more {
  display: inline-block;
  margin-top: 8px;
  color: var(--home-accent);
  font-weight: 500;
}

/* Gateways */
.home-gateway {
  display: block;
  height: 100%;
  min-height: 160px;
  padding: 18px 16px;
  margin-bottom: 14px;
  background: var(--home-surface);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-gateway:hover {
  border-color: var(--home-accent);
  box-shadow: 0 4px 14px rgba(26, 35, 50, 0.06);
}

.home-gateway .material-icons {
  color: var(--home-accent);
  margin-bottom: 8px;
}

.home-gateway h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  font-weight: 600;
}

.home-gateway p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--home-muted);
  line-height: 1.4;
}

/* For you / blog / pricing */
/* specificity > Materialize `.row .col { padding: 0 .75rem }` */
.home-page .row .col.home-foryou__empty {
  text-align: center;
  padding: 40px 20px 44px;
  background: var(--home-accent-soft);
  border-radius: 6px;
}

.home-page .home-foryou__empty p {
  margin: 0 0 18px;
}

.home-page .home-foryou__actions {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-blog__card {
  display: block;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--home-surface);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  min-height: 120px;
}

.home-blog__card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
  font-weight: 600;
}

.home-blog__card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.home-pricing {
  background: var(--home-bg);
  border-radius: 8px;
  padding: 28px 16px;
  margin-top: 48px;
}

.home-teaser-text {
  color: var(--home-muted);
  margin-bottom: 12px;
}

/* Trend chart widget */
.home-trend {
  background: var(--home-surface);
  border: 1px solid var(--home-line);
  border-radius: 8px;
  padding: 18px 16px 12px;
}

.home-trend__header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-trend__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-trend__controls select.browser-default,
.home-trend__select {
  display: block;
  height: 2.4rem;
  padding: 0 8px;
  border: 1px solid var(--home-line);
  border-radius: 4px;
  background: #fff;
  min-width: 180px;
  width: auto;
}

.home-trend__kpi {
  text-align: right;
}

.home-trend__kpi-total {
  font-size: 1.35rem;
  font-weight: 700;
}

.home-trend__kpi-delta {
  font-size: 0.9rem;
}

.home-trend__kpi-delta.is-up { color: var(--home-accent); }
.home-trend__kpi-delta.is-down { color: #b91c1c; }

.home-trend__note {
  font-size: 0.8rem;
  color: var(--home-muted);
  margin: 8px 0 0;
}

.home-trend__canvas-wrap {
  position: relative;
  height: 280px;
}

.home-trend__canvas-wrap--large {
  height: 320px;
}

.home-trend__loading,
.home-trend__error {
  padding: 24px;
  text-align: center;
  color: var(--home-muted);
}

.home-htlcnt-multi .home-trend__canvas-wrap {
  margin-top: 10px;
}

.home-trend__kpi-note {
  margin-top: 4px;
}

.home-htlcnt-multi__snapshot {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-htlcnt-multi__snapshot-item {
  border: 1px solid var(--home-line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}

.home-htlcnt-multi__snapshot-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
  white-space: nowrap;
}

.home-htlcnt-multi__snapshot-label {
  font-weight: 600;
}

.home-htlcnt-multi__snapshot-values {
  display: flex;
  justify-content: space-between;
  color: var(--home-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  gap: 10px;
}

@media (max-width: 992px) {
  .home-htlcnt-multi__snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .home-htlcnt-multi__snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .home-hero {
    padding: 28px 12px 32px;
  }

  .home-trend__kpi {
    text-align: left;
    width: 100%;
  }

  .home-trend__canvas-wrap {
    height: 220px;
  }
}

/* Operator brand — Agent Insights */
.home-operator {
  --op-navy: #0a1633;
  --op-ai: #1a6dff;
  --op-ai-glow: rgba(26, 109, 255, 0.35);
  position: relative;
  margin-top: 64px;
  margin-bottom: 8px;
  padding: 56px 20px 52px;
  overflow: hidden;
  border-radius: 4px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(26, 109, 255, 0.1), transparent 55%),
    linear-gradient(165deg, #f7f9fc 0%, #eef2f8 48%, #e8eef7 100%);
  border: 1px solid rgba(10, 22, 51, 0.08);
}

.home-operator__glow {
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--op-ai-glow), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease 0.35s;
}

.home-operator.is-inview .home-operator__glow {
  opacity: 0.55;
}

.home-operator__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
}

.home-operator__label {
  font-family: var(--home-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-muted);
  margin: 0 0 1.35rem;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-operator.is-inview .home-operator__label {
  opacity: 1;
  transform: translateY(0);
}

.home-operator__mark {
  margin: 0 auto;
}

.home-operator__brand {
  font-family: var(--home-display);
  font-size: clamp(2rem, 5.5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--op-navy);
  margin: 0 0 0.55rem;
  opacity: 0;
  transform: translateX(-48px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
}

.home-operator.is-inview .home-operator__brand {
  opacity: 1;
  transform: translateX(0);
}

.home-operator__ai {
  color: var(--op-ai);
  display: inline-block;
  position: relative;
}

.home-operator.is-inview .home-operator__ai {
  animation: home-operator-ai-pulse 1.6s ease 0.75s 1 both;
}

.home-operator__tagline {
  font-family: var(--home-display);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--op-navy);
  margin: 0;
  opacity: 0;
  transform: translateX(48px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.32s,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.32s;
}

.home-operator.is-inview .home-operator__tagline {
  opacity: 1;
  transform: translateX(0);
}

@keyframes home-operator-ai-pulse {
  0% {
    text-shadow: 0 0 0 transparent;
  }
  40% {
    text-shadow: 0 0 18px var(--op-ai-glow);
  }
  100% {
    text-shadow: 0 0 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-operator__label,
  .home-operator__brand,
  .home-operator__tagline,
  .home-operator__glow {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .home-operator.is-inview .home-operator__ai {
    animation: none;
  }
}

/* Top contractors */
.home-top-contractors__table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.home-top-contractors__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.home-top-contractors__table th,
.home-top-contractors__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--home-line);
  text-align: left;
  vertical-align: top;
}

.home-top-contractors__table thead th {
  font-family: var(--home-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--home-muted);
  background: #f8fafc;
}

.home-top-contractors__table th.is-rank,
.home-top-contractors__table td.is-rank {
  width: 42px;
  text-align: center;
  font-weight: 700;
  color: var(--home-accent);
}

.home-top-contractors__table th.is-num,
.home-top-contractors__table td.is-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.home-top-contractors__table td.is-focus {
  font-weight: 700;
  color: var(--home-ink);
}

.home-top-contractors__name {
  display: block;
  color: var(--home-ink);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
}

.home-top-contractors__name:hover {
  color: var(--home-accent);
}

.home-top-contractors__msdn {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--home-muted);
}

.home-top-contractors__table tbody tr:hover {
  background: var(--home-accent-soft);
}
