/* =====================================================================
   Shared site header + footer (views/partials/header.php, footer.php)
   Every class is prefixed "ch-" so page / Bootstrap / template styles
   cannot change the size or look of the header, logo or footer.
   ===================================================================== */

/* Metric-matched fallbacks: text set in Arial before the web fonts arrive takes the same space,
   so the swap to Inter / Plus Jakarta Sans does not shift the layout (CLS). Measured in Chrome. */
@font-face{ font-family:'Inter Fallback'; src:local('Arial'), local('ArialMT'), local('Helvetica'); size-adjust:106.48%; ascent-override:91.1%; descent-override:22.5%; line-gap-override:0%; }
@font-face{ font-family:'Plus Jakarta Sans Fallback'; src:local('Arial'), local('ArialMT'), local('Helvetica'); size-adjust:101.4%; ascent-override:102.6%; descent-override:21.7%; line-gap-override:0%; }

.ch-header, .ch-footer{
  --ch-orange:#ff7f00;
  --ch-orange-dark:#e86e00;
  --ch-orange-text:#b35300; /* AA contrast for small orange text */
  --ch-ink:#14161a;
  --ch-navy:#12182b;
  --ch-border:#eef0f3;
  font-family:'Inter', 'Inter Fallback', sans-serif;
  -webkit-font-smoothing:antialiased;
  box-sizing:border-box;
}
.ch-header *, .ch-footer *{ box-sizing:border-box; }
.ch-header ul, .ch-footer ul{ list-style:none; margin:0; padding:0; }
.ch-header a, .ch-footer a{ text-decoration:none; }
.ch-header img, .ch-footer img{ display:block; max-width:100%; }

.ch-container{ width:100%; max-width:1240px; margin:0 auto; padding:0 32px; }

/* ===== HEADER ===== */
.ch-header{
  position:sticky; top:0; left:0; right:0; z-index:1000;
  background:#fff; border-bottom:1px solid var(--ch-border);
}
.ch-nav-wrap{
  display:flex; align-items:center; justify-content:space-between;
  height:82px; position:relative;
}
.ch-logo{
  display:flex; align-items:center; gap:10px;
  font-family:'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback', sans-serif; font-weight:800; font-size:20px;
  letter-spacing:-0.3px; line-height:1; color:var(--ch-ink); white-space:nowrap;
}
.ch-logo:hover{ color:var(--ch-ink); }
.ch-logo img{ height:38px; width:auto; border-radius:8px; }
.ch-logo span{ color:var(--ch-orange); }

.ch-nav{ display:flex; }
.ch-menu{ display:flex; align-items:center; gap:34px; }
.ch-menu > li{ position:relative; margin:0; }
.ch-menu > li > a{
  display:inline-flex; align-items:center; gap:6px;
  font-family:'Inter', 'Inter Fallback', sans-serif; font-weight:600; font-size:14.5px; line-height:1.4;
  color:#2b2f36; position:relative; padding:4px 0;
}
.ch-menu > li > a:hover{ color:var(--ch-orange-text); }
.ch-menu > li > a .fa-chevron-down{ font-size:10px; }
.ch-menu > li.active > a{ color:var(--ch-orange-text); }
.ch-menu > li.active > a::after{
  content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background:var(--ch-orange); border-radius:2px;
}

