/* ===================================================================
   INFOGRAPHIC DESIGN STYLES (User Request)
   =================================================================== */

/* 1. Circle + Bar Style (Berita Terkini & Sorotan Utama) */

/* Common Container */
.label-ekonomi,
.label-tekno {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    height: 60px;
}

/* Circle Icon Box */
.label-ekonomi .icon-box,
.label-tekno .icon-tech {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid #fff;
    flex-shrink: 0;
}

/* Bar Text */
.label-ekonomi .label-text,
.label-tekno .label-text {
    flex-grow: 1;
    height: 45px;
    display: flex;
    align-items: center;
    padding-left: 40px;
    /* Space for circle overlap */
    padding-right: 20px;
    border-radius: 0 25px 25px 0;
    color: #fff;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 18px !important;
    letter-spacing: 0.5px;
    margin-left: -30px;
    /* Overlap */
    position: relative;
    z-index: 1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Specific Colors - Berita Terkini (Red/Pink Theme - Style 01) */
.label-ekonomi .icon-box {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.label-ekonomi .label-text {
    background: linear-gradient(90deg, #ff4b2b 0%, #ff416c 100%);
}

/* Specific Colors - Sorotan Utama (Blue/Cyan Theme - Style 02) */
.label-tekno .icon-tech {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
}

.label-tekno .label-text {
    background: linear-gradient(90deg, #96c93d 0%, #00b09b 100%);
}


/* 2. Diamond Card Style (Trending Widget Rank) */

.trending-item {
    position: relative;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    overflow: visible;
    /* Allow diamond to pop out if needed */
}

.trending-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.trending-rank {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-radius: 4px;
    transform: rotate(45deg);
    /* Diamond Shape */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    margin-top: 5px;
    margin-left: 5px;
}

/* Counter-rotate the number so it's upright */
.trending-rank::before {
    content: attr(data-rank);
    /* Use attribute if available, otherwise just text content works if wrapped */
    transform: rotate(-45deg);
}

/* Since the number is direct text, we need to wrap it in index.php or use a trick. 
   Better to just rotate the container and counter-rotate a span inside. 
   But I can't easily change HTML structure inside the loop without editing index.php.
   
   Alternative: Use the existing text node.
   If I rotate the parent, the text rotates. 
   I can't counter-rotate a text node directly in CSS.
   
   Wait, I CAN edit index.php. The user said "don't change layout", but wrapping a number in a span is fine.
   
   Let's check index.php again.
   Line 225: <div class="trending-rank"><?php echo $rank++; ?></div>
   
   I will modify index.php to:
   <div class="trending-rank"><span><?php echo $rank++; ?></span></div>
   
   Then CSS:
   .trending-rank span { transform: rotate(-45deg); display: block; }
*/

.trending-rank span {
    transform: rotate(-45deg);
    display: block;
    font-weight: 800;
}

/* Cycle Colors for Ranks */
.trending-item:nth-child(1) .trending-rank {
    background: linear-gradient(135deg, #ff512f 0%, #dd2476 100%);
}

.trending-item:nth-child(2) .trending-rank {
    background: linear-gradient(135deg, #1fa2ff 0%, #12d8fa 100%);
}

.trending-item:nth-child(3) .trending-rank {
    background: linear-gradient(135deg, #f09819 0%, #edde5d 100%);
}

.trending-item:nth-child(4) .trending-rank {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.trending-item:nth-child(5) .trending-rank {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
}