/* =========================================================
   VTM AEC-Q SITE – FINAL STABLE STYLESHEET
========================================================= */

:root{
  --vtm-blue:#002d5a;
  --vtm-blue-2:#004a8f;
  --vtm-bg:#f6f8fb;
  --vtm-card:#ffffff;
  --vtm-text:#16202a;
  --vtm-muted:#5b6773;
  --vtm-border:#e3e7ee;
  --vtm-radius:16px;
}

*{
  box-sizing:border-box;
}

/* ---------------------------------------------------------
   Base
--------------------------------------------------------- */
body{
  margin:0;
  background:var(--vtm-bg);
  color:var(--vtm-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  line-height:1.55;
}

a{
  color:var(--vtm-blue);
  text-decoration:none;
}
a:hover{
  color:var(--vtm-blue-2);
  text-decoration:underline;
}

/* ---------------------------------------------------------
   Banner / logo safety
--------------------------------------------------------- */
img{
  max-width:100%;
  height:auto;
}

img[src$="Banner.jpg"]{
  width:100%;
  max-height:180px;
  object-fit:contain;
  display:block;
}

/* ---------------------------------------------------------
   Headings
--------------------------------------------------------- */
h1,h2,h3,h4{
  color:var(--vtm-blue);
  font-weight:650;
  letter-spacing:.2px;
  margin:0 0 10px;
}

h1{ font-size:28px; }
h2{ font-size:22px; margin-top:18px; }
h3{ font-size:18px; }

/* ---------------------------------------------------------
   Main content wrapper (safe inside tables)
--------------------------------------------------------- */
.page-wrap{
  width:min(1200px, calc(100% - 32px)) !important;
  margin:18px auto;
  background:var(--vtm-card);
  border:1px solid var(--vtm-border);
  border-radius:var(--vtm-radius);
  box-shadow:0 10px 30px rgba(0,0,0,.06);
  padding:18px 18px 22px;
}

.lead{
  margin:0 0 14px;
  color:var(--vtm-muted);
}

/* =========================================================
   NAVIGATION BAR – FINAL VERSION
========================================================= */

.navbar{
  width:min(1200px, calc(100% - 32px));
  margin:10px auto 0;
  background:var(--vtm-card);
  border:1px solid var(--vtm-border);
  border-radius:var(--vtm-radius);
  box-shadow:0 8px 20px rgba(0,0,0,.05);

  display:flex;
  align-items:center;
  flex-wrap:nowrap;                 /* single line */
  gap:8px;
  padding:10px 12px;

  white-space:nowrap;
  overflow-x:auto;                  /* scroll instead of wrap */
  overflow-y:visible !important;    /* dropdowns */
  -webkit-overflow-scrolling:touch;
}

/* Normalise ALL top-level items */
.navbar > a,
.navbar .dropbtn{
  height:36px !important;
  padding:0 14px !important;
  display:inline-flex !important;
  align-items:center !important;
  line-height:36px !important;
  font-weight:600;
  border-radius:12px;
  margin:0 !important;
  box-sizing:border-box;
}

/* Plain links */
.navbar > a:hover{
  background:#eef3fb;
  text-decoration:none;
}

/* Dropdown wrapper */
.navbar .dropdown{
  height:36px !important;
  display:inline-flex !important;
  align-items:center !important;
  position:relative;
  overflow:visible;
  flex-shrink:0;
}

/* Dropdown button */
.dropbtn{
  background:var(--vtm-blue);
  color:#fff;
  border:0;
  cursor:pointer;
}
.dropbtn:hover,
.dropbtn:focus{
  background:var(--vtm-blue-2);
}

/* Dropdown panel */
.dropdown-content{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:240px;
  background:#fff;
  border:1px solid var(--vtm-border);
  border-radius:14px;
  box-shadow:0 14px 34px rgba(0,0,0,.14);
  z-index:9999;
  overflow:hidden;
}

.dropdown-content a{
  display:block;
  padding:10px 12px;
  font-size:14px;
}

.dropdown-content a:hover{
  background:#eef3fb;
  text-decoration:none;
}

/* Hover + touch support */
.dropdown:hover .dropdown-content{ display:block; }
.dropdown:focus-within .dropdown-content{ display:block; }

/* =========================================================
   FEATURED PRODUCTS – CARD LAYOUT (BULLETPROOF)
========================================================= */

.home-cards{
  display:block !important;      /* safer than grid in tables */
  width:100% !important;
  font-size:0 !important;        /* remove inline gaps */
  margin-top:10px;
}

.home-cards .home-card{
  display:inline-block !important;
  vertical-align:top;
  width:calc(33.333% - 16px) !important;
  margin:0 12px 18px 0;
  font-size:14px;

  background:#fff;
  border:1px solid var(--vtm-border);
  border-radius:var(--vtm-radius);
  padding:16px 16px 14px;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}

.home-cards .home-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(0,0,0,.12);
}

