/* =====================================================================
   TestPros native header + footer
   Replaces Elementor header (26493) and footer (26510).
   Everything is scoped under #tp-header / #tp-footer so the ID beats
   Hello Elementor + Elementor Kit element styles (buttons, links, h2).
   Breakpoint: desktop nav > 1024px, hamburger drawer <= 1024px.
   ===================================================================== */

#tp-header, #tp-footer { --tp-navy:#0D1B3E; --tp-blue:#3D55AB; --tp-dblue:#2A3C78; --tp-gold:#FFB23E; --tp-gold-d:#E89615; --tp-ink:#22314F; --tp-line:#E3E7F0; --tp-tint:#EFF3FB; }
#tp-header *, #tp-header *::before, #tp-header *::after,
#tp-footer *, #tp-footer *::before, #tp-footer *::after { box-sizing:border-box; }
#tp-header a, #tp-footer a { text-decoration:none; box-shadow:none; }
#tp-header ul, #tp-footer ul { list-style:none; margin:0; padding:0; }
#tp-header button, #tp-footer button { font:inherit; margin:0; text-transform:none; }

/* Shared focus ring (visible on white and navy) */
#tp-header :focus-visible { outline:3px solid var(--tp-blue); outline-offset:2px; border-radius:6px; }
#tp-footer :focus-visible { outline:3px solid var(--tp-gold); outline-offset:3px; border-radius:4px; }

