/* index.html — Latest News section */

#latest-news.index-news-section {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 28%, #ffffff 100%);
}

#latest-news.index-news-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 8% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 55% 40% at 92% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

html.dark #latest-news.index-news-section {
    background: linear-gradient(180deg, #0f172a 0%, #111827 35%, #0f172a 100%);
}

html.dark #latest-news.index-news-section::before {
    background:
        radial-gradient(ellipse 70% 50% at 8% 0%, rgba(59, 130, 246, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 55% 40% at 92% 15%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
}

#latest-news .container {
    position: relative;
    z-index: 1;
}

/* Header */
.index-news-head {
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
}

.index-news-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.875rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
}

.index-news-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    animation: index-news-pulse 2s ease-in-out infinite;
}

@keyframes index-news-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.92); }
}

html.dark .index-news-eyebrow {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(96, 165, 250, 0.35);
}

.index-news-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0f172a;
}

html.dark .index-news-title {
    color: #f8fafc;
}

.index-news-lead {
    margin: 0 auto 1.25rem;
    max-width: 480px;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #64748b;
}

html.dark .index-news-lead {
    color: #94a3b8;
}

.index-news-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.index-news-view-all:hover {
    color: #1d4ed8;
    gap: 0.55rem;
}

html.dark .index-news-view-all {
    color: #60a5fa;
}

html.dark .index-news-view-all:hover {
    color: #93c5fd;
}

/* Carousel */
.index-news-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#latest-news .index-news-swiper {
    width: 100%;
    margin: 0;
    padding: 0.25rem 0 0;
    overflow: hidden;
}

#latest-news .index-news-swiper .swiper-wrapper {
    align-items: stretch;
    box-sizing: border-box;
}

#latest-news .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

/* Cards */
#latest-news .news-card {
    width: 100%;
    min-height: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.35rem 1.15rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    position: relative;
    overflow: hidden;
    margin: 0;
}

#latest-news .news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    opacity: 0;
    transition: opacity 0.28s ease;
}

#latest-news .news-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow:
        0 16px 32px rgba(15, 23, 42, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.08);
}

@media (min-width: 768px) {
    #latest-news .news-card:hover {
        transform: translateY(-4px);
    }
}

#latest-news .news-card:hover::before {
    opacity: 1;
}

html.dark #latest-news .news-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html.dark #latest-news .news-card:hover {
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

#latest-news .news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#latest-news .news-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: #2563eb;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

html.dark #latest-news .news-icon {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(49, 46, 129, 0.35) 100%);
    color: #93c5fd;
}

#latest-news .news-card:hover .news-icon {
    transform: scale(1.06);
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #fff;
}

#latest-news .news-badge {
    padding: 0.3rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 8px;
    line-height: 1.2;
}

#latest-news .news-badge-high {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

#latest-news .news-badge-medium {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

#latest-news .news-badge-low {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

html.dark #latest-news .news-badge-high {
    background: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.3);
}

html.dark #latest-news .news-badge-medium {
    background: rgba(146, 64, 14, 0.45);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.25);
}

html.dark #latest-news .news-badge-low {
    background: rgba(30, 58, 138, 0.45);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
}

#latest-news .news-content {
    flex: 1 1 auto;
    min-height: 0;
}

#latest-news .news-title {
    margin: 0 0 0.65rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}

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

#latest-news .news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

#latest-news .news-title a:hover {
    color: #2563eb;
}

html.dark #latest-news .news-title a:hover {
    color: #60a5fa;
}

#latest-news .news-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.dark #latest-news .news-description {
    color: #94a3b8;
}

#latest-news .news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

html.dark #latest-news .news-footer {
    border-top-color: #334155;
}

#latest-news .news-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
}

html.dark #latest-news .news-date {
    color: #64748b;
}

#latest-news .news-date svg {
    opacity: 0.75;
}

#latest-news .news-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

html.dark #latest-news .news-arrow {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

#latest-news .news-card:hover .news-arrow,
#latest-news .news-arrow:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: translateX(2px);
}

/* Controls — prev | dots | next in one row */
.index-news-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 0.25rem;
}

#latest-news .index-news-nav {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#latest-news .index-news-nav::after {
    font-size: 0.75rem;
    font-weight: 700;
}

#latest-news .index-news-nav:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

#latest-news .index-news-nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

html.dark #latest-news .index-news-nav {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

#latest-news .index-news-pagination {
    position: static !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 5.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    color: #64748b;
}

#latest-news .index-news-pagination.swiper-pagination-fraction {
    bottom: auto;
    left: auto;
    transform: none;
}

#latest-news .index-news-pagination .swiper-pagination-current {
    color: #2563eb;
}

html.dark #latest-news .index-news-pagination {
    color: #94a3b8;
}

html.dark #latest-news .index-news-pagination .swiper-pagination-current {
    color: #60a5fa;
}

@media (max-width: 479px) {
    .index-news-controls {
        gap: 0.65rem;
    }

    #latest-news .index-news-nav {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-news-eyebrow::before {
        animation: none;
    }

    #latest-news .news-card:hover {
        transform: none;
    }
}
