/* ==========================================================================
   Directory extras (templates/directory/directory.php)
   Professional, sectioned redesign of the ETM / operator / training directory.
   Owns ALL new page-level blocks: page header, search bar, value boxes,
   browse-by-category grid, sidebar filter panel + selectable pills, results
   emphasis, recently-listed section, SEO copy, request-TM CTA band.
   etm.css owns .etm-dir2 (max-width 1560), .etm-rcard*, .etm-vbadge*, .etm-stars.
   Brand: navy #001238 / navy2 #0d1f4c / teal #00c9a7 / line #e3e8f1 /
          soft #f6f8fc / muted #64748b.
   ========================================================================== */

/* ---- Section rhythm: generous, clean spacing between blocks ------------- */
.etm-dir2 > section,
.etm-dir2 > .etm-dir2-layout{ margin:0 0 40px; }
.etm-dir2 > section:last-child{ margin-bottom:0; }

/* ---- 1. Page header (H1 + intro) above the search ---------------------- */
.etm-dir2-pagehead{ margin:0 0 22px; max-width:880px; }
.etm-dir2-pagehead h1{
  font-size:38px;line-height:1.1;font-weight:900;letter-spacing:-1px;
  color:#001238;margin:0 0 12px;
}
.etm-dir2-pagehead .etm-dir2-sub{
  font-size:17px;line-height:1.6;color:#475569;margin:0;font-weight:500;
}

