/* Красивая карусель новостей с впечатляющими эффектами */

.news-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px;
    margin: 60px 0;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

/* Анимированный фон */
.news-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 60%);
    animation: rotateBackground 40s linear infinite;
}

.news-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.05) 25%,
            transparent 25%,
            transparent 75%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 60px 60px;
    opacity: 0.3;
    animation: movePattern 20s linear infinite;
}

@keyframes rotateBackground {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes movePattern {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 60px 60px;
    }
}

/* Заголовок секции */
.news-section .section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.news-section .section-header h2 {
    color: white;
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.news-section .section-header h2 .highlight {
    background: linear-gradient(120deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.news-section .section-header h2 .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, white, transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.news-section .section-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2em;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Контейнер карусели */
.posts-carousel {
    position: relative;
    z-index: 2;
    padding: 20px 0;
    overflow: hidden;
}

.posts-container {
    display: flex;
    gap: 0;
    padding: 20px 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Карточки новостей */
.post-card {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    margin: 0 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s;
}

.post-card:hover::before {
    left: 100%;
}

/* Дата/тег поста */
.post-date {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.post-card h3 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    background: linear-gradient(135deg, #2c3e50, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-card p {
    color: #555;
    font-size: 1em;
    line-height: 1.7;
    font-weight: 400;
}

/* Точки карусели */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.carousel-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.carousel-dots .dot.active {
    background: white;
    width: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Анимации появления */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .post-card {
        min-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 50px 15px;
        border-radius: 20px;
        margin: 40px 0;
    }

    .news-section .section-header h2 {
        font-size: 2.2em;
    }

    .news-section .section-header p {
        font-size: 1em;
    }

    .posts-carousel {
        padding: 10px 0;
    }

    .posts-container {
        gap: 0;
        padding: 15px 0;
    }

    .post-card {
        min-width: 100%;
        width: 100%;
        padding: 30px 25px;
        margin: 0 10px;
    }

    .post-card h3 {
        font-size: 1.4em;
    }

    .post-card p {
        font-size: 0.95em;
    }

    .post-date {
        font-size: 0.8em;
        padding: 6px 16px;
    }

    .carousel-dots {
        margin-top: 30px;
        gap: 10px;
    }

    .carousel-dots .dot {
        width: 12px;
        height: 12px;
    }

    .carousel-dots .dot.active {
        width: 30px;
    }

    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }

    .carousel-nav.prev {
        left: 5px;
    }

    .carousel-nav.next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 40px 10px;
        border-radius: 15px;
        margin: 30px 0;
    }

    .news-section .section-header h2 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .news-section .section-header p {
        font-size: 0.9em;
    }

    .posts-container {
        gap: 0;
        padding: 10px 0;
    }

    .post-card {
        min-width: 100%;
        width: 100%;
        padding: 25px 20px;
        margin: 0 8px;
        border-radius: 20px;
    }

    .post-card h3 {
        font-size: 1.2em;
    }

    .post-card p {
        font-size: 0.9em;
        line-height: 1.6;
    }

    .post-date {
        font-size: 0.75em;
        padding: 5px 14px;
        margin-bottom: 15px;
    }

    .carousel-dots {
        margin-top: 25px;
        gap: 8px;
    }

    .carousel-dots .dot {
        width: 10px;
        height: 10px;
    }

    .carousel-dots .dot.active {
        width: 25px;
    }

    .carousel-nav {
        width: 38px;
        height: 38px;
        font-size: 1.1em;
    }

    .carousel-nav.prev {
        left: 3px;
    }

    .carousel-nav.next {
        right: 3px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .news-section {
        padding: 30px 8px;
    }

    .news-section .section-header h2 {
        font-size: 1.5em;
    }

    .post-card {
        padding: 20px 15px;
        margin: 0 5px;
    }

    .post-card h3 {
        font-size: 1.1em;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}

/* Кнопки навигации карусели */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #667eea;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .carousel-nav {
        opacity: 0.7;
    }

    .carousel-nav:active {
        opacity: 1;
        transform: translateY(-50%) scale(0.95);
    }

    .post-card:hover {
        transform: none;
    }

    .post-card:active {
        transform: scale(0.98);
    }
}

@media (max-width: 768px) {
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}