/**
 * je-brand-card.css — стили карточки бренда казино внутри статьи.
 * Префикс .je-brand-card — изолирует от темы сайта.
 *
 * Responsive: ≥768px — горизонтальный лейаут (логотип / контент / CTA).
 *             <768px — вертикальный лейаут, CTA на всю ширину.
 *
 * Анимация: hover-эффект (плавный подъём + тень), CSS pulse на CTA-кнопке.
 * Tяжёлой графики нет — всё через CSS transforms (60fps без GPU нагрузки).
 */

.je-brand-card {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    color: #1f2937;
}

.je-brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* Background screenshot — только на slot pages */
.je-brand-card__bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.je-brand-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.je-brand-card__logo {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f9fafb;
    overflow: hidden;
}

.je-brand-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.je-brand-card__logo-placeholder {
    font-size: 36px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
}

.je-brand-card__body {
    flex: 1;
    min-width: 180px;
}

.je-brand-card__title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.je-brand-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.je-brand-card__license {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4338ca;
    background: #eef2ff;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.je-brand-card__rating {
    color: #f59e0b;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.je-brand-card__offer {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.je-brand-card__bullets {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: #4b5563;
}

.je-brand-card__bullets li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.je-brand-card__bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

.je-brand-card__dynamic {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: #6b7280;
    min-height: 1.2rem;
}

.je-brand-card__cta-wrap {
    flex: 0 0 auto;
}

.je-brand-card__cta {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    cursor: pointer;
    border: 0;
    line-height: 1.2;
    min-height: 48px;
    box-sizing: border-box;
    animation: jeBcPulse 9s ease-in-out infinite;
}

.je-brand-card__cta--orange { background: #f97316; color: #ffffff; }
.je-brand-card__cta--green  { background: #22c55e; color: #ffffff; }
.je-brand-card__cta--red    { background: #ef4444; color: #ffffff; }
.je-brand-card__cta--blue   { background: #3b82f6; color: #ffffff; }

.je-brand-card__cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.je-brand-card__cta:active {
    transform: translateY(0);
}

.je-brand-card__badge {
    position: absolute;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    padding: 0.3rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
}

.je-brand-card--has-badge {
    margin-top: 0;
}

.je-brand-card--has-badge .je-brand-card__inner {
    /* Контент уходит вниз чтобы освободить место для badge внутри карточки */
    padding-top: 2.5rem;
}

.je-brand-card__disclaimer {
    position: relative;
    z-index: 1;
    margin-top: 0.85rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    font-size: 0.7rem;
    color: #9ca3af;
    line-height: 1.3;
}

/* ---------------------------------------------------------------------- */
/* Mobile layout                                                          */
/* ---------------------------------------------------------------------- */

@media (max-width: 767px) {
    .je-brand-card {
        padding: 1rem;
    }
    .je-brand-card__inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.8rem;
    }
    .je-brand-card__logo {
        margin: 0 auto;
    }
    .je-brand-card__title-row {
        justify-content: center;
    }
    .je-brand-card__bullets {
        text-align: left;
        padding-left: 1.5rem;
    }
    .je-brand-card__cta-wrap {
        width: 100%;
    }
    .je-brand-card__cta {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ---------------------------------------------------------------------- */
/* Pulse animation на CTA                                                 */
/* ---------------------------------------------------------------------- */

@keyframes jeBcPulse {
    0%, 88%, 100% { transform: scale(1); }
    92%           { transform: scale(1.03); }
    94%           { transform: scale(1); }
    96%           { transform: scale(1.02); }
    98%           { transform: scale(1); }
}

/* Reduce motion для пользователей с настройкой prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .je-brand-card__cta {
        animation: none;
    }
    .je-brand-card {
        transition: none;
    }
}

/* Dark theme — централизованно через [data-theme="dark"] в je-brand-formats.css.
   (Старый prefers-color-scheme блок удалён 2026-05-23 — он срабатывал по OS,
   а сайтовый theme-toggle использует data-theme на <html>.) */

/* === Contrast & emphasis fixes 2026-05-23 === */
.je-brand-card__name { font-size: 1.4rem; }
.je-brand-card__offer {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}
.je-brand-card__cta,
.je-brand-card__cta:hover,
.je-brand-card__cta:focus,
.je-brand-card__cta:visited { color: #ffffff !important; }
.je-brand-card__license::before {
    content: 'Lic. ';
    font-weight: 400;
    opacity: 0.85;
}
.je-brand-card__rating { display: inline-flex; align-items: center; gap: 0.3rem; }
.je-brand-card__rating-num {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

/* === Half-star rendering (shared between Card and Hero) 2026-05-23 === */
.je-rating-star {
    display: inline-block;
    line-height: 1;
}
.je-rating-star--full { color: #f59e0b; }
.je-rating-star--empty { color: #d1d5db; }
.je-rating-star--half {
    background: linear-gradient(90deg, #f59e0b 0%, #f59e0b 50%, #d1d5db 50%, #d1d5db 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