/* ---- 2. Search bar ----------------------------------------------------- */
.etm-dir2-searchbar{ margin:0 0 34px; }
.etm-dir2-search{
  display:flex;align-items:center;gap:12px;background:#fff;
  border:2px solid #d4dbe8;border-radius:16px;padding:8px 8px 8px 18px;
  box-shadow:none;
  transition:border-color .15s, box-shadow .15s;
}
.etm-dir2-search:focus-within{ border-color:#E01E26; box-shadow:none; }
.etm-dir2-search input[type="search"],
.etm-dir2-search select{ box-shadow:none; }
.etm-dir2-search .etm-dir2-search-ico{ display:inline-flex;color:#00a98c;flex:none; }
.etm-dir2-search .etm-dir2-search-ico svg{ width:24px;height:24px; }
.etm-dir2-search input[type="search"]{
  flex:1;min-width:0;border:none;outline:none;background:transparent;
  font-size:17px;font-weight:500;color:#0f172a;font-family:inherit;padding:13px 4px;
}
.etm-dir2-search input[type="search"]::placeholder{ color:#94a3b8;font-weight:400; }
.etm-dir2-search select{
  flex:none;border:1px solid #e3e8f1;border-radius:11px;background:#f6f8fc;
  font-size:14.5px;color:#17233f;font-family:inherit;padding:12px 14px;cursor:pointer;
}
.etm-dir2-search .etm-btn{ flex:none;padding:14px 28px;font-size:15px;font-weight:700;border-radius:11px; }

/* ---- 3. Value props — BIG, aligned icon boxes -------------------------- */
.etm-dir2-values{
  display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:0 0 40px;
}
.etm-dir2-value{
  display:flex;flex-direction:column;gap:14px;background:#fff;
  border:1px solid #e3e8f1;border-radius:18px;padding:24px 22px;
  transition:box-shadow .18s,transform .18s,border-color .18s;
}
.etm-dir2-value:hover{
  box-shadow:0 14px 34px rgba(0,18,56,.08);transform:translateY(-2px);
  border-color:rgba(0,201,167,.45);
}
.etm-dir2-value-ico{
  display:inline-flex;align-items:center;justify-content:center;
  width:58px;height:58px;border-radius:16px;flex:none;
  background:rgba(0,201,167,.12);color:#00a98c;
}
.etm-dir2-value-ico svg{ width:28px;height:28px; }
.etm-dir2-value-txt strong{
  display:block;font-size:16px;color:#001238;font-weight:800;margin:0 0 5px;letter-spacing:-.2px;
}
.etm-dir2-value-txt span{ display:block;font-size:13.5px;line-height:1.6;color:#64748b; }

/* ---- 4. Browse by category — BOLD NAVY/BLUE icon cards w/ counts -------- */
.etm-dir2-browse h2{
  font-size:22px;font-weight:800;color:#001238;margin:0 0 18px;letter-spacing:-.4px;
}
.etm-dir2-browse-grid{ display:grid;grid-template-columns:repeat(4,1fr);gap:16px; }
.etm-dir2-browse-card{
  display:flex;align-items:center;gap:15px;
  background:linear-gradient(150deg,#0d1f4c 0%,#001238 100%);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;padding:20px 19px;text-decoration:none;color:#fff;
  position:relative;overflow:hidden;
  box-shadow:0 6px 18px rgba(0,18,56,.18);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
/* subtle teal glow accent in the corner */
.etm-dir2-browse-card::after{
  content:"";position:absolute;right:-40px;top:-40px;width:120px;height:120px;
  background:radial-gradient(circle,rgba(0,201,167,.22),transparent 70%);
  opacity:.7;transition:opacity .18s ease;pointer-events:none;
}
.etm-dir2-browse-card:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 36px rgba(0,18,56,.32);
  border-color:rgba(0,201,167,.55);
}
.etm-dir2-browse-card:hover::after{ opacity:1; }
.etm-dir2-browse-card.is-active{
  border-color:#00c9a7;
  box-shadow:0 0 0 2px rgba(0,201,167,.6),0 14px 32px rgba(0,18,56,.3);
}
.etm-dir2-browse-ico{
  display:inline-flex;align-items:center;justify-content:center;
  width:50px;height:50px;border-radius:13px;flex:none;
  background:rgba(255,255,255,.1);color:#fff;
  border:1px solid rgba(255,255,255,.14);position:relative;z-index:1;
}
.etm-dir2-browse-card:hover .etm-dir2-browse-ico,
.etm-dir2-browse-card.is-active .etm-dir2-browse-ico{
  background:rgba(0,201,167,.2);border-color:rgba(0,201,167,.5);color:#00f0c8;
}
.etm-dir2-browse-ico svg{ width:24px;height:24px; }
.etm-dir2-browse-body{ display:flex;flex-direction:column;gap:4px;min-width:0;position:relative;z-index:1; }
.etm-dir2-browse-name{ font-weight:800;font-size:15.5px;line-height:1.25;color:#fff;letter-spacing:-.2px; }
.etm-dir2-browse-count{
  font-size:12px;font-weight:700;color:rgba(255,255,255,.62);
  text-transform:uppercase;letter-spacing:.04em;
}

/* ---- 4b. "All categories" back-link (shown on filtered/landing views) -- */
.etm-dir2-backlink{ margin:0 0 6px; }
.etm-dir2-allcats{
  display:inline-flex;align-items:center;gap:8px;text-decoration:none;
  font-size:13.5px;font-weight:700;color:#0d1f4c;
  background:#f6f8fc;border:1px solid #e3e8f1;border-radius:999px;
  padding:8px 16px;transition:background .15s,border-color .15s,color .15s;
}
.etm-dir2-allcats:hover{ background:#fff;border-color:#00c9a7;color:#00a98c; }
.etm-dir2-allcats svg{ width:15px;height:15px;transform:rotate(180deg); }

/* ---- 5. Layout: sidebar (distinct panel) + results (main focus) -------- */
.etm-dir2-layout{
  display:grid;grid-template-columns:320px minmax(0,1fr);gap:30px;align-items:start;
}

/* Sidebar reads as a distinct, sticky panel */
.etm-dir2-filters{ position:sticky;top:24px;display:flex;flex-direction:column;gap:18px; }
.etm-dir2-fcard{
  background:#fff;border:1px solid #e3e8f1;border-radius:18px;padding:22px 20px;
  box-shadow:0 10px 30px rgba(0,18,56,.05);
}
.etm-dir2-fcard-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid #eef2f9;
}
.etm-dir2-fcard-head h3{ font-size:16px;font-weight:800;color:#001238;margin:0; }
.etm-dir2-clear{
  font-size:12.5px;font-weight:700;color:#00a98c;text-decoration:none;flex:none;
}
.etm-dir2-clear:hover{ text-decoration:underline; }

.etm-filter-block{ margin:0 0 18px; }
/* Higher specificity + !important to beat etm.css `.etm-filter-block label`. */
.etm-filter-block .etm-filter-label{
  display:block;font-size:13px;font-weight:800 !important;letter-spacing:.04em;text-transform:uppercase;
  color:#000 !important;margin:0 0 9px;
}
.etm-dir2-fcard select{
  width:100%;border:1px solid #e3e8f1;border-radius:11px;background:#f6f8fc;
  font-size:14px;color:#17233f;font-family:inherit;padding:11px 12px;cursor:pointer;
}
.etm-dir2-fcard select:focus{ outline:none;border-color:#00c9a7;background:#fff; }
.etm-dir2-fcard .etm-btn-block{ margin-top:4px; }

/* Selectable filter pills (services / sectors / member / certifications) */
.etm-pillset{ display:flex;flex-wrap:wrap;gap:8px; }
.etm-pill{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  border:1px solid #e3e8f1;background:#fff;border-radius:999px;
  padding:7px 13px;font-size:13px;font-weight:600;color:#334155;
  line-height:1.2;transition:border-color .15s,background .15s,color .15s,box-shadow .15s;
}
.etm-pill:hover{ border-color:#cbd5e1; }
.etm-pill input{
  position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;
}
.etm-pill svg{ width:15px;height:15px;color:#94a3b8;flex:none; }
/* Selected state — applied both server-side (.is-on) and immediately on click
   (:has(input:checked)) so the pill highlights green the moment you tap it,
   not only after Apply. */
.etm-pill.is-on,
.etm-pill:has(input:checked){
  border-color:#00c9a7;background:rgba(0,201,167,.12);color:#05382e;
  box-shadow:inset 0 0 0 1px rgba(0,201,167,.55);
}
.etm-pill.is-on svg,
.etm-pill:has(input:checked) svg{ color:#00a98c; }
/* Member type radios: equal pills, icon stacked above label so all three line up
   identically (short "Free" no longer renders inline while the longer two wrap). */
.etm-pillset-radio .etm-pill{ display:flex !important;flex:1;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:5px;min-width:0;padding:10px 8px; }
.etm-pillset-radio .etm-pill svg{ margin:0; }
/* Certification pills sit on their own lines for legibility */
.etm-pillset-cert .etm-pill-cert{ }

/* Sidebar CTA card (ETM only) */
.etm-dir2-sidecta{
  background:linear-gradient(135deg,#001238,#0d1f4c);border-radius:18px;
  padding:22px 20px;color:#fff;
}
.etm-dir2-sidecta h3{ font-size:16px;font-weight:800;margin:0 0 7px;color:#fff; }
.etm-dir2-sidecta p{ font-size:13.5px;line-height:1.6;color:rgba(255,255,255,.82);margin:0 0 15px; }

/* Results column — the main focus */
.etm-dir2-count{
  font-size:15px;color:#475569;margin:0 0 18px;font-weight:500;
}
.etm-dir2-count strong{ color:#001238;font-weight:800;font-size:17px; }
.etm-rcard-list{ display:flex;flex-direction:column;gap:16px; }

/* ---- 6. Recently listed — its own full-width section ------------------- */
.etm-dir2-recent-section{
  margin-top:8px;border-top:1px solid #e3e8f1;padding-top:34px;
}
.etm-dir2-recent-section .etm-recent{ margin:0; }

/* ---- 7. SEO copy block ------------------------------------------------- */
.etm-dir2-seo{ border-top:1px solid #e3e8f1;padding-top:34px; }
.etm-dir2-seo > *{ max-width:920px;box-sizing:border-box; }
.etm-dir2-seo h2{
  font-size:22px;font-weight:800;color:#001238;margin:0 0 14px;letter-spacing:-.4px;
}
.etm-dir2-seo h3{
  font-size:18px;font-weight:800;color:#001238;margin:28px 0 10px;letter-spacing:0;
}
.etm-dir2-seo p{ font-size:15.5px;line-height:1.78;color:#475569;max-width:920px;margin:0 0 16px; }
.etm-dir2-seo ul,
.etm-dir2-seo ol{
  width:fit-content;max-width:920px;margin:0 0 18px;padding-left:22px;list-style-position:outside;color:#475569;
}
.etm-dir2-seo li{ max-width:880px;padding-left:4px;margin:7px 0;line-height:1.65; }

/* ---- 7b. ETM location cross-links — pill grid -------------------------- */
.etm-dir2-locations{ border-top:1px solid #e3e8f1;padding-top:34px;margin:40px 0 52px; }
.etm-dir2-locations h2{
  font-size:22px;font-weight:800;color:#001238;margin:0 0 8px;letter-spacing:-.4px;
}
.etm-dir2-locations-sub{ font-size:15px;color:#64748b;margin:0 0 18px; }
.etm-dir2-locations-grid{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;
}
.etm-dir2-locations-grid a{
  display:flex;align-items:center;gap:9px;text-decoration:none;
  background:#f6f8fc;border:1px solid #e3e8f1;border-radius:12px;
  padding:13px 15px;font-size:14px;font-weight:700;color:#17233f;
  transition:background .15s,border-color .15s,color .15s,transform .15s;
}
.etm-dir2-locations-grid a:hover{
  background:#fff;border-color:#00c9a7;color:#0d1f4c;transform:translateY(-2px);
}
.etm-dir2-locations-grid svg{ width:16px;height:16px;color:#00a98c;flex:none; }

/* ---- 8. Request-TM CTA band -------------------------------------------- */
.etm-dir2-cta-band-inner{
  background:linear-gradient(135deg,#001238 0%,#0d1f4c 100%);
  border-radius:22px;padding:48px 40px;text-align:center;color:#fff;
  position:relative;overflow:hidden;
}
.etm-dir2-cta-band-inner::after{
  content:"";position:absolute;right:-50px;top:-50px;width:240px;height:240px;
  background:radial-gradient(circle,rgba(0,201,167,.28),transparent 70%);
}
.etm-dir2-cta-band-inner h2{
  font-size:27px;font-weight:900;letter-spacing:-.6px;margin:0 0 12px;color:#fff;position:relative;
}
.etm-dir2-cta-band-inner p{
  font-size:16px;line-height:1.65;max-width:680px;margin:0 auto 24px;
  color:rgba(255,255,255,.88);position:relative;
}
.etm-dir2-cta-band-inner .etm-btn-lg{
  background:#00c9a7;color:#04221b;font-weight:800;font-size:15.5px;border-radius:12px;
  padding:14px 28px;display:inline-flex;align-items:center;gap:9px;text-decoration:none;position:relative;
}
.etm-dir2-cta-band-inner .etm-btn-lg svg{ width:19px;height:19px; }
.etm-dir2-cta-band-inner .etm-btn-lg:hover{ filter:brightness(.96); }

/* ---- Responsive -------------------------------------------------------- */
@media(max-width:1200px){
  .etm-dir2-layout{ grid-template-columns:280px minmax(0,1fr);gap:24px; }
  .etm-dir2-values{ grid-template-columns:repeat(2,1fr); }
  .etm-dir2-browse-grid{ grid-template-columns:repeat(3,1fr); }
  .etm-dir2-locations-grid{ grid-template-columns:repeat(3,1fr); }
}
@media(max-width:900px){
  .etm-dir2-pagehead h1{ font-size:30px; }
  .etm-dir2-layout{ grid-template-columns:1fr; }
  .etm-dir2-filters{ position:static; }
  .etm-dir2-browse-grid{ grid-template-columns:repeat(2,1fr); }
  .etm-dir2-locations-grid{ grid-template-columns:repeat(2,1fr); }
}
@media(max-width:620px){
  .etm-dir2-search{ flex-wrap:wrap; }
  .etm-dir2-search input[type="search"]{ flex:1 1 100%;order:-1; }
  .etm-dir2-search select,.etm-dir2-search .etm-btn{ flex:1; }
  .etm-dir2-values{ grid-template-columns:1fr; }
  .etm-dir2-browse-grid{ grid-template-columns:1fr; }
  .etm-dir2-locations-grid{ grid-template-columns:1fr; }
  .etm-dir2-cta-band-inner{ padding:34px 22px; }
  .etm-dir2-cta-band-inner h2{ font-size:22px; }
}
.etm-dir2-pagination{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:32px 0 8px}
.etm-page-btn{min-width:40px;height:40px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e3e8f1;border-radius:10px;background:#fff;color:#001238;font-weight:700;font-size:14px;text-decoration:none;transition:.15s}
.etm-page-btn:hover{border-color:#00c9a7;color:#00a98c}
.etm-page-btn.is-active{background:#001238;color:#fff;border-color:#001238}
.etm-page-gap{display:inline-flex;align-items:center;padding:0 4px;color:#94a3b8}

/* Operator card "Claim this business": one line, dark-blue primary */
.etm-btn-claim-card{white-space:nowrap;font-size:13.5px;padding-left:10px;padding-right:10px;gap:6px;}
.etm-btn-claim-card svg{width:15px;height:15px;flex:none;}

/* Directory: add-business header button + after-5 inline CTA bar */
.etm-dir2-pagehead{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap}
.etm-dir2-headmain{flex:1;min-width:240px}
.etm-dir2-addhead{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.etm-dir2-addlabel{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#64748b}
.etm-dir2-addbtn{white-space:nowrap}
.etm-dir2-inline-cta{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;background:#f3fbf9;border:1px solid #bfe9df;border-radius:12px;padding:13px 18px;margin:4px 0}
.etm-dir2-inline-cta span{font-weight:600;color:#001238;font-size:14px}
@media(max-width:600px){.etm-dir2-addhead{align-items:flex-start;width:100%}}

/* Directory CTA tweaks (2026-06-08): dark-navy bar, white button, blue header link */
.etm-dir2-inline-cta{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#001238;border:1px solid #001238;border-radius:12px;padding:16px 22px;margin:8px 0}
.etm-dir2-inline-cta span{font-weight:600;color:#fff;font-size:15px}
.etm-dir2-cta-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;color:#001238;font-weight:700;font-size:14px;padding:9px 16px;border-radius:8px;text-decoration:none;white-space:nowrap}
.etm-dir2-cta-btn:hover{background:#eafaf6}
.etm-dir2-cta-btn svg{width:16px;height:16px}
.etm-dir2-addlink{display:inline-flex;align-items:center;gap:6px;color:#1a56db;font-weight:700;font-size:15px;text-decoration:none;white-space:nowrap;flex-shrink:0;margin-left:auto}
.etm-dir2-addlink:hover{text-decoration:underline}
.etm-dir2-addlink svg{width:16px;height:16px}

/* Header must span full content width so the Add-business link sits far right */
.etm-dir2-pagehead{max-width:none}
.etm-dir2-headmain{max-width:820px}

/* Search-bar Reset link */
.etm-dir2-reset{background:#fff;border:1px solid #d8dee9;color:#33415a}
.etm-dir2-reset:hover{background:#f1f4f9;color:#001238}
