/* ═══════════════════════════════════════════════════
   ESCO TOOL — SHARED COMPONENTS
   Top bar, header, footer, CTA bands, cards
   ═══════════════════════════════════════════════════ */


/* ═══ TOP BAR ═══ */

.top-bar {
  background: var(--text-primary);
  padding: 10px 0;
  font-size: 16px;
  color: rgba(255,255,255,0.85);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}

.top-bar a:hover { color: var(--esco-red-bright); }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}


/* ═══ SOCIAL ICONS ═══ */

.social-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: rgba(255,255,255,0.85);
  transition: all 0.25s;
}

.social-icon:hover {
  border-color: var(--esco-red);
  background: var(--esco-red);
  color: #fff;
}

.social-icon svg { width: 14px; height: 14px; fill: currentColor; }


/* ═══ MAIN HEADER / NAV ═══ */

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(28, 28, 28, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: var(--header-height);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 0; }

.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  padding: 28px 18px;
  position: relative;
  transition: color 0.25s;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--esco-red);
  transition: width 0.3s ease;
}

.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: #fff; }
.main-nav a.active::after { width: 100%; }

.nav-cta { margin-left: 16px; }


/* ═══ HEADER SEARCH ═══ */

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 16px;
}

.header-search-input {
  width: 220px;
  height: 42px;
  padding: 0 42px 0 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.header-search-input::placeholder { color: rgba(255,255,255,0.45); }

.header-search-input:focus {
  width: 280px;
  background: rgba(255,255,255,0.12);
  border-color: var(--esco-red);
  box-shadow: 0 0 0 3px rgba(219,0,0,0.15);
}

.header-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--esco-red);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}

.header-search-btn:hover { background: var(--esco-red-bright); }

.header-search-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}


/* ═══ SEARCHWP LIVE AJAX SEARCH DROPDOWN ═══ */

.searchwp-live-search-results {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 4px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15) !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  z-index: 10000 !important;
  margin-top: 8px !important;
}

.searchwp-live-search-results .searchwp-live-search-result {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border-light) !important;
  transition: background 0.15s !important;
}

.searchwp-live-search-results .searchwp-live-search-result:last-child {
  border-bottom: none !important;
}

.searchwp-live-search-results .searchwp-live-search-result:hover,
.searchwp-live-search-results .searchwp-live-search-result:focus {
  background: var(--esco-red-bg) !important;
}

.searchwp-live-search-results .searchwp-live-search-result a {
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  text-decoration: none !important;
}

.searchwp-live-search-results .searchwp-live-search-result--title a {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--text-primary) !important;
}

.searchwp-live-search-results .searchwp-live-search-result--title a:hover {
  color: var(--esco-red) !important;
}

.searchwp-live-search-results .searchwp-live-search-result--img {
  width: 48px !important;
  height: 48px !important;
  border-radius: 4px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.searchwp-live-search-no-results {
  padding: 24px 16px !important;
  text-align: center !important;
  color: var(--text-muted) !important;
  font-size: 16px !important;
}

/* Scrollbar styling for the dropdown */
.searchwp-live-search-results::-webkit-scrollbar { width: 6px; }
.searchwp-live-search-results::-webkit-scrollbar-track { background: var(--bg-secondary); }
.searchwp-live-search-results::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
.searchwp-live-search-results::-webkit-scrollbar-thumb:hover { background: var(--esco-red); }


/* ═══ HAMBURGER ═══ */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
  display: block;
}


/* ═══ MOBILE NAV OVERLAY ═══ */

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(28, 28, 28, 0.98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 16px 24px;
  transition: color 0.2s;
}

.mobile-nav a:hover { color: var(--esco-red-bright); }

.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 32px;
}


/* ═══ FOOTER ═══ */

.site-footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.8);
}

.footer-main { padding: 64px 0 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-top: 16px;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--esco-red-bright); }

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social .social-icon {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
}


/* ═══ GLOBAL CTA BAND ═══ */

.cta-band {
  position: relative;
  padding: clamp(48px, 6vw, 80px) 0;
  background: url('/wp-content/uploads/2015/09/15438.jpg') center/cover no-repeat fixed;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(219,0,0,0.92) 0%, rgba(168,0,0,0.88) 100%);
}

.cta-band .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.cta-band h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  text-transform: uppercase;
  color: #fff;
  max-width: 600px;
  line-height: 1.1;
}

.cta-band p {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  margin-top: 8px;
  max-width: 500px;
}

.cta-band-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}


/* ═══ PAGE HERO BANNER ═══ */
/* Used on archive pages, default pages with featured images, etc. */

.page-hero {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 0;
  background: var(--text-primary);
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--esco-red), var(--esco-red-bright), var(--esco-red));
}

.page-hero .container { position: relative; z-index: 2; }

.page-hero .eyebrow { margin-bottom: 8px; }

.page-hero .section-title {
  color: #fff;
  max-width: 700px;
}

.page-hero .section-sub {
  color: rgba(255,255,255,0.8);
  margin-top: 16px;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}


/* ═══ PROOF BAR ═══ */

.proof-bar {
  background: var(--bg-primary);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

.proof-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.proof-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--esco-red-bg);
  border: 1px solid var(--esco-red-border);
  border-radius: 10px;
}

.proof-icon svg { width: 20px; height: 20px; stroke: var(--esco-red); fill: none; stroke-width: 2; }


/* ═══ RESPONSIVE ═══ */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .header-search { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cta-band .container { flex-direction: column; text-align: center; }
  .cta-band-buttons { justify-content: center; }
  .proof-bar .container { gap: 28px; }
  .page-hero { text-align: center; }
  .page-hero .section-sub { margin-left: auto; margin-right: auto; }
}
