/**
 * Theme B — Shared Styles
 * Header, hamburger, fullscreen menu, social icons, sticky header, footer
 * Loaded on ALL Theme B pages
 */

/* =============================================
   HEADER — Transparent Overlay
   Context-aware text color via --ce-header-fg variable.
   Light-background pages override it with body class below.
   ============================================= */
.ce-hb-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  --ce-header-fg: #fff;
  --ce-header-hover-bg: rgba(255, 255, 255, 0.18);
  --ce-header-logo-invert: 0;
  color: var(--ce-header-fg);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.4s ease,
              box-shadow 0.4s ease;
}

/* Light-bg pages → dark header text */
body.page-haberler .ce-hb-header,
body.page-iletisim .ce-hb-header,
body.single-ce_album .ce-hb-header,
body.single-post .ce-hb-header,
body.search .ce-hb-header,
body.error404 .ce-hb-header {
  --ce-header-fg: #111;
  --ce-header-hover-bg: rgba(0, 0, 0, 0.08);
  --ce-header-logo-invert: 1;
}

/* Sticky mode always has dark bg → force white text back, even on light pages */
.ce-hb-header.is-sticky {
  --ce-header-fg: #fff;
  --ce-header-hover-bg: rgba(255, 255, 255, 0.18);
  --ce-header-logo-invert: 0;
}

