/* PLACE YOU CUSTOM STYLES IN THIS FILE */

/* Game Logo Overlay Effect - similar to nk-image-slider-logo */
.nk-post-img-game {
    position: relative;
}

.nk-game-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    z-index: 1;
    pointer-events: none;
}

/* Game Card Feature Wrapper - адаптация nk-feature-1 для карточек игр */
.nk-feature-game {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    min-height: auto;
    margin-bottom: 30px;
    height: 100%;
}

.nk-feature-game .nk-blog-post {
    margin-bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nk-feature-game .nk-post-img {
    margin: -20px -20px 20px -20px;
    width: calc(100% + 40px);
    display: block;
    overflow: hidden;
}

.nk-feature-game .nk-post-img img {
    border-radius: 4px 4px 0 0;
    width: 100%;
    height: auto;
    display: block;
}

.nk-feature-game .nk-post-text {
    flex-grow: 1;
    width: 100%;
}

.nk-feature-game .nk-post-text p {
    width: 100%;
    text-align: justify;
}

.nk-feature-game .nk-game-buttons {
    margin-top: auto;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nk-feature-game .nk-game-download-btn {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.nk-feature-game .nk-game-download-btn:hover {
    opacity: 0.8;
}

.nk-feature-game .nk-game-download-btn img {
    display: block;
}

.nk-feature-game .nk-game-buttons .nk-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

/* Game Page Logo Overlay - для страниц игр */
.nk-game-page-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    z-index: 1;
    pointer-events: none;
}

/* Game Description Wrapper - подложка для описания на страницах игр */
.nk-feature-game-description {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    min-height: auto;
}

/* Game Page Card - карточка для страниц игр */
.nk-feature-game-page {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    min-height: auto;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.nk-feature-game-page .nk-blog-post {
    margin-bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Game Header with Banner and Gallery */
.nk-game-header-gallery {
    margin: -20px -20px 20px -20px;
    width: calc(100% + 40px);
    overflow: hidden;
}

.nk-game-header-gallery .col-lg-6 {
    padding: 0;
}

/* Game Banner Wrapper */
.nk-game-banner-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a; /* Темный фон для контейнера */
}

.nk-game-banner-wrapper img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Mad Screenshots Carousel - пересобранная карусель */
.mad-screenshots-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #1a1a1a;
}

.mad-screenshots-carousel .mad-carousel-container {
    width: 100%;
    height: 100%;
}

.mad-screenshots-carousel .mad-carousel-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mad-screenshots-carousel .mad-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Кнопки навигации */
.mad-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mad-carousel-arrow:hover {
    background: rgba(221, 22, 59, 0.8);
    border-color: #dd163b;
    color: #fff;
}

.mad-carousel-prev {
    left: 10px;
}

.mad-carousel-next {
    right: 10px;
}

/* Точки навигации */
.mad-carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.mad-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mad-carousel-dots .dot.is-selected {
    background: #dd163b;
    width: 24px;
    border-radius: 4px;
}

/* Flickity стили для mad карусели */
.mad-screenshots-carousel .flickity-viewport {
    height: 100%;
    width: 100%;
}

.mad-screenshots-carousel .flickity-cell {
    width: 100%;
    height: 100%;
    margin-right: 0;
}

/* Ensure banner and slider have same height */
.nk-game-header-gallery .row {
    display: flex;
    align-items: stretch;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.nk-game-header-gallery .col-lg-6 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.nk-game-banner-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.mad-screenshots-carousel {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure images scale properly */
.nk-game-banner-wrapper img,
.mad-screenshots-carousel .mad-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 991px) {
    .nk-game-header-gallery .row {
        flex-direction: column;
    }
    
    .nk-game-banner-wrapper,
    .mad-screenshots-carousel {
        height: auto;
    }
    
    /* Убираем padding-top для колонки с каруселью на мобильных */
    .nk-game-header-gallery .row.vertical-gap > [class*="col-"]:has(.mad-screenshots-carousel),
    .nk-game-header-gallery .row.vertical-gap > .col-lg-6:last-child {
        padding-top: 0 !important;
    }
}

.nk-feature-game-page .nk-post-title {
    margin: 0;
}

.nk-feature-game-page .nk-game-download-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nk-feature-game-page .nk-post-text {
    flex-grow: 1;
    width: 100%;
}

.nk-feature-game-page .nk-post-text p {
    width: 100%;
    text-align: justify;
}

/* Скрываем баннер в строке со слайдером, показываем только в карточке */
.nk-game-banner-top {
    display: none;
}
