/* ===== Paleta y tokens básicos ===== */
:root{
  --brand-dark:#1d1a21;
  --brand-darker:#141217;
  --brand-accent:#55102c;
  --brand-highlight:#cc0066;
  --brand-soft:#8f2c47;
  --text-light:#f8f7fb;
  --text-muted:#c9c3cf;
  --stroke:rgba(255,255,255,0.14);
}

/* ===== Top ribbon ===== */
.topmenu{
  background: linear-gradient(90deg,#2b2a2f 0%, var(--brand-accent) 55%, #6d1c40 100%);
  color: var(--text-light);
  font-size: 13px;
}
.topmenu .tm-wrap{
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.tm-info{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tm-pill{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  letter-spacing: .04em;
  font-weight: 700;
  text-transform: uppercase;
}
.tm-text{ opacity: .85; font-weight: 500; }
.tm-links{
  display: flex;
  align-items: center;
  gap: 18px;
}
.tm-links a{
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .01em;
  position: relative;
  padding-bottom: 2px;
  transition: opacity .18s ease;
}
.tm-links a::after{
  content:"";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  opacity: 0;
  transform: scaleX(.4);
  transform-origin: left;
  transition: transform .2s ease, opacity .2s ease;
}
.tm-links a:hover{
  opacity: 1;
}
.tm-links a:hover::after{
  opacity: 1;
  transform: scaleX(1);
}

/* ===== Header principal ===== */
.site-header{
  background: linear-gradient(135deg,var(--brand-dark),var(--brand-darker));
  color: var(--text-light);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.site-header__inner{
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 24px 22px;
  display: grid;
  grid-template-columns: minmax(220px,260px) minmax(420px,1fr) minmax(320px,420px);
  gap: 32px;
  align-items: center;
}
.brand-stack{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand img{
  height: 80px;
  width: auto;
  display: block;
}
.brand-tagline{
  margin: 0;
  font-size: .9rem;
  color: var(--text-muted);
  letter-spacing: .015em;
}

/* ===== Buscador ===== */
.search-wrapper{ width: 100%; }
.searchbar{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.search-input{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0,0,0,0.18);
}
.searchbar .input{
  flex: 1;
  border: none;
  border-radius: 999px;
  height: 48px;
  padding: 0 18px;
  font-size: 15px;
}
.searchbar .input::placeholder{ color: #9ca3af; }
.searchbar .input:focus{ outline: none; }
.search-btn{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--brand-highlight);
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 12px 26px rgba(204,0,102,0.45);
}
.search-btn:hover{ transform: translateY(-1px); }
.search-btn i{ font-size: 1.1rem; }

.search-hints{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .85rem;
  color: rgba(255,255,255,0.8);
}
.search-hints span{ font-weight: 600; }
.hint-btn{
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.12);
  color: var(--text-light);
  font-size: .78rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.hint-btn:hover{
  background: #fff;
  color: var(--brand-accent);
}

/* ===== Acciones de cabecera ===== */
.header-actions{
  display: flex;
  justify-content: flex-end;
  width: 100%;
}
.ha-panel{
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg,rgba(255,255,255,0.05),rgba(255,255,255,0.02));
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  min-width: 0;
}
.ha-group{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ha-group__label{
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  color: var(--text-muted);
  padding-left: 2px;
}
.ha-divider{
  width: 1px;
  background: var(--stroke);
  margin: 4px 2px;
}
.ha-panel .ha-line{
  justify-content: flex-start;
}
.ha-line{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ha-chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.ha-chip__icon{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  border: 1px solid var(--stroke);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.ha-chip__text{ display: inline-flex; align-items: center; gap: 4px; }
.ha-chip__count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-accent);
  font-size: .82rem;
  font-weight: 800;
  min-width: 32px;
}
.ha-chip:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}
.ha-chip--light{
  background: #fff;
  color: var(--brand-accent);
  border-color: #fff;
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}
.ha-chip--light:hover{
  color: #6b0d33;
}
.ha-chip--ghost{
  background: rgba(255,255,255,0.02);
}
.ha-chip--solid{
  border: 1px solid transparent; /* mantener ancho para evitar salto en hover */
  background: linear-gradient(120deg,var(--brand-soft),var(--brand-accent));
  color: #fff;
  box-shadow: 0 12px 30px rgba(85,16,44,0.45);
}
.ha-chip--solid:hover{
  background: #fff;
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}

/* ===== Responsivo ===== */
@media (max-width: 1200px){
  .site-header__inner{
    grid-template-columns: minmax(220px,260px) minmax(320px,1fr);
    grid-template-rows: auto auto;
  }
  .header-actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .ha-panel{
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 900px){
  .topmenu .tm-wrap{
    flex-direction: column;
    align-items: flex-start;
  }
  .site-header__inner{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .header-actions{
    width: 100%;
    justify-content: flex-start;
  }
  .ha-panel{
    flex-direction: column;
    align-items: stretch;
  }
  .ha-divider{
    width: 100%;
    height: 1px;
  }
  .search-hints{
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px){
  .ha-chip{
    width: 100%;
    justify-content: flex-start;
  }
  .ha-chip__count{
    margin-left: auto;
  }
}
