/* Header flotante en tarjetas (comparte tema con la landing) */
.site-header { position: fixed; top: 14px; left: max(12px, 2vw); right: max(12px, 2vw); z-index: 50; }
.hd-bar {
  display: flex; align-items: stretch; gap: 8px; padding: 8px;
  background: rgba(13, 14, 18, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid #23242b; border-radius: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.hd-card { background: #14151b; border: 1px solid #1f2026; border-radius: 15px; display: flex; align-items: center; color: var(--fg); transition: border-color .2s, background .2s; }
.hd-logo { gap: 12px; padding: 0 18px 0 8px; min-height: 48px; letter-spacing: .2em; font-size: 13px; font-weight: 300; white-space: nowrap; }
.hd-logo b { font-weight: 800; color: var(--accent); }
.hd-mark { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px #23242b; }
.hd-menu { gap: 10px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.hd-menu:hover, .hd-menu[aria-expanded="true"] { border-color: var(--accent); background: #1a1417; }
.hd-nav { gap: 2px; padding: 0 8px; flex: 1; min-width: 0; }
.hd-nav > a, .dd-btn {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 11px; color: #d4d4d8; background: none; border: 0;
  font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.hd-nav > a:hover, .dd-btn:hover, .dd-btn[aria-expanded="true"] { background: #1c1d24; color: #fff; }
.hd-nav > a.active { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 11px 11px 6px 6px; }
.dd { position: relative; }
.dd .chev { transition: transform .2s; opacity: .7; }
.dd-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 14px); left: 0; min-width: 270px; padding: 8px; display: none;
  background: rgba(13, 14, 18, .96); backdrop-filter: blur(16px); border: 1px solid #23242b; border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.dd.open .dd-panel { display: block; animation: ddIn .16s ease-out; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } }
.dd-panel a { display: block; padding: 11px 14px; border-radius: 12px; transition: background .15s; }
.dd-panel a:hover { background: #1c1d24; }
.dd-panel a b { display: block; font-size: 14px; font-weight: 600; }
.dd-panel a span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dd-panel a.all { margin-bottom: 4px; border-bottom: 1px solid #1f2026; border-radius: 12px 12px 0 0; }
.dd-panel a.all b { color: var(--accent); }
.dd-btn.active { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 11px 11px 6px 6px; }

.hd-right { display: flex; gap: 8px; align-items: stretch; }
.hd-search { padding: 0 4px; }
.hd-icon, .hd-fav { background: none; border: 0; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hd-icon { width: 40px; height: 40px; border-radius: 10px; }
.hd-icon:hover { color: var(--accent); }
.hd-search input { width: 0; opacity: 0; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 14px; outline: none; transition: width .25s, opacity .2s, padding .25s; }
.hd-search.open input { width: 170px; opacity: 1; padding: 0 10px 0 4px; }
.hd-search.open { border-color: var(--accent); }
.hd-fav { gap: 7px; padding: 0 16px; font-size: 14px; }
.hd-fav:hover { border-color: var(--accent); }
.hd-cta { display: flex; align-items: center; padding: 0 22px; border-radius: 15px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; transition: background .2s, transform .2s; }
.hd-cta:hover { background: #ff5238; transform: translateY(-1px); }

/* Menú completo */
.mega { margin-top: 10px; background: rgba(13, 14, 18, .96); backdrop-filter: blur(18px); border: 1px solid #23242b; border-radius: 22px; padding: 26px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.mega[hidden] { display: none; }
.mega:not([hidden]) { animation: ddIn .18s ease-out; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 28px; }
.mega .label { margin-bottom: 12px; }
.mega-grid > div a { display: block; padding: 8px 0; color: #d4d4d8; font-size: 15px; transition: color .15s, transform .15s; }
.mega-grid > div a:hover { color: #fff; transform: translateX(4px); }
.mega-feature { position: relative; border-radius: 16px; overflow: hidden; min-height: 150px; border: 1px solid #1f2026; }
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mega-feature:hover img { transform: scale(1.06); }
.mega-feature span { position: absolute; left: 14px; bottom: 12px; font-weight: 600; font-size: 14px; text-shadow: 0 2px 12px #000; }
.mega-feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent 60%); }
.mega-feature span { z-index: 1; }
.site-header :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 1100px) {
  .hd-nav { display: none; }
  .hd-bar { justify-content: flex-start; }
  .hd-right { margin-left: auto; }
  .hd-fav { display: none; }
}
@media (max-width: 760px) {
  .hd-name { display: none; }
  .hd-logo { padding: 0 10px; }
  .hd-search { display: none; }
  .hd-cta { padding: 0 16px; }
  .mega-grid { grid-template-columns: 1fr 1fr; }
  .mega-feature { grid-column: 1 / -1; }
  .mega { max-height: 75vh; overflow: auto; }
}