.tp-h-sr, .tp-f-sr { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#tp-header .tp-h-sr { color:#222222; }
#tp-footer .tp-f-sr { color:#C8D4E8; }

/* =====================================================================
   HEADER
   ===================================================================== */
#tp-header { position:sticky; top:0; z-index:999; background-color:#FFFFFF; border-bottom:1px solid var(--tp-line); font-family:'Mulish',Arial,sans-serif; }
.admin-bar #tp-header { top:32px; }
@media (max-width:782px){ .admin-bar #tp-header { top:46px; } }
@media (max-width:600px){ .admin-bar #tp-header { top:0; } }

#tp-header .tp-h-inner { position:relative; max-width:1240px; height:80px; margin:0 auto; padding:0 24px; display:flex; align-items:center; gap:24px; }

#tp-header .tp-h-logo { flex:0 0 auto; display:block; line-height:0; }
#tp-header .tp-h-logo img { height:44px !important; width:auto !important; max-width:none; display:block; }

/* ---------- Desktop nav ---------- */
#tp-header .tp-h-nav { flex:1 1 auto; display:flex; justify-content:center; }
#tp-header .tp-h-menu { display:flex; align-items:center; gap:4px; }
#tp-header .tp-h-item { position:relative; }
#tp-header .tp-h-item--wide { position:static; } /* Services panel anchors to .tp-h-inner */

#tp-header .tp-h-top { display:inline-flex; align-items:center; gap:7px; padding:10px 14px; background:transparent; border:0; border-radius:8px; color:var(--tp-navy); font-family:'Mulish',Arial,sans-serif; font-size:16px; font-weight:700; line-height:1.2; cursor:pointer; transition:background-color .15s ease, color .15s ease; }
#tp-header .tp-h-top:hover, #tp-header .tp-h-item.is-open > .tp-h-top { background-color:var(--tp-tint); color:var(--tp-blue); }
#tp-header .tp-h-caret { transition:transform .2s ease; }
#tp-header .tp-h-item.is-open .tp-h-caret { transform:rotate(180deg); }

/* Panels (desktop): hidden until .is-open */
#tp-header .tp-h-panel { position:absolute; top:100%; left:0; padding-top:10px; z-index:10; opacity:0; visibility:hidden; transform:translateY(6px); transition:opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
#tp-header .tp-h-item--wide .tp-h-panel { top:calc(100% - 8px); left:50%; transform:translate(-50%,6px); }
#tp-header .tp-h-item:last-child .tp-h-panel { left:auto; right:0; }
#tp-header .tp-h-item.is-open .tp-h-panel { opacity:1; visibility:visible; transform:translateY(0); transition:opacity .16s ease, transform .16s ease, visibility 0s; }
#tp-header .tp-h-item--wide.is-open .tp-h-panel { transform:translate(-50%,0); }

/* ---------- Right-side actions ---------- */
#tp-header .tp-h-actions { flex:0 0 auto; display:flex; align-items:center; gap:10px; }
#tp-header .tp-h-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; background:transparent; border:0; border-radius:8px; color:var(--tp-navy); cursor:pointer; transition:background-color .15s ease, color .15s ease; }
#tp-header .tp-h-icon-btn:hover, #tp-header .tp-h-icon-btn[aria-expanded="true"] { background-color:var(--tp-tint); color:var(--tp-blue); }

#tp-header .tp-h-cta { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:12px 24px; background-color:var(--tp-gold); color:var(--tp-navy); font-family:'Mulish',Arial,sans-serif; font-size:14px; font-weight:800; text-transform:uppercase; letter-spacing:1px; line-height:1; border-radius:2px; white-space:nowrap; transition:background-color .18s ease; }
#tp-header .tp-h-cta:hover { background-color:var(--tp-gold-d); color:var(--tp-navy); }
#tp-header .tp-h-cta--drawer { display:none; }

/* Hamburger (hidden on desktop) */
#tp-header .tp-h-burger { display:none; }
#tp-header .tp-h-burger-bars { position:relative; display:block; width:22px; height:16px; }
#tp-header .tp-h-burger-bars span { position:absolute; left:0; width:100%; height:2px; border-radius:2px; background-color:currentColor; transition:transform .2s ease, opacity .2s ease, top .2s ease; }
#tp-header .tp-h-burger-bars span:nth-child(1){ top:0; }
#tp-header .tp-h-burger-bars span:nth-child(2){ top:7px; }
#tp-header .tp-h-burger-bars span:nth-child(3){ top:14px; }
#tp-header .tp-h-burger[aria-expanded="true"] .tp-h-burger-bars span:nth-child(1){ top:7px; transform:rotate(45deg); }
#tp-header .tp-h-burger[aria-expanded="true"] .tp-h-burger-bars span:nth-child(2){ opacity:0; }
#tp-header .tp-h-burger[aria-expanded="true"] .tp-h-burger-bars span:nth-child(3){ top:7px; transform:rotate(-45deg); }

/* ---------- Search bar ---------- */
#tp-header .tp-h-search { position:absolute; left:0; right:0; top:100%; background-color:#FFFFFF; border-top:1px solid var(--tp-line); border-bottom:1px solid var(--tp-line); box-shadow:0 14px 30px rgba(13,27,62,0.10); }
#tp-header .tp-h-search[hidden] { display:none; }
#tp-header .tp-h-search-form { max-width:1240px; margin:0 auto; padding:14px 24px; display:flex; align-items:center; gap:10px; }
#tp-header .tp-h-search-form input[type="search"] { flex:1 1 auto; min-width:0; height:46px; padding:0 14px; border:1px solid #D0D5E8; border-radius:4px; background-color:#FFFFFF; color:#222222; font-family:'DM Sans',Arial,sans-serif; font-size:16px; }
#tp-header .tp-h-search-form input[type="search"]::placeholder { color:#595959; opacity:1; }
#tp-header .tp-h-search-form input[type="search"]:focus { outline:3px solid var(--tp-blue); outline-offset:0; border-color:var(--tp-blue); }
#tp-header .tp-h-search-submit { height:46px; padding:0 20px; border:0; border-radius:2px; background-color:var(--tp-blue); color:#FFFFFF; font-family:'Mulish',Arial,sans-serif; font-size:14px; font-weight:800; text-transform:uppercase; letter-spacing:1px; cursor:pointer; }
#tp-header .tp-h-search-submit:hover { background-color:var(--tp-dblue); color:#FFFFFF; }

/* =====================================================================
   DROPDOWN CARDS — carried over from the Elementor HTML widgets
   ===================================================================== */

/* --- Services mega menu (.tp-mn) --- */
#tp-header .tp-mn { position:relative; width:940px; max-width:calc(100vw - 48px); background-color:#FFFFFF; padding:28px 26px 22px; border-radius:12px; box-shadow:0 18px 44px rgba(13,27,62,0.16); font-family:'DM Sans',Arial,sans-serif; overflow:hidden; }
#tp-header .tp-mn::before, #tp-header .tp-dd::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background-color:var(--tp-gold); background-image:linear-gradient(90deg,#FFB23E,#E89615); }
#tp-header .tp-mn-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
#tp-header .tp-mn-card { border-radius:12px; padding:6px 8px 12px; }
#tp-header .tp-mn-sum { list-style:none; display:block; }
#tp-header .tp-mn-sum::-webkit-details-marker { display:none; }
#tp-header .tp-mn-head { display:flex; align-items:center; gap:12px; margin:0 0 11px; padding:10px; border-radius:10px; transition:background-color .16s ease; }
#tp-header .tp-mn-head:hover { background-color:var(--tp-tint); }
#tp-header .tp-mn-ico, #tp-header .tp-dd-grp-ico { flex:0 0 auto; width:42px; height:42px; border-radius:11px; background-color:var(--tp-gold-d); background-image:linear-gradient(135deg,#FFB23E,#E89615); display:flex; align-items:center; justify-content:center; box-shadow:0 6px 14px rgba(255,178,62,0.28); transition:transform .16s ease, box-shadow .16s ease; }
#tp-header .tp-mn-ico svg, #tp-header .tp-dd-grp-ico svg { width:22px; height:22px; display:block; }
#tp-header .tp-mn-head:hover .tp-mn-ico { transform:translateY(-2px); box-shadow:0 10px 20px rgba(255,178,62,0.40); }
#tp-header .tp-mn-pillar { font-family:'Mulish',Arial,sans-serif; font-size:18px; font-weight:800; color:var(--tp-navy); line-height:1.2; display:inline-flex; align-items:center; gap:6px; letter-spacing:-0.3px; transition:color .15s ease; }
#tp-header .tp-mn-head:hover .tp-mn-pillar { color:var(--tp-blue); }
#tp-header .tp-mn-arrow { font-size:15px; color:var(--tp-blue); transition:transform .16s ease; }
#tp-header .tp-mn-head:hover .tp-mn-arrow { transform:translateX(4px); }
#tp-header .tp-mn-acc { margin-left:auto; flex:0 0 auto; color:var(--tp-blue); font-size:20px; line-height:1; transition:transform .2s ease; display:none; }
#tp-header .tp-mn-tag { font-size:13px; color:#595959; line-height:1.5; margin:0 10px 13px; }
#tp-header .tp-mn-rule, #tp-header .tp-dd-rule { width:34px; height:3px; border-radius:3px; background-color:var(--tp-gold); background-image:linear-gradient(90deg,#FFB23E,#E89615); }
#tp-header .tp-mn-rule { margin:0 10px 12px; }
#tp-header .tp-mn-link { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-radius:8px; font-family:'Mulish',Arial,sans-serif; font-size:14.5px; font-weight:600; color:var(--tp-ink); line-height:1.3; transition:background-color .15s ease, color .15s ease; }
#tp-header .tp-mn-link:hover { background-color:var(--tp-tint); color:var(--tp-blue); }
#tp-header .tp-mn-chev, #tp-header .tp-dd-chev { color:var(--tp-blue); font-size:16px; opacity:0; transform:translateX(-5px); transition:opacity .15s ease, transform .15s ease; }
#tp-header .tp-mn-link:hover .tp-mn-chev, #tp-header .tp-mn-link:focus-visible .tp-mn-chev,
#tp-header .tp-dd-link:hover .tp-dd-chev, #tp-header .tp-dd-link:focus-visible .tp-dd-chev { opacity:1; transform:translateX(0); }
#tp-header .tp-mn-viewall { display:none; }
#tp-header .tp-mn-foot { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-top:20px; padding-top:16px; border-top:1px solid var(--tp-line); }
#tp-header .tp-mn-utils { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
#tp-header .tp-mn-util { font-family:'Mulish',Arial,sans-serif; font-size:14px; font-weight:700; color:var(--tp-blue); display:inline-flex; align-items:center; gap:7px; transition:gap .15s ease; }
#tp-header .tp-mn-util:hover { gap:11px; color:var(--tp-blue); }
#tp-header .tp-mn-ask { display:flex; align-items:center; gap:12px; font-size:13.5px; color:#595959; margin:0; }
#tp-header .tp-mn-btn { background-color:var(--tp-gold); color:var(--tp-navy); font-family:'Mulish',Arial,sans-serif; font-size:12.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.6px; padding:8px 16px; border-radius:7px; display:inline-flex; align-items:center; white-space:nowrap; transition:background-color .18s ease; }
#tp-header .tp-mn-btn:hover { background-color:var(--tp-gold-d); color:var(--tp-navy); }

/* --- Industries / Resources / Company cards (.tp-dd) --- */
#tp-header .tp-dd { position:relative; display:inline-block; background-color:#FFFFFF; border-radius:12px; box-shadow:0 18px 44px rgba(13,27,62,0.16); padding:26px 26px 20px; font-family:'DM Sans',Arial,sans-serif; overflow:hidden; }
#tp-header .tp-dd-grp { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
#tp-header .tp-dd-grp.is-second { margin-top:22px; }
#tp-header .tp-dd-grp-label { font-family:'Mulish',Arial,sans-serif; font-size:17px; font-weight:800; color:var(--tp-navy); line-height:1.2; letter-spacing:-0.3px; }
#tp-header .tp-dd-rule { margin:0 0 10px 2px; }
#tp-header .tp-dd-grid { display:grid; grid-template-columns:repeat(2, max-content); gap:2px 28px; }
#tp-header .tp-dd-link { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 11px; margin:0 -11px; border-radius:8px; font-family:'Mulish',Arial,sans-serif; font-size:14.5px; font-weight:600; color:var(--tp-ink); line-height:1.3; white-space:nowrap; transition:background-color .15s ease, color .15s ease; }
#tp-header .tp-dd-link:hover { background-color:var(--tp-tint); color:var(--tp-blue); }

/* =====================================================================
   HEADER — tablet / mobile (<= 1024px): hamburger drawer
   ===================================================================== */
@media (max-width:1024px){
  #tp-header .tp-h-inner { height:72px; padding:0 16px; gap:12px; }
  #tp-header .tp-h-logo img { height:38px !important; }
  #tp-header .tp-h-actions { margin-left:auto; gap:6px; }
  #tp-header .tp-h-burger { display:inline-flex; }

  /* Drawer */
  #tp-header .tp-h-nav { display:none; position:absolute; top:100%; left:0; right:0; flex-direction:column; justify-content:flex-start; background-color:#FFFFFF; border-top:1px solid var(--tp-line); box-shadow:0 18px 30px rgba(13,27,62,0.12); padding:8px 16px 20px; max-height:calc(100vh - 72px); max-height:calc(100dvh - 72px); overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
  #tp-header.is-nav-open .tp-h-nav { display:flex; }
  #tp-header .tp-h-menu { flex-direction:column; align-items:stretch; gap:0; }
  #tp-header .tp-h-item, #tp-header .tp-h-item--wide { position:static; border-bottom:1px solid var(--tp-line); }
  #tp-header .tp-h-top { width:100%; justify-content:space-between; padding:16px 6px; font-size:17px; border-radius:0; }
  #tp-header .tp-h-top:hover, #tp-header .tp-h-item.is-open > .tp-h-top { background-color:transparent; }

  /* Panels become inline accordions */
  #tp-header .tp-h-panel,
  #tp-header .tp-h-item--wide .tp-h-panel,
  #tp-header .tp-h-item:last-child .tp-h-panel { position:static; display:none; padding:0 0 14px; opacity:1; visibility:visible; transform:none; transition:none; }
  #tp-header .tp-h-item.is-open .tp-h-panel,
  #tp-header .tp-h-item--wide.is-open .tp-h-panel { display:block; transform:none; }

  #tp-header .tp-mn, #tp-header .tp-dd { display:block; width:auto; max-width:100%; box-shadow:none; border:1px solid var(--tp-line); border-radius:10px; padding:16px; }

  /* Services pillars collapse into their own accordion */
  #tp-header .tp-mn-grid { grid-template-columns:1fr; gap:6px; }
  #tp-header .tp-mn-card { padding:0; border-bottom:1px solid #EDF0F6; border-radius:0; }
  #tp-header .tp-mn-card:last-child { border-bottom:none; }
  #tp-header .tp-mn-sum .tp-mn-head { cursor:pointer; margin:0; }
  #tp-header .tp-mn-arrow, #tp-header .tp-mn-tag, #tp-header .tp-mn-rule { display:none; }
  #tp-header .tp-mn-acc { display:inline-block; }
  #tp-header .tp-mn-pil[open] .tp-mn-acc { transform:rotate(180deg); }
  #tp-header .tp-mn-list { padding:0 0 8px; }
  #tp-header .tp-mn-link { padding:11px 12px; }
  #tp-header .tp-mn-viewall { display:flex; align-items:center; gap:6px; margin:2px 12px 10px; font-family:'Mulish',Arial,sans-serif; font-size:13.5px; font-weight:700; color:var(--tp-blue); }
  #tp-header .tp-mn-foot { flex-direction:column; align-items:flex-start; gap:14px; margin-top:14px; }
  #tp-header .tp-mn-ask { flex-wrap:wrap; }

  #tp-header .tp-dd-grid { grid-template-columns:1fr 1fr; gap:2px 20px; }
  #tp-header .tp-dd-link { white-space:normal; padding:10px 11px; }

  #tp-header .tp-h-cta--drawer { display:flex; margin-top:18px; width:100%; }
  #tp-header .tp-h-search-form { padding:12px 16px; }
}
@media (max-width:560px){
  #tp-header .tp-h-actions > .tp-h-cta { display:none; }   /* CTA lives in the drawer on phones */
  #tp-header .tp-h-logo img { height:34px !important; }
  #tp-header .tp-h-search-submit { padding:0 14px; }
}
@media (max-width:400px){
  #tp-header .tp-dd-grid { grid-template-columns:1fr; }
}

/* Mobile drawer fills the screen below the header, so the page behind can't be
   scrolled. (Don't put overflow:hidden on html/body instead: that breaks
   position:sticky and snaps the header back to the top of the page.) */
@media (max-width:1024px){
  #tp-header.is-nav-open .tp-h-nav { height:calc(100vh - 72px); height:calc(100dvh - 72px); }
}
@media (min-width:601px) and (max-width:782px){
  .admin-bar #tp-header.is-nav-open .tp-h-nav { height:calc(100vh - 118px); height:calc(100dvh - 118px); }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
#tp-footer { background-color:#0D1B3E; color:#C8D4E8; font-family:'DM Sans',Arial,sans-serif; font-size:15px; line-height:1.6; }
#tp-footer .tp-f-inner { max-width:1240px; margin:0 auto; padding:64px 24px 48px; display:grid; grid-template-columns:minmax(280px,1.5fr) repeat(4, minmax(0,1fr)); gap:40px 32px; }

#tp-footer .tp-f-head { margin:0 0 16px !important; padding:0 0 10px; border-bottom:3px solid var(--tp-gold); display:inline-block; font-family:'Mulish',Arial,sans-serif; font-size:14px !important; line-height:1.3 !important; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:#FFFFFF; }

#tp-footer a { color:#C8D4E8; transition:color .15s ease; }
#tp-footer a:hover { color:#FFFFFF; text-decoration:underline; text-underline-offset:3px; }

/* Brand column */
#tp-footer .tp-f-logo { display:inline-block; line-height:0; margin-bottom:22px; }
#tp-footer .tp-f-logo img { height:44px !important; width:auto !important; max-width:none; display:block; }
#tp-footer .tp-f-contact li { margin:0 0 10px; }
#tp-footer .tp-f-contact a { display:inline-flex; align-items:flex-start; gap:12px; }
#tp-footer .tp-f-contact svg { flex:0 0 auto; margin-top:4px; color:var(--tp-gold); }

#tp-footer .tp-f-social { display:flex; gap:10px; margin:20px 0 32px; }
#tp-footer .tp-f-social a { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; background-color:#1C2B52; color:#FFFFFF; transition:background-color .15s ease, color .15s ease; }
#tp-footer .tp-f-social a:hover { background-color:var(--tp-gold); color:var(--tp-navy); text-decoration:none; }

/* Newsletter */
#tp-footer .tp-f-news { max-width:360px; }
#tp-footer .tp-f-label { display:block; margin:0 0 6px; font-size:14px; color:#C8D4E8; }
#tp-footer .tp-f-news-row { display:flex; gap:0; }
#tp-footer .tp-f-news input[type="email"] { flex:1 1 auto; min-width:0; height:46px; padding:0 14px; border:1px solid #3A4A75; border-right:0; border-radius:2px 0 0 2px; background-color:#FFFFFF; color:#222222; font-family:'DM Sans',Arial,sans-serif; font-size:15px; }
#tp-footer .tp-f-news input[type="email"]:focus { outline:3px solid var(--tp-gold); outline-offset:0; }
#tp-footer .tp-f-news button { flex:0 0 auto; height:46px; padding:0 18px; border:0; border-radius:0 2px 2px 0; background-color:var(--tp-gold); color:var(--tp-navy); font-family:'Mulish',Arial,sans-serif; font-size:13px; font-weight:800; letter-spacing:1px; text-transform:uppercase; cursor:pointer; transition:background-color .15s ease; }
#tp-footer .tp-f-news button:hover { background-color:var(--tp-gold-d); color:var(--tp-navy); }
#tp-footer .tp-f-news button[disabled] { opacity:.7; cursor:wait; }
#tp-footer .tp-f-news-msg { min-height:1.4em; margin:8px 0 0; font-size:14px; color:#FFFFFF; }
#tp-footer .tp-f-news-msg.is-error { color:#FFD7A3; }

/* Link columns */
#tp-footer .tp-f-col li { margin:0 0 9px; }
#tp-footer .tp-f-col a { display:inline-block; padding:2px 0; }

/* Bottom bar */
#tp-footer .tp-f-bar { border-top:1px solid #243359; }
#tp-footer .tp-f-bar-inner { max-width:1240px; margin:0 auto; padding:20px 24px; display:flex; align-items:center; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; font-size:14px; }
#tp-footer .tp-f-copy { margin:0; color:#C8D4E8; }
#tp-footer .tp-f-legal { display:flex; flex-wrap:wrap; gap:6px 24px; }

@media (max-width:1024px){
  #tp-footer .tp-f-inner { grid-template-columns:repeat(4, minmax(0,1fr)); padding:56px 24px 40px; }
  #tp-footer .tp-f-brand { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:0 40px; align-items:start; }
  #tp-footer .tp-f-news { grid-column:2; grid-row:1 / span 3; max-width:none; }
}
@media (max-width:767px){
  #tp-footer .tp-f-inner { grid-template-columns:1fr 1fr; gap:36px 24px; padding:48px 16px 32px; }
  #tp-footer .tp-f-brand { display:block; }
  #tp-footer .tp-f-bar-inner { padding:18px 16px; flex-direction:column; align-items:flex-start; }
}
@media (max-width:420px){
  #tp-footer .tp-f-news-row { flex-direction:column; gap:8px; }
  #tp-footer .tp-f-news input[type="email"] { border-right:1px solid #3A4A75; border-radius:2px; }
  #tp-footer .tp-f-news button { border-radius:2px; }
}

@media (prefers-reduced-motion:reduce){
  #tp-header *, #tp-footer * { transition:none !important; }
  #tp-header .tp-mn-head:hover .tp-mn-ico, #tp-header .tp-mn-head:hover .tp-mn-arrow { transform:none !important; }
}
