<style>
    
    .card-body .d-flex.flex-wrap.gap-2 span {
        display: block;         /* bikin turun kebawah */
        margin-bottom: 6px;     /* jarak antar baris */
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white !important;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.9em;
        transition: all 0.3s ease-in-out;
        cursor: pointer;
    }
    
    .card-body .d-flex.flex-wrap.gap-2 span:hover {
        background: linear-gradient(135deg, #4386e976 0%, #004f9483 100%);
        color: #fff !important;
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }


    /* CSS Hover Animation */
    .tag-hover {
        transition: all 0.3s ease-in-out;
        cursor: pointer;
    }

    .tag-hover:hover {
        background-color: #0d6efd !important;
        color: white !important;
        transform: scale(1.05);
    }

    .hover-post {
        transition: all 0.3s ease-in-out;
        padding: 5px;
        border-radius: 8px;
    }

    .hover-post:hover {
        background-color: #f5f5f5;
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
        transform: scale(1.01);
        cursor: pointer;
    }

    /* 🎯 Tag Style */
    .card-body .d-flex.flex-wrap.gap-2 {
        display: block;        /* ubah jadi blok biar turun ke bawah */
        line-height: 1.8;      /* jarak antar baris kayak paragraf */
    }

    .tag-hover {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white !important;
        padding: 5px 10px;
        border-radius: 12px;
        font-size: 0.9em;
        transition: all 0.3s ease-in-out;
        cursor: pointer;
        display: inline;        /* inline → tampil kayak teks paragraf */
        margin-right: 6px;      /* jarak kanan antar kata */
        margin-bottom: 4px;     /* jarak bawah biar rapi */
        white-space: normal;    /* biar bisa turun baris */
        word-break: break-word; /* pecah kata panjang */
    }

    .tag-hover:hover {
        background: linear-gradient(135deg, #4386e976 0%, #004f9483 100%);
        color: #fff !important;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    /* 🔄 Loading Screen */
    .loading-screen {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: linear-gradient(45deg, #ffffff, #e2deff);
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        z-index: 9999;
    }

    .loader {
        width: 100px;
        height: 100px;
        animation: spin 2s linear infinite;
    }

    @keyframes spin {
        0% { transform: rotateY(0deg) rotateX(0deg); }
        100% { transform: rotateY(360deg) rotateX(360deg); }
    }

    .loading-text {
        font-size: 1.2em;
        color: #333;
        margin-top: 20px;
    }

    /* 🎞️ Carousel Fix */
    .carousel-container {
        position: relative;
        width: 100%;
        padding-top: 56.25%; /* 16:9 aspect ratio */
        overflow: hidden;
    }

    .carousel-inner {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%;
        height: 100%;
    }

    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .carousel-caption {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(25, 125, 255, 0.22);
        text-align: center;
        padding: 20px;
        z-index: 2;
    }

    .carousel-caption h2 {
        color: #fff;
        font-size: 2rem;
        margin-bottom: 0.5rem;
        font-family: Helvetica;
    }

    .carousel-caption p {
        color: #fff;
        font-size: 1.1rem;
        margin: 0;
    }

    .carousel-caption .upload-date {
        font-size: 1rem;
        color: #f0f0f0;
        margin-top: 0.3rem;
    }
    
</style>
