/* Blog Archive Shortcode Styles */
/* Стили для шорткода архива блога */

.blog-archive-shortcode {
    width: 100%;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

.blog-archive-shortcode .samokat-blog-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    overflow: visible !important;
    height: auto !important;
}

/* Адаптивность для сайдбара и узких контейнеров */
.widget .blog-archive-shortcode,
.sidebar .blog-archive-shortcode,
.col-sidebar .blog-archive-shortcode {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    position: relative !important;
}

.widget .blog-archive-shortcode .samokat-blog-card,
.sidebar .blog-archive-shortcode .samokat-blog-card,
.col-sidebar .blog-archive-shortcode .samokat-blog-card {
    /* Вертикальная карточка для сайдбара */
    overflow: visible !important;
    position: relative !important;
}

.widget .blog-archive-shortcode .samokat-card-link,
.sidebar .blog-archive-shortcode .samokat-card-link,
.col-sidebar .blog-archive-shortcode .samokat-card-link {
    flex-direction: column !important;
}

.widget .blog-archive-shortcode .samokat-card-image-wrapper,
.sidebar .blog-archive-shortcode .samokat-card-image-wrapper,
.col-sidebar .blog-archive-shortcode .samokat-card-image-wrapper {
    width: 100% !important;
    min-width: auto !important;
    height: auto !important;
    padding-bottom: 100% !important; /* Квадрат 1:1 */
}

.widget .blog-archive-shortcode .samokat-card-image,
.sidebar .blog-archive-shortcode .samokat-card-image,
.col-sidebar .blog-archive-shortcode .samokat-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Уменьшаем размер заголовка в сайдбаре */
.widget .blog-archive-shortcode .samokat-card-overlay,
.sidebar .blog-archive-shortcode .samokat-card-overlay,
.col-sidebar .blog-archive-shortcode .samokat-card-overlay {
    padding: 12px !important;
}

.widget .blog-archive-shortcode .samokat-card-overlay .samokat-card-title,
.sidebar .blog-archive-shortcode .samokat-card-overlay .samokat-card-title,
.col-sidebar .blog-archive-shortcode .samokat-card-overlay .samokat-card-title {
    font-size: 13px !important;
    margin: 0 0 4px 0 !important;
}

.widget .blog-archive-shortcode .samokat-card-excerpt-overlay,
.sidebar .blog-archive-shortcode .samokat-card-excerpt-overlay,
.col-sidebar .blog-archive-shortcode .samokat-card-excerpt-overlay {
    font-size: 12px !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Компактный контент для сайдбара */
.widget .blog-archive-shortcode .samokat-card-content,
.sidebar .blog-archive-shortcode .samokat-card-content,
.col-sidebar .blog-archive-shortcode .samokat-card-content {
    padding: 0 !important;
    display: none !important;
}

/* Убираем мета, описание и категории - они уже на изображении */
.widget .blog-archive-shortcode .samokat-card-meta,
.sidebar .blog-archive-shortcode .samokat-card-meta,
.col-sidebar .blog-archive-shortcode .samokat-card-meta,
.widget .blog-archive-shortcode .samokat-card-excerpt,
.sidebar .blog-archive-shortcode .samokat-card-excerpt,
.col-sidebar .blog-archive-shortcode .samokat-card-excerpt,
.widget .blog-archive-shortcode .samokat-card-categories,
.sidebar .blog-archive-shortcode .samokat-card-categories,
.col-sidebar .blog-archive-shortcode .samokat-card-categories {
    display: none !important;
}

/* Адаптивность для узких контейнеров и мобильных */
@media screen and (max-width: 768px) {
    .blog-archive-shortcode {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        position: relative !important;
    }
    
    .blog-archive-shortcode .samokat-blog-grid {
        overflow: visible !important;
        height: auto !important;
        position: relative !important;
    }
    
    .blog-archive-shortcode .samokat-card-link {
        flex-direction: column !important;
    }
    
    .blog-archive-shortcode .samokat-card-image-wrapper {
        width: 100% !important;
        min-width: auto !important;
        height: auto !important;
        padding-bottom: 100% !important; /* Квадрат 1:1 */
    }
    
    .blog-archive-shortcode .samokat-card-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .blog-archive-shortcode .samokat-card-overlay {
        padding: 12px;
    }
    
    .blog-archive-shortcode .samokat-card-overlay .samokat-card-title {
        font-size: 14px !important;
        margin: 0 0 4px 0;
    }
    
    .blog-archive-shortcode .samokat-card-excerpt-overlay {
        font-size: 13px !important;
    }
    
    .blog-archive-shortcode .samokat-card-content {
        display: none !important;
    }
    
    /* Фиксим скролл на мобильных в виджетах */
    .widget .blog-archive-shortcode,
    .sidebar .blog-archive-shortcode,
    .col-sidebar .blog-archive-shortcode {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        -webkit-overflow-scrolling: auto !important;
        touch-action: auto !important;
    }
}

/* Специальный фикс для портретного режима на телефонах */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .widget .blog-archive-shortcode,
    .sidebar .blog-archive-shortcode,
    .col-sidebar .blog-archive-shortcode,
    .widget,
    .sidebar {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        min-height: 0 !important;
        -webkit-overflow-scrolling: touch !important;
        transform: translateZ(0) !important;
        will-change: auto !important;
    }
    
    .widget .blog-archive-shortcode .samokat-blog-grid,
    .sidebar .blog-archive-shortcode .samokat-blog-grid,
    .col-sidebar .blog-archive-shortcode .samokat-blog-grid {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        min-height: 0 !important;
        position: static !important;
    }
}

/* Пустое сообщение */
.blog-archive-shortcode-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.blog-archive-shortcode-empty p {
    margin: 0;
    font-size: 16px;
}


