@layer pages {
  /*
   * Cabeçalhos da Home: ações alinhadas à direita e dropdown de canais.
   * O bloco original vivia em core/utilities, mas seus únicos consumidores
   * são seções deste template. O menu preserva o estado .open e suas rotas.
   */
  .home-section-action {
    box-sizing: border-box;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background:
      linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
      linear-gradient(110deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink)) border-box;
    box-shadow: 0 0 7px rgb(179 136 255 / 12%);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color 140ms ease, box-shadow 140ms ease;
  }

  .home-section-action:hover,
  .home-section-action:focus-visible {
    background:
      linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
      conic-gradient(from var(--orbit-border-angle), var(--neon-cyan), var(--neon-purple), var(--neon-pink), var(--neon-cyan)) border-box;
    animation: orbit-border-spin 4s linear infinite;
  }

  .home-section-action:hover {
    color: var(--neon-purple);
    box-shadow: 0 0 9px rgb(179 136 255 / 16%);
    text-decoration: none;
  }

  .home-section-action:focus-visible {
    position: relative;
    z-index: 2;
    outline: 3px solid var(--neon-purple-bright);
    outline-offset: 3px;
  }

  .home-section-action svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }

  .home-hub .home-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    align-items: center;
    margin-bottom: 12px;
  }

  .home-hub .home-section-header .section-title {
    min-width: 0;
    margin: 0;
  }

  .home-hub .home-section-header > .home-section-action,
  .home-hub .home-section-header .section-link-dropdown {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .home-section-dropdown {
    position: relative;
    display: inline-block;
  }

  .home-section-dropdown .dropdown-chevron {
    width: 14px;
    height: 14px;
    color: inherit;
    transition: transform 0.2s;
  }

  .home-section-dropdown .dropdown-chevron.rotated {
    transform: rotate(180deg);
  }

  .home-section-dropdown .section-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    min-width: 220px;
    padding: 0.5rem 0;
    border: 1px solid rgb(99 102 241 / 30%);
    border-radius: 12px;
    background: #0f0f1a;
    box-shadow: 0 12px 32px rgb(0 0 0 / 50%), 0 0 0 1px rgb(255 255 255 / 5%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    backdrop-filter: blur(20px);
  }

  .home-section-dropdown .section-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .home-section-dropdown .section-dropdown-item {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
  }

  .home-section-dropdown .section-dropdown-item:focus-visible {
    outline: 2px solid var(--neon-cyan-bright, #33e5ff);
    outline-offset: -3px;
  }

  .home-section-dropdown .section-dropdown-item:hover {
    background: linear-gradient(90deg, rgb(99 102 241 / 20%), rgb(99 102 241 / 10%));
    color: #a5b4fc;
  }

  .home-section-dropdown .section-dropdown-divider {
    height: 1px;
    margin: 0.5rem 1rem;
    background: rgb(99 102 241 / 20%);
  }

  /* Cabeçalho de Shorts conserva seu espaçamento próprio. */
  .shorts-home-section .home-section-header {
    margin-bottom: 1rem;
  }

  @media (width <= 767px) {
    .home-section-action {
      gap: 6px;
      padding-inline: 7px;
      font-size: 0.8rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .home-section-action,
    .home-section-dropdown .dropdown-chevron,
    .home-section-dropdown .section-dropdown-menu {
      transition: none;
    }

    .home-section-action,
    .home-section-action:hover,
    .home-section-action:focus-visible {
      animation: none;
    }

    .home-section-dropdown .section-dropdown-menu {
      transform: none;
    }
  }
}
