/* ========================================
   DigiNewspro Widget - Frontend CSS
   Base styles (colors injected dynamically)
   ======================================== */

/* Widget Container */
.dnw-widget-wrap {
    width: 100%;
    margin-bottom: 25px;
}
.dnw-widget {
    padding: 20px;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}
.dnw-widget * {
    box-sizing: border-box;
}

/* Header */
.dnw-header {
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid #404040;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}
.dnw-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
}

/* Meta elements */
.dnw-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
}
.dnw-meta .dnw-cat::before { content: ''; }
.dnw-meta .dnw-date::before { content: ''; }
.dnw-meta .dnw-comments::before { content: ''; }
.dnw-meta .dnw-cat { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; }
.dnw-meta .dnw-date { opacity: 0.8; }
.dnw-meta .dnw-comments { opacity: 0.8; }

/* Excerpt */
.dnw-excerpt {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.75;
    line-height: 1.5;
}

/* Empty state */
.dnw-empty {
    font-size: 14px;
    padding: 15px 0;
    text-align: center;
}

/* ========================================
   STYLE 1: NUMBER BOLD
   ======================================== */
.dnw-style-number_bold .dnw-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    gap: 15px;
    transition: all 0.3s ease;
}
.dnw-style-number_bold .dnw-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.dnw-style-number_bold .dnw-number {
    font-size: 72px;
    font-weight: 900;
    line-height: 55px;
    font-family: "Arial Black", Arial, sans-serif;
    transition: all 0.3s ease;
    width: 40px;
    height: 55px;
    overflow: hidden;
    text-align: left;
    flex-shrink: 0;
    margin-top: 2px;
}
.dnw-style-number_bold .dnw-no-1 {
    padding-left: 2px;
}
.dnw-style-number_bold .dnw-title {
    font-size: 14.5px;
    line-height: 1.5;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}
.dnw-style-number_bold .dnw-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   STYLE 2: THUMBNAIL LIST
   ======================================== */
.dnw-style-thumbnail_list .dnw-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    align-items: flex-start;
}
.dnw-style-thumbnail_list .dnw-card:last-child {
    margin-bottom: 0;
}
.dnw-style-thumbnail_list .dnw-card-thumb {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}
.dnw-style-thumbnail_list .dnw-card-featured .dnw-card-thumb {
    width: 100%;
    margin-bottom: 8px;
}
.dnw-style-thumbnail_list .dnw-card-featured {
    flex-direction: column;
}
.dnw-style-thumbnail_list .dnw-card-small .dnw-card-thumb {
    width: 80px;
    height: 60px;
}
.dnw-style-thumbnail_list .dnw-card-small .dnw-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dnw-style-thumbnail_list .dnw-card-featured .dnw-card-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}
.dnw-style-thumbnail_list .dnw-card-body {
    flex: 1;
    min-width: 0;
}
.dnw-style-thumbnail_list .dnw-title {
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}
.dnw-style-thumbnail_list .dnw-card-featured .dnw-title {
    font-size: 15px;
    -webkit-line-clamp: 3;
}

/* ========================================
   STYLE 3: CARD KILAS
   ======================================== */
.dnw-style-card_kilas .dnw-featured {
    display: block;
    text-decoration: none;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid transparent;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.dnw-style-card_kilas .dnw-featured-img {
    position: relative;
    overflow: hidden;
}
.dnw-style-card_kilas .dnw-featured-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.dnw-style-card_kilas .dnw-featured:hover .dnw-featured-img img {
    transform: scale(1.03);
}
.dnw-style-card_kilas .dnw-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dnw-style-card_kilas .dnw-featured-body {
    padding: 12px;
}
.dnw-style-card_kilas .dnw-title-lg {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dnw-style-card_kilas .dnw-card-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dnw-style-card_kilas .dnw-card-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: all 0.3s ease;
}
.dnw-style-card_kilas .dnw-card-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.dnw-style-card_kilas .dnw-card-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.dnw-style-card_kilas .dnw-card-item-body {
    flex: 1;
    min-width: 0;
}
.dnw-style-card_kilas .dnw-card-item .dnw-title {
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* ========================================
   MOBILE HORIZONTAL SCROLL
   ======================================== */
.dnw-mobile-scroll .dnw-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 10px;
    scrollbar-width: thin;
}
.dnw-mobile-scroll .dnw-list::-webkit-scrollbar {
    height: 4px;
}
.dnw-mobile-scroll .dnw-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}
.dnw-mobile-scroll .dnw-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

/* Scroll items */
.dnw-mobile-scroll.dnw-style-number_bold .dnw-item,
.dnw-mobile-scroll.dnw-style-thumbnail_list .dnw-card,
.dnw-mobile-scroll.dnw-style-card_kilas .dnw-featured,
.dnw-mobile-scroll.dnw-style-card_kilas .dnw-card-list {
    scroll-snap-align: start;
    flex-shrink: 0;
    min-width: 220px;
}

/* Desktop: stack normally */
@media (min-width: 768px) {
    .dnw-mobile-scroll .dnw-list {
        flex-direction: column;
        overflow-x: visible;
        gap: 0;
    }
    .dnw-mobile-scroll.dnw-style-number_bold .dnw-item,
    .dnw-mobile-scroll.dnw-style-thumbnail_list .dnw-card,
    .dnw-mobile-scroll.dnw-style-card_kilas .dnw-featured,
    .dnw-mobile-scroll.dnw-style-card_kilas .dnw-card-list {
        min-width: auto;
    }
}

/* ========================================
   LEGACY COMPATIBILITY (single-modern theme)
   ======================================== */
.single-modern .main-sidebar .widget:nth-child(1) .dnw-widget-wrap {
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 10px;
    padding-bottom: 15px;
}
