/* Homepage only (Views/Home/Index.cshtml via the layout "styles" section). Loaded after theme.css and
   uses its --jx-* tokens; shared components (locator, search results, state map links) come from the theme. */
.home { color: var(--jx-ink); }

/* Hero */
.home-hero {
  position: relative;
  color: #fff;
  padding: 40px 0 88px;
  background: linear-gradient(140deg, #0b2545 0%, #123f6e 60%, #1a5aa8 100%);
}
@media (min-width: 768px) {
  .home-hero {
    padding: 72px 0 120px;
    /* Photo only where it is visible behind text; phones skip the download. */
    background:
      linear-gradient(100deg, rgba(8, 27, 51, .96) 0%, rgba(10, 37, 69, .9) 48%, rgba(17, 64, 115, .74) 100%),
      url("/images/FL - Palm Beach County Jail.jpg") 50% 40% / cover no-repeat,
      #0b2545;
  }
}
.home-hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 992px) {
  .home-hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; }
}
.home-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: .85rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9cc9ff;
}
.home-eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.home-hero h1 {
  margin: 0 0 18px; color: #fff; font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem); line-height: 1.1;
}
.home-hero .homepage-intro { margin: 0; max-width: 40em; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; color: rgba(255, 255, 255, .88); }
.home-highlights { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 24px 0 0; padding: 0; list-style: none; }
.home-highlights li { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: rgba(255, 255, 255, .92); }
.home-highlights i { color: var(--jx-sky); }

/* Search card (sits above the facility cards so the results list can overlap them) */
.home-search-card {
  position: relative; z-index: 3;
  background: #fff; color: var(--jx-ink); border-radius: var(--jx-radius);
  padding: clamp(20px, 3vw, 32px); box-shadow: 0 24px 60px rgba(3, 18, 38, .35);
}
.home-search-card h2 { margin: 0 0 4px; font-size: 1.375rem; font-weight: 700; line-height: 1.3; color: var(--jx-navy); }
.home-search-lede { margin: 0 0 18px; font-size: .95rem; color: var(--jx-muted); }
#main-search .jail-search-wrap { position: relative; width: 100%; margin: 0; overflow: visible; }
#main-search .searchInput input {
  width: 100%; height: 56px; margin: 0; padding: 0 16px 0 50px;
  border: 1.5px solid #c5d3e2; border-radius: 12px; background: #fff; color: var(--jx-ink);
  font-size: 1rem; box-shadow: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
#main-search .searchInput input::placeholder { color: #6b7f90; }
#main-search .searchInput input:focus { border-color: var(--jx-blue); box-shadow: 0 0 0 4px rgba(21, 101, 192, .15); }
#main-search .searchInput .icon {
  position: absolute; left: 0; top: 0; width: 50px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--jx-blue); pointer-events: none;
}
#main-search .jail-search-results { top: calc(100% + 6px); left: 0; }
.home-search-divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #6b7f90;
}
.home-search-divider::before, .home-search-divider::after { content: ''; flex: 1; height: 1px; background: var(--jx-line); }
.home-locate {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 1.5px solid #c5d3e2; border-radius: 12px; background: var(--jx-surface);
  color: var(--jx-blue-dark); font: inherit; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.home-locate i { color: #c62828; }
.home-locate:hover { border-color: var(--jx-blue); background: #e8f1fc; }
.home-locate:disabled { cursor: progress; opacity: .75; }
.home-locate-status { margin: 0; font-size: .9rem; color: var(--jx-muted); }
.home-locate-status:not(:empty) { margin-top: 10px; }

/* Facility type cards overlap the bottom of the hero */
.home-types { position: relative; z-index: 1; margin-top: -48px; }
@media (min-width: 768px) { .home-types { margin-top: -64px; } }
.home-type-grid { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 576px) { .home-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .home-type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-type-card {
  display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 20px;
  background: #fff; border: 1px solid var(--jx-line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 37, 69, .1); color: var(--jx-ink); text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.home-type-card:hover { transform: translateY(-2px); border-color: #b6cfec; box-shadow: 0 16px 36px rgba(11, 37, 69, .16); color: var(--jx-ink); }
.home-type-icon {
  flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; background: #e8f1fc; color: var(--jx-blue); font-size: 18px;
}
.home-type-body { flex: 1; min-width: 0; }
.home-type-title { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--jx-navy); }
.home-type-text { display: block; margin-top: 4px; font-size: .925rem; line-height: 1.5; color: var(--jx-muted); }
.home-type-arrow { flex: none; align-self: center; color: var(--jx-blue); transition: transform .15s; }
.home-type-card:hover .home-type-arrow { transform: translateX(3px); }
@media (min-width: 1200px) {
  /* Four narrow columns: stack icon over text so descriptions use the full card width. */
  .home-type-card { position: relative; flex-direction: column; gap: 14px; padding: 22px; }
  .home-type-arrow { position: absolute; top: 34px; right: 22px; }
}

/* Inmate locator (shared partial; base styles in theme.css) */
.home-locator { padding: 48px 0 8px; }
.home-locator .inmate-locator { margin: 0 !important; }
.home-locator .inmate-locator h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem) !important; margin-bottom: 24px; }

/* State directory */
.home-directory { padding: 48px 0 72px; }
.home-section-title { margin: 0 0 8px; text-align: center; color: var(--jx-navy); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.2; }
.home-section-lede { margin: 0 auto 28px; max-width: 40em; text-align: center; color: var(--jx-muted); }
.home-map-card { padding: clamp(16px, 3vw, 40px); background: #fff; border: 1px solid var(--jx-line); border-radius: var(--jx-radius); box-shadow: 0 6px 24px rgba(11, 37, 69, .06); }
.home-map-card #us-map { display: block; max-width: 900px; margin: 0 auto; }

/* The directory is a <nav>; undo the legacy top-bar rules (float, white text, 64px line-height). */
.state-directory { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--jx-line); line-height: 1.5; }
.state-directory ul.custom-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 12px; margin: 0; padding: 0; }
.state-directory ul li { float: none; margin: 0; }
.state-directory ul a { display: block; padding: 9px 10px; border-radius: 8px; color: #1a4f8b; font-size: .95rem; line-height: 1.4; }
.state-directory ul a:hover { background: var(--jx-surface); color: var(--jx-blue-dark); }

@media (prefers-reduced-motion: reduce) {
  .home-type-card:hover, .home-type-card:hover .home-type-arrow { transform: none; }
}
