/*
 * ECS Site — Shared Inner-Page Styles
 * Used by all pages except index.html (which has inline styles)
 */

:root {
  --navy:    #1a2f52;
  --blue:    #2f5187;
  --blue-lt: #4472b8;
  --accent:  #1e6ac4;
  --accent-dk: #1558a8;
  --gray-lt: #f4f6f9;
  --gray:    #e2e8f0;
  --text:    #2d3748;
  --muted:   #6b7280;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  margin: 0;
  padding-top: 0;
}

/* ── TOP BAR ── */
.ecs-topbar {
  background: var(--navy);
  padding: 6px 0;
  font-size: 0.78rem;
}
.ecs-topbar a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.ecs-topbar a:hover { color: #fff; }
.ecs-topbar .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  margin-left: 4px;
  background: rgba(255,255,255,.07);
  color: #94a3b8;
  font-size: 0.85rem;
  transition: background .2s, color .2s;
}
.ecs-topbar .social-links a:hover { background: var(--accent); color: #fff; }

/* ── LOGO BAR ── */
.ecs-logobar {
  background: #fff;
  border-bottom: 1px solid var(--gray);
  padding: 14px 0;
}
.ecs-logobar img { height: 44px; }
.ecs-logobar .brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.5px;
  text-decoration: none;
}
.ecs-logobar .brand-name span { color: var(--accent); }
.ecs-logobar .tagline { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* ── MAIN NAV ── */
.ecs-nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.ecs-nav .navbar-toggler {
  border-color: rgba(255,255,255,.3);
}
.ecs-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.ecs-nav .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 14px 12px !important;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.ecs-nav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }

/* Mega menu */
.ecs-mega { position: static !important; }
.ecs-mega .dropdown-menu {
  width: 100%;
  left: 0;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  padding: 24px;
  margin-top: 0;
  transform: none !important;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.ecs-prod-thumb {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-lt);
  margin-bottom: 6px;
}
.ecs-prod-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ecs-prod-thumb:hover img { transform: scale(1.05); }
.ecs-prod-link { font-size: 0.78rem; font-weight: 600; color: var(--navy); text-decoration: none; display: block; }
.ecs-prod-link:hover { color: var(--accent); }
.ecs-mega-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray);
}

/* Quote button */
.ecs-nav .btn-quote {
  background: var(--accent);
  color: #fff !important;
  border-radius: 4px;
  padding: 7px 16px !important;
  font-weight: 600 !important;
  margin-left: 8px;
  font-size: 0.85rem !important;
  transition: background .2s !important;
}
.ecs-nav .btn-quote:hover { background: var(--accent-dk) !important; }

/* Nav search */
.ecs-nav-search { position: relative; }
.ecs-nav-search input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 30px 6px 10px;
  width: 170px;
  transition: background .2s, width .3s;
}
.ecs-nav-search input::placeholder { color: rgba(255,255,255,.45); }
.ecs-nav-search input:focus { outline: none; background: rgba(255,255,255,.18); width: 210px; }
.ecs-nav-search button {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.55); font-size: 0.8rem; cursor: pointer;
}

/* ── BREADCRUMB ── */
.ecs-breadcrumb {
  background: var(--gray-lt);
  border-bottom: 1px solid var(--gray);
  padding: 10px 0;
  font-size: 0.8rem;
}
.ecs-breadcrumb .breadcrumb { margin: 0; background: transparent; padding: 0; }
.ecs-breadcrumb .breadcrumb-item a { color: var(--blue-lt); text-decoration: none; }
.ecs-breadcrumb .breadcrumb-item a:hover { color: var(--accent); }
.ecs-breadcrumb .breadcrumb-item.active { color: var(--muted); }

/* ── PAGE HEADER ── */
.ecs-page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 36px 0;
  margin-bottom: 0;
}
.ecs-page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.ecs-page-header p { color: rgba(255,255,255,.7); font-size: 0.95rem; margin: 0; }

/* ── CONTENT AREA ── */
.ecs-content { padding: 48px 0; }
.ecs-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.ecs-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.ecs-content p { font-size: 0.95rem; line-height: 1.75; color: var(--text); }