/* Sticky mode: fixed + dark bg */
.ce-hb-header.is-sticky {
  position: fixed;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Hidden: slide up */
.ce-hb-header.is-hidden {
  transform: translateY(-100%);
}

/* Visible: slide down */
.ce-hb-header.is-visible {
  transform: translateY(0);
}

/* WordPress wpautop wraps elements in <p> — neutralize them */
.ce-hb-header > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =============================================
   LOGO
   ============================================= */
.ce-hb-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.ce-hb-logo img {
  height: 55px;
  width: auto;
  display: block;
  filter: invert(var(--ce-header-logo-invert, 0));
  transition: filter 0.3s ease;
}

/* =============================================
   HAMBURGER
   ============================================= */
.ce-hb-hamburger {
  position: fixed;
  left: 50%;
  top: 35px;
  transform: translate(-50%, -50%);
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  outline: none;
  transition: left 0.4s ease, top 0.4s ease;
}
.ce-hb-hamburger:focus,
.ce-hb-hamburger:focus-visible {
  outline: none;
  box-shadow: none;
}

/* When menu open: move to top-right, bigger X */
.ce-hb-hamburger.is-active {
  left: auto;
  right: 40px;
  top: 35px;
  transform: none;
}
.ce-hb-hamburger br {
  display: none;
}
.ce-hb-hamburger span {
  display: block;
  width: 56px;
  height: 2px;
  background-color: var(--ce-header-fg, #fff);
  transition: all 0.4s ease;
  transform-origin: center;
}

/* Hamburger → X transform when menu is open — always white (menu bg is dark) */
.ce-hb-hamburger.is-active span {
  background-color: #fff;
  width: 44px;
}
.ce-hb-hamburger.is-active span:first-of-type {
  transform: translateY(3px) rotate(45deg);
}
.ce-hb-hamburger.is-active span:last-of-type {
  transform: translateY(-3px) rotate(-45deg);
}

/* Desktop horizontal nav — shown only on desktop (≥1200px) */
.ce-hb-nav {
  display: none;
  align-items: center;
  gap: 2px;
}
/* Neutralize wpautop <br>/<p> injection inside nav */
.ce-hb-nav > br,
.ce-hb-nav br,
.ce-hb-nav__dropdown-btn br,
.ce-hb-nav__dropdown-menu br {
  display: none !important;
}
.ce-hb-nav > p,
.ce-hb-nav p,
.ce-hb-nav__dropdown > p,
.ce-hb-nav__dropdown-menu > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ce-hb-nav__link {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ce-header-fg, #fff);
  text-decoration: none;
  padding: 0 14px;
  height: 46px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
}
.ce-hb-nav__link:hover,
.ce-hb-nav__link:focus-visible,
.ce-hb-nav__link.is-active,
.ce-hb-nav__link.current-menu-item,
.current-menu-item > .ce-hb-nav__link {
  background: var(--ce-header-hover-bg, rgba(255, 255, 255, 0.18));
  color: var(--ce-header-fg, #fff);
  outline: none;
}

/* Müzik dropdown — hover-triggered */
.ce-hb-nav__dropdown {
  position: relative;
}
.ce-hb-nav__dropdown-btn {
  gap: 6px;
}
.ce-hb-nav__dropdown-btn svg {
  transition: transform 0.3s ease;
  opacity: 0.8;
}
.ce-hb-nav__dropdown:hover .ce-hb-nav__dropdown-btn svg,
.ce-hb-nav__dropdown:focus-within .ce-hb-nav__dropdown-btn svg {
  transform: rotate(180deg);
}
.ce-hb-nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  /* padding-top creates invisible hover-bridge so cursor doesn't lose hover */
  padding: 18px 0 10px;
  margin-top: -2px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}
.ce-hb-nav__dropdown:hover .ce-hb-nav__dropdown-menu,
.ce-hb-nav__dropdown:focus-within .ce-hb-nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ce-hb-nav__dropdown-item {
  display: block;
  padding: 10px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.ce-hb-nav__dropdown-item:hover {
  color: #d48063;
  background: rgba(255, 255, 255, 0.04);
}

/* Dil seçimi */
.ce-hb-nav__lang {
  position: relative;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.ce-hb-nav__lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  height: 46px;
}
.ce-hb-nav__lang-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ce-hb-nav__lang.is-open .ce-hb-nav__lang-dropdown {
  opacity: 1;
  visibility: visible;
}
.ce-hb-nav__lang-option {
  display: block;
  padding: 8px 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ce-hb-nav__lang-option:hover,
.ce-hb-nav__lang-option.is-active {
  color: #fff;
}

/* =============================================
   SOCIAL ICONS — visible only on desktop (≥1200px).
   Mobile/tablet: socials live inside hamburger menu.
   ============================================= */
.ce-hb-socials {
  display: none;
  align-items: center;
  gap: 18px;
}
.ce-hb-socials a {
  color: var(--ce-header-fg, #fff);
  text-decoration: none;
  transition: opacity 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-hb-socials a:hover {
  opacity: 0.6;
}
.ce-hb-socials a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* =============================================
   DESKTOP BREAKPOINT — Show horizontal nav, hide hamburger
   ============================================= */
@media (min-width: 1200px) {
  .ce-hb-nav {
    display: flex;
  }
  .ce-hb-hamburger {
    display: none;
  }
  .ce-hb-header {
    padding: 0 50px;
    height: 80px;
  }
  .ce-hb-logo img {
    height: 48px;
  }
  .ce-hb-socials {
    display: flex;
    gap: 16px;
  }
  .ce-hb-socials a svg {
    width: 15px;
    height: 15px;
  }
}

/* =============================================
   FULLSCREEN MENU — MicDrop clone
   ============================================= */
.ce-hb-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.ce-hb-menu.is-open {
  opacity: 1;
  visibility: visible;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cline x1='10' y1='10' x2='34' y2='34' stroke='%23fff' stroke-width='2.5'/%3E%3Cline x1='34' y1='10' x2='10' y2='34' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") 22 22, pointer;
}

/* NAV — all items equally spaced */
.ce-hb-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Kill wpautop injected <br> tags, make <p> transparent */
.ce-hb-menu-nav > br,
.ce-hb-menu-nav br,
.ce-hb-menu > br {
  display: none !important;
}
.ce-hb-menu-nav > p,
.ce-hb-menu-nav p,
.ce-hb-menu > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Every direct child (links + accordion div) gets same spacing */
.ce-hb-menu-nav > a,
.ce-hb-menu-nav > .ce-hb-menu-accordion {
  margin: 0;
  padding: 0;
}

.ce-hb-menu-link {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  line-height: 2.2;
  margin: 0;
  padding: 0;
  display: block;
  transition: color 0.3s ease;
  cursor: pointer;
}
.ce-hb-menu-link:hover {
  color: #d48063;
}

/* Accordion wrapper — completely transparent in layout */
.ce-hb-menu-accordion {
  display: contents;
}
.ce-hb-menu-accordion-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}
.ce-hb-menu-accordion-btn:focus,
.ce-hb-menu-accordion-btn:focus-visible {
  outline: none;
  box-shadow: none;
}
.ce-hb-chevron {
  display: inline;
  transition: transform 0.3s ease;
  font-size: 0.7em;
}
.ce-hb-menu-accordion.is-open .ce-hb-chevron {
  display: inline-block;
  transform: rotate(180deg);
}

/* Accordion sub-links panel */
.ce-hb-menu-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding-left: 4px;
}
.ce-hb-menu-accordion.is-open .ce-hb-menu-accordion-panel {
  max-height: 300px;
}

.ce-hb-menu-sublink {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  line-height: 1;
  margin: 5px 0;
  padding-left: 20px;
  display: block;
  transition: color 0.3s ease;
}
/* Kill br inside accordion panel, make p transparent */
.ce-hb-menu-accordion-panel > br,
.ce-hb-menu-accordion-panel br {
  display: none !important;
}
.ce-hb-menu-accordion-panel > p,
.ce-hb-menu-accordion-panel p {
  display: contents !important;
  margin: 0 !important;
}
.ce-hb-menu-sublink:hover {
  color: #d48063;
}

.ce-hb-menu-link.ce-hb-menu-active {
  color: #d48063;
}

/* Bottom close button removed — hamburger X + cursor X handle closing */
.ce-hb-menu-close {
  display: none;
}

.ce-hb-menu-socials {
  position: absolute;
  bottom: 40px;
  right: 80px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.ce-hb-menu-socials a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ce-hb-menu-socials a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}
.ce-hb-menu-socials a:hover {
  color: #d48063;
  transform: translateY(-2px);
}

/* =============================================
   FOOTER — Shared across all Theme B pages
   ============================================= */
.ce-theme-b__footer {
  padding: 50px 60px;
  background: #111;
}

.ce-theme-b__footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.ce-theme-b__footer-logo img {
  height: 50px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.ce-theme-b__footer-logo:hover img {
  opacity: 1;
}

.ce-theme-b__footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.ce-theme-b__footer-nav a {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}
.ce-theme-b__footer-nav a:hover {
  color: #c8876e;
}

.ce-theme-b__footer-copy {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

/* =============================================
   RESPONSIVE — Shared components
   ============================================= */
@media (max-width: 768px) {
  .ce-hb-header {
    padding: 0 20px;
    height: 60px;
  }
  .ce-hb-hamburger span {
    width: 40px;
  }
  .ce-hb-menu {
    padding: 60px 40px;
  }
  .ce-hb-menu-socials {
    bottom: 30px;
    right: 40px;
    gap: 18px;
  }
  .ce-hb-menu-socials a svg {
    width: 18px;
    height: 18px;
  }
  .ce-theme-b__footer {
    padding: 40px 30px;
  }
  .ce-theme-b__footer-nav {
    gap: 16px;
  }
}

/* =============================================
   MODAL — Theme B paylaşılan
   - Spotify track / YouTube video lightbox (ce-hb-modal--track / --video)
   - Şarkı künye popup (ce-hb-modal--credits)
   ============================================= */
.ce-hb-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ce-hb-modal.is-open { display: flex; }

.ce-hb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: ce-hb-modal-fade 0.3s ease forwards;
  cursor: pointer;
}
.ce-hb-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  animation: ce-hb-modal-slide 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.ce-hb-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.ce-hb-modal__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}
.ce-hb-modal__close svg {
  width: 18px;
  height: 18px;
}
.ce-hb-modal__body {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6);
}
.ce-hb-modal__body iframe {
  display: block;
  width: 100%;
  border: 0;
}
.ce-hb-modal--track .ce-hb-modal__body iframe {
  height: 380px;
}
.ce-hb-modal--video .ce-hb-modal__body {
  aspect-ratio: 16 / 9;
}
.ce-hb-modal--video .ce-hb-modal__body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── KÜNYE varyantı ──────────────────────────────────────────────────── */
.ce-hb-modal--credits .ce-hb-modal__dialog {
  max-width: 720px;
}
.ce-hb-modal--credits .ce-hb-modal__body {
  background: #ffffff;
  border-radius: 16px;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
}
.ce-hb-modal--credits .ce-hb-modal__close {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ce-hb-modal--credits .ce-hb-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Künye içerik düzeni */
.ce-credits {
  padding: 36px 40px 40px;
  font-family: 'Montserrat', sans-serif;
  color: #000;
}
.ce-credits__head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}
.ce-credits__cover {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f1f1;
}
.ce-credits__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ce-credits__head-text {
  flex: 1;
  min-width: 0;
}
.ce-credits__num {
  display: inline-block;
  color: #c8876e;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.ce-credits__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  text-transform: uppercase;
  color: #000;
  margin: 0 0 8px;
  word-break: break-word;
}
.ce-credits__summary {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.5;
}
.ce-credits__summary strong {
  color: #000;
  font-weight: 600;
}

.ce-credits__group + .ce-credits__group {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.ce-credits__group-title {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0 0 14px;
}
.ce-credits__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.ce-credits__row:last-child {
  border-bottom: 0;
}
.ce-credits__label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
}
.ce-credits__value {
  font-size: 14px;
  color: #000;
  font-weight: 500;
  word-break: break-word;
}

/* Sözler grubu — newline'lar &#10; entity ile korunur, white-space:pre-wrap render eder */
.ce-credits__group--lyrics .ce-credits__lyrics {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 16px 18px;
  background: rgba(200, 135, 110, 0.06);
  border-left: 3px solid #c8876e;
  border-radius: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.ce-credits__footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ce-credits__footer iframe {
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 12px;
}
.ce-credits__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
}
.ce-credits__footer-link:hover {
  background: #c8876e;
  color: #000;
}

@keyframes ce-hb-modal-fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes ce-hb-modal-slide {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (max-width: 640px) {
  .ce-hb-modal { padding: 16px; }
  .ce-hb-modal__close { top: -44px; width: 36px; height: 36px; }
  .ce-hb-modal--track .ce-hb-modal__body iframe { height: 352px; }

  .ce-credits { padding: 28px 24px 32px; }
  .ce-credits__head { gap: 14px; padding-bottom: 18px; margin-bottom: 18px; }
  .ce-credits__cover { flex-basis: 64px; width: 64px; height: 64px; }
  .ce-credits__row { grid-template-columns: 110px 1fr; gap: 12px; }
}
