/* ===== LKK Header ===== */
:root {
  --lkk-bg: #161616;
  --lkk-bg-2: #1f1f1f;
  --lkk-fg: #ffffff;
  --lkk-fg-muted: rgba(255,255,255,0.85);
  --lkk-hover: rgba(255,255,255,0.05);
  --lkk-border: rgba(255,255,255,0.08);
  --lkk-primary: #a80038; /* LKK brand red */
}

.lkk-header{
  position: sticky; top: 0; z-index: 50;
  background: var(--lkk-bg);
  color: var(--lkk-fg);
  border-bottom: 1px solid var(--lkk-border);
  font-family: inherit;
}
.lkk-header *{ box-sizing: border-box; }
.lkk-header__inner{
  max-width: 1280px; margin: 0 auto;
  height: 64px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.lkk-header__logo img,
.lkk-header__logo .custom-logo{ height: 36px; width: auto; display: block; }

/* ---- Desktop menu ---- */
.lkk-header__nav{ display: none; }
@media (min-width: 1024px){
  .lkk-header__nav{ display: block; }
  .lkk-header__burger{ display: none; }
}
.lkk-menu{
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.lkk-menu > li{ position: relative; }
.lkk-menu > li > a{
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border-radius: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--lkk-fg-muted); text-decoration: none;
  transition: background-color .15s, color .15s;
}
.lkk-menu > li > a:hover,
.lkk-menu > li:hover > a{ background: var(--lkk-hover); color: var(--lkk-fg); }

/* Dropdown caret for parents */
.lkk-menu > li.menu-item-has-children > a::after{
  content: ""; width: 10px; height: 10px; margin-left: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
  transition: transform .15s;
}
.lkk-menu > li.menu-item-has-children:hover > a::after{ transform: rotate(180deg); }

/* Submenu */
.lkk-menu .sub-menu{
  position: absolute; top: 100%; left: 0;
  min-width: 224px;
  background: var(--lkk-bg-2);
  border: 1px solid var(--lkk-border);
  border-radius: 8px;
  padding: 8px;
  margin: 0; list-style: none;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.lkk-menu > li:hover > .sub-menu,
.lkk-menu > li:focus-within > .sub-menu{ display: block; }
.lkk-menu .sub-menu a{
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: 14px; color: var(--lkk-fg-muted); text-decoration: none;
}
.lkk-menu .sub-menu a:hover{ background: var(--lkk-hover); color: var(--lkk-fg); }

/* ---- Burger ---- */
.lkk-header__burger{
  width: 40px; height: 40px; border: 0; background: transparent;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; border-radius: 6px; cursor: pointer; color: var(--lkk-fg);
}
.lkk-header__burger:hover{ background: var(--lkk-hover); }
.lkk-header__burger span{ width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---- Mobile drawer ---- */
.lkk-mobile{
  display: none;
  background: var(--lkk-bg);
  border-top: 1px solid var(--lkk-border);
  padding: 12px 8px 16px;
}
.lkk-mobile.is-open{ display: block; }
@media (min-width: 1024px){ .lkk-mobile{ display: none !important; } }

.lkk-mobile__title{
  padding: 8px 12px 12px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.lkk-mobile__menu, .lkk-mobile__menu .sub-menu{
  list-style: none; margin: 0; padding: 0;
}
.lkk-mobile__menu a{
  display: flex; align-items: center; gap: 8px;
  padding: 12px; border-radius: 6px;
  color: var(--lkk-fg-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.lkk-mobile__menu a:hover{ background: var(--lkk-hover); color: var(--lkk-fg); }
.lkk-mobile__menu .sub-menu{ margin-left: 32px; display: none; }
.lkk-mobile__menu .menu-item-has-children.is-open > .sub-menu{ display: block; }

.lkk-mobile__menu .menu-item-has-children > a::after{
  content: ""; margin-left: auto;
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
  transition: transform .2s;
}
.lkk-mobile__menu .menu-item-has-children.is-open > a::after{ transform: rotate(180deg); }

/* ---- Icons via menu item CSS classes ---- */
.lkk-menu > li > a::before,
.lkk-mobile__menu > li > a::before{
  content: ""; width: 16px; height: 16px; display: inline-block;
  background-color: var(--lkk-primary);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.lkk-menu > li:not([class*="lkk-icon-"]) > a::before,
.lkk-mobile__menu > li:not([class*="lkk-icon-"]) > a::before{ display: none; }

/* Spade */
.lkk-icon-spade > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7z'/><path d='M12 18v4'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7z'/><path d='M12 18v4'/></svg>");
}
/* Dice */
.lkk-icon-dice > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='8' cy='8' r='1'/><circle cx='16' cy='16' r='1'/><circle cx='12' cy='12' r='1'/><circle cx='8' cy='16' r='1'/><circle cx='16' cy='8' r='1'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='8' cy='8' r='1'/><circle cx='16' cy='16' r='1'/><circle cx='12' cy='12' r='1'/><circle cx='8' cy='16' r='1'/><circle cx='16' cy='8' r='1'/></svg>");
}
/* Circle play */
.lkk-icon-play > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polygon points='10,8 16,12 10,16' fill='black' stroke='none'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polygon points='10,8 16,12 10,16' fill='black' stroke='none'/></svg>");
}
/* Star */
.lkk-icon-star > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='12 2 15 9 22 9.3 17 14 18.5 21 12 17.3 5.5 21 7 14 2 9.3 9 9'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='12 2 15 9 22 9.3 17 14 18.5 21 12 17.3 5.5 21 7 14 2 9.3 9 9'/></svg>");
}
/* Coins */
.lkk-icon-coins > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='8' cy='8' r='6'/><path d='M18.09 10.37A6 6 0 1 1 10.34 18'/><path d='M7 6h1v4'/><path d='M16.71 13.88l.7.71-2.82 2.82'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='8' cy='8' r='6'/><path d='M18.09 10.37A6 6 0 1 1 10.34 18'/><path d='M7 6h1v4'/><path d='M16.71 13.88l.7.71-2.82 2.82'/></svg>");
}
/* Newspaper */
.lkk-icon-news > a::before{
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8'/><path d='M15 18h-5'/><path d='M10 6h8v4h-8V6Z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8'/><path d='M15 18h-5'/><path d='M10 6h8v4h-8V6Z'/></svg>");
}

/* ===== Overrides to beat parent-theme CSS ===== */
.lkk-header__nav{ display: none !important; }
.lkk-header__burger{ display: inline-flex !important; }
@media (min-width: 1024px){
  .lkk-header__nav{ display: block !important; }
  .lkk-header__burger{ display: none !important; }
}

/* Brand text fallback if no logo file exists */
.lkk-header__brand{
  font-size: 18px; font-weight: 700; color: var(--lkk-fg);
  letter-spacing: .02em;
}

/* Right-side actions cluster */
.lkk-header__actions{
  display: inline-flex; align-items: center; gap: 4px;
}

/* Search toggle button */
.lkk-header__search-btn{
  width: 40px; height: 40px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer; color: var(--lkk-fg);
}
.lkk-header__search-btn:hover{ background: var(--lkk-hover); }

/* Search panel (slides down under header) */
.lkk-search{
  background: var(--lkk-bg-2);
  border-top: 1px solid var(--lkk-border);
  padding: 12px 16px;
}
.lkk-search.is-open{ display: block; }
.lkk-search__form{
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 8px;
}
.lkk-search__input{
  flex: 1; height: 40px; padding: 0 12px;
  background: var(--lkk-bg); color: var(--lkk-fg);
  border: 1px solid var(--lkk-border); border-radius: 6px;
  font-size: 14px; outline: none;
}
.lkk-search__input:focus{ border-color: var(--lkk-primary); }
.lkk-search__submit{
  height: 40px; padding: 0 16px;
  background: var(--lkk-primary); color: #fff;
  border: 0; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 600;
}
.lkk-search__submit:hover{ filter: brightness(1.1); }

/* ===== Hard resets to defeat parent-theme button styles ===== */
.lkk-header button,
.lkk-header .lkk-header__search-btn,
.lkk-header .lkk-header__burger{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font: inherit !important;
}
.lkk-header .lkk-header__search-btn{
  width: 40px !important; height: 40px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border-radius: 6px !important; cursor: pointer !important;
  position: relative; z-index: 2;
  pointer-events: auto !important;
}
.lkk-header .lkk-header__search-btn:hover,
.lkk-header .lkk-header__burger:hover{
  background: rgba(255,255,255,.06) !important;
}
.lkk-header .lkk-header__search-btn svg{
  width: 20px !important; height: 20px !important; display: block;
}

/* Re-assert burger visibility rules with higher specificity */
.lkk-header .lkk-header__burger{
  display: inline-flex !important;
  width: 40px !important; height: 40px !important;
  flex-direction: column !important;
  align-items: center !important; justify-content: center !important;
  gap: 5px !important; border-radius: 6px !important;
}
@media (min-width: 1024px){
  .lkk-header .lkk-header__burger{ display: none !important; }
}

/* Actions cluster spacing */
.lkk-header .lkk-header__actions{
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
