/* ==============================================================
   theme/202605-daylight/css/nav.css
   Navigation: progress bar, sticky nav, dropdown, drawer
   © 2004–2026 Ideal Creation Center Co., Ltd.
   ============================================================== */

/* ── RESET (scoped) ── */
#ic-progress, #ic-nav-wrap, #ic-nav,
#ic-drawer, #ic-drawer-overlay {
  box-sizing: border-box;
}
#ic-nav *, #ic-drawer * { box-sizing: border-box; }

/* ── PROGRESS BAR ── */
#ic-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--ic-orange, #FF9900);
  z-index: 9999;
  transition: width .08s linear;
  pointer-events: none;
}

/* ── NAV WRAP (sticky) ── */
#ic-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ── NAV BAR ── */
#ic-nav {
  background: #021159;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  box-shadow: 0 2px 20px rgba(0,0,0,.28);
  gap: 0;
}

/* ── LOGO ── */
.ic-logo-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 28px;
}
.ic-logo-block img {
  height: 26px;
  width: auto;
  display: block;
}
.ic-logo-tagline {
  font-size: 9.5px;
  color: rgba(255,255,255,.38);
  font-weight: 500;
  letter-spacing: .5px;
  margin-top: 3px;
  white-space: nowrap;
}

/* ── DESKTOP NAV LINKS ── */
#ic-nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0;
}
.ic-nav-item { position: relative; }

.ic-nav-item > a,
.ic-nav-item > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ic-font, 'Quicksand','Prompt',sans-serif);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 7px;
  transition: background .13s, color .13s;
  white-space: nowrap;
  line-height: 1;
}
.ic-nav-item > a:hover,
.ic-nav-item > button:hover,
.ic-nav-item.open > button {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ACTIVE GROUP — สีขาว + bg highlight */
.ic-nav-item.ic-active > a,
.ic-nav-item.ic-active > button {
  color: #fff;
  background: rgba(255,255,255,.16);
}

/* Chevron */
.ic-chevron {
  width: 12px; height: 12px;
  flex-shrink: 0;
  transition: transform .18s;
  opacity: .55;
}
.ic-nav-item.open .ic-chevron {
  transform: rotate(180deg);
  opacity: .9;
}

/* ── DROPDOWN ── */
.ic-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #e2e6f2;
  border-radius: 11px;
  box-shadow: 0 10px 36px rgba(44,48,147,.12);
  min-width: 218px;
  padding: 5px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.ic-nav-item.open .ic-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ic-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1e3c;
  text-decoration: none;
  transition: background .1s, color .1s;
  white-space: nowrap;
}
.ic-dropdown a:hover {
  background: #f0f2fc;
  color: var(--ic-navy, #2C3093);
}
.ic-dd-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #021159;
  flex-shrink: 0;
  opacity: .3;
  transition: opacity .1s, background .1s;
}
.ic-dropdown a:hover .ic-dd-dot {
  opacity: 1;
  background: var(--ic-orange, #FF9900);
}
.ic-dropdown-divider {
  height: 1px;
  background: #eef0f8;
  margin: 4px 0;
}
.ic-dropdown-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #9ba8c4;
  padding: 6px 15px 2px;
  text-transform: uppercase;
}

/* ── NAV RIGHT ── */
.ic-nav-right {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Language switcher */
.ic-lang {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,.18);
  border-radius: 7px;
  padding: 3px;
}
.ic-lang a {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  color: rgba(255,255,255,.52);
  text-decoration: none;
  transition: all .12s;
  letter-spacing: .3px;
}
.ic-lang a:hover { color: #fff; background: rgba(255,255,255,.1); }
.ic-lang a.active {
  background: var(--ic-orange, #FF9900);
  color: #1a1400;
}

/* Login link */
.ic-nav-login {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.58);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.18);
  transition: all .12s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ic-nav-login:hover {
  color: #fff;
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
}


/* CTA button */
.ic-nav-cta {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--ic-orange, #FF9900);
  color: #1a1400;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .13s, transform .1s;
}
.ic-nav-cta:hover {
  background: var(--ic-orange-light, #ffb133);
  transform: translateY(-1px);
}

/* Hamburger */
#ic-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 7px;
  padding: 7px;
  transition: background .12s;
}
#ic-hamburger:hover { background: rgba(255,255,255,.1); }
#ic-hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s, opacity .22s;
}
#ic-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#ic-hamburger.open span:nth-child(2) { opacity: 0; }
#ic-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── DRAWER OVERLAY ── */
#ic-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,14,40,.52);
  z-index: 1998;
  backdrop-filter: blur(2px);
}

/* ── MOBILE DRAWER ── */
#ic-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(300px, 82vw);
  background: #fff;
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#ic-drawer.open { transform: translateX(0); }

