
/* ================================================
   header.css — Header SimiFest
   Escritorio: logo · menú · campana · píldora de usuario
   Móvil (≤ 991px): logo · campana · avatar · hamburguesa
   ================================================ */

.hd-simifest {
  --hd-bg:        #4C3896;                 /* morado del header */
  --hd-menu-bg:   #161226;                 /* fondo del menú móvil */             /* "150 SimiStars" */              /* globito rojo de la campana */
  --hd-circ-bg:   rgba(255, 255, 255, .12);
  --hd-circ-borde: rgba(255, 255, 255, .28);
  --hd-alto:      76px;
  --hd-pad-x:     52px;
  --hd-fuente:    'Montserrat', system-ui, sans-serif;

  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--hd-alto);
  font-family: var(--hd-fuente);
  color: var(--hd-texto);
  background-color: var(--hd-bg);
}

.hd-simifest *,
.hd-simifest *::before,
.hd-simifest *::after { box-sizing: border-box; }

.hd-inner {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 var(--hd-pad-x);
}

/* ---------- Logo ---------- */
.hd-logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  text-decoration: none;
}
.hd-logo img {
  height: 34px;
  width: auto;
  display: block;
}

/* ---------- Menú (escritorio) ---------- */
.hd-nav {
  margin-left: clamp(50px, 6vw, 30px);
}
.hd-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}
.hd-nav a {
  position: relative;
  text-decoration: none;
  cursor: pointer;
  display: block;
  padding: 6px 0;
  color: var(--white);
  text-decoration: none;
  font-family: 'gottamBold', sans-serif;
  font-size: .8em;
  white-space: nowrap;
}

.hd-nav a:hover{
  color: var(--subtext);

}

/* ---------- Acciones (derecha) ---------- */
.hd-login{
  font-family: 'gottamMedium', sans-serif;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  font-size: .8em;
  border: 1px solid rgba(255, 255, 255, .7);
  padding: 8px 20px;
  margin: 0;
  border-radius: 100px;
  

}
a.hd-login:hover{
  transition: .5s ease-in-out;
  color: var(--white);
  background: #161226;

}
.hd-acciones {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botón circular (campana, hamburguesa) */
.hd-circ {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--hd-circ-borde);
  border-radius: 50%;
  background: var(--hd-circ-bg);
  color: var(--hd-texto);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease;
}
.hd-circ:hover { background: rgba(255, 255, 255, .2); }
.hd-circ svg { width: 20px; height: 20px; display: block; }

/* Globito de notificaciones */
.hd-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--alerta);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.hd-badge[hidden] { display: none; }

[hidden]{ display: none !important; }

.hd-notif-wrap{ position: relative; }

.hd-notif-panel{
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: linear-gradient(271deg,rgba(101, 80, 255, 1) 0%, rgba(217, 94, 234, 1) 100%);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
    z-index: 999;
    overflow: hidden;
}

