/* Custom styles for news portal */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Card hover effects */
.news-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dark .news-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    color: white;
}

/* Image placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .img-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Hero overlay */
.hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
}

/* Prose content inside articles */
.prose-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
}

.prose-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.prose-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose-content ul,
.prose-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.prose-content li {
    margin-bottom: 0.5rem;
}

.prose-content img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.prose-content blockquote {
    border-left: 4px solid #0ea5e9;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f0f9ff;
    border-radius: 0 0.5rem 0.5rem 0;
}

.dark .prose-content blockquote {
    background: #1e293b;
}

/* Pagination */
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.pagination a:hover {
    background: #0ea5e9;
    color: white;
}

.pagination .active {
    background: #0ea5e9;
    color: white;
}

/* Skeleton loader */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* News Carousel */
.news-carousel {
    position: relative;
    overflow: hidden;
}

.news-carousel .carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-carousel .carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.news-carousel .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dots .dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}