/* ============================================================
   header-nav.css — Fiori
   Header sticky con logo, título central y nav con botones
   Depende de: main.css (variables --red, --dark, --dark2)
   ============================================================ */

/* ===== HEADER ===== */
header {
  background: var(--dark);
  color: white;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 94px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  border-bottom: 3px solid var(--red);
}

/* ── Logo contenedor ── */
.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo-fallback {
  height: 120px;
  width: auto;
  display: flex;
  align-items: center;
  gap: 13px;
}

/* ── Ícono del logo (fallback sin imagen) ── */
.logo-icon {
  width: 105px;
  height: 105px;
  background: var(--red);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 3.6rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: -1px;
  box-shadow: 0 3px 12px rgba(217, 10, 10, 0.4);
}

/* ── Texto del logo ── */
.logo-text-wrap {
  line-height: 1.2;
}

.logo-text-main {
  font-family: 'Oswald', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: white;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-text-sub {
  font-size: 0.82rem;
  color: #bbb;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* ── Logo como imagen ── */
.header-img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

/* ── Título central ── */
.header-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(0.85rem, 2.2vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ccc;
  text-align: center;
  flex: 1;
}

.header-title strong {
  color: white;
  font-weight: 600;
}

/* ===== NAV ===== */
nav {
  background: var(--dark2);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
  position: sticky;
  top: 94px; /* igual a la altura del header */
  z-index: 2100;
}

nav button {
  color: #aaa;
  background: none;
  border: none;
  padding: 14px 18px;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  letter-spacing: 1.5px;
  font-size: 0.88rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
  position: relative;
}

nav button:hover {
  color: white;
}

nav button.nav-activo {
  color: white;
  border-bottom-color: var(--red);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  header {
    height: 70px;
    padding: 0 14px;
  }
  .header-logo-fallback { height: 70px; }
  .header-img           { height: 70px; }
  .logo-icon {
    width: 52px; height: 52px;
    font-size: 1.8rem; border-radius: 7px;
  }
  .logo-text-main { font-size: 1.1rem; letter-spacing: 1px; }
  .logo-text-sub  { font-size: 0.68rem; letter-spacing: 1.5px; }
  .header-title   { display: none; }
  nav {
    top: 70px;
    padding: 0 2px;
    gap: 0;
    height: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  nav button {
    padding: 10px 8px;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    height: 40px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  header { height: 58px; padding: 0 10px; }
  .header-logo-fallback { height: 58px; }
  .header-img           { height: 58px; }
  .logo-icon {
    width: 42px; height: 42px;
    font-size: 1.4rem; border-radius: 6px;
  }
  .logo-text-main { font-size: 0.9rem; letter-spacing: 0.5px; }
  .logo-text-sub  { display: none; }
  nav {
    top: 58px;
    padding: 0 2px;
    gap: 0;
    height: 38px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  nav button {
    padding: 9px 7px;
    font-size: 0.7rem;
    letter-spacing: 0;
    height: 38px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}