/* Responsive cards */
@media (max-width:980px){
  .home-cards .home-card{
    width:calc(50% - 12px) !important;
  }
}
@media (max-width:620px){
  .home-cards .home-card{
    width:100% !important;
    margin-right:0;
  }
}

/* Card internals */
.home-card-top{
  padding-bottom:8px;
  border-bottom:1px solid var(--vtm-border);
  margin-bottom:10px;
}

.home-card-kicker{
  font-size:12px;
  font-weight:750;
  letter-spacing:.6px;
  text-transform:uppercase;
  color:var(--vtm-muted);
  margin-bottom:6px;
}

.spec-list{
  margin:0 0 10px;
  padding-left:18px;
  font-size:14px;
}

.card-text{
  margin:0 0 14px;
  color:var(--vtm-muted);
}

.card-cta{
  display:inline-block;
  background:var(--vtm-blue);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-weight:700;
  text-decoration:none !important;
}
.card-cta:hover{
  background:var(--vtm-blue-2);
}

/* =========================================================
   FOOTER – VTM STYLE
========================================================= */

.vtm-footer{
  width:min(1200px, calc(100% - 32px));
  margin:14px auto 22px;
  background:var(--vtm-blue);
  color:#fff;
  border-radius:var(--vtm-radius);
  box-shadow:0 10px 30px rgba(0,0,0,.10);
}

.vtm-footer-inner{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  padding:18px 18px 10px;
}

.vtm-footer-col{
  flex:1;
  min-width:220px;
}

.vtm-footer-bottom{
  padding:10px 18px 14px;
  border-top:1px solid rgba(255,255,255,.18);
  font-size:13px;
}
/* =========================================================
   FEATURED CARD – COMPONENT IMAGE
========================================================= */

.home-card-image{
  width: 100%;
  height: 140px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f2f4f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-card-image img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* =========================================================
   CARD IMAGE – VTM POLISH
========================================================= */

.home-card-image{
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3fb 100%);
  border: 1px solid #e3e7ee;
  transition: background .2s ease;
}

.home-card:hover .home-card-image{
  background: linear-gradient(180deg, #f2f6fb 0%, #e8eff9 100%);
}

.home-card-image img{
  transition: transform .25s ease;
}

.home-card:hover .home-card-image img{
  transform: scale(1.04);
}
/* =========================================================
   CARD BADGE
========================================================= */

.card-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  background: #002d5a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .4px;
}

/* make image container relative */
.home-card-image{
  position: relative;
}
/* =========================================================
   FULL CARD CLICKABILITY
========================================================= */

.home-card{
  cursor: pointer;
}

.home-card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
}

.home-card a{
  position: relative;
  z-index:2;
}
/* =========================================================
   SERIES / MANUFACTURER CARDS (for non-home pages)
========================================================= */
.series-cards{
  display:block !important;
  width:100% !important;
  font-size:0 !important;
  margin-top:10px;
}

.series-cards .series-card{
  display:inline-block !important;
  vertical-align:top;
  width:calc(33.333% - 16px) !important;
  margin:0 12px 18px 0;
  font-size:14px;

  background:#fff;
  border:1px solid var(--vtm-border);
  border-radius:var(--vtm-radius);
  padding:14px 14px 12px;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}

.series-cards .series-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(0,0,0,.12);
}

.series-card h3{
  margin:6px 0 8px !important;
  color:var(--vtm-blue) !important;
  font-size:16px;
}

.series-card .meta{
  color:var(--vtm-muted);
  font-size:13px;
  margin:0 0 10px;
}

.series-card .series-links a{
  display:inline-block;
  margin-right:10px;
  font-weight:700;
}

