/* Стили для новостей */
.news-item {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    position: relative;
    border: 1px solid #e2e8f0;
}

.news-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.dark .news-item {
    background-color: #374151;
    border-color: #4b5563;
}

.dark .news-item:hover {
    background-color: #4b5563;
}

.news-new {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border: 2px solid #22c55e;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.2);
}

.dark .news-new {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-color: #22c55e;
}

.news-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: #22c55e;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.news-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1173d4;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.dark .news-date {
    color: #60a5fa;
}

.news-new .news-date {
    color: #16a34a;
}

.dark .news-new .news-date {
    color: #22c55e;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.dark .news-title {
    color: #f1f5f9;
}

.news-new .news-title {
    color: #15803d;
}

.dark .news-new .news-title {
    color: #22c55e;
}

.news-description {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.dark .news-description {
    color: #cbd5e1;
}

.news-new .news-description {
    color: #166534;
}

.dark .news-new .news-description {
    color: #dcfce7;
}

.news {
    font-size: 1.6rem;
    color: green;
    text-align: center;
}

.dark .news {
    color: #4ade80;
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #1173d4;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(17, 115, 212, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: #0d5fa8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 115, 212, 0.4);
}

.dark .scroll-to-top {
    background-color: #374151;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

.dark .scroll-to-top:hover {
    background-color: #4b5563;
    box-shadow: 0 6px 16px rgba(55, 65, 81, 0.4);
}


/* Стили для функций в новостях */
.news-feature {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border-left: 4px solid #1173d4;
    align-items: start;
}

.dark .news-feature {
    background-color: #1e293b;
    border-left-color: #60a5fa;
}

.news-new .news-feature {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
}

.dark .news-new .news-feature {
    background-color: #1f2937;
    border-left-color: #22c55e;
}

.news-feature-content {
    flex: 1;
}

.news-feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.news-feature-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.dark .news-feature-title {
    color: #f1f5f9;
}

.news-new .news-feature-title {
    color: #15803d;
}

.dark .news-new .news-feature-title {
    color: #22c55e;
}

.news-feature-text {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.dark .news-feature-text {
    color: #cbd5e1;
}

.news-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
}

.dark .news-feature-list {
    color: #cbd5e1;
}

.news-feature-list li {
    margin-bottom: 0.4rem;
    padding-left: 0;
}

.news-feature-list strong {
    color: #1e293b;
    font-weight: 600;
}

.dark .news-feature-list strong {
    color: #f1f5f9;
}

.news-feature-sublist {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.4rem 0;
}

.news-feature-sublist li {
    margin-bottom: 0.2rem;
}

.news-feature-sublist li:before {
    content: "◦ ";
    color: #1173d4;
    font-weight: bold;
    margin-right: 0.5rem;
}

.dark .news-feature-sublist li:before {
    color: #60a5fa;
}

.news-feature-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.news-feature-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .news-feature-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .news-feature-image:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
    .news-feature {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-feature-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .news-feature {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .news-feature-image {
        max-width: 100%;
    }

    .news-feature-list {
        font-size: 0.8rem;
    }
}

/* Итоговый блок */
.news-summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #fef3c7;
    border-radius: 0.5rem;
    border-left: 4px solid #f59e0b;
    font-size: 0.95rem;
    color: #78350f;
    line-height: 1.6;
}

.dark .news-summary {
    background-color: #78350f;
    color: #fef3c7;
    border-left-color: #f59e0b;
}

.news-summary p {
    margin: 0;
}

/* Блок доступа */
.news-access {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #dbeafe;
    border-radius: 0.5rem;
    border: 2px solid #0284c7;
}

.dark .news-access {
    background-color: #1e3a8a;
    border-color: #0284c7;
}

.news-access h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0 0 0.75rem 0;
}

.dark .news-access h3 {
    color: #93c5fd;
}

.news-access p {
    font-size: 0.95rem;
    color: #0c4a6e;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.dark .news-access p {
    color: #dbeafe;
}

.news-access-button {
    margin: 1rem 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.news-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #0284c7;
    transition: all 0.2s;
}

.dark .news-link {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.news-link:hover {
    color: #0c4a6e;
    background-color: rgba(2, 132, 199, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.dark .news-link:hover {
    color: #93c5fd;
    background-color: rgba(96, 165, 250, 0.1);
}

.news-access-images {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.news-access-image {
    max-width: 250px;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    object-fit: contain;
}

.news-access-image:first-child {
    object-fit: scale-down;
}

.news-access-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .news-access-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .news-access-image:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .news-access-image {
        max-width: 150px;
    }
}


/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    visibility: visible;
    transition: all 0.2s;
}

.image-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    animation: modalImageAppear 0.3s ease-out;
}

@keyframes modalImageAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2001;
}

.image-modal-close:hover {
    transform: scale(1.2);
    color: #f0f0f0;
}

@media (max-width: 768px) {
    .image-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        font-size: 2rem;
    }

    .image-modal-image {
        max-width: 95vw;
        max-height: 85vh;
    }
}
