/*
Theme Name: TWWC V1
Theme URI: http://thewarkopwarkopclub.com/themes
Author: Fiki Purnama
Author URI: http://instagram.com/fikipurnama
Description: Tema editorial ultra-minimalis dengan sentuhan warna dinamis.
Version: 1.1.5
*/

/* ==========================================================================
   GLOBAL UTILITIES
   ========================================================================== */
body { 
    font-family: 'Inter', sans-serif; 
    background-color: #ffffff; 
    margin: 0; 
    overflow-x: hidden; 
}

a { text-decoration: none !important; }

.fw-black { font-weight: 900 !important; }
.object-fit-cover { object-fit: cover; }
.nav-link { font-weight: 700; font-size: 0.9rem; color: #000 !important; }
.text-uppercase { letter-spacing: 0.5px; }
.custom-category-link a {
    color: #000000 !important;
    text-decoration: none !important;
}
.custom-category-link a:hover {
    text-decoration: underline !important;
}
.warkop-share-container .btn {
    transition: all 0.3s ease;
    border-width: 2px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.warkop-share-container .btn-outline-dark:hover {
    background-color: #000;
    color: #fff;
}

#generateIGStory {
    background-color: #000;
    border-color: #000;
}

#generateIGStory:hover {
    background-color: #333;
}

@media (max-width: 767.98px) {
  .date-wrapper-left {
    padding-bottom: 20px;
  }
}

/* ==========================================================================
   NAVBAR & SEARCH (CLEAN VERSION)
   ========================================================================== */
.header-main { 
    transition: all 0.3s ease; 
    background: #fff;
}

