/*
Theme Name: Pikabu Child Theme
Theme URI: https://sobaka.click/
Description: Дочерняя тема для создания аналога Pikabu
Author: Ваше имя
Author URI: https://sobaka.click/
Template: kadence  
Version: 1.0.0
License: GPL v2 or later
Text Domain: pikabu-child
*/

/* Здесь начинаются стили */
body { font-family: Arial, sans-serif; }

/* Остальные ваши стили... */
/* Основной контейнер ленты */
.pikabu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
}

/* Фильтры ленты */
.feed-filters {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.feed-filters a {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feed-filters a:hover {
    background: #f6f7f8;
    color: #333;
	opacity: 0.6 !important;
}

.feed-filters a.active {
    background: #ff4500;
    color: white;
    border-color: #ff4500;
	opacity: 0.8 !important;
}

/* Карточка поста */
.post-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Блок голосования */
.voting-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding-top: 5px;
}

.vote-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #878a8c;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.vote-btn:hover {
    background: #f6f7f8;
    color: #ff4500;
}

.vote-count {
    font-weight: bold;
    margin: 5px 0;
    font-size: 16px;
    color: #1c1c1c;
    min-width: 30px;
    text-align: center;
}

/* Основное содержимое */
.post-content {
    flex: 1;
    min-width: 0; /* Для корректного обрезания текста */
}

.post-meta {
    color: #787c7e;
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.community-tag {
    color: #ff4500;
    font-weight: bold;
    text-decoration: none;
}

.community-tag:hover {
    text-decoration: underline;
}

.meta-separator {
    color: #ccc;
    margin: 0 5px;
}

.post-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
}

.post-title a {
    color: #1c1c1c;
    text-decoration: none;
}

.post-title a:hover {
    color: #ff4500;
}

/* Анонс и полный контент */
.post-excerpt {
    color: #1c1c1c;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 15px;
}

.full-content {
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Кнопки действий */
.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.read-more-btn {
    background: #ff6600;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #e55c00;
}

.read-more-btn.expanded {
    background: #666;
}

.comments-link,
.share-btn,
.bookmark-btn {
    background: none;
    border: none;
    color: #878a8c;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.comments-link:hover,
.share-btn:hover,
.bookmark-btn:hover {
    background: #f6f7f8;
    color: #1c1c1c;
}

/* Пагинация */
.feed-pagination {
    margin-top: 30px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pikabu-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .post-card {
        flex-direction: column;
        gap: 10px;
    }
    
    .voting-widget {
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
}
/* Делаем всю карточку поста кликабельной */
.post-card {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Эффект при наведении/тапе */
.post-card:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Для мобильных - эффект при касании */
@media (max-width: 768px) {
    .post-card:active {
        background-color: #f0f0f0;
        transform: scale(0.995);
    }
}

/* Ссылка заголовка теперь занимает весь блок */
.post-title a {
    display: block;
    position: relative;
    z-index: 2;
    text-decoration: none;
    color: inherit;
}

/* Перекрывающий псевдоэлемент для клика */
.post-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Исключаем из кликабельной зоны кнопки действий */
.post-actions,
.voting-widget,
.read-more-btn {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}
/* Индикатор кликабельности */
.post-card {
    user-select: none; /* Не выделять текст при тапе */
}

/* Для мобильных - визуальная обратная связь */
@media (max-width: 768px) {
    .post-card {
        -webkit-tap-highlight-color: rgba(255, 69, 0, 0.1);
    }
    
    /* Индикатор что пост можно открыть */
    .post-card:not(.post-expanded)::before {
        content: '↓';
        position: absolute;
        right: 15px;
        top: 15px;
        color: #ccc;
        font-size: 20px;
        opacity: 0.5;
        transition: transform 0.3s;
    }
    
    .post-card.post-expanded::before {
        content: '↑';
        transform: rotate(180deg);
    }
}

/* Состояние открытого поста */
.post-card.post-expanded {
    border-left: 4px solid #ff4500;
    margin: 20px 0;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .post-card {
        padding: 15px;
        margin: 12px 0;
    }
    
    .post-card.post-expanded {
        padding: 20px;
        margin: 15px 0;
    }
}

/* Плавная анимация раскрытия */
.full-content {
    transition: opacity 0.3s ease;
}
/* Presto Player Customization */
.presto-player {
    margin: 15px 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

/* Контейнер видео в ленте */
.post-media {
    margin: 15px 0;
    position: relative;
}

/* Кнопка добавления видео */
.add-video-btn {
    background: #ff4500;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-video-btn:hover {
    background: #e03d00;
}

/* Форма загрузки видео */
.video-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
}

.video-source-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 16px;
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.tab-btn.active {
    background: #ff4500;
    color: white;
}

.tab-content {
    margin-top: 10px;
}

.video-url-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Миниатюра видео в ленте */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .presto-player {
        max-width: 100% !important;
    }
    
    .video-form {
        padding: 10px;
    }
}