/* ============================================
   BREAKING NEWS / NEWSTAG COMPONENT
   ============================================ */

.breaking-news-section {
    background: #f5f5f5;
    border: 1px solid #222 ;
    border-radius: 12px;
    padding: 16px 20px 20px;
    max-width: 900px;
    margin: 20px auto;
}

.breaking-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.breaking-news-header h2 {
    font-size: 22px;
    font-style: italic;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.breaking-news-header a {
    font-size: 15px;
    font-weight: 700;
    color: #d32f2f;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breaking-news-header a:hover {
    text-decoration: underline;
}

.breaking-news-header a svg {
    width: 18px;
    height: 18px;
}

/* ===== CAROUSEL WRAPPER & SCROLL BUTTONS ===== */
.news-carousel-wrapper {
    position: relative;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    
    /* Default tersembunyi, muncul saat hover wrapper (Desktop) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.scroll-btn svg {
    width: 20px;
    height: 20px;
    stroke: #333;
}

/* Muncul saat wrapper di-hover (HANYA Desktop) */
@media (min-width: 769px) {
    .news-carousel-wrapper:hover .scroll-btn {
        opacity: 1;
        visibility: visible;
    }
    
    .scroll-btn:hover {
        background: #fff;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-50%) scale(1.05);
    }
    
    .scroll-btn:active {
        transform: translateY(-50%) scale(0.95);
    }
}

.scroll-left {
    left: -10px;
}

.scroll-right {
    right: -10px;
}

/* === PENTING: Benar-benar HILANG saat tidak aktif === */
.scroll-btn.disabled {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* Sembunyikan tombol TOTAL di Mobile/Tablet */
@media (max-width: 768px) {
    .scroll-btn {
        display: none !important;
    }
}

/* ===== CARDS CONTAINER ===== */
.news-cards-container {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.news-cards-container::-webkit-scrollbar {
    display: none;
}

.news-card {
    min-width: 144px;
    max-width: 200px;
    height: 230px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.news-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.news-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.75) 75%,
      rgba(0, 0, 0, 0.92) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    pointer-events: none;
}

.news-card .card-category {
    display: inline-block;
    background-color: #d32f2f;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    align-self: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    pointer-events: auto;
}

.news-card .card-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: auto;
}

.news-card .card-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 400;
    pointer-events: auto;
}

.progress-bar-container {
    margin-top: 14px;
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #d32f2f;
    border-radius: 2px;
    transition: width 0.15s ease-out;
}

/* ===== RESPONSIVE 480px ===== */
@media (max-width: 480px) {
    .breaking-news-section {
        padding: 14px 16px 18px;
        margin: 15px auto;
        margin-left: 15px;  /* ← DITAMBAHKAN */
        margin-right: 15px; /* ← DITAMBAHKAN */
    }
    .breaking-news-header h2 { font-size: 20px; }
    .breaking-news-header a { font-size: 14px; }
    .breaking-news-header a svg { width: 16px; height: 16px; }
    .news-cards-container { gap: 12px; }
    .news-card { min-width: 180px; max-width: 180px; height: 280px; }
    .news-card .card-overlay { padding: 12px; }
    .news-card .card-title { font-size: 13px; }
    .news-card .card-category { font-size: 9px; padding: 2px 7px; }
    .news-card .card-date { font-size: 10px; }
}

/* ===== RESPONSIVE 360px ===== */
@media (max-width: 360px) {
    .breaking-news-section {
        padding: 12px 12px 16px;
        border-radius: 10px;
        margin: 12px auto;
        margin-left: 16px;  /* ← DITAMBAHKAN */
        margin-right: 16px; /* ← DITAMBAHKAN */
    }
    .breaking-news-header { margin-bottom: 12px; }
    .breaking-news-header h2 { font-size: 18px; }
    .breaking-news-header a { font-size: 13px; }
    .breaking-news-header a svg { width: 15px; height: 15px; }
    .news-cards-container { gap: 10px; }
    .news-card { min-width: 144px; max-width: 144px; height: 220px; border-radius: 10px; }
    .news-card .card-overlay { padding: 10px; }
    .news-card .card-category { font-size: 8.5px; padding: 2px 6px; margin-bottom: 6px; border-radius: 3px; }
    .news-card .card-title { font-size: 12px; line-height: 1.3; margin-bottom: 6px; }
    .news-card .card-date { font-size: 9.5px; }
    .progress-bar-container { height: 3px; margin-top: 12px; }
}