/*
 Theme Name: GeneratePress Child
 Theme URI: https://example.com/
 Description: Child theme for GeneratePress
 Author: Alex
 Template: generatepress
 Version: 1.0
 Text Domain: generatepress-child
*/

/* ===========================
   SINGLE SLOT PAGE
   =========================== */

.slot-single__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

/* Header: title + buttons */
.slot-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.slot-title {
    margin: 0;
    font-size: 28px;
}

.slot-header__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Кнопки */
.slot-btn {
    padding: 10px 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-gray {
    background: #f2f2f2;
}

.btn-yellow {
    background: #ffd54f;
}

/* Hero: картинка + демо */
.slot-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.slot-hero__iframe,
.slot-hero__image {
    flex: 1 1 48%;
}

.slot-iframe-wrap {
    position: relative;
    padding-bottom: 62%;
    height: 0;
    overflow: hidden;
}

.slot-iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    width: 100%;
    height: 100%;
}

/* Таблица характеристик */
.slot-intro__table table {
    border-collapse: collapse;
    width: 100%;
}

.slot-intro__table th,
.slot-intro__table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.slot-intro__table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.slot-intro__table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Нижняя кнопка */
.slot-cta-bottom {
    margin-top: 30px;
    text-align: center;
}

.slot-btn--big {
    padding: 14px 30px;
    font-size: 16px;
}

/* ===========================
   SINGLE SLOT: LAYOUT (NO SIDEBAR)
   =========================== */

body.single-slots .sidebar,
body.single-slots .widget-area,
body.single-slots #right-sidebar,
body.single-slots #left-sidebar {
    display: none !important;
}

body.single-slots .site-content,
body.single-slots .site-content .content-area,
body.single-slots .site-content .content-area.grid-parent {
    width: 100% !important;
    max-width: 1100px;
    margin: 0 auto;
    float: none !important;
}

/* ===========================
   MOBILE: SINGLE SLOT
   =========================== */

@media (max-width: 768px) {
    .slot-single__inner {
        display: flex;
        flex-direction: column;
    }

    .slot-header,
    .slot-hero {
        width: 100%;
    }

    .slot-hero {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
    }

    .slot-hero__iframe,
    .slot-hero__image {
        flex: 1 1 100%;
    }

    .slot-hero img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .slot-hero iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        display: block;
    }
}

/* ===========================
   SLOTS ARCHIVE GRID (/slots/)
   =========================== */

.slots-archive {
    padding: 40px 15px 60px;
}

.slots-archive__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.slots-archive__header {
    text-align: left;
    margin-bottom: 25px;
}

.slots-archive__title {
    font-size: 32px;
    margin: 0 0 5px;
}

.slots-archive__subtitle {
    margin: 0;
    font-size: 15px;
    color: #555;
}

/* Грид архивных карточек */
.slots-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Карточка слота (архив) */
.slots-archive__card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
}

/* ===========================
   GENERIC SLOT CARD (архив + главная)
   =========================== */

.slot-card {
    display: flex;
    flex-direction: column;
}

/* Заголовок карточки */
.slot-card-title,
.slot-card__title {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.3;
}

.slot-card__title a {
    text-decoration: none;
}

/* Кнопки в карточке, прижатые вниз */
.slot-card-footer,
.slot-card__buttons {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

.slot-card__buttons .slot-btn {
    flex: 1 1 48%;
    font-size: 13px;
    padding: 8px 10px;
}

/* Пагинация */
.slots-archive__pagination {
    margin-top: 30px;
    text-align: center;
}

/* ===========================
   ADAPTIVE: ARCHIVE & CARDS
   =========================== */

@media (max-width: 992px) {
    .slots-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .slots-archive__grid {
        grid-template-columns: 1fr;
    }

    .slot-card__buttons .slot-btn {
        flex: 1 1 100%;
    }
}

/* ===========================
   HOME PAGE: LATEST SLOTS GRID
   =========================== */

/* грид уже задан инлайном, тут только поведение карточек и превью */
.home .slots-grid .slot-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* приводим превью к одному соотношению сторон */
.home .slots-grid .slot-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 62%;          /* ~16:10 */
    overflow: hidden;
}

/* обрезаем изображения ровно, пробиваем inline height:auto */
.home .slots-grid .slot-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==== Catalog meta on /slots/ ==== */

.slot-card__body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.slot-card__meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.slot-card__provider {
    font-weight: 500;
}

.slot-card__dot {
    opacity: 0.6;
}

.slot-card__rtp {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
}

/* чтобы кнопки всегда прижимались к низу карточки */
.slot-card__buttons {
    margin-top: auto;
}
