/* =============================================
   NEWS SLIDER — Dark Theme
   Original class names preserved for Swiper compatibility
   Bootstrap overridden via .news-section scoping
   ============================================= */

:root {
    --card-width: 350px;
    --card-height: 380px;
    --image-height: 180px;
    --primary-color1: #6366f1;
    --secondary-color1: #8b5cf6;
}

/* ===========================================
   WRAPPER
   =========================================== */
.wrapper {
    max-width: 1150px;
    padding: 20px 10px;
    margin: 0 auto 35px;
    overflow: hidden;
}

/* ===========================================
   NO-SWIPER MODE (1-2 cards)
   =========================================== */
.wrapper.no-swiper {
    display: flex;
    justify-content: center;
}

.wrapper.no-swiper .swiper-wrapper {
    display: flex;
    justify-content: center;
    gap: 25px;
    transform: none !important;
    width: auto !important;
}

.wrapper.no-swiper .swiper-slide {
    width: var(--card-width) !important;
    flex-shrink: 0;
    margin: 0 !important;
}

/* ===========================================
   SWIPER MODE (3+ cards)
   =========================================== */
.wrapper:not(.no-swiper) .swiper-slide {
    height: auto;
    display: flex;
}

/* ===========================================
   CARD STYLES — Dark Theme
   Scoped under .news-section to beat Bootstrap
   =========================================== */
.news-section .wrapper .card {
    background: #141d2a !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    border: 1px solid rgba(129, 134, 213, 0.18) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    min-height: var(--card-height);
    overflow: hidden;
}

.news-section .wrapper .card:hover {
    transform: translateY(-8px);
    border-color: rgba(129, 134, 213, 0.4) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
}

/* Card Image */
.news-section .wrapper .card .card-image {
    position: relative;
    width: 100%;
    height: var(--image-height);
    overflow: hidden;
    padding: 10px;
    flex-shrink: 0;
}

.news-section .wrapper .card .card-image img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.news-section .wrapper .card .card-image .card-tag {
    position: absolute;
    top: 22px;
    left: 22px;
    font-size: 0.75rem;
    color: #F5875D !important;
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(20, 29, 42, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 135, 93, 0.25) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Card Content */
.news-section .wrapper .card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px;
}

.news-section .wrapper .card .card-content .card-title {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.news-section .wrapper .card .card-content .card-text {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Card Footer */
.news-section .wrapper .card .card-footer {
    display: flex;
    margin-top: auto;
    align-items: center;
    padding-top: 12px;
    justify-content: flex-start;
    border-top: 1px solid rgba(129, 134, 213, 0.15) !important;
    background: transparent !important;
}

.news-section .wrapper .card .card-footer .btn-site-solid,
.news-section .wrapper .card .card-footer .card-button {
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.81rem;
    font-weight: 600;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--primary-color1) 0%, var(--secondary-color1) 100%) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    transition: all 0.3s ease;
    display: inline-block;
}

.news-section .wrapper .card .card-footer .btn-site-solid:hover,
.news-section .wrapper .card .card-footer .card-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    color: #fff !important;
}

/* Profile info inside card (if present) */
.news-section .wrapper .card .card-profile .card-profile-name {
    color: #e0e2ff !important;
}

.news-section .wrapper .card .card-profile .card-profile-role {
    color: rgba(255, 255, 255, 0.45) !important;
}

.news-section .wrapper .card .card-profile img {
    border: 2px solid rgba(129, 134, 213, 0.3) !important;
}

/* ===========================================
   SWIPER PAGINATION & NAVIGATION
   =========================================== */
.wrapper .swiper-pagination-bullet {
    height: 15px;
    width: 15px;
    opacity: 1;
    overflow: hidden;
    position: relative;
    background: rgba(129, 134, 213, 0.3);
}

.wrapper .swiper-pagination-bullet-active {
    background: rgba(129, 134, 213, 0.5);
}

.newsSlider {
    text-align: center;
}

.wrapper .swiper-pagination-bullet-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--primary-color1);
    transform-origin: left center;
    transform: scaleX(0);
    animation: autoplay-loading 5s linear forwards;
}

.container:hover .wrapper .swiper-pagination-bullet-active::before {
    animation-play-state: paused;
}

@keyframes autoplay-loading {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

.wrapper :where(.swiper-button-prev, .swiper-button-next) {
    color: var(--primary-color1);
    margin-top: -35px;
    transition: all 0.3s ease;
}

.wrapper :where(.swiper-button-prev, .swiper-button-next):hover {
    color: var(--secondary-color1);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1023px) {
    :root {
        --card-width: 340px;
        --card-height: 360px;
        --image-height: 170px;
    }
}

@media (max-width: 767px) {
    :root {
        --card-width: 300px;
        --card-height: 340px;
        --image-height: 160px;
    }

    .wrapper {
        margin: 0 auto 35px;
        padding: 20px 5px;
    }

    .wrapper.no-swiper .swiper-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .wrapper :where(.swiper-button-prev, .swiper-button-next) {
        display: none;
    }

    .news-section .wrapper .card .card-content {
        padding: 10px 15px 15px;
    }

    .news-section .wrapper .card .card-image {
        padding: 8px;
    }
}