/* Card footer links (e.g. "Learn More" on about.html facility cards) */
.card-footer a {
  color: var(--blue-lt);
  text-decoration: none;
}
.card-footer a:hover { color: var(--accent); }

/* Product category card links (Bootstrap .card used on connector listing pages) */
.card-body .card-title a,
.card-body .card-title a strong {
  color: var(--blue-lt);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.card-body .card-title a:hover,
.card-body .card-title a:hover strong { color: var(--accent); }

/* Bootstrap table links on product listing pages */
.table td a { color: var(--blue-lt); text-decoration: none; font-size: 0.875rem; }
.table td a:hover { color: var(--accent); }

/* Product tables */
.ecs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 24px;
}
.ecs-table th {
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: .03em;
}
.ecs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray);
  color: var(--text);
}
.ecs-table tr:hover td { background: var(--gray-lt); }
.ecs-table td a { color: var(--blue-lt); text-decoration: none; font-weight: 500; }
.ecs-table td a:hover { color: var(--accent); }

/* Product cards (used on listing pages) */
.ecs-card {
  display: block;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray);
  transition: box-shadow .25s, transform .25s;
  background: #fff;
  height: 100%;
}
.ecs-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,.1); transform: translateY(-3px); }
.ecs-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-lt); }
.ecs-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ecs-card:hover .ecs-card-img img { transform: scale(1.06); }
.ecs-card-body { padding: 16px; }
.ecs-card-body h4 { font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ecs-card-body p { font-size: 0.78rem; color: var(--muted); line-height: 1.55; margin: 0; }

/* ── CTA STRIP ── */
.ecs-cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  padding: 40px 0;
  margin-top: 48px;
}
.ecs-cta h3 { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.ecs-cta p { color: rgba(255,255,255,.75); margin: 0; font-size: 0.9rem; }
.ecs-cta .btn-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  transition: background .2s;
}
.ecs-cta .btn-cta:hover { background: var(--accent-dk); color: #fff; }

/* ── FOOTER ── */
.ecs-footer-widgets {
  background: #0a1628;
  color: rgba(255,255,255,.7);
  padding: 52px 0 0;
}
.ecs-footer-logo img { height: 38px; filter: brightness(0) invert(1); opacity: .8; margin-bottom: 12px; }
.ecs-footer-logo p { font-size: 0.8rem; line-height: 1.7; max-width: 260px; color: rgba(255,255,255,.55); }
.ecs-footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ecs-footer-links { list-style: none; padding: 0; margin: 0; }
.ecs-footer-links li { margin-bottom: 7px; }
.ecs-footer-links a { font-size: 0.8rem; color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.ecs-footer-links a:hover { color: var(--accent); }
.ecs-footer-newsletter label { font-size: 0.8rem; color: rgba(255,255,255,.65); display: block; margin-bottom: 8px; }
.ecs-footer-newsletter .fn-row { display: flex; gap: 8px; }
.ecs-footer-newsletter input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
  padding: 7px 10px;
}
.ecs-footer-newsletter input::placeholder { color: rgba(255,255,255,.3); }
.ecs-footer-newsletter button {
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--accent); border: none; border-radius: 4px;
  color: #fff; font-size: 0.8rem; font-weight: 600; padding: 7px 14px; cursor: pointer;
}
.ecs-footer-newsletter button:hover { background: var(--accent-dk); }
.ecs-footer-iso {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px;
  background: rgba(255,255,255,.05); border-radius: 6px;
}
.ecs-footer-iso img { height: 36px; }
.ecs-footer-iso p { font-size: 0.75rem; color: rgba(255,255,255,.55); margin: 0; }
.ecs-footer-iso strong { color: #fff; font-size: 0.78rem; display: block; }
.ecs-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 40px;
  padding: 18px 0;
  font-size: 0.76rem;
  color: rgba(255,255,255,.38);
}
.ecs-footer-bottom a { color: rgba(255,255,255,.38); text-decoration: none; transition: color .2s; }
.ecs-footer-bottom a:hover { color: rgba(255,255,255,.75); }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .ecs-mega .dropdown-menu { position: static !important; box-shadow: none; }
}
@media (max-width: 767px) {
  .ecs-nav-search { display: none; }
  .ecs-page-header { padding: 24px 0; }
  .ecs-content { padding: 32px 0; }
}
