/* ============================================
   WR News Carousel Widget Styles
   ============================================ */

.wr-news-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.wr-news-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 80px;
}

.wr-news-track::-webkit-scrollbar {
    display: none;
}

/* --- Card Base --- */
.wr-news-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08); /* default; overridden by Elementor card_background control */
}

.wr-news-card:hover {
    transform: translateY(-2px);
}

/* --- Style 1: Image Left + Arrow Right --- */
.wr-news-card.style-1 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 16px;
    padding: 0 !important; /* image sits flush; padding applied to inner content only */
    overflow: hidden;
}

.wr-news-card.style-1 .card-image {
    /* width/height intentionally NOT set here — controlled by Elementor selectors */
    width: 120px;   /* fallback only; overridden by responsive control */
    height: 90px;   /* fallback only; overridden by responsive control */
    border-radius: 0; /* flush to card edge; border-radius on image itself via control */
    object-fit: cover;
    flex-shrink: 0;
    align-self: stretch; /* fills full card height */
}

.wr-news-card.style-1 .card-content {
    flex: 1;
    min-width: 0;
    padding: 14px 0 14px 0; /* vertical breathing room; no left pad (gap handles it) */
}

.wr-news-card.style-1 .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.wr-news-card.style-1 .card-description {
    font-size: 13px;
    color: #999999;
    line-height: 1.4;
}

.wr-news-card.style-1 .card-arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    flex-shrink: 0;
    color: #ffffff;
    transition: background 0.2s ease;
    margin-right: 16px; /* replaces card right padding since padding:0 on card */
}

.wr-news-card.style-1 .card-arrow svg {
    width: 14px;
    height: 14px;
    display: block;
}

.wr-news-card.style-1:hover .card-arrow {
    background: rgba(255,255,255,0.2);
}

/* --- Style 2: Title/Desc + Image Right, Source Below --- */
.wr-news-card.style-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
}

.wr-news-card.style-2 .card-top {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px;
    flex: 1;
}

.wr-news-card.style-2 .card-text-content {
    flex: 1;
    min-width: 0;
}

.wr-news-card.style-2 .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.wr-news-card.style-2 .card-description {
    font-size: 13px;
    color: #999999;
    line-height: 1.4;
    margin-bottom: 0;
}

.wr-news-card.style-2 .card-image {
    /* width/height intentionally NOT set here — controlled by Elementor selectors */
    width: 100px;   /* fallback only */
    height: 100px;  /* fallback only */
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.wr-news-card.style-2 .card-source {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    /* justify-content set by Elementor source_alignment control */
}

.wr-news-card.style-2 .source-logo {
    /* width/height controlled by Elementor source_logo_size control */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wr-news-card.style-2 .source-name {
    font-size: 13px;
    color: #bbbbbb;
    font-weight: 500;
}

/* --- Glass Effect --- */
.wr-news-card.glass-enabled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Peek Indicator --- */
.wr-peek-indicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(10,10,10,0.8));
    pointer-events: none;
    z-index: 2;
}

.wr-news-carousel-wrapper.peek-hidden .wr-peek-indicator {
    display: none;
}

/* --- Responsive Card Widths --- */
/* Desktop */
@media (min-width: 1024px) {
    .wr-news-track[data-desktop="4"] .wr-news-card {
        width: calc(25% - 12px);
    }
    .wr-news-track[data-desktop="3"] .wr-news-card {
        width: calc(33.333% - 11px);
    }
    .wr-news-track[data-desktop="2"] .wr-news-card {
        width: calc(50% - 8px);
    }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
    .wr-news-track[data-tablet="2"] .wr-news-card {
        width: calc(50% - 8px);
    }
    .wr-news-track[data-tablet="1"] .wr-news-card {
        width: calc(85% - 8px);
    }
}

/* Mobile */
@media (max-width: 639px) {
    .wr-news-track[data-mobile="1"] .wr-news-card {
        width: calc(85% - 8px);
    }
}