/* =====================================================================
   IML CONTACT SHEETS (contacts.html)
   Loaded AFTER the site's own files, in this order:
     assets/bootstrap/css/bootstrap.min.css   (site theme: colors, fonts, .container, #mainNav)
     assets/css/bs-theme-overrides.css        (IML gold + Montserrat)
     assets/css/Mega-Menu-Dropdown-100-Editable---Ambrodu.css   (Resources menu)
     assets/css/contacts.css                  (this file)
   Only link this file from contacts.html. It uses short class names
   (.card, .grid, .title ...) that would change other pages.
   ===================================================================== */

:root {
  /* Same colors the rest of imlss.com uses */
  --iml-gold: var(--bs-success, #F4BF37);              /* bs-theme-overrides: rgb(244,191,55) */
  --iml-gold-hover: #F6C955;
  --iml-gold-light: var(--bs-success-bg-subtle, #FDF2D7);
  --iml-blue: #1C5EAC;                                  /* branch card titles on the home page */
  --iml-charcoal: #2D2D2D;                              /* = site body text color */
  --iml-gray-bg: #F4F4F4;                               /* = home page form fields */
  --iml-border: #E3E3E3;
  --iml-muted: #6B6B6B;
  --white: #FFFFFF;
  --nav-h: 106px;                                       /* height of the sticky site nav; kept exact by the page script */
}

html { scroll-padding-top: calc(var(--nav-h) + 76px); }   /* nav + search bar */

body {
  color: var(--iml-charcoal);
  line-height: 1.45;
  min-height: 100vh; display: flex; flex-direction: column;
  /* Same fixed blue building background as the home page (.parallax) */
  background-color: #12386A;
  background-image: url("../img/Images/LOCATION%20IMG.png");
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ---------- Site nav: same rules as the <style> in index.html ---------- */
.navbar-nav .nav-link {
  transition: all 0.2s ease-in-out;
  border-radius: 8px;
  padding: 8px 16px !important;
}
.navbar-nav .nav-link:hover {
  background-color: #f0f0f0;
  color: #000000 !important;
}

/* ---------- Hero ---------- */
.hero { color: var(--white); }
.hero .container { padding-top: 32px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-end; justify-content: space-between; }
.eyebrow { color: var(--iml-gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin: 0 0 6px; }
.hero .container > div { flex: 1 1 100%; min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1; }
.hero h1 span { color: var(--iml-gold); }

/* Location + Department dropdowns. Wide screens: side by side (phones stack them, see below) */
.pickers { margin-top: 14px; display: grid; grid-template-columns: max-content minmax(0, 300px) max-content minmax(0, 300px); justify-content: start; gap: 8px 12px; align-items: center; }
.pickers label[for="dept-select"] { margin-left: 16px; }
.pickers:has(#loc-select:empty) { display: none; }
.pickers label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pickers select {
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: #000; background-color: var(--iml-gold); cursor: pointer;
  border: 0; border-radius: 16px; padding: 8px 40px 8px 16px; min-width: 220px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.pickers select:hover { background-color: var(--iml-gold-hover); }
.pickers select:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.pickers select:disabled { opacity: .55; cursor: not-allowed; }
.pickers #dept-select { background-color: var(--white); }
.pickers #dept-select:hover { background-color: var(--iml-gold-light); }

/* Address + phone numbers: one row of buttons under the location name */
.office-info { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.office-info:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 13px; border-radius: 16px; font-size: 13px; font-weight: 700; line-height: 1.2;
  color: var(--white); text-decoration: none;
  background: rgba(0,0,0,.28); border: 1.5px solid rgba(255,255,255,.55);
}
.chip svg { width: 15px; height: 15px; flex: none; color: var(--iml-gold); }
.chip .lbl { font-weight: 500; color: rgba(255,255,255,.75); }
a.chip:hover { background: var(--iml-gold); border-color: var(--iml-gold); color: #000; }
a.chip:hover svg, a.chip:hover .lbl { color: #000; }
a.chip:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.chip.addr { border-color: var(--iml-gold); white-space: normal; }

/* ---------- Search bar: sticks just under the sticky site nav ---------- */
.toolbar { position: sticky; top: var(--nav-h); z-index: 10; background: var(--white); border-bottom: 1px solid var(--iml-border); color: var(--iml-charcoal); }
.toolbar .container { padding-top: 12px; padding-bottom: 12px; }
.search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; margin: 0; background: var(--iml-gray-bg); border: 2px solid transparent; border-radius: 16px; padding: 6px 14px; }
.search:focus-within { border-color: var(--iml-gold); background: var(--white); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; width: 100%; color: var(--iml-charcoal); }
.result-count { font-size: 13px; color: var(--iml-muted); white-space: nowrap; }
.scope { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; }
.scope input { accent-color: var(--iml-blue); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.btn-print { border: 0; border-radius: 16px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600; background: var(--iml-charcoal); color: var(--white); cursor: pointer; }
.btn-print:hover { background: #000; }

/* Hover/focus tip on the Print button saying exactly what will print */
.print-wrap { position: relative; display: inline-flex; }
.print-tip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: 270px;
  display: flex; flex-direction: column; gap: 4px; padding: 11px 14px; border-radius: 8px;
  background: var(--iml-charcoal); color: var(--white); font-size: 13px; line-height: 1.4; text-align: left;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.print-tip::before { content: ""; position: absolute; bottom: 100%; right: 22px; border: 7px solid transparent; border-bottom-color: var(--iml-charcoal); }
.print-wrap:hover .print-tip, .btn-print:focus-visible + .print-tip { opacity: 1; visibility: visible; transform: none; transition-delay: .25s; }
.pt-head { font-weight: 700; color: var(--iml-gold); }
.pt-what { font-weight: 700; }
.pt-hint { color: rgba(255,255,255,.7); font-size: 12px; }
.pt-folded { color: var(--iml-gold); font-size: 12px; font-weight: 600; }
.pt-folded:empty { display: none; }
@media (hover: none) { .print-tip { display: none; } }   /* phones: no hover, so no tip */

/* ---------- Departments ---------- */
main { padding: 28px 0 48px; flex: 1 0 auto; }
.dept { margin-bottom: 34px; }
.dept-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 3px solid var(--iml-gold); padding-bottom: 6px; margin-bottom: 14px; }
.dept-head h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .03em; color: var(--white); }
.dept-head .count { font-size: 13px; color: rgba(255,255,255,.75); font-weight: 600; white-space: nowrap; }
.dept-head .count.one { display: none; }   /* no "1 person" note, on screen or printed */
.dept-head .go { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--iml-gold); text-decoration: none; white-space: nowrap; }
.dept-head .go:hover { text-decoration: underline; }
/* Minimize arrow at the right end of the gold line */
.dept-head .fold {
  margin-left: auto; align-self: center; flex: none; width: 30px; height: 30px; padding: 0;
  display: inline-grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--iml-gold);
}
.dept-head .go + .fold { margin-left: 6px; }
.dept-head .fold:hover { background: rgba(244,191,55,.18); }
.dept-head .fold:focus-visible { outline: 2px solid var(--iml-gold); outline-offset: 2px; }
.dept-head .fold svg { width: 18px; height: 18px; transition: transform .2s; }
.dept.folded .fold svg { transform: rotate(180deg); }
.dept.folded .grid { display: none; }
.dept.folded { margin-bottom: 18px; }
.dept.folded .dept-head { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }

/* ---------- Person cards ----------
   These reuse Bootstrap's .card / .card-body names, so the first two rules
   switch off Bootstrap's column layout, padding and 1rem radius. */
.card {
  display: flex; flex-direction: row; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 7px;
  background: var(--white); color: var(--iml-charcoal); border: 1px solid var(--iml-border);
  transition: box-shadow .15s, transform .15s;
}
.card-body { flex: 1 1 auto; min-width: 0; padding: 0; color: inherit; }
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.avatar { position: relative; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--iml-blue); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.card .where { font-size: 11px; font-weight: 600; color: var(--iml-muted); margin: 0 0 2px; }
.card .title { font-size: 12px; font-weight: 600; color: var(--iml-blue); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 2px; }
.card .name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.card .email, .card .phone { font-size: 13px; display: block; text-decoration: none; }
.card .email { color: var(--iml-blue); }
.card .email span { display: inline-block; white-space: nowrap; }
.card .email:hover { text-decoration: underline; }
.card .phone { color: var(--iml-charcoal); }

/* When a photo exists: tall rounded rectangle filling the left of the tile */
.card.has-photo { padding: 8px 14px 8px 8px; align-items: stretch; }
.card.has-photo .avatar { flex: 0 0 84px; width: 84px; height: auto; min-height: 104px; border-radius: 6px; cursor: zoom-in; background: var(--iml-gray-bg); }
.card.has-photo .card-body { padding: 6px 0; align-self: center; }

/* Copy email / Save contact buttons on each card */
.card-actions { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; }
.act { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--iml-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.act:hover { color: var(--iml-blue); }
.act:focus-visible { outline: 2px solid var(--iml-gold); outline-offset: 2px; border-radius: 3px; }
.act.done { color: #1E7B34; }
.act svg { width: 13px; height: 13px; flex: none; }

mark { background: var(--iml-gold-light); color: inherit; padding: 0 1px; border-radius: 2px; }

/* Larger photo that pops up on hover (above the sticky nav, below Bootstrap modals) */
.photo-pop { position: fixed; z-index: 1030; width: 260px; pointer-events: none; background: var(--white); color: var(--iml-charcoal); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,.35); border-bottom: 4px solid var(--iml-gold); opacity: 0; transform: scale(.96); transition: opacity .15s, transform .15s; }
.photo-pop.show { opacity: 1; transform: scale(1); }
.photo-pop img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.photo-pop .cap { padding: 10px 14px 12px; }
.photo-pop .cap b { display: block; font-size: 16px; }
.photo-pop .cap span { font-size: 12px; font-weight: 600; color: var(--iml-blue); text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .photo-pop { transition: none; } }

/* ---------- Messages ---------- */
.status { background: var(--white); color: var(--iml-charcoal); border-radius: 7px; padding: 24px; text-align: center; max-width: 560px; margin: 24px auto; }
.status h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.status p { margin: 0 0 14px; color: var(--iml-muted); font-size: 14px; }
.no-results { display: none; text-align: center; padding: 48px 16px; margin: 0; color: var(--white); font-weight: 600; }

/* Data check panel (only shown with ?check in the address) */
.check-panel { background: var(--white); color: var(--iml-charcoal); border-left: 6px solid var(--iml-gold); border-radius: 7px; padding: 16px 20px; margin-bottom: 26px; font-size: 14px; }
.check-panel h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.check-panel p { margin: 0; color: var(--iml-muted); }
.check-panel ul { margin: 10px 0 0; padding-left: 20px; max-height: 340px; overflow: auto; }
.check-panel li { margin: 3px 0; }
.check-panel .tag { display: inline-block; min-width: 64px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #8A5A00; }
.check-panel .tag.err { color: #B3261E; }
.check-panel.ok { border-left-color: #1E7B34; }

table.layout, table.layout > tbody, table.layout tr, table.layout td { display: block; width: auto; }
.print-head { display: none; }

/* ---------- Footer extra: "Contacts updated" line under the copyright ---------- */
.contacts-updated { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.75); }
.contacts-updated:empty { display: none; }

/* ---------- Phones (Bootstrap's md breakpoint, where the nav collapses) ---------- */
@media (max-width: 767.98px) {
  .pickers { grid-template-columns: auto minmax(0, 1fr); }
  .pickers label[for="dept-select"] { margin-left: 0; }
  .office-info { gap: 6px; }
  .chip { padding: 6px 11px; }
  .chip.main .lbl { display: none; }   /* phone icon says it; lets phone + fax share a row */
  .chip.fax { order: 1; }
  .chip.nat { order: 2; }
}

/* ---------- Print: compact, PDF-like ---------- */
@media print {
  @page { size: letter; margin: 0.45in; }
  body { background: #fff; background-image: none; font-size: 10px; display: block; }
  #mainNav, .hero, .toolbar, .photo-pop,
  .card-actions, .check-panel, .dept-head .go, .dept-head .fold, .dept.folded,
  .site-footer .footer-contact { display: none !important; }
  main { padding: 0; }
  /* Header repeated at the top of every printed page (a table header repeats on each page) */
  table.layout { display: table; width: 100%; border-collapse: collapse; }
  table.layout > thead { display: table-header-group; }
  table.layout > tbody { display: table-row-group; }
  table.layout tr { display: table-row; } table.layout td { display: table-cell; padding: 0; }
  .ph-inner { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--iml-gold); padding-bottom: 6px; margin-bottom: 10px; }
  .ph-inner img { width: 78px; height: auto; }
  .ph-text { flex: 1; min-width: 0; }
  .ph-text b { display: block; font-size: 14px; }
  .ph-text span { display: block; font-size: 9px; color: #333; }
  .ph-date { font-size: 8.5px; color: #555; text-align: right; white-space: nowrap; }
  .card .where { font-size: 8px; color: #555; }
  .dept { margin-bottom: 12px; }
  .dept-head { break-after: avoid; margin-bottom: 6px; }
  .dept-head h2 { font-size: 12px; color: #000; }
  .dept-head .count { color: #555; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 4px 10px; }
  .card, .card.has-photo { border: 0; padding: 3px 0; gap: 6px; align-items: center; break-inside: avoid; }
  .card:hover { box-shadow: none; transform: none; }
  /* No photo: light outlined initials (saves ink) */
  .avatar { flex: 0 0 28px; width: 28px; height: 28px; font-size: 9px; background: none; color: #666; border: 1px solid #bbb; }
  /* Photo: small portrait thumbnail */
  .card.has-photo .avatar { flex: 0 0 42px; width: 42px; height: 52px; min-height: 0; border: 0; border-radius: 4px; }
  .card.has-photo .card-body { padding: 0; }
  .card .name { font-size: 11px; margin: 0; }
  .card .title { font-size: 8.5px; }
  .card .email, .card .phone { font-size: 9px; color: #000; }
  /* Footer prints as one gray copyright line */
  .site-footer section { padding-top: 6px !important; border-top: 1px solid #ccc; }
  .site-footer .container { max-width: none; padding: 0 !important; }
  .site-footer p, .site-footer p span { font-size: 8.5px; color: #555 !important; }
  .site-footer .footer-employees { display: none; }
  .container { max-width: none; padding: 0; }
  a { color: #000; }
}
