/* Mobile Apps Block Styles — dark theme */

.app-block {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-surface, #151A23);
    border: 1px solid var(--border-color, #262D3D);
    border-radius: 25px;
    padding: 36px;
    margin: 24px 0;
    color: var(--text-main, #FFFFFF);
}

/* Header with Number and Title */
.app-block__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.app-block__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--bg-surface-hover, #1E2532);
    border: 1px solid var(--border-color, #262D3D);
    border-radius: 50%;
    color: var(--text-muted, #8A93A6);
    font-size: 24px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    flex-shrink: 0;
}

.app-block__title {
    font-size: 36px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: var(--text-main, #FFFFFF);
    margin: 0;
    line-height: 1.2;
}

/* H1 styles when app-bookmaker-profile template is active */
.app-block h1.app-block__title {
    font-family: Inter, Arial, sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    backface-visibility: hidden;
}

/* Text Content */
.app-block__text-content p {
    font-size: 18px;
    line-height: 28px;
    font-family: 'Manrope', sans-serif;
    color: var(--text-muted, #8A93A6);
    margin: 0 0 20px 0;
}

.app-block__text-content p:last-child {
    margin-bottom: 0;
}

/* App Cards Wrapper - Лого + Android + iOS в одной строке */
.app-block__cards-wrapper {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
    align-items: stretch;
}

/* Logo 4x4 */
.app-block__logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-block__logo {
    width: 208px;
    height: 208px;
    object-fit: contain;
    border-radius: 16px;
}

/* Individual App Card */
.app-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface-hover, #1E2532);
    border: 1px solid var(--border-color, #262D3D);
    border-radius: 16px;
    padding: 20px;
}

/* Push the download button to the bottom so cards align at equal height */
.app-card__download-btn {
    margin-top: auto;
}

.app-card--android {
    color: var(--text-main, #FFFFFF);
}

.app-card--ios {
    color: var(--text-main, #FFFFFF);
}

/* App Card Header */
.app-card__header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
}

.app-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-card--android .app-card__icon {
    color: var(--text-main, #FFFFFF);
}

.app-card--ios .app-card__icon {
    color: var(--text-main, #FFFFFF);
}

.app-card__title-wrapper {
    flex: 1;
}

.app-card__title {
    font-size: 24px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    margin: 0 0 6px 0;
    line-height: 28px;
}

.app-card--android .app-card__title {
    color: var(--text-main, #FFFFFF);
}

.app-card--ios .app-card__title {
    color: var(--text-main, #FFFFFF);
}

.app-card__subtitle {
    font-size: 18px;
    font-family: 'Manrope', sans-serif;
    line-height: 28px;
    font-weight: 500;
    margin: 0;
    color: var(--text-muted, #8A93A6);
}

/* App Card Info */
.app-card__info {
    display: flex;
    gap: 24px;
    margin-bottom: 14px;
}

.app-card__info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-card__info-label {
    font-size: 16px;
    font-weight: 600;
    line-height: 28px;
    color: var(--text-muted, #8A93A6);
}

.app-card__info-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main, #FFFFFF);
}

.app-card__rating {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.app-card__rating-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main, #FFFFFF);
}

.app-card__rating-value img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.app-card__rating-star {
    color: #FFC107;
    font-size: 15px;
    line-height: 1;
}

/* Download Buttons */
.app-card__download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
}

.app-card__download-btn--google {
    background: var(--accent-color, #00E574);
    color: #04130B;
}

.app-card__download-btn--google:hover {
    background: var(--accent-hover, #00C462);
    color: #04130B;
    transform: scale(1.02);
}

.app-card__download-btn--apple {
    background: var(--accent-color, #00E574);
    color: #04130B;
}

.app-card__download-btn--apple:hover {
    background: var(--accent-hover, #00C462);
    color: #04130B;
    transform: scale(1.02);
}

.app-card__download-btn .btn-icon {
    flex-shrink: 0;
}

.download-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.download-btn__label {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0%;
}

.download-btn__store {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
}

/* Screenshots Section */
.app-block__screenshots {
    margin-top: 36px;
    margin-bottom: 36px;
    position: relative;
}

/* Desktop: сетка 2 колонки */
.app-screenshots__desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.app-screenshots__column {
    display: flex;
    gap: 10px;
}

.app-screenshot-item {
    flex: 1;
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Mobile: скрыт на десктопе */
.app-screenshots__mobile {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 1400px) {
    .app-block {
        padding: 16px;
    }
    .app-block__logo {
        width: 206px;
        height: 206px;
    }
}
@media (max-width: 992px) {
    .app-block {
        padding: 20px;
    }

    .app-block__title {
        font-size: 28px;
    }

    .app-block__cards-wrapper {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .app-block {
        border-radius: 20px;
    }

    .app-block__header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .app-block__number {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 20px;
    }

    /* H1 mobile styles when app template is active */
    .app-block h1.app-block__title {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .app-block__title {
        font-size: 24px;
    }

    .app-block__logo {
        width: 100px;
        height: 100px;
    }

    .app-block__text-content p {
        font-size: 16px;
    }

    .app-block__cards-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .app-card {
        padding: 20px;
    }

    .app-card__title {
        font-size: 18px;
    }

    /* Мобильная версия: показываем слайдер, скрываем десктоп */
    .app-screenshots__desktop {
        display: none;
    }

    .app-screenshots__mobile {
        display: block;
        position: relative;
        padding-bottom: 60px;
        overflow: hidden;
    }

    /* Слайдер трек */
    .app-screenshots__slider-track {
        display: flex;
        flex-wrap: nowrap;
        transition: transform 0.4s ease;
        width: 300%;
    }

    .app-screenshot-slide {
        width: calc(100% / 6);
        flex-shrink: 0;
        padding: 0 5px;
        box-sizing: border-box;
    }

    .app-screenshot-slide .app-screenshot {
        width: 100%;
    }

    /* Мобильная навигация под скриншотами */
    .app-screenshots__mobile-nav {
        display: flex;
        justify-content: center;
        gap: 12px;
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-slider-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--accent-color, #00E574);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 229, 116, 0.3);
    }

    .mobile-slider-btn:hover {
        background: var(--accent-hover, #00C462);
        box-shadow: 0 4px 12px rgba(0, 229, 116, 0.4);
        transform: scale(1.05);
    }

    .mobile-slider-btn svg {
        color: #04130B;
    }
}

@media (max-width: 480px) {
    .app-block__header {
        display: block;
        text-align: center;
        margin-bottom: 16px;
    }

    .app-block__number {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
        margin: 0 auto 12px;
    }

    .app-block__title {
        font-size: 20px;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }

    .app-block__logo {
        width: 64px;
        height: 64px;
    }

    .app-block__text-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .app-card {
        padding: 16px;
    }

    .app-card__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .app-card__icon {
        width: 40px;
        height: 40px;
    }

    .app-card__icon svg {
        width: 40px;
        height: 40px;
    }

    .app-card__title {
        font-size: 24px;
    }

    .app-card__subtitle {
        font-size: 16px;
    }

    /* Горизонтальное расположение с разделителем */
    .app-card__info {
        flex-direction: row;
        gap: 16px;
        align-items: center;
        justify-content: center;
        margin-bottom: 16px;
    }

    .app-card__info-item {
        position: relative;
        padding-right: 16px;
    }

    .app-card__info-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 24px;
        background: var(--border-color, #262D3D);
    }

    .app-card__info-item:last-child {
        padding-right: 0;
    }

    .app-card__info-label {
        font-size: 10px;
        text-align: center;
    }

    .app-card__info-value {
        font-size: 14px;
        text-align: center;
    }

    .app-card__rating-value {
        font-size: 14px;
        text-align: center;
    }

    .app-card__download-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .app-screenshots__column {
        flex-direction: column;
        gap: 8px;
    }
}

/* Editor Preview Styles */
.app-block-editor {
    padding: 20px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}

.app-block-preview h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.app-block-preview p {
    margin: 8px 0;
    font-size: 14px;
}

.app-block-error {
    font-family: 'Manrope', sans-serif;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}