/* Главная: hero и витрина. */
/* Hero - компактный, без лишних отступов */
    .hero {
        padding: 20px 20px 15px;
        min-height: 280px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gradient-hero);
        position: relative;
        overflow: hidden;
    }
    #particleCanvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        pointer-events: none;
    }
    .hero__container {
        position: relative;
        z-index: 2;
        max-width: 800px;
        text-align: center;
        padding: 0 10px;
    }
    .hero__badge {
        margin-bottom: 8px;
    }
    .hero__badge .badge {
        display: inline-block;
        padding: 2px 14px;
        border-radius: 30px;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(8px);
        font-size: 13px;
        font-weight: 500;
        color: white;
        border: 1px solid rgba(255,255,255,0.1);
        min-height: 26px;
        line-height: 1.4;
        white-space: normal;
        overflow: visible;
        max-width: 100%;
    }
    #typing-badge {
        min-width: 200px;
        display: inline-block;
    }
    @media (max-width: 768px) {
        #typing-badge { width: 100%; min-width: 0; }
    }
    .hero-title {
        font-size: 28px;
        font-weight: 900;
        letter-spacing: -0.5px;
        line-height: 1.2;
        margin-bottom: 8px;
        color: white;
    }
    .hero-title .highlight-gradient {
        background: linear-gradient(135deg, #ffd966, #ffb347);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    .hero-description {
        font-size: 16px;
        opacity: 0.95;
        max-width: 600px;
        margin: 0 auto 16px;
        color: white;
        line-height: 1.5;
    }
    .hero__buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    .btn-hero-primary,
    .btn-hero-secondary,
    .btn-hero-outline {
        padding: 8px 22px;
        border-radius: 40px;
        font-weight: 600;
        font-size: 14px;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
    }
    .btn-hero-primary {
        background: white;
        color: var(--color-primary-text);
    }
    .btn-hero-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    }
    .btn-hero-secondary {
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(8px);
        color: white;
        border: 1px solid rgba(255,255,255,0.25);
    }
    .btn-hero-secondary:hover {
        background: rgba(255,255,255,0.25);
        transform: translateY(-2px);
    }
    .btn-hero-outline {
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(8px);
        color: white;
        border: 1px solid rgba(255,255,255,0.5);
    }
    .btn-hero-outline:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-2px);
    }

    /* Лента */
    .feed-section {
        padding: 15px 0 40px;
    }
    .feed-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-end;
        gap: 20px;
        margin-bottom: 20px;
    }
    .feed-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-end;
    }
    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .filter-group label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
    }
    .filter-group select,
    .filter-group input {
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--bg-input);
        color: var(--text-primary);
        font-size: 14px;
    }
    .search-group .search-wrapper {
        display: flex;
        align-items: stretch;
    }
    .search-group .search-wrapper input {
        border-radius: 8px 0 0 8px;
        border-right: none;
        width: 180px;
    }
    .search-group .search-wrapper button {
        border: 1px solid var(--border-color);
        border-left: none;
        border-radius: 0 8px 8px 0;
        background: var(--bg-input);
        padding: 0 12px;
        cursor: pointer;
        color: var(--text-muted);
    }

    /* ===== СЕТКА КАРТОЧЕК ===== */
    .feed-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
        grid-auto-rows: 1fr;
        align-items: stretch;
        margin-bottom: 30px;
    }

    .feed-card {
        background: var(--bg-card);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid var(--border-light);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .feed-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-hover);
    }

    /* Изображение / видео */
    .feed-card-image {
        position: relative;
        height: 200px;
        overflow: hidden;
        background: var(--bg-hover);
        flex-shrink: 0;
    }
    .feed-card-image img,
    .feed-card-image video {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }
    /* Битый файл: медиа скрывается, остаётся заглушка */
    .feed-card-media--broken { display: none !important; }
    .feed-card:hover .feed-card-image img,
    .feed-card:hover .feed-card-image video {
        transform: scale(1.03);
    }

    /* Видео: значок play и эффект наведения */
    .video-play-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
        pointer-events: none;
        transition: all 0.3s ease;
        opacity: 0.8;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    .feed-card:hover .video-play-icon {
        transform: translate(-50%, -50%) scale(1.1);
        background: rgba(0, 0, 0, 0.75);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }
    .feed-card-image video:hover ~ .video-play-icon {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    /* Заглушка */
    .feed-card-placeholder {
        position: absolute;
        inset: 0;
        z-index: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 48px;
        color: var(--text-muted);
        background: var(--bg-hover);
    }

    /* Бейдж типа контента */
    .feed-type-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        color: white;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        pointer-events: none;
        transition: background 0.3s;
    }
    .feed-type-badge i {
    font-size: 20px; /* иконка крупнее */
    line-height: 1;
    }
    .feed-type-badge.photo { background: rgba(59, 130, 246, 0.85); }
    .feed-type-badge.video { background: rgba(239, 68, 68, 0.85); }
    .feed-type-badge.event { background: rgba(245, 158, 11, 0.85); }
    .feed-type-badge.album { background: rgba(154, 52, 18, 0.85); }
    .feed-type-badge.user { background: rgba(34, 197, 94, 0.85); }

    /* Содержимое карточки */
    .feed-card-content {
        padding: 16px 20px 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .feed-card-content h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 6px;
        color: var(--text-primary);
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .feed-card-content p {
        font-size: 14px;
        color: var(--text-secondary);
        margin-bottom: 12px;
        line-height: 1.5;
        flex: 1;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .feed-card-meta {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
        color: var(--text-muted);
        margin-top: auto;
        padding-top: 10px;
        border-top: 1px solid var(--border-light);
    }
    .feed-card-meta i {
        margin-right: 4px;
    }
    .author-link {
        color: var(--color-primary-text);
        text-decoration: none;
        cursor: pointer;
        transition: color 0.2s;
    }
    .author-link:hover {
        color: var(--color-secondary-text);
        text-decoration: underline;
    }

    .empty-feed {
        text-align: center;
        padding: 60px 20px;
        grid-column: 1 / -1;
        color: var(--text-muted);
    }
    .empty-feed i {
        font-size: 48px;
        margin-bottom: 12px;
        display: block;
    }
    .empty-feed p {
        font-size: 16px;
    }

    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin-top: 30px;
        flex-wrap: wrap;
    }
    .pagination .btn-secondary {
        padding: 6px 20px;
        font-size: 14px;
    }
    .page-info {
        font-size: 14px;
        color: var(--text-muted);
    }

    /* ============================================
       ПАРТНЁРЫ - горизонтальные плитки по 2 в ряд
    ============================================ */
    .partners-section {
        padding: 40px 0;
        background: var(--bg-body);
    }

    .partners-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .partner-card {
        position: relative;
        border-radius: 16px;
        overflow: hidden;
        background: var(--bg-card);
        box-shadow: var(--shadow);
        transition: transform 0.3s, box-shadow 0.3s;
        height: 120px;
        display: flex;
        align-items: center;
        cursor: pointer;
        border: none;
    }

    .partner-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }

    .partner-card-bg {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-size: cover;
        background-position: center;
        background-color: var(--bg-hover);
        transition: transform 0.4s ease;
    }

    .partner-card:hover .partner-card-bg {
        transform: scale(1.05);
    }

    .partner-card-bg::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
        transition: background 0.3s ease;
    }

    .partner-card:hover .partner-card-bg::after {
        background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.15) 100%);
    }

    .partner-card-content {
        position: relative;
        z-index: 2;
        padding: 16px 20px;
        width: 100%;
        color: white;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .partner-avatar {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        border: 3px solid rgba(255,255,255,0.9);
        overflow: hidden;
        background: var(--gradient-main);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        font-weight: 700;
        color: white;
        flex-shrink: 0;
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }

    .partner-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .partner-info {
        flex: 1;
        min-width: 0;
    }

    .partner-info h4 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 2px;
        color: white;
        text-shadow: 0 1px 4px rgba(0,0,0,0.4);
        line-height: 1.2;
    }

    .partner-info p {
        font-size: 13px;
        opacity: 0.9;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: rgba(255,255,255,0.9);
        text-shadow: 0 1px 4px rgba(0,0,0,0.4);
        max-width: 100%;
        line-height: 1.4;
    }

    /* Адаптивность */
    @media (max-width: 768px) {
        .partners-grid {
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }
        .partner-card {
            height: 100px;
        }
        .partner-avatar {
            width: 50px;
            height: 50px;
            font-size: 20px;
            border-width: 2px;
        }
        .partner-info h4 {
            font-size: 15px;
        }
        .partner-info p {
            font-size: 12px;
            -webkit-line-clamp: 1;
        }
        .partner-card-content {
            padding: 12px 14px;
            gap: 12px;
        }
    }

    @media (max-width: 480px) {
        .partners-grid {
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        .partner-card {
            height: 85px;
            border-radius: 12px;
        }
        .partner-avatar {
            width: 40px;
            height: 40px;
            font-size: 16px;
            border-width: 2px;
        }
        .partner-info h4 {
            font-size: 13px;
        }
        .partner-info p {
            font-size: 11px;
            -webkit-line-clamp: 1;
        }
        .partner-card-content {
            padding: 10px 12px;
            gap: 10px;
        }
    }
