/* =========================================================
   TOPBAR — Barra superior responsiva con swipe en móvil
   Casa Polska Host
   ========================================================= */

/* ── Variables por defecto (se sobreescriben desde el Customizer) ── */
:root {
  --topbar-bg:      #1e293b;
  --topbar-color:   #f1f5f9;
  --topbar-height:  38px;
  --topbar-fs:      13px;
}

/* ── Contenedor principal ── */
.cph-topbar {
  width: 100%;
  background-color: var(--topbar-bg);
  color: var(--topbar-color);
  font-size: var(--topbar-fs);
  height: var(--topbar-height);
  position: relative;
  z-index: 1000;
  overflow: hidden;
}

/* ── Inner: flex row ── */
.cph-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}

/* =========================================================
   NAVEGACIÓN (izquierda) — swipeable en móvil
   ========================================================= */
.cph-topbar-nav-wrap {
  flex: 1;
  min-width: 0;          /* permite que se comprima */
  overflow: hidden;
  position: relative;
}

/* Fade-out en el borde derecho para indicar scroll */
.cph-topbar-nav-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 32px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--topbar-bg));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.cph-topbar-nav-wrap.has-overflow::after {
  opacity: 1;
}

.cph-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  white-space: nowrap;
  height: var(--topbar-height);
}
.cph-topbar-nav::-webkit-scrollbar {
  display: none;
}

/* Lista del menú */
.cph-topbar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.cph-topbar-nav ul li {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.cph-topbar-nav ul li a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--topbar-height);
  padding: 0 14px;
  color: var(--topbar-color);
  text-decoration: none;
  font-size: var(--topbar-fs);
  font-weight: 500;
  white-space: nowrap;
  transition: opacity .15s, background-color .15s;
  opacity: .9;
}

.cph-topbar-nav ul li a:hover,
.cph-topbar-nav ul li.current-menu-item a {
  opacity: 1;
  background-color: rgba(255,255,255,.08);
}

/* Separador vertical entre items */
.cph-topbar-nav ul li + li a::before {
  content: '';
  display: block;
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: .2;
  margin-right: 14px;
  flex-shrink: 0;
}

/* Ícono opcional en el item (se pone como primer hijo span.topbar-icon) */
.cph-topbar-nav ul li a .topbar-icon {
  font-size: 12px;
  opacity: .8;
}

/* Fallback cuando no hay menú asignado */
.cph-topbar-empty {
  font-size: var(--topbar-fs);
  opacity: .5;
  padding: 0 4px;
  font-style: italic;
}

/* =========================================================
   REDES SOCIALES (derecha)
   ========================================================= */
.cph-topbar-social {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.cph-topbar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--topbar-color);
  text-decoration: none;
  font-size: 14px;
  transition: opacity .15s, background-color .15s;
  opacity: .85;
}

.cph-topbar-social a i {
  font-size: 14px;
  line-height: 1;
}

.cph-topbar-social a:hover {
  opacity: 1;
  background-color: rgba(255,255,255,.12);
}



/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet: padding mayor */
@media (min-width: 768px) {
  .cph-topbar-inner {
    padding: 0 24px;
  }
  .cph-topbar-nav ul li a {
    padding: 0 18px;
  }
}

/* Móvil: iconos sociales reducidos */
@media (max-width: 480px) {
  .cph-topbar-social a {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

}
