/* Editor Recommends Block Styles v1.0 */

:root {
  --bybit-orange: #F7A600;
  --bybit-dark:   #17181E;
  --bybit-grad-1: #FFD748;
  --bybit-gray:   #404347;
  --bybit-white:  #FFFFFF;
  --bybit-black:  #000000;
}

.editor-recommends-section {
    margin: 30px 0;
}

.editor-recommends-title {
    font-family: 'SSP_Bold', Arial, sans-serif;
    font-size: 28px;
    color: var(--bybit-dark);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-recommends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Убеждаемся что подгружаемые карточки тоже в grid */
.editor-recommends-grid > .clear {
    display: none;
}

.editor-recommends-grid > div:not(.editor-recommends-card) {
    display: contents;
}

.editor-recommends-card {
    position: relative;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    opacity: 0;
    animation: cardFadeIn 0.4s ease forwards;
}

/* Быстрая анимация появления карточек */
@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Быстрая задержка анимации для изначальных карточек */
.editor-recommends-card:nth-child(1) { animation-delay: 0.05s; }
.editor-recommends-card:nth-child(2) { animation-delay: 0.10s; }
.editor-recommends-card:nth-child(3) { animation-delay: 0.15s; }

/* Плавные переходы для всех динамических изменений */
.editor-recommends-card * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Отключаем начальную анимацию для загружаемых карточек */
.editor-recommends-card.loaded-card {
    opacity: 1;
    animation: none;
}

.editor-recommends-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(23, 24, 30, 0.2); /* --bybit-dark тень */
}

.card-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    transition: transform 0.4s ease;
    overflow: hidden;
}

.editor-recommends-card:hover .card-container {
    transform: scale(1.05);
}

/* Category tags removed for cleaner design */

.card-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    background: rgba(23, 24, 30, 0.3); /* --bybit-dark с прозрачностью */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0 0 12px 12px;
    padding: 20px;
    margin: -20px;
    margin-top: auto;
    /* Fallback для браузеров без поддержки backdrop-filter */
    @supports not (backdrop-filter: blur(12px)) {
        background: rgba(23, 24, 30, 0.7); /* --bybit-dark с прозрачностью */
    }
}

.card-title {
    margin: 0 0 15px 0;
}

.card-title a {
    color: var(--bybit-white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    font-family: 'SSP_Bold', Arial, sans-serif;
    text-shadow: none;
    display: block;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.editor-recommends-card:hover .card-title a {
    color: var(--bybit-orange);
    transform: translateY(-2px);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--bybit-white);
    opacity: 0.95;
    font-family: 'SSP_Regular', Arial, sans-serif;
    text-shadow: none;
}

.author-info,
.date-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-info .icon,
.date-info .icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Show more button */
.editor-recommends-show-more {
    text-align: center;
    margin-top: 20px;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--bybit-orange) 0%, var(--bybit-grad-1) 100%);
    color: var(--bybit-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'SSP_Semibold', Arial, sans-serif;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.show-more-btn:hover {
    background: linear-gradient(135deg, var(--bybit-grad-1) 0%, var(--bybit-orange) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(23, 24, 30, 0.15); /* --bybit-dark тень */
    color: var(--bybit-white);
}

.show-more-btn .arrow-icon {
    transition: transform 0.3s ease;
}

.show-more-btn:hover .arrow-icon {
    transform: translateX(3px);
}

/* Responsive design */
@media (max-width: 1024px) {
    .editor-recommends-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .editor-recommends-card {
        height: 260px;
    }
    
    .card-title a {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .editor-recommends-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .editor-recommends-card {
        height: 240px;
    }
    
    .card-container {
        padding: 12px;
    }
    
    .card-title a {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .card-meta {
        gap: 10px;
        font-size: 11px;
    }
    
    /* category-label removed */
}

@media (max-width: 480px) {
    .editor-recommends-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .editor-recommends-card {
        height: 220px;
    }
    
    .card-meta {
        gap: 8px;
    }
}
