/* ============================================================ */
/* SACRIFICE THE FALLEN // LOOKBOOK REPLICA                      */
/* EXACT 5-COLUMN POSTER MURAL + MODAL FIDELITY                 */
/* ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #111111;
}

body {
    background: #1a1817 url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1920&q=80') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, .button, .sidebar, .gridItemLabel, .sidebarDate {
    font-family: 'Open Sans Condensed', sans-serif;
    text-transform: uppercase;
}

h1 {
    font-weight: 300;
    font-size: 2.2rem;
    letter-spacing: 3px;
    margin: 1.2rem 0 0.8rem 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* ============================================================ */
/* 1. SIDEBAR FIXA ESQUERDA (#navigation)                       */
/* ============================================================ */
#navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 32%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 50;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translate3d(0, 0, 0);
}

#navContent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8%;
    width: 100%;
    height: 100%;
}

.profileImage {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.85);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}

/* A Barra Branca Minimalista do seu Print */
.button.minimalBar {
    width: 90px;
    height: 8px;
    background-color: #ffffff;
    border: none;
    margin: 1.5rem 0 2.5rem 0;
    padding: 0;
    display: block;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.button.minimalBar:hover {
    transform: scaleX(1.15);
    opacity: 0.85;
}

#navMinorItems {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-family: 'Open Sans Condensed', sans-serif;
    color: #cccccc;
}

#navMinorItems a::after {
    content: " /";
    color: #777777;
}

#navMinorItems a:last-child::after {
    content: "";
}

.credit {
    position: absolute;
    bottom: 20px;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: #777777;
    font-family: sans-serif;
}

/* ============================================================ */
/* 2. O GRID DIREITO (5 COLUNAS COM VÃO DE 5PX)                 */
/* ============================================================ */
#homePage {
    width: 100%;
    min-height: 100vh;
}

#grid {
    float: right;
    width: 66%;
    margin: 20px 20px 40px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* Vão micro-fino exato do Photoshop */
    transition: opacity 0.4s ease;
}

#grid.gridNotLoaded {
    opacity: 0;
}

.gridSizer {
    width: calc(20% - 4px);
}

.gutterSizer {
    width: 5px;
}

/* O CARD DO PÔSTER */
.gridItem {
    position: relative;
    width: calc(20% - 4px); /* 5 colunas perfeitas */
    height: 360px; /* Altura padrão para proporção ~2:3 */
    background-color: #050505;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.gridItem:hover {
    z-index: 10;
}

/* Ícone sutil no canto superior direito (a camerazinha) */
.postType {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    z-index: 4;
}

.gridImageWrapper {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gridItem:hover .gridImageWrapper {
    transform: scale(1.04);
}

/* Hover do Card (Faixa Escura Inferior) */
.gridOverlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    padding: 25px 12px 10px 12px;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.gridItem:hover .gridOverlay {
    transform: translateY(0);
}

.gridBottom {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.gridItemLabel {
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gridTime {
    font-size: 0.65rem;
    color: #aaaaaa;
    letter-spacing: 1px;
    font-family: sans-serif;
}

/* ============================================================ */
/* 3. MODAL EM TELA CHEIA (FOTO 01 DO SEU PRINT)                */
/* ============================================================ */
.detailsWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fundo Desfocado Dinâmico */
.blurredBackground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

.blurredBackground.cssBlur {
    filter: blur(35px) brightness(40%) saturate(110%);
    transform: scale(1.2);
}

.detailsWrapper.active .blurredBackground {
    opacity: 1;
}

/* Moldura Central com a Transição Lateral Clássica de 2500px */
.permalinkContent {
    position: relative;
    max-width: 520px;
    width: 85%;
    max-height: 90vh;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    transform: translate3d(2500px, 0, 0);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    opacity: 0;
}

.detailsWrapper.active .permalinkContent {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Borda Branca Clássica do Pôster no Modal */
.mediaContainer {
    width: 100%;
    max-height: 85vh;
    background: #000000;
    border: 8px solid #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

.mediaContainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================ */
/* 4. O BLOQUINHO BRANCO FLUTUANTE (CÍRCULO VERMELHO DO PRINT)   */
/* ============================================================ */
.sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translate3d(500px, -50%, 0);
    background: #ffffff;
    color: #222222;
    padding: 14px 18px;
    border-radius: 6px 0 0 6px;
    z-index: 25;
    box-shadow: -4px 6px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 130px;
    text-align: right;
}

.detailsWrapper.active .sidebar {
    transform: translate3d(0, -50%, 0);
}

.sidebar ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebarDate {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #333333;
    font-weight: 700;
}

.sidebarDate::before {
    content: "POSTED";
    display: block;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: #888888;
    font-style: italic;
    font-weight: 300;
    font-family: sans-serif;
}

.sidebarShare ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.sidebarShare a {
    color: #999999;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.sidebarShare a:hover {
    color: #111111;
}

/* ============================================================ */
/* 5. OS BOTÕES DO TOPO & A MECÂNICA DA FOTO 02                 */
/* ============================================================ */

/* O Botão X no canto superior direito */
#xButton {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 3.5rem;
    font-weight: 100;
    color: #ffffff;
    line-height: 0.6;
    cursor: pointer;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
    user-select: none;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

#xButton:hover {
    transform: scale(1.1);
    color: #cccccc;
}

/* O Mini Avatar no canto superior esquerdo (Foto 01) */
#miniAvatar {
    position: fixed;
    top: 25px;
    left: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.8);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.6);
    transition: opacity 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
}

#miniAvatar:hover {
    transform: scale(1.08);
    border-color: #ffffff;
}

/* Visibilidade quando o modal está aberto */
body.details #xButton,
body.details #miniAvatar {
    opacity: 1;
    pointer-events: auto;
}

/* Quando o modal abre, a sidebar principal se oculta à esquerda */
body.details #navigation {
    transform: translate3d(-100%, 0, 0);
}

/* ============================================================ */
/* 6. A MECÂNICA DA FOTO 02 (.navigationOn)                     */
/* ============================================================ */
/* Ao clicar no #miniAvatar, a sidebar desliza de volta para a tela */
body.details.navigationOn #navigation {
    transform: translate3d(0, 0, 0) !important;
    background: rgba(10, 10, 10, 0.88) !important;
    z-index: 110;
}

/* E empurra o pôster central exatamente 350px para a direita! */
body.details.navigationOn .detailsWrapper.active .permalinkContent {
    transform: translate3d(350px, 0, 0) !important;
}

/* ============================================================ */
/* 7. RESPONSIVIDADE                                            */
/* ============================================================ */
@media screen and (max-width: 1400px) {
    .gridItem, .gridSizer {
        width: calc(25% - 4px); /* 4 colunas em telas menores */
    }
}

@media screen and (max-width: 1024px) {
    #navigation {
        width: 35%;
    }
    #grid {
        width: 62%;
    }
    .gridItem, .gridSizer {
        width: calc(33.333% - 4px); /* 3 colunas em tablets */
    }
}

@media screen and (max-width: 768px) {
    #navigation {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
    }
    #navContent {
        position: relative;
        padding: 50px 5%;
    }
    #grid {
        float: none;
        width: 96%;
        margin: 20px auto;
    }
    .gridItem, .gridSizer {
        width: calc(50% - 3px); /* 2 colunas no celular */
        height: 300px;
    }
    .sidebar {
        display: none;
    }
    body.details.navigationOn .detailsWrapper.active .permalinkContent {
        transform: translate3d(0, 0, 0) !important;
    }
}