@media (max-width:980px){
  .series-cards .series-card{ width:calc(50% - 12px) !important; }
}
@media (max-width:620px){
  .series-cards .series-card{ width:100% !important; margin-right:0; }
}
/* =========================================================
   SERIES / MANUFACTURER PAGES – CARD GRID (Stackpole-style)
   Paste this at the END of your existing style.css
========================================================= */

.series-cards{
  display:block !important;
  width:100% !important;
  font-size:0 !important;
  margin-top:10px;
}

.series-card{
  display:inline-block !important;
  vertical-align:top;
  width:calc(33.333% - 16px) !important;
  margin:0 12px 18px 0;
  font-size:14px;
  background:#fff;
  border:1px solid var(--vtm-border, #e3e7ee);
  border-radius: var(--vtm-radius, 16px);
  padding:14px 14px 12px;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}

.series-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(0,0,0,.12);
}

.series-card-top{
  display:block;
  padding-bottom:10px;
  margin-bottom:10px;
  border-bottom:1px solid var(--vtm-border, #e3e7ee);
}

.series-card-image{
  width:100%;
  height:140px;
  border-radius:12px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3fb 100%);
  border:1px solid var(--vtm-border, #e3e7ee);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin-bottom:10px;
}

.series-card-image img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  transition: transform .25s ease;
}

.series-card:hover .series-card-image img{
  transform: scale(1.04);
}

.series-card h3{
  margin:0 !important;
  font-size:16px;
  color: var(--vtm-blue, #002d5a);
}

.series-card-details{
  color: var(--vtm-muted, #5b6773);
  font-size:14px;
  margin-bottom:10px;
}

.series-links a{
  display:inline-block;
  margin-right: 12px;
  font-weight: 700;
  color: var(--vtm-blue, #002d5a);
}
.series-links a:hover{
  color: var(--vtm-blue-2, #004a8f);
  text-decoration: underline;
}

@media (max-width: 980px){
  .series-card{ width: calc(50% - 12px) !important; }
}
@media (max-width: 620px){
  .series-card{ width: 100% !important; margin-right: 0 !important; }
}
/* =========================================================
   FIX: dropdown selections hidden by navbar overflow
========================================================= */

/* Desktop: allow dropdown panels to overflow normally */
.navbar{
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* Mobile/tablet: allow horizontal scroll, but still allow dropdowns */
@media (max-width: 1024px){
  .navbar{
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Extra safety: ensure dropdowns render above everything */
.dropdown{ position: relative; z-index: 50; }
.dropdown-content{ z-index: 9999; }
/* =========================================================
   FIX: keep ALL nav items (incl. Resettable Fuses) inside bar
========================================================= */

.navbar{
  align-items: center !important;
  min-height: 56px !important;
  padding: 10px 12px !important;
}

/* normalise top-level items */
.navbar > a,
.navbar .dropbtn{
  height: 36px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 36px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

/* dropdown wrapper same height */
.navbar .dropdown{
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}
/* =========================================================
   FOOTER: force links + email to white
========================================================= */

.vtm-footer,
.vtm-footer *{
  color: #ffffff !important;
}

.vtm-footer a,
.vtm-footer a:visited{
  color: #ffffff !important;
  text-decoration: underline;
}

.vtm-footer a:hover{
  color: #ffffff !important;
  opacity: 0.9;
}
/* ===== FIX: stop card overlay intercepting navbar clicks ===== */
.home-card{
  position: relative !important;
}

/* If you previously added an overlay pseudo-element, disable it */
.home-card::after{
  content: none !important;
}
/* ===== NAVBAR: make the white background wide enough + fit items ===== */

/* Make the white bar full width of the page area */
.navbar{
  width: calc(100% - 32px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Keep one line, but reduce how much horizontal space items consume */
.navbar{
  gap: 6px !important;
  padding: 10px 10px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* Tighten top-level items (this is what stops Resettable fuses spilling out) */
.navbar > a,
.navbar .dropbtn{
  font-size: 13px !important;
  padding: 0 10px !important;
  height: 36px !important;
  line-height: 36px !important;
}

/* If any logo-images in dropdowns force width, constrain them */
.dropdown-content img{
  max-width: 170px;
  height: auto;
}
/* ===== NAVBAR: centre all top-level buttons ===== */

/* Centre the button group inside the white bar */
.navbar{
  justify-content: center !important;
}

/* Keep dropdowns positioned correctly */
.navbar .dropdown{
  position: relative;
}
