.header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* TOP BAR */
.header__top {
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-right: 8px;
}

.logo {
  width: 58px;
  display: flex;
}

/* NAV */
.header__nav {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
}

.header__nav::-webkit-scrollbar {
  display: none;
}

.header__nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 12px;
  flex-shrink: 0;
  line-height: 1;
}

.header__nav a:hover {
  opacity: 1;
  background-color: rgb(240, 80, 16);
  outline: none;
}

/* RIGHT */
.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ICONS */
.icon-btn,
.burger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;

  img {
    flex-shrink: 0;
  }
}

/* BOTTOM BAR */
.header__bottom {
  background: #ff6a00;
  overflow-x: auto;
  white-space: nowrap;
}

.ticker {
  display: flex;
  gap: 24px;
  padding: 10px 16px;
}

.ticker a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}

.burger {
  display: none;
}

@media (width <1000px) {
  .burger {
    display: flex;
  }
  .header__nav {
    display: none;
  }
  .header__left {
    width: 100%;
  }
  .logo {
    margin-inline: auto;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header__nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #000;
    flex-direction: column;
    display: none;
    padding: 10px 16px;
  }

  .header__nav.active {
    display: flex;
  }
  .header__left {
    span {
      display: none;
    }
  }
}

/* ── Demo spacer ── */
.page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════
       FOOTER
    ══════════════════════════════════════ */
footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
}

/* ── Main grid ── */
.footer-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 40px 28px;
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr 1fr;
  gap: 0 24px;
}

/* ── Brand column ── */
.brand-col {
  padding-right: 16px;
  border-right: 1px solid #e8e8e8;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 24px;
  text-decoration: none;
}

.logo-rtve {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-r {
  color: #e8581f;
}
.logo-t {
  color: #1a66cc;
}
.logo-v {
  color: #e8581f;
}
.logo-e {
  color: #f0a500;
}
.logo-dot {
  color: #555;
  font-weight: 700;
  font-size: 1.3rem;
}
.logo-es {
  color: #333;
  font-size: 1rem;
  font-weight: 600;
}

.brand-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.brand-nav a {
  color: #222;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.18s;
}
.brand-nav a:hover {
  color: #e8581f;
}

/* ── Channel columns ── */
.channel-col {
  padding: 0 8px;
}

.channel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.channel-logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

/* TVE – blue */
.tve-logo {
  color: #1a66cc;
}
/* RNE – red */
.rne-logo {
  color: #cc1a1a;
}
/* RTVE corp – orange */
.rtve-logo {
  color: #e8581f;
}

.channel-bar {
  height: 3px;
  border-radius: 2px;
}
.tve-bar {
  background: #1a66cc;
}
.rne-bar {
  background: #cc1a1a;
}
.rtve-bar {
  background: #f0a500;
}

.channel-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.channel-nav a {
  color: #222;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: color 0.18s;
}
.channel-nav a:hover {
  color: #e8581f;
}

/* ── Legal bar ── */
.footer-legal {
  border-top: 1px solid #e0e0e0;
  padding: 16px 40px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
}

.footer-legal a {
  color: #333;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s;
}
.footer-legal a:hover {
  color: #e8581f;
}

/* ── Copyright ── */
.footer-copy {
  border-top: 1px solid #ebebeb;
  text-align: center;
  padding: 14px 40px;
  color: #888;
  font-size: 0.78rem;
}

/* ══════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: 140px 1fr 1fr 1fr 1fr;
    padding: 28px 24px 20px;
    gap: 0 16px;
  }
}

@media (max-width: 860px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  .brand-col {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 20px;
    padding-right: 0;
  }
  .brand-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 20px;
  }
}

@media (max-width: 520px) {
  .footer-main {
    grid-template-columns: 1fr;
    padding: 20px 16px 16px;
    gap: 24px;
  }
  .footer-legal {
    padding: 14px 16px;
  }
  .footer-copy {
    padding: 12px 16px;
  }

  /* Collapse each channel block with toggle */
  .channel-col .channel-nav {
    display: none;
  }
  .channel-col .channel-nav.open {
    display: flex;
  }
  .channel-header {
    cursor: pointer;
    user-select: none;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
  }
  .channel-bar {
    display: none;
  }
  .toggle-icon {
    margin-left: auto;
    font-size: 0.9rem;
    color: #999;
    transition: transform 0.25s;
  }
  .toggle-icon.open {
    transform: rotate(180deg);
  }
  .channel-col {
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 8px;
  }
}
