/**
 * Homepage Hero Block - Полностью независимые стили
 * @package GamblingTheme
 * @version 4.1.0 - Добавлен .homepage-hero__actions для кнопок под баннером в variant_3
 */

/* ══════════════════════════════════════════════════════════════════
   ОСНОВНАЯ СЕКЦИЯ
   ══════════════════════════════════════════════════════════════════ */

.homepage-hero {
    background: var(--bg-secondary, #222222);
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--border-color, #333333);
    margin-bottom: var(--spacing-10);
}

/* ── H1 ЗАГОЛОВОК ── */

.homepage-hero__header {
    text-align: center;
}

.homepage-hero__title {
    font-family: var(--font-headings, sans-serif);
    font-size: clamp(20px, 2.8vw, 28px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text-primary, #ffffff);
    line-height: 1.2;
    padding: 10px 5px 5px 5px;
}

/* ── ДВУХКОЛОНОЧНАЯ СЕТКА (variant_1 и variant_2) ── */

.homepage-hero__grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    align-items: start; /* ВАЖНО: start, не stretch - позволяет контенту расти */
    margin: 0 auto;
    padding: 10px;
}

/* variant_3: одна колонка на всю ширину */
.homepage-hero--banner-only .homepage-hero__grid {
    grid-template-columns: 1fr;
}

.homepage-hero__col {
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════════
   ЛЕВАЯ КОЛОНКА: БАННЕР
   ══════════════════════════════════════════════════════════════════ */

.homepage-hero__banner {
    width: 100%;
    min-height: 400px;
    flex: 1 1 auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border-color, #333333);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.homepage-hero__banner-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
}

.homepage-hero__col--banner > .homepage-hero__banner {
    flex: 1 1 auto;
}

.homepage-hero__banner-link:hover .homepage-hero__banner {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.homepage-hero__banner--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.homepage-hero__banner--placeholder p {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin: 0;
    text-align: center;
    padding: 20px;
}

/* ══════════════════════════════════════════════════════════════════
   КНОПКИ ПОД БАННЕРОМ (только variant_3)
   ══════════════════════════════════════════════════════════════════ */

/*
 * Обёртка для кнопок под баннером в варианте 3.
 * Сами кнопки полностью стилизуются через классы gt-buttons-group
 * и gt-button из глобального buttons.css — здесь задаётся только отступ.
 */
.homepage-hero__actions {
/*    margin-top: 20px;*/
}

/* ══════════════════════════════════════════════════════════════════
   ПРАВАЯ КОЛОНКА: РЕКЛАМНЫЙ ВИДЖЕТ (variant_2)
   ══════════════════════════════════════════════════════════════════ */

.homepage-hero__promo-widget {
    flex: 1 1 auto;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color, #333333);
    border-radius: var(--radius-lg, 12px);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ── WYSIWYG ТЕКСТ ── */

.homepage-hero__promo-text {
    color: var(--text-primary, #ffffff);
    font-size: 15px;
    line-height: 1.6;
}

.homepage-hero__promo-text h2,
.homepage-hero__promo-text h3,
.homepage-hero__promo-text h4 {
    font-family: var(--font-headings, sans-serif);
    color: var(--text-primary, #ffffff);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.homepage-hero__promo-text h2 { font-size: 20px; }
.homepage-hero__promo-text h3 { font-size: 18px; }
.homepage-hero__promo-text h4 { font-size: 16px; }

.homepage-hero__promo-text p {
    margin: 0 0 12px 0;
    color: var(--text-secondary, #cccccc);
}

.homepage-hero__promo-text p:last-child { margin-bottom: 0; }

.homepage-hero__promo-text strong {
    color: var(--text-primary, #ffffff);
    font-weight: 700;
}

/* ── БЛОК КНОПОК variant_2 ── */

.homepage-hero__promo-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.homepage-hero__promo-buttons .gt-button {
    width: 100%;
    justify-content: center;
    min-width: 0; /* Сброс минимальной ширины из buttons.css */
}

/* ══════════════════════════════════════════════════════════════════
   ПРАВАЯ КОЛОНКА: ВИДЖЕТ КАЗИНО (variant_1)
   ══════════════════════════════════════════════════════════════════ */

.homepage-hero__casinos-widget {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color, #333333);
    border-radius: var(--radius-lg, 12px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.homepage-hero__casinos-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--info, #00ff88);
    color: var(--text-primary, #ffffff);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.homepage-hero__casinos-list {
    display: flex;
    flex-direction: column;
}

.homepage-hero__empty-message {
    text-align: center;
    padding: 30px 15px;
    color: var(--text-secondary, #888888);
    font-style: italic;
}

.homepage-hero__empty-message p { margin: 0; }

/* ══════════════════════════════════════════════════════════════════
   КАРТОЧКИ КАЗИНО ДЛЯ HERO БЛОКА
   ══════════════════════════════════════════════════════════════════ */

.hero-casino-card {
    display: flex;
    flex-direction: column;
    background: #252538;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    color: inherit;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.hero-casino-card:hover {
    background: #252538;
    border-color: var(--primary, #00ff88);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ── ВЕРХНЯЯ ЧАСТЬ: Логотип + Название + Рейтинг ── */

.hero-casino-card__top {
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 12px;
}

/* ── ЛОГОТИП (единственная ссылка) ── */

.hero-casino-card__logo {
    width: 80px;
    min-width: 80px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.hero-casino-card__logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-casino-card__logo-link:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.hero-casino-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-casino-card__logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary, #00ff88), var(--info, #00ccff));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── ПРАВАЯ ЧАСТЬ: Название + Рейтинг ── */

.hero-casino-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.hero-casino-card__name {
    font-family: var(--font-primary, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-casino-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-casino-card__rating .stars-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #fbbf24;
    font-size: 12px;
}

.hero-casino-card__rating-number {
    font-family: var(--font-primary, sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary, #a1a1aa);
}

/* ── НИЖНЯЯ ЧАСТЬ: Бонус ── */

.hero-casino-card__bonus {
    background: linear-gradient(135deg, #3735ff42 0%, #42ffaa 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-primary, sans-serif);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-casino-card__bonus--empty {
    opacity: 0.7;
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary, #888888);
}

/* ══════════════════════════════════════════════════════════════════
   АДАПТИВНОСТЬ
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .homepage-hero__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .homepage-hero__col--sidebar { order: 2; }
    .homepage-hero__col--banner  { order: 1; }

    .homepage-hero__banner { min-height: 350px; }

    /* Казино в 2 колонки на планшете */
    .homepage-hero__casinos-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .homepage-hero__title {
        font-size: clamp(20px, 5vw, 28px);
    }

    .homepage-hero__banner { min-height: 280px; }

    .homepage-hero__promo-widget,
    .homepage-hero__casinos-widget {
        padding: 20px;
    }

    /* Казино в 1 колонку на мобиле */
    .homepage-hero__casinos-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .hero-casino-card__top {
        padding: 8px 10px;
        gap: 10px;
    }

    .hero-casino-card__logo {
        width: 65px;
        min-width: 65px;
        height: 48px;
    }

    .hero-casino-card__name  { font-size: 13px; }

    .hero-casino-card__bonus {
        font-size: 12px;
        padding: 6px 10px 8px;
    }
}

@media (max-width: 480px) {
    .homepage-hero__grid { gap: 15px; }

    .homepage-hero__banner { min-height: 220px; }

    .homepage-hero__promo-widget,
    .homepage-hero__casinos-widget {
        padding: 15px;
    }

    .homepage-hero__promo-buttons { gap: 12px; }

    .hero-casino-card__logo {
        width: 55px;
        min-width: 55px;
        height: 42px;
    }

    .hero-casino-card__name { font-size: 12px; }

    .hero-casino-card__rating .stars-rating { font-size: 10px; }

    .hero-casino-card__rating-number { font-size: 10px; }
}
