/* ===== LAYOUTS DE SEÇÕES ===== */

/* Grid Layout (Padrão) */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.section-grid .item-game {
    /* Removido background escuro */
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Removido border */
}

.section-grid .item-game:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Carousel Layout */
.section-carousel {
    position: relative;
    padding: 20px 0;
}

/* Viewport do Carrossel */
.carousel-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but handle horizontal */
}

/* Track do Carrossel */
.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease-in-out;
    /* Largura será ajustada dinamicamente pelo JavaScript */
    align-items: flex-start;
}

/* Itens do Carrossel - Tamanho controlado pelo JavaScript */
.carousel-track .item-game {
    /* Largura será definida pelo JavaScript para evitar cortes */
    /* Removido background escuro */
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Removido border */
    /* Garantir que os itens não encolham */
    flex-shrink: 0;
    /* Garantir que o item seja exibido completamente */
    box-sizing: border-box;
    position: relative;
}

.carousel-track .item-game:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Navegação Inline do Carrossel - Dentro da eng-title */
.carousel-navigation-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Container para botões de navegação e "Ver Todos" */
.eng-title.mb-8 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eng-title.mb-8 .left-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container para botão "Ver Todos" e navegação */
.eng-title.mb-8 .right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-direction: row-reverse; /* Inverte a ordem: botões de navegação primeiro, depois "Ver Todos" */
}

/* Garantir que o botão "Ver Todos" tenha o estilo correto */
.eng-title.mb-8 .right-controls .btn-color-1 {
    white-space: nowrap;
    margin: 0;
}

.carousel-nav-btn {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
}

.carousel-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    backdrop-filter: blur(10px);
}

.carousel-nav-btn:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.carousel-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ajustar a div eng-title para acomodar os botões */
.eng-title.mb-8 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eng-title.mb-8 .left-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .carousel-track {
        gap: 12px; /* Reduce gap on mobile */
    }
    
    .carousel-navigation-inline {
        gap: 8px;
    }
    
    .carousel-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* Ajustes responsivos para o layout dos controles */
    .eng-title.mb-8 .right-controls {
        gap: 10px;
    }
    
    .eng-title.mb-8 .left-title {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .carousel-track {
        gap: 10px; /* Further reduce gap on small mobile */
    }
    
    .carousel-navigation-inline {
        gap: 6px;
    }
    
    .carousel-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    /* Ajustes responsivos para o layout dos controles em telas pequenas */
    .eng-title.mb-8 .right-controls {
        gap: 8px;
    }
    
    .eng-title.mb-8 .left-title {
        gap: 6px;
        font-size: 8px;
    }
}

/* Estados de Carregamento e Vazio */
.section-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.section-empty h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.section-empty p {
    font-size: 14px;
    opacity: 0.8;
}

/* Estilos Gerais dos Itens de Jogo */
.item-game {
    position: relative;
}

/* Garantir que os nomes dos jogos sejam sempre visíveis */
.item-game .name-game,
.carousel-track .item-game .name-game {
    opacity: 1 !important;
    position: absolute !important;
    z-index: 3 !important; /* Maior que o gradiente (z-index: 2) */
    display: block !important;
}

.item-game .link-game {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    width: 100%;
}

/* Regra mais específica para sobrescrever o CSS global */
.item-game .slot-game,
.carousel-track .item-game .slot-game {
    width: 100% !important;
    /*height: 280px !important;  Altura fixa maior para os jogos */
    object-fit: cover !important; /* Mantém proporção e preenche todo o espaço */
    border-radius: 8px;
    display: block;
    max-width: none !important; /* Remover max-width inline */
    max-height: none !important; /* Remover max-height inline */
    position: relative !important; /* Manter position do CSS global */
    z-index: 1 !important; /* Manter z-index do CSS global */
    /* Removido border */
    filter: saturate(130%) !important; /* Manter filter do CSS global */
        height: 280px;
}

/* Gradiente de sombra sobre a imagem usando elemento real */
.item-game .slot-game {
    position: relative !important;
}


.item-game .shadow-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.92) 25%,
    rgba(10, 10, 10, 0.88) 50%,
    rgba(20, 20, 20, 0.6) 70%,
    transparent 100%
    display: none !important;
); 
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 2;
    pointer-events: none;
}

.item-game .name-game {
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: white;
    text-align: left;
    margin: 0;
    opacity: 1 !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 20px;
    right: 20px;
    bottom: 14px;
}

.item-game .name-game:first-of-type {
    font-weight: 600;
    font-size: 14px;
    bottom: 39px;
}

.item-game .name-game:last-of-type {
    font-size: 13px;
    opacity: 0.8;
    bottom: 15px; /* Provedor mais próximo */
}

