/**
 * Friendoza - News & Posters Styles
 * Стили для вкладки "Новости и Афиша"
 */

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */

.news-posters-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-header h1 {
    font-size: 32px;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-header h1 i {
    color: #667eea;
}

.btn-create-post {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-create-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ===== ТАБЫ ===== */

.news-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* ===== ФИЛЬТРЫ ===== */

.news-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    flex: 1;
    min-width: 200px;
}

.filter-group i {
    color: #667eea;
    font-size: 18px;
}

.filter-group select,
.filter-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: none;
}

.filter-group select:focus,
.filter-group input:focus {
    border: none;
    outline: none;
}

/* ===== СЕТКА ПОСТОВ ===== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* ===== КАРТОЧКА ПОСТА ===== */

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ad-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 193, 7, 0.95);
    color: #856404;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px;
}

.post-event-date,
.post-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.post-event-date i,
.post-location i {
    color: #667eea;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author .verified {
    color: #28a745;
    margin-left: 3px;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-date {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-posts i {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-posts p {
    font-size: 18px;
    color: #999;
    margin-bottom: 25px;
}

/* ===== LOADING ===== */

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #999;
}

.loading-spinner i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 15px;
}

/* ===== ERROR ===== */

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.error-message i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ===== МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ===== */

.post-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-details-modal.show {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.post-details {
    padding: 30px;
}

.post-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.post-images-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.post-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.post-details h1 {
    font-size: 32px;
    color: #333;
    margin: 0 0 20px;
    line-height: 1.3;
}

.post-meta-full {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 25px;
}

.post-author-full {
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-author-full img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.post-date-full {
    font-size: 13px;
    color: #888;
}

.post-location-full,
.post-event-info div {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.post-event-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.post-content-full {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
    white-space: pre-line;
}

.post-stats-full {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.stat-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.stat-btn:hover {
    color: #667eea;
}

.post-comments {
    margin-top: 30px;
}

.post-comments h3 {
    font-size: 22px;
    margin-bottom: 20px;
}

.comment {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.comment img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-content strong {
    display: block;
    margin-bottom: 5px;
}

.comment-content p {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.5;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 30px;
}

/* ===== ФОРМА СОЗДАНИЯ ===== */

.create-post-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.create-post-modal.show {
    opacity: 1;
}

.create-post-modal .modal-content {
    max-width: 700px;
}

.create-post-modal h2 {
    margin: 0 0 25px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.type-selector {
    display: flex;
    gap: 10px;
}

.type-btn {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-btn:hover {
    border-color: #667eea;
}

.type-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.type-btn i {
    font-size: 24px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.photo-upload {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
}

.photo-upload:hover {
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .news-header h1 {
        font-size: 24px;
    }
    
    .btn-create-post {
        width: 100%;
        justify-content: center;
    }
    
    .news-tabs {
        gap: 5px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .news-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .post-details {
        padding: 20px;
    }
    
    .post-details h1 {
        font-size: 24px;
    }
    
    .post-images-gallery {
        grid-template-columns: 1fr;
    }
    
    .post-stats-full {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .type-selector {
        flex-direction: column;
    }
}

/* ===== АНИМАЦИИ ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.3s ease forwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }
