/* =====================================
   ROOT VARIABLES
===================================== */
:root {
  --header-height: 72px;
  --primary: #1f6fa8;
  --accent: #2fa4a9;
}

/* =====================================
   HEADER BASE
===================================== */
.ck-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid #eef2f4;
}

.ck-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =====================================
   LOGO
===================================== */
.ck-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.ck-logo img {
  height: 42px;
  display: block;
}

.ck-site-title {
  font-family: Poppins, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* =====================================
   DESKTOP MENU
===================================== */
.ck-nav {
  display: block;
}

.ck-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 34px;
}

.ck-menu li {
  position: relative;
}

.ck-menu a {
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s ease;
}

.ck-menu a:hover {
  color: var(--accent);
}

/* ===== DROPDOWN ===== */
.ck-menu .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  padding: 10px 0;
  min-width: 220px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.12);
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.25s ease;
  z-index: 1001;
}

.ck-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ck-menu .sub-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: #333;
}

.ck-menu .sub-menu a:hover {
  background: #f3f8fb;
  color: var(--primary);
}

/* =====================================
   DROPDOWN ARROW
===================================== */
.ck-menu li.menu-item-has-children > a {
  padding-right: 18px;
}

.ck-menu li.menu-item-has-children > a::after {
  content: "▾";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  transition: transform 0.25s ease;
}

.ck-menu li.menu-item-has-children:hover > a::after {
  transform: translateY(-50%) rotate(180deg);
}

/* =====================================
   MOBILE TOGGLE
===================================== */
.ck-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.ck-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  display: block;
  margin: 5px 0;
  transition: 0.3s;
}

/* =====================================
   MOBILE MENU PANEL
===================================== */
@media (max-width: 992px) {

  .ck-mobile-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: auto;

    width: 75%;            /* 👈 HALF-ish SCREEN */
    max-width: 360px;      /* 👈 keeps it elegant on large phones */
    height: calc(100vh - var(--header-height));

    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.35s ease;

    box-shadow: -10px 0 30px rgba(0,0,0,0.12);
    z-index: 999;
  }

  .ck-mobile-nav.active {
    transform: translateX(0);
  }
}


body.ck-menu-open {
  overflow: hidden;
}

/* MOBILE MENU LIST */
.ck-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 24px;
}

.ck-mobile-menu li {
  margin-bottom: 14px;
}

.ck-mobile-menu a {
  font-size: 16px;
  text-decoration: none;
  color: var(--primary);
}

/* MOBILE SUBMENU */
.ck-mobile-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  padding-left: 16px;
  transition: max-height 0.3s ease;
}

.ck-mobile-menu li.submenu-open > .sub-menu {
  max-height: 500px;
}

/* =====================================
   RESPONSIVE
===================================== */
@media (max-width: 992px) {
  .ck-nav {
    display: none;
  }

  .ck-menu-toggle {
    display: block;
  }
}

@media (max-width: 576px) {
  .ck-site-title {
    font-size: 15px;
  }
}



/* =====================================
   MOBILE HEADER REFINEMENT
===================================== */
@media (max-width: 992px) {

  :root {
    --header-height: 64px;
  }

  .ck-header {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  }

  .ck-header-inner {
    padding: 0 18px;
  }

  .ck-logo img {
    height: 36px;
  }

  .ck-site-title {
    font-size: 16px;
    font-weight: 600;
  }
}
@media (max-width: 992px) {

  .ck-menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .ck-menu-toggle span {
    width: 22px;
    height: 2px;
    margin: 4px 0;
  }
}
/* =====================================
   MOBILE MENU PANEL – POLISHED
===================================== */
@media (max-width: 992px) {

  .ck-mobile-nav {
    background: #ffffff;
    padding-bottom: 40px;
  }

  .ck-mobile-menu {
    padding: 20px 20px 32px;
  }

  .ck-mobile-menu li {
    margin-bottom: 6px;
  }

  .ck-mobile-menu a {
    display: block;
    padding: 14px 12px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
  }

  .ck-mobile-menu a:hover {
    background: #f3f8fb;
  }
}
/* =====================================
   MOBILE SUBMENU STYLE
===================================== */
@media (max-width: 992px) {

  .ck-mobile-menu .menu-item-has-children > a {
    position: relative;
  }

  .ck-mobile-menu .menu-item-has-children > a::after {
    content: "›";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 18px;
    transition: transform 0.25s ease;
  }

  .ck-mobile-menu li.submenu-open > a::after {
    transform: translateY(-50%) rotate(-90deg);
  }

  .ck-mobile-menu .sub-menu {
    background: #f8fafc;
    margin-top: 6px;
    border-radius: 10px;
    padding: 8px 0;
  }

  .ck-mobile-menu .sub-menu a {
    font-size: 15px;
    padding: 12px 16px;
  }
}
body.ck-menu-open {
  position: fixed;
  width: 100%;
}

@media (max-width: 992px) {

  .ck-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: auto;
    z-index: 1100;
  }

  .ck-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #1f6fa8; /* primary */
    margin: 4px 0;
  }
}

.ck-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 998;
}

.ck-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* FORCE mobile menu hidden on desktop */
.ck-mobile-nav,
.ck-mobile-overlay {
  display: none;
}

@media (max-width: 992px) {

  .ck-mobile-nav,
  .ck-mobile-overlay {
    display: block;
  }

  .ck-mobile-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 75%;
    max-width: 360px;
    height: calc(100vh - var(--header-height));
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.12);
    z-index: 999;
  }

  .ck-mobile-nav.active {
    transform: translateX(0);
  }
}
.ck-mobile-menu {
  padding-top: 12px;
}