/* Responsividade para imagens - Ajuste baseado no número de itens por view */
@media (max-width: 768px) {
    .item-game .slot-game,
    .carousel-track .item-game .slot-game {
        height: 165px !important; /* Altura maior no mobile */
    }
    
    .item-game .name-game {
        left: 12px;
        right: 12px;
        font-size: 9px;
    }
    
    .item-game .name-game:first-of-type {
        font-size: 14px;
        bottom: 30px;
    }
    
    .item-game .name-game:last-of-type {
        font-size: 11px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .item-game .slot-game,
    .carousel-track .item-game .slot-game {
        height: 180px !important; /* Altura maior em telas pequenas */
    }
    
    .item-game .name-game {
        left: 10px;
        right: 10px;
        font-size: 11px;
    }
    
    .item-game .name-game:first-of-type {
        font-size: 13px;
        bottom: 25px;
    }
    
    .item-game .name-game:last-of-type {
        font-size: 10px;
        bottom: 8px;
    }
}

/* Ajustes específicos para diferentes números de itens por view */
[data-items-per-view="2"] .item-game .slot-game {
    height: 320px !important;
}

[data-items-per-view="3"] .item-game .slot-game {
    height: 280px !important;
}

[data-items-per-view="4"] .item-game .slot-game {
    height: 240px !important;
}

[data-items-per-view="5"] .item-game .slot-game,
[data-items-per-view="6"] .item-game .slot-game {
    height: 322px !important;
}

/* Ajustes para mobile com diferentes números de itens */
@media (max-width: 768px) {
    [data-items-per-view="2"] .item-game .slot-game,
    [data-items-per-view="3"] .item-game .slot-game {
        height: 220px !important;
    }
    
    [data-items-per-view="4"] .item-game .slot-game,
    [data-items-per-view="5"] .item-game .slot-game,
    [data-items-per-view="6"] .item-game .slot-game {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    [data-items-per-view] .item-game .slot-game {
        height: 160px !important;
    }
}

/* ===== REGRAS ESPECÍFICAS PARA APP-USER ===== */
/* Estas regras são necessárias para sobrescrever os conflitos dos CSS globais */

/* Sobrescrever regras globais que escondem o nome do jogo */
.app-user .item-game .name-game,
.app-user .carousel-track .item-game .name-game {
    opacity: 1 !important;
    position: absolute !important;
    z-index: 3 !important;
    display: block !important;
    visibility: visible !important;
}

/* Sobrescrever regras globais para slot-game */
.app-user .item-game .slot-game,
.app-user .carousel-track .item-game .slot-game {
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    position: relative !important;
    z-index: 1 !important;
    filter: saturate(130%) !important;
}

/* Garantir que o shadow-overlay seja visível */
.app-user .item-game .shadow-overlay,
.app-user .carousel-track .item-game .shadow-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60% !important;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.92) 25%,
        rgba(10, 10, 10, 0.88) 50%,
        rgba(20, 20, 20, 0.6) 70%,
        transparent 100%
    ) !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    z-index: 2 !important;
    pointer-events: none !important;
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Estilos específicos para nome do jogo no app-user */
.app-user .item-game .name-game {
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    color: white !important;
    text-align: left !important;
    margin: 0 !important;
    opacity: 1 !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 14px !important;
}

.app-user .item-game .name-game:first-of-type {
    font-weight: 600 !important;
    font-size: 14px !important;
    bottom: 39px !important;
}

.app-user .item-game .name-game:last-of-type {
    opacity: 0.8 !important;
  bottom: -8px !important;
  position: absolute !important;
  width: 100%;
  text-align: center !important;
  left: 0px !important;
  right: 0px !important;
  font-size: 11px !important;
}

/* Responsividade específica para app-user */
@media (max-width: 768px) {
    .app-user .item-game .slot-game,
    .app-user .carousel-track .item-game .slot-game {
        height: 165px !important;
    }
    
    .app-user .item-game .name-game {
        left: 12px !important;
        right: 12px !important;
        font-size: 9px !important;
    }
    
    .app-user .item-game .name-game:first-of-type {
        font-size: 14px !important;
        bottom: 30px !important;
    }
    
    .app-user .item-game .name-game:last-of-type {
        font-size: 11px !important;
        bottom: 10px !important;
    }
}

@media (max-width: 480px) {
    .app-user .item-game .slot-game,
    .app-user .carousel-track .item-game .slot-game {
        height: 100% !important;
    }
    
    .app-user .item-game .name-game {
        left: 10px !important;
        right: 10px !important;
        font-size: 11px !important;
    }
    
    .app-user .item-game .name-game:first-of-type {
   font-size: 10px !important;
    bottom: 8px !important;
    line-height: 10px;
    }
    
    .app-user .item-game .name-game:last-of-type {
        font-size: 10px !important;
    bottom: 8px !important;
    margin-top: 8px !important;
    text-align: center !important;
    position: static !important;
    }
}

/* Ajustes específicos para diferentes números de itens por view no app-user */
.app-user [data-items-per-view="2"] .item-game .slot-game {
    height: 320px !important;
}

.app-user [data-items-per-view="3"] .item-game .slot-game {
    height: 280px !important;
}

.app-user [data-items-per-view="4"] .item-game .slot-game {
    height: 240px !important;
}

.app-user [data-items-per-view="5"] .item-game .slot-game,
.app-user [data-items-per-view="6"] .item-game .slot-game {
    height: 322px !important;
}

/* Ajustes para mobile com diferentes números de itens no app-user */
@media (max-width: 768px) {
    .app-user [data-items-per-view="2"] .item-game .slot-game,
    .app-user [data-items-per-view="3"] .item-game .slot-game {
        height: 220px !important;
    }
    
    .app-user [data-items-per-view="4"] .item-game .slot-game,
    .app-user [data-items-per-view="5"] .item-game .slot-game,
    .app-user [data-items-per-view="6"] .item-game .slot-game {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .app-user [data-items-per-view] .item-game .slot-game {
        height: 160px !important;
    }
} 