/* Products dropdown */
.ch-sub{
  position:absolute; top:100%; left:-18px; min-width:230px; padding:10px 0 !important;
  background:#fff; border:1px solid var(--ch-border); border-radius:10px;
  box-shadow:0 14px 30px rgba(20,22,26,.10);
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s;
  margin-top:14px !important;
}
.ch-sub::before{ content:''; position:absolute; left:0; right:0; top:-16px; height:16px; }
.ch-has-sub:hover > .ch-sub,
.ch-has-sub:focus-within > .ch-sub{ opacity:1; visibility:visible; transform:translateY(0); }
.ch-sub li a{
  display:block; padding:10px 20px; font-size:14px; font-weight:500; color:#2b2f36;
}
.ch-sub li a:hover, .ch-sub li.active a{ color:var(--ch-orange-text); background:#fff6ec; }

.ch-right{ display:flex; align-items:center; gap:18px; }
.ch-btn{
  display:inline-block; background:var(--ch-orange); color:#fff !important;
  font-family:'Inter', 'Inter Fallback', sans-serif; font-weight:700; font-size:13.5px; line-height:1.2;
  text-transform:uppercase; letter-spacing:.2px;
  padding:13px 24px; border-radius:9px; border:0;
  box-shadow:0 8px 20px rgba(255,127,0,.28);
}
.ch-btn:hover{ background:var(--ch-orange-dark); color:#fff; }

.ch-toggle{
  display:none; width:42px; height:42px; border-radius:9px; border:1px solid var(--ch-border);
  align-items:center; justify-content:center; font-size:18px; color:var(--ch-ink);
  background:#fff; cursor:pointer; padding:0;
}

/* ===== FOOTER ===== */
.ch-footer{ background:var(--ch-navy); color:#c7cbe0; padding:64px 0 0; margin-top:0; }
.ch-footer-grid{
  display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:32px; padding-bottom:46px;
}
.ch-footer-logo{
  display:flex; align-items:center; gap:10px; margin-bottom:16px;
  font-family:'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback', sans-serif; font-weight:800; font-size:19px; color:#fff;
}
.ch-footer-logo:hover{ color:#fff; }
.ch-footer-logo img{ height:32px; width:auto; border-radius:6px; background:#fff; padding:3px; }
.ch-footer-logo span{ color:var(--ch-orange); }
.ch-footer p{ font-size:13px; line-height:1.7; color:#9aa0c0; max-width:280px; margin:0; }
.ch-footer h4, .ch-footer .ch-footer-title{
  font-family:'Inter', 'Inter Fallback', sans-serif; color:#fff; font-size:14.5px; font-weight:700; letter-spacing:normal;
  line-height:1.3; margin:0 0 20px; text-transform:none;
}
.ch-badges{ display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }
.ch-badge{
  display:flex; align-items:center; gap:8px; border:1px solid #2c3357; border-radius:9px;
  padding:9px 14px; font-size:11px; line-height:1.3; color:#c7cbe0;
}
.ch-badge:hover{ color:#fff; border-color:var(--ch-orange); }
.ch-badge i{ font-size:18px; }
.ch-badge b{ display:block; font-size:12.5px; }
.ch-links li{ margin:0 0 13px; }
.ch-links a{
  font-size:13.5px; color:#9aa0c0; display:flex; align-items:center; justify-content:space-between;
}
.ch-links a i{ font-size:10px; }
.ch-links a:hover{ color:#fff; }
.ch-contact li{
  display:flex; align-items:center; gap:10px; font-size:13px; margin:0 0 14px; color:#c7cbe0;
}
.ch-contact i{ color:var(--ch-orange); width:16px; }
.ch-social{ display:flex; gap:10px; margin-top:6px; }
.ch-social a{
  width:36px; height:36px; border-radius:8px; border:1px solid #2c3357; color:#c7cbe0;
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.ch-social a:hover{ background:var(--ch-orange); border-color:var(--ch-orange); color:#fff; }
.ch-footer-bottom{
  border-top:1px solid #232a4a; padding:22px 16px; text-align:center;
  font-size:12.5px; color:#7e84a6;
}
.ch-footer-bottom strong{ color:#c7cbe0; }

/* ===== RESPONSIVE ===== */
@media (max-width:1080px){
  .ch-menu{ gap:24px; }
  .ch-footer-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:960px){
  .ch-toggle{ display:flex; }
  .ch-nav{
    position:absolute; top:82px; left:0; right:0;
    background:#fff; border-bottom:1px solid var(--ch-border);
    max-height:0; overflow:hidden; visibility:hidden; transition:max-height .3s ease, visibility 0s linear .3s; /* hidden links are not focusable */
    box-shadow:0 12px 24px rgba(0,0,0,.06);
  }
  .ch-nav.open{ max-height:640px; overflow-y:auto; visibility:visible; transition:max-height .3s ease; }
  .ch-menu{ flex-direction:column; align-items:stretch; gap:0; padding:10px 32px 18px; }
  .ch-menu > li{ border-bottom:1px solid var(--ch-border); }
  .ch-menu > li > a{ display:flex; justify-content:space-between; padding:14px 0; }
  .ch-menu > li.active > a::after{ display:none; }
  .ch-sub{
    position:static; opacity:1; visibility:inherit; transform:none; box-shadow:none;
    border:0; border-radius:0; min-width:0; margin:0 0 10px !important; padding:0 !important;
  }
  .ch-sub::before{ display:none; }
  .ch-sub li a{ padding:9px 14px; }
  .ch-right .ch-btn{ display:none; }
}
@media (max-width:600px){
  .ch-container{ padding:0 20px; }
  .ch-footer-grid{ grid-template-columns:1fr; }
  .ch-nav{ top:74px; }
  .ch-menu{ padding:10px 20px 18px; }
}
@media (max-width:420px){
  .ch-nav-wrap{ height:74px; }
  .ch-logo{ font-size:16px; }
  .ch-logo img{ height:32px; }
}
