/*
 * City company directories (single-moving-companies.php, /moving-companies/<city>/).
 * Builds on css/companies.css (the hub's .thl styles, loaded first); everything here is
 * scoped under .thd. Version: ThemeConstants::DIRECTORY_VERSION.
 */
.thd h3{margin:0}

/* Hero: text left, city photo right (lg+ only) */
.thd-hero{padding-bottom:112px}
.thd-hero .thl-hero-grid{align-items:center}
.thd .thd-hl{color:#F2B6E8}
.thd h1.thl-title{font-size:48px;max-width:640px}
.thd .thl-lede{margin-top:20px}
.thd-ctas{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}
.thd-ctas .btn{height:52px;padding:0 24px;font-size:16px}
.thd .btn-g{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.32)}
.thd .btn-g:hover{background:rgba(255,255,255,.16);border-color:#fff;color:#fff}
.thd-photo{position:relative;flex:none;width:460px;margin:0}
.thd-photo img{width:460px;height:380px;object-fit:cover;border-radius:24px;border:1px solid rgba(255,255,255,.16);box-shadow:0 30px 60px rgba(0,0,0,.28)}
.thd-float{position:absolute;left:-36px;bottom:28px;display:grid;gap:3px;max-width:310px;padding:14px 18px;background:#fff;border-radius:16px;box-shadow:0 18px 40px rgba(13,54,89,.28);color:#0D3659}
.thd a.thd-float{color:#0D3659;transition:transform .2s,box-shadow .2s}
.thd a.thd-float:hover{color:#0D3659;transform:translateY(-2px);box-shadow:0 22px 44px rgba(13,54,89,.34)}
.thd-float .k{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8F3985}
.thd-float b{font-size:16px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
.thd-float .r{display:flex;align-items:center;gap:6px;font-size:13px;color:#5B6B82}

/* List header: ACF companies title + description */
.thd-head{margin-bottom:18px}
.thd-head h2{font-size:30px;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:#0D3659}
.thd-desc{margin-top:8px;font-size:16px;line-height:1.6;color:#5B6B82}
.thd-desc p{margin:0}
.thd-desc p+p{margin-top:8px}

/* Company rows (template-parts/directory-company.php) */
.thd h3.thl-name{font-size:20px;font-weight:800;line-height:1.2;letter-spacing:-.01em;overflow-wrap:anywhere}
.thd .thl-acts{width:196px}
.thd .thl-acts .btn-p{height:auto;min-height:46px;padding:10px 14px;white-space:normal;line-height:1.25;text-align:center}
.thd .thl-facts li b{font-weight:700;color:#0D3659}
.thd .thl-facts .thd-dist{color:#0D3659;font-weight:600}
.thd .thl-facts .thd-dist svg{color:#8F3985}

/* Rows after the first 10: folded until "Show all" (still in the HTML) */
.thd-rest{margin-top:16px}
.thd-rest:not(.is-open){display:none}
.thd-morebar{display:flex;justify-content:center;margin-top:20px}
.thd-morebar .btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.thd-morebar svg{transition:transform .2s}

/* Top-rated fill-up when few companies are near the city */
.thd-sub{margin:32px 0 16px;padding:18px 20px;border-radius:16px;background:#F5F7FF;border:1px solid #E3E7EF}
.thd-sub h3{font-size:18px;font-weight:800;color:#0D3659}
.thd-sub p{margin-top:4px;font-size:14.5px;line-height:1.55;color:#5B6B82}

/* Services ("How can we help?", Options services) */
.thd-svcs{margin-top:72px;padding:36px;border-radius:24px;background:#F5F7FF;border:1px solid #E3E7EF}
.thd-svcs-head{display:flex;justify-content:space-between;align-items:flex-end;gap:8px 24px;flex-wrap:wrap;margin-bottom:24px}
.thd-svcs-head h2{font-size:30px;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:#0D3659}
.thd-svcs-head p{font-size:15px;color:#5B6B82}
.thd-svc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.thd-svc-grid a{display:flex;align-items:center;gap:14px;min-height:72px;padding:12px 16px;background:#fff;border:1px solid #E3E7EF;border-radius:16px;color:#0D3659;font-size:16px;font-weight:700;transition:border-color .2s,box-shadow .2s,color .2s}
.thd-svc-grid a:hover{border-color:#C9A3C4;box-shadow:0 10px 26px rgba(13,54,89,.08);color:#8F3985}
.thd-svc-grid .ic{width:44px;height:44px;border-radius:12px;background:#F1E7F0;color:#8F3985;display:flex;align-items:center;justify-content:center;flex:none}
.thd-svc-grid .ic .icon{width:24px;height:24px}
.thd-svc-grid .n{flex:1;min-width:0;line-height:1.25}
.thd-svc-grid a > svg{color:#9AA6B8;transition:transform .2s,color .2s}
.thd-svc-grid a:hover > svg{color:#8F3985;transform:translateX(3px)}

.thd .thl-hero-main{flex-basis:520px}

/* "Moving Companies Near {City}" (outside .thl, so its link colours are its own) */
.thd-near{font-family:Inter,system-ui,sans-serif;color:#0D3659;padding:0 0 96px}
.thd-near *,.thd-near *::before,.thd-near *::after{box-sizing:border-box}
.thd-near-in{max-width:1200px;margin:0 auto;padding:0 32px}
.thd-near-head{display:flex;justify-content:space-between;align-items:flex-end;gap:8px 24px;flex-wrap:wrap;margin-bottom:24px}
.thd-near h2{margin:0;font-size:30px;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:#0D3659}
.thd-near-head p{margin:0;font-size:15px;line-height:1.55;color:#5B6B82}
.thd-near-head p a{color:#8F3985;font-weight:600;text-decoration:underline;text-underline-offset:2px}
.thd-near-head p a:hover{text-decoration:none}
.thd-near-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.thd-near-grid a{display:flex;flex-direction:column;justify-content:center;gap:2px;height:100%;min-height:68px;padding:12px 16px;background:#fff;border:1px solid #E3E7EF;border-radius:14px;text-decoration:none;transition:border-color .2s,box-shadow .2s}
.thd-near-grid a:hover{border-color:#C9A3C4;box-shadow:0 10px 26px rgba(13,54,89,.08)}
.thd-near-grid .n{font-size:15px;font-weight:700;line-height:1.25;color:#0D3659;overflow-wrap:anywhere}
.thd-near-grid a:hover .n{color:#8F3985}
.thd-near-grid .s{font-size:13px;color:#5B6B82}
.thd-near-all{display:flex;justify-content:center;margin-top:28px}
.thd-near-all a{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 20px;border:1px solid #CBD2E0;border-radius:10px;background:#fff;font-size:15px;font-weight:600;color:#0D3659;text-decoration:none;transition:border-color .2s,color .2s}
.thd-near-all a:hover{border-color:#0D3659;color:#0D3659}
.thd-near a:focus-visible{outline:3px solid #F59E0B;outline-offset:2px}

@media (max-width:1279px){
  .thd-photo,.thd-photo img{width:400px}
  .thd-photo img{height:340px}
  .thd-float{left:-24px}
}
@media (max-width:1023px){
  .thd-photo{display:none}
  .thd-svc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .thd-near-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:767px){
  .thd-hero{padding-bottom:76px}
  .thd-ctas{margin-top:22px;gap:10px}
  .thd-ctas .btn{height:48px;font-size:15px;padding:0 18px}
  .thd-head h2,.thd-svcs-head h2{font-size:24px}
  .thd-desc{font-size:15px}
  .thd h3.thl-name{font-size:17px}
  .thd .thl-acts{width:auto}
  .thd .thl-acts .btn-p{min-height:44px;padding:8px 10px;font-size:14px}
  .thd-svcs{margin-top:48px;padding:20px 16px;border-radius:20px}
  .thd-svcs-head{margin-bottom:16px}
  .thd h1.thl-title{font-size:32px}
  .thd-svc-grid{gap:8px}
  .thd-svc-grid a{min-height:56px;gap:10px;font-size:14px;padding:8px 10px;border-radius:14px}
  .thd-svc-grid a > svg{display:none}
  .thd-svc-grid .ic{width:34px;height:34px;border-radius:10px}
  .thd-svc-grid .ic .icon{width:20px;height:20px}
  .thd-near{padding-bottom:64px}
  .thd-near-in{padding:0 16px}
  .thd-near h2{font-size:24px}
  .thd-near-head{margin-bottom:16px}
  .thd-near-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .thd-near-grid a{min-height:60px;padding:10px 12px;border-radius:12px}
}
@media (max-width:420px){
  .thd-ctas .btn{flex:1 1 100%}
}