.ic-drawer-header {
  background: #021159;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ic-drawer-header img { height: 22px; width: auto; }
#ic-drawer-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.62);
  padding: 5px; border-radius: 5px; line-height: 0;
  transition: background .12s, color .12s;
}
#ic-drawer-close:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.ic-drawer-lang {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f8;
  flex-shrink: 0;
}
.ic-drawer-lang a {
  flex: 1;
  text-align: center;
  font-size: 12px; font-weight: 700;
  padding: 6px;
  border-radius: 5px;
  border: 1.5px solid #e0e4f0;
  color: #5a6488;
  text-decoration: none;
  transition: all .12s;
}
.ic-drawer-lang a.active {
  background: var(--ic-orange, #FF9900);
  border-color: var(--ic-orange, #FF9900);
  color: #1a1400;
}

.ic-drawer-nav { flex: 1; padding: 5px 0; }

/* Accordion group */
.ic-drawer-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 18px;
  background: none; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  color: #1a1e3c;
  font-family: var(--ic-font, 'Quicksand','Prompt',sans-serif);
  transition: background .11s;
}
.ic-drawer-group-btn:hover { background: #f5f7fc; }
.ic-drawer-group-btn svg {
  width: 15px; height: 15px;
  color: #9ba8c4;
  transition: transform .18s;
  flex-shrink: 0;
}
.ic-drawer-group.open .ic-drawer-group-btn svg { transform: rotate(180deg); }

.ic-drawer-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height .23s cubic-bezier(.4,0,.2,1);
  background: #f8f9fd;
}
.ic-drawer-group.open .ic-drawer-group-items { max-height: 600px; }

.ic-drawer-group-items a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 26px;
  font-size: 13px; font-weight: 500;
  color: #2a2f5a;
  text-decoration: none;
  border-bottom: 1px solid #eef1f8;
  transition: background .1s, color .1s;
}
.ic-drawer-group-items a:last-child { border-bottom: none; }
.ic-drawer-group-items a:hover {
  background: #eef1fc;
  color: var(--ic-navy, #2C3093);
}
.ic-dd2 {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #021159;
  opacity: .28;
  flex-shrink: 0;
  transition: opacity .1s, background .1s;
}
.ic-drawer-group-items a:hover .ic-dd2 {
  opacity: 1;
  background: var(--ic-orange, #FF9900);
}

/* Login link in drawer */
.ic-drawer-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 13.5px; font-weight: 600;
  color: var(--ic-navy, #2C3093);
  text-decoration: none;
  border-top: 1px solid #eef0f8;
  transition: background .1s;
}
.ic-drawer-login:hover { background: #f0f2fc; }

/* CTA in drawer */
.ic-drawer-cta {
  padding: 14px 16px;
  border-top: 1px solid #e8ebf5;
  flex-shrink: 0;
}
.ic-drawer-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #021159;
  color: #fff;
  padding: 12px;
  border-radius: 9px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: background .13s;
}
.ic-drawer-cta a:hover { background: #3d44b5; }


/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  #ic-nav { padding: 0 18px; }
  .ic-logo-block { margin-right: 16px; }
  .ic-nav-item > a,
  .ic-nav-item > button { padding: 7px 9px; font-size: 12.5px; }
  .ic-nav-login { display: none; }
}
@media (max-width: 768px) {
  #ic-nav-links { display: none; }
  #ic-hamburger { display: flex; }
  .ic-nav-cta { display: none; }
  .ic-lang { display: none; }
  #ic-nav { padding: 0 14px; height: 60px; }
  .ic-logo-block { margin-right: 0; }
}

/* ── SCROLL TO TOP — ใช้ .dmtop เหมือน theme เดิม ── */
.dmtop {
  position: fixed;
  bottom: -80px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: #021159;
  color: #fff !important;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(44,48,147,.3);
  transition: bottom .3s cubic-bezier(.4,0,.2,1), background .15s;
  z-index: 900;
  cursor: pointer;
}
.dmtop.show,
.dmtop:not([style*="bottom: -"]) { bottom: 24px; }
body.host_version .dmtop:hover {
  background: var(--ic-orange, #FF9900);
  color: #1a1400 !important;
}
.dmtop i { line-height: 1; }


/* ── BREADCRUMBS ── */
#ic-breadcrumbs {
  background: #f0f3fa;
  border-bottom: 1px solid #e2e6f0;
  padding: 0;
}
.ic-bc-inner {
  max-width: var(--ic-container, 1280px);
  margin: 0 auto;
  padding: 9px 28px;
}
#ic-breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
}
#ic-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
}
#ic-breadcrumbs a {
  color: #021159;
  text-decoration: none;
  opacity: .68;
  transition: opacity .12s;
}
#ic-breadcrumbs a:hover { opacity: 1; }
#ic-breadcrumbs [aria-current="page"] {
  color: var(--ic-text-muted, #5a6488);
  font-weight: 600;
}
.ic-bc-sep {
  color: #9ba8c4;
  font-size: 13px;
  margin: 0 2px;
  line-height: 1;
}
@media (max-width: 768px) {
  .ic-bc-inner { padding: 8px 14px; }
  #ic-breadcrumbs li { font-size: 12px; }
}