.btn-nav-icon {
    width: 40px; height: 40px; 
    display: flex; align-items: center; justify-content: center;
    border-radius: 50% !important; 
    border: 1px solid #dee2e6; 
    cursor: pointer; 
    transition: 0.2s;
    background: transparent;
}
.btn-nav-icon:hover { background-color: #f8f9fa; border-color: #000; }

.search-wrapper { display: flex; align-items: center; }

/* 1. CSS UNTUK MOBILE & TABLET (< 992px) */
@media (max-width: 991.98px) {
    .search-input-field { 
        border: none; outline: none; background: transparent; 
        transition: 0.3s; width: 0; opacity: 0; 
    }
    
    .search-active .logo-wrapper { display: none !important; }
    .search-active .search-wrapper { flex-grow: 1; }
    
    .search-active .search-form { 
        width: 100%; 
        background: #f1f3f5; 
        border-radius: 50px; 
        padding-right: 10px;
        display: flex;
        align-items: center;
    }
    
    .search-active .search-input-field { 
        width: 100%; 
        opacity: 1; 
        padding: 8px 5px; 
    }
    
    .search-active .search-close-btn { 
        display: block !important; 
    }
}

/* 2. CSS UNTUK DESKTOP (>= 992px) */
@media (min-width: 992px) {
    .search-form { 
        background: #f1f3f5; 
        border-radius: 50px; 
        padding: 5px 15px; 
        width: 100%; 
        max-width: 400px; /* Lebar permanen di tengah */
        display: flex; 
        align-items: center; 
    }

    .search-input-field { 
        border: none; 
        outline: none; 
        background: transparent;
        width: 100%; 
        opacity: 1; 
        padding: 5px 10px;
    }

    /* Hilangkan tombol close di desktop karena form selalu terbuka */
    .search-close-btn { 
        display: none !important; 
    }

    /* Icon search di desktop berfungsi sebagai tombol submit */
    .search-toggle-btn { 
        border: none !important;
        background: transparent !important;
        width: auto;
        height: auto;
        margin-right: 5px;
        cursor: pointer;
    }
    
    .search-toggle-btn:hover {
        background: transparent !important;
    }
}

/* ==========================================================================
   HOMEPAGE: SPOTLIGHT BANNER
   ========================================================================== */
.spotlight-banner { position: relative; transition: all 0.3s ease; }
.spotlight-banner img { transition: transform 0.8s ease; }
.spotlight-banner a:hover img { transform: scale(1.03); }

@media (max-width: 767px) {
    .spotlight-breakout {
        margin-left: -1.5rem !important;
        margin-right: -1.5rem !important;
        width: calc(100% + 3rem) !important;
        max-width: none !important;
    }
    .spotlight-breakout .rounded-4 { border-radius: 0 !important; }
    .spotlight-banner h2 { font-size: 1.75rem !important; padding: 0 1rem; }
}

@media (min-width: 768px) {
    .rounded-4 { border-radius: 1.5rem !important; }
}

/* Menghilangkan scrollbar tapi fungsi geser tetap jalan (opsional) */
.custom-scroll-playlist {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.custom-scroll-playlist::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Memastikan elemen di dalam flex-nowrap tidak menyusut */
.custom-scroll-playlist .col-9,
.custom-scroll-playlist .col-md-3 {
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    /* Memberikan padding ekstra di akhir agar card terakhir tidak menempel ke pinggir layar */
    .custom-scroll-playlist::after {
        content: '';
        padding-right: 20px;
    }
}
.mobile-scroll-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
/* ==========================================================================
   ARTICLES & CARDS
   ========================================================================== */
.main-featured-img { height: 400px; object-fit: cover; }
.headline-title { font-size: calc(1.5rem + 0.5vw); letter-spacing: -0.5px; }

.dot-indicator {
    width: 10px; height: 10px;
    background-color: #e9214f; 
    border-radius: 50%;
    display: inline-block;
}

.secondary-article-card { 
    transition: all 0.2s ease; 
    background: #fff; 
    border: 1px solid #dee2e6; 
}
.secondary-article-card:hover { 
    background-color: #f8f9fa; 
    border-color: #e9214f !important; 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.hover-red:hover { color: #e9214f !important; transition: 0.2s; }

/* Typography Constraints */
.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* Maksimal 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.4; /* Atur tinggi baris yang pasti */
    max-height: 2.8em; /* 1.4 x 2 baris = 2.8em */
    min-height: 2.8em; /* Menjaga card tetap sejajar jika judul hanya 1 baris */
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.btn-twwc-primary { 
    background-color: #e9214f; 
    color: #fff !important; 
    border: none; 
    transition: all 0.3s ease; 
}
.btn-twwc-primary:hover { 
    background-color: #d11a43; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(233, 33, 79, 0.2);
}

/* Tombol Rounded Playlist */
.playlist-btn-rounded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: #f1f3f5; /* Warna abu-abu soft, atau ganti #e9214f jika ingin merah */
    color: #000;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.playlist-btn-rounded svg {
    transition: transform 0.3s ease;
}

/* Hover Effect */
.playlist-btn-rounded:hover {
    background-color: #e9214f;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(233, 33, 79, 0.2);
}

.playlist-btn-rounded:hover svg {
    transform: translateX(3px); /* Panah bergeser sedikit ke kanan */
}

/* Memastikan teks H2 sejajar vertikal */
.headline-title {
    display: flex;
    align-items: center;
}

.btn-twwc-primary {
    background-color: #e9214f !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.btn-twwc-primary:hover {
    background-color: #c71b43 !important; /* Merah yang sedikit lebih gelap untuk state hover */
    transform: translateY(-2px);
}

/* ==========================================================================
   NEWS PAGE: FILTER & HEADER
   ========================================================================== */
.display-3.fw-black { letter-spacing: -2px; }

.form-select.category-filter {
    padding-left: 1.5rem;
    padding-right: 3rem; 
    background-position: right 1.2rem center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select.category-filter:focus {
    border-color: #e9214f !important;
    box-shadow: 0 0 0 0.25rem rgba(233, 33, 79, 0.1) !important;
}

/* ==========================================================================
   PAGINATION: CIRCLE STYLE - FINAL NUCLEAR FIX
   ========================================================================== */
.pagination-wrapper {
    display: block !important; /* Wrapper sebagai blok */
    text-align: center !important; /* Memastikan isinya ke tengah */
    width: 100% !important;
    margin: 50px 0 !important;
    clear: both !important;
}

/* Container UL - Kita paksa horizontal dengan inline-flex */
.pagination-wrapper ul.page-numbers {
    display: inline-flex !important; /* Mengikuti lebar konten tapi tetap bisa flex */
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Paksa satu baris, jangan turun */
    justify-content: center !important;
    align-items: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    gap: 12px !important;
}

/* Element List LI - Paksa sejajar ke samping */
.pagination-wrapper ul.page-numbers li {
    display: inline-block !important; /* Jurus maut agar pasti horizontal */
    float: none !important; /* Buang float jika ada */
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
}

/* Link Angka & Navigasi */
.pagination-wrapper .page-numbers {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 50% !important;
    color: #6c757d !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

/* Halaman Aktif */
.pagination-wrapper .page-numbers.current {
    background-color: #e9214f !important;
    color: #ffffff !important;
    border-color: #e9214f !important;
}

/* Prev & Next khusus */
.pagination-wrapper .prev.page-numbers,
.pagination-wrapper .next.page-numbers {
    background-color: #f8f9fa !important;
}

/* Sembunyikan bullet bawaan browser yang mungkin muncul */
.pagination-wrapper ul.page-numbers li::before {
    content: none !important;
}

/* ==========================================================================
   WEEKLY PLAYLIST COMPONENTS
   ========================================================================== */
.playlist-card-v2 {
    aspect-ratio: 1 / 1;
    background-color: #222;
    position: relative;
    overflow: hidden;
}

.playlist-card-v2 .artwork-img { transition: transform 0.5s ease; }

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; 
    transition: all 0.3s ease;
}

.play-icon-circle {
    width: 50px; height: 50px;
    background-color: #e9214f;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    transform: scale(0.8);
    transition: 0.3s ease;
}

.playlist-card-v2:hover .artwork-img { transform: scale(1.1); }
.playlist-card-v2:hover .card-overlay { opacity: 1; }
.playlist-card-v2:hover .play-icon-circle { transform: scale(1); }

/* Arrow link next to headings */
.playlist-arrow-link {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}
.playlist-arrow-link svg {
    width: 28px; height: 28px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
h2:hover .playlist-arrow-link svg { transform: translateX(10px); }

/* ==========================================================================
   SINGLE POST CONTENT
   ========================================================================== */
.entry-content p { margin-bottom: 1.5rem; line-height: 1.8; color: #333; }
.entry-content img { max-width: 100%; height: auto; border-radius: 15px; margin: 20px 0; }

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    .main-featured-img { height: 220px !important; }
    .headline-title { font-size: 1.4rem !important; }
    .form-select.category-filter { width: 100%; margin-top: 1rem; }
    .pagination-wrapper .page-numbers { min-width: 40px; height: 40px; font-size: 0.8rem; }
}

/* Styling Default (Desktop Merch) */
.product-main-img {
    height: 600px;
}

/* Styling Khusus Mobile */
@media (max-width: 768px) {
    .product-main-img {
        height: auto !important; /* Reset height fix */
        aspect-ratio: 1 / 1;    /* Paksa jadi kotak (Square) */
        width: 100%;
    }
}

/* --------------- */
#search-results {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
    z-index: 9999;
}

#search-results .list-group-item:hover {
    background-color: #f8f9fa;
    color: #e9214f;
    font-weight: bold;
}

#city-search:focus {
    border-color: #e9214f;
    box-shadow: 0 0 0 0.25 mil rgba(233, 33, 79, 0.1);
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
}

table {
    min-width: 600px; 
}