/* IRON PENDULUM — PHASE 3.2 / LATEST V4 (TESTE LOCAL)
   Complementa a Home V5 sem alterar suas medidas de sidebar,
   cabeçalho, marca compacta ou rodapé.
   Sem PHP, consultas ao MariaDB ou mudanças no Forge.
*/

/* Exclusivo das subpáginas: a caverna mais escura é o fundo fixo. */
body.page-latest {
    background-image: url('asset.php?name=Landing-Page-Site.png');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000;
    overflow: hidden; /* a única rolagem é a área das capas */
}

/* Ajuste cirúrgico: preserva a coordenada exata de Discography na V5
   (altura de slot + margem = 49px), mas posiciona Home
   imediatamente acima, sem uma linha em branco. */
.page-latest .sidebar-home-slot {
    height: 49px;
    margin-bottom: 0;
    align-items: flex-end;
}
.page-latest .sidebar-home-link {
    display: inline-block;
    /* Home com a mesma tipografia de Discography; brilho individual preservado. */
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25px;
    line-height: 1.4;
}

/* V4: os subitens do menu ficam ainda mais próximos.
   A distância de Discography para Latest permanece a mesma (17px),
   e a Home V5 não recebe nenhuma mudança nesta rodada. */
.page-latest .sidebar-section-items {
    gap: 4px;
}

/* Região entre a faixa do título e o rodapé V5. */
.catalog-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin-top: 80px; /* mesma altura do cabeçalho V5 */
    padding: 30px 24px 26px calc(var(--sidebar-width) + 24px); /* 12px extras para o rótulo ACIMA das capas */
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    position: relative;
    z-index: 1;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    column-gap: 60px;
    row-gap: 46px;
    justify-content: center;
    align-content: start;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 8px;
}

.catalog-item {
    width: 200px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.catalog-item:hover { z-index: 5; }

/* V3: identificação discreta e FIXA, centralizada acima da arte.
   Não é link nem recebe brilho variável ao passar o mouse. */
.release-type-label {
    position: absolute;
    top: -21px;
    left: 0;
    width: 200px;
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.25px;
    color: #e5c383;
    text-shadow: 0 0 5px rgba(197,160,89,0.32);
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.thumb-wrapper {
    width: 200px;
    height: 200px;
    border: 1px solid rgba(197, 160, 89, 0.32);
    background: #090908;
    overflow: hidden;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
    will-change: transform;
}
.thumb-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}
.thumb-wrapper:hover {
    transform: scale(1.04);
    border-color: #e5c383;
    box-shadow: 0 0 16px rgba(197, 160, 89, 0.2);
}

.track-title {
    margin-top: 12px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.25px;
    color: #e5c383;
    white-space: normal;
    text-transform: none;
    min-height: 19px;
}
.track-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* V3: o pergaminho é o ÚNICO link de cada cartão.
   Aponta para uma página de teste LOCAL; as páginas definitivas vêm depois. */
.action-symbol {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 24px;
    color: #ae8b4c;
    opacity: .95;
    text-decoration: none;
    cursor: pointer;
    border-radius: 3px;
    transition: color 230ms ease, opacity 230ms ease, filter 230ms ease, transform 230ms ease;
}
.action-symbol:hover,
.action-symbol:focus-visible {
    color: #ffe699;
    opacity: 1;
    filter: drop-shadow(0 0 7px rgba(229,195,131,.82));
    transform: scale(1.11);
}
.action-symbol:focus-visible {
    outline: 1px solid #ffe699;
    outline-offset: 3px;
}
.action-symbol svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    filter: drop-shadow(0 0 2px rgba(222, 170, 73, .12));
}

/* Scrollbar à direita somente do catálogo (Chrome/Edge). */
.catalog-container::-webkit-scrollbar { width: 11px; }
.catalog-container::-webkit-scrollbar-track { background: rgba(3, 3, 2, .65); }
.catalog-container::-webkit-scrollbar-thumb {
    background: rgba(146, 116, 62, .62);
    border-radius: 6px;
    border: 3px solid rgba(3, 3, 2, .75);
}
.catalog-container::-webkit-scrollbar-thumb:hover { background: #be9857; }
.catalog-container { scrollbar-width: thin; scrollbar-color: rgba(146,116,62,.7) rgba(0,0,0,.65); }

/* Ajustes para janela estreita, sem afetar os tamanhos desktop aprovados. */
@media (max-width: 1280px) {
    .catalog-grid { grid-template-columns: repeat(3, 200px); column-gap: 46px; }
}
@media (max-width: 980px) {
    .catalog-grid { grid-template-columns: repeat(2, 200px); column-gap: 32px; }
}
@media (max-width: 660px) {
    .catalog-container { padding-left: calc(var(--sidebar-width) + 8px); padding-right: 8px; }
    .catalog-grid { grid-template-columns: 200px; }
}
@media (prefers-reduced-motion: reduce) {
    .thumb-wrapper, .action-symbol { transition: none; }
}


/* =============================================================
   FIVE-COLUMN VISUAL STUDY — PHASE 3.3 (LOCAL, NO DATABASE)
   At desktop widths >=1490px, 5 x 200px covers. The grid center
   aligns visually with the global IRON PENDULUM header center,
   not the center of the content region to the right of the sidebar.
   The -87px compensation accounts for the 185px sidebar and the
   approximately 11px reserved scrollbar gutter ( (185 - 11)/2 ).
   At smaller widths retain the previously approved 4/3/2/1 layout.
   ============================================================= */
@media (min-width: 1490px) {
    .catalog-grid {
        grid-template-columns: repeat(5, 200px);
        column-gap: clamp(24px, calc(25vw - 347.5px), 60px);
        max-width: none;
        width: max-content;
        position: relative;
        left: -87px;
    }
}