.hd-notif-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    color: var(--white);
    font-family: 'gottamBold', sans-serif;
    font-size: .9em;
}
.hd-notif-cerrar{
    background: none;
    border: 0;
    color: var(--white);
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.hd-notif-lista{ max-height: 60vh; overflow-y: auto; }

.hd-notif-item{
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
    transition: background .2s;
}
.hd-notif-item:hover{ background: rgba(255,255,255,.06); }
.hd-notif-item.no-leida{ background: rgba(255,233,110,.07); }
.hd-notif-ico img{ width: 32px; height: 50px; }

.hd-notif-txt h4{
    margin: 0 0 4px;
    font-size: .85em;
    color: var(--white);;
    font-family: 'gottamBold', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hd-notif-txt .punto{
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--yellow);
    flex: 0 0 8px;
}
.hd-notif-txt p{
    margin: 0;
    font-size: .78em;
    color: rgba(255,255,255,.75);
    font-family: 'gottamRegularNormal', sans-serif;
    line-height: 1.35;
}
.hd-notif-tiempo{
    display: block;
    margin-top: 6px;
    font-size: .7em;
    color: rgba(255,255,255,.45);
}

.hd-notif-vacio{
    margin: 0;
    padding: 28px 16px;
    text-align: center;
    color: rgba(255,255,255,.6);
    font-size: .8em;
}

.hd-notif-todas{
    display: block;
    padding: 12px;
    text-align: center;
    color: var(--yellow);
    text-decoration: none;
    font-size: .8em;
    font-family: 'gottamBold', sans-serif;
    border-top: 1px solid rgba(255,255,255,.12);
}
.hd-notif-todas:hover{
  color: var(--yellow);

}
button.hd-circ{
    font: inherit;
    color: inherit;
    padding: 0;
    cursor: pointer;
}

.hd-notif-wrap{
    position: relative;
    display: inline-flex;
    align-items: center;
}


@media (max-width: 520px){
    .hd-notif-panel{
        position: fixed;
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* Píldora de usuario */
.hd-usuario {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 3px 20px 3px 3px;
  border: 1px solid var(--hd-circ-borde);
  border-radius: 999px;
  background: var(--hd-circ-bg);
  color: var(--white);
  text-decoration: none;
  transition: background .2s ease;
}
.hd-usuario.hd-nombre :hover{
  color: white;
}

.hd-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.hd-usuario-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.hd-nombre {
  color: white;
  font-size: 13px;
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hd-estrellas {
  font-size: 11px;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

/* Hamburguesa: solo en móvil */
.hd-toggle { display: none; }
.hd-toggle .ico-cerrar { display: none; }
.hd-toggle[aria-expanded="true"] .ico-menu   { display: none; }
.hd-toggle[aria-expanded="true"] .ico-cerrar { display: block; }

/* Foco visible con teclado */
.hd-simifest a:focus-visible,
.hd-simifest button:focus-visible {
  outline: 2px solid var(--hd-estrellas);
  outline-offset: 3px;
}

/* ================================================
   MÓVIL
   ================================================ */
@media (max-width: 991px) {
  .hd-simifest {
    --hd-alto: 64px;
    --hd-pad-x: 20px;
  }

  .hd-acciones { gap: 10px; }

  /* La píldora se vuelve solo el avatar en círculo */
  .hd-usuario {
    width: 40px;
    height: 40px;
    padding: 0;
    gap: 0;
    justify-content: center;
    overflow: hidden;
  }
  .hd-usuario .hd-avatar { width: 100%; height: 100%; }
  .hd-usuario-txt { display: none; }

  .hd-toggle { display: grid; }

  /* El menú pasa a ser un panel debajo del header */
  .hd-nav {
    position: fixed;
    top: var(--hd-alto);
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 12px 33px 32px;
    background: var(--hd-menu-bg);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .hd-simifest.abierto .hd-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }

  .hd-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .hd-nav a {
    display: inline-block;
    padding: 10px 0;
    font-size: 1em;
    line-height: 1.8;
  }
}

/* Evita que la página se desplace detrás del menú abierto */
body.hd-sin-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hd-simifest * { transition: none !important; }
}

.hd-invitado {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hd-invitado[hidden] { display: none; }

.hd-avatar-link {
    display: inline-flex;
    border-radius: 50%;
}

.hd-avatar {
    width: 42px;          /* ajústalo al tamaño de tu .hd-circ */
    height: 42px;
    display: block;
}

.hd-avatar .av-fondo {
    fill: #5f4d9f;
    stroke: #8a7dbf;
    transition: fill .2s ease, stroke .2s ease;
}
.hd-avatar .av-figura {
    fill: #aba0cf;
    transition: fill .2s ease;
}

/* Al pasar el puntero se aclara */
.hd-avatar-link:hover .av-fondo,
.hd-avatar-link:focus-visible .av-fondo {
    fill: #7663bd;
    stroke: #a99ddb;
}
.hd-avatar-link:hover .av-figura,
.hd-avatar-link:focus-visible .av-figura {
    fill: #cfc6ec;
}

.hd-avatar-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
/* ---- Solo para la demo ---- */
body { margin: 0; background: #241448; min-height: 150vh; font-family: 'Montserrat', sans-serif; }
.demo-logo { font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: #fff; line-height: 34px; font-style: italic; }
.demo-avatar { background: linear-gradient(135deg, #f58bd0, #7b5cf0); }
