/**
 * BERITA UMKM LAMPUNG - STYLES
 * Complete styling for news system
 * Version: 1.0.0
 */

/* ============================================
   BERITA CAROUSEL (HOMEPAGE)
   ============================================ */
.berita-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.berita-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.berita-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ============================================
   BERITA CARD
   ============================================ */
.berita-carousel-card {
    min-width: calc(33.333% - 20px);
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.berita-carousel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.berita-card-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.berita-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.berita-carousel-card:hover .berita-card-thumbnail img {
    transform: scale(1.1);
}

.berita-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    font-size: 64px;
}

/* Location Badge */
.berita-location-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 215, 0, 0.95);
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Card Content */
.berita-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.berita-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
}

.berita-date {
    font-weight: 600;
}

.berita-headline {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 56px;
}

.berita-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-read-more {
    display: inline-block;
    padding: 10px 25px;
    background: #FFD700;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.berita-read-more:hover {
    background: #FFA500;
    color: #fff;
    transform: translateX(5px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.berita-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
}

.berita-nav:hover {
    background: #FFD700;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.berita-prev {
    left: -25px;
}

.berita-next {
    right: -25px;
}

/* ============================================
   DOTS INDICATOR
   ============================================ */
.berita-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.berita-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.berita-dot:hover {
    background: #999;
}

.berita-dot.active {
    background: #FFD700;
    border-color: #FFA500;
    transform: scale(1.3);
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.berita-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.berita-archive-header {
    text-align: center;
    margin-bottom: 60px;
}

.berita-archive-header h1 {
    font-size: 48px;
    font-weight: 900;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.berita-archive-header p {
    font-size: 18px;
    color: #666;
}

/* Filter Bar */
.berita-filter-bar {
    background: #fff;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.berita-filter-group {
    flex: 1;
    min-width: 200px;
}

.berita-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.berita-filter-group select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.berita-filter-group select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.berita-reset-btn {
    padding: 10px 25px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    height: 42px;
}

.berita-reset-btn:hover {
    background: #555;
    transform: translateY(-2px);
}

/* Grid Layout */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ============================================
   SINGLE PAGE
   ============================================ */
.berita-single-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.berita-single-container.full-width {
    max-width: 1400px;
}

.berita-single-container.sidebar {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.berita-single-header {
    margin-bottom: 40px;
}

.berita-single-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.berita-single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.berita-single-title {
    font-size: 42px;
    font-weight: 900;
    color: #333;
    line-height: 1.3;
    margin-bottom: 20px;
}

.berita-single-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #FFD700;
}

.berita-featured-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.berita-single-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.berita-single-content p {
    margin-bottom: 20px;
}

.berita-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
}

.berita-single-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: #333;
}

.berita-single-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 15px;
    color: #333;
}

/* Sidebar */
.berita-sidebar {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 15px;
}

.berita-sidebar h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.berita-related-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.berita-related-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.berita-related-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.berita-related-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.4;
}

.berita-related-info a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.berita-related-info a:hover {
    color: #FFD700;
}

.berita-related-date {
    font-size: 12px;
    color: #999;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .berita-carousel-card {
        min-width: calc(50% - 15px);
    }
    
    .berita-single-container.sidebar {
        grid-template-columns: 1fr;
    }
    
    .berita-sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .berita-carousel-card {
        min-width: calc(100% - 40px);
    }
    
    .berita-nav {
        display: none;
    }
    
    .berita-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .berita-filter-group {
        width: 100%;
    }
    
    .berita-grid {
        grid-template-columns: 1fr;
    }
    
    .berita-single-title {
        font-size: 32px;
    }
    
    .berita-archive-header h1 {
        font-size: 36px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.berita-carousel-card {
    animation: fadeInUp 0.6s ease forwards;
}

.berita-carousel-card:nth-child(1) {
    animation-delay: 0.1s;
}

.berita-carousel-card:nth-child(2) {
    animation-delay: 0.2s;
}

.berita-carousel-card:nth-child(3) {
    animation-delay: 0.3s;
}
