#mgw-dynamic-wrapper {
    opacity: 0;
    transition: opacity .2s ease;
}

.mgw-wrapper {
    margin-bottom: 50px;
}

.mgw-title {
    text-transform: uppercase;
}

.mgw-genre-text {
    color: #195C63;
    font-weight: bold;
}

.mgw-post-title h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 10px;
    margin-bottom: 15px;
}

.mgw-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.mgw-tab {
    padding: 8px 18px;
    border-radius: 50px;
    border-style: solid;
    border-color: white;
    border-width: 2px;
    box-sizing: border-box;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    color: inherit;
}

.mgw-tab:not(.active) {
    background: transparent;
    opacity: 0.8;
    border-width: 1px;
}

.mgw-tab:not(.active):hover {
    opacity: 1;
    transform: translateY(-2px);
}

.mgw-tab.active {
    background: #232d36;
    color: #fff !important;
    border-width: 2px;
}

body.text-ui-light .mgw-view-more a,
body.text-ui-light .mgw-view-more a:hover {
    color: #fff;
}

.mgw-tab-pane {
    display: none;
}

.mgw-tab-pane.active {
    display: block;
}

.mgw-item-detail .mgw-item-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
}

.mgw-view-more {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.mgw-view-more a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    background-color: #232d36;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.mgw-view-more a:hover {
    background-color: #121212;
}

@media (max-width: 576px) {
    .mgw-view-more {
        display: block;
    }
    
    .mgw-tabs-wrapper {
        --fade-size: 10px;
        position: relative;
    }

    .mgw-tabs-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 3px var(--fade-size) 0 var(--fade-size);
    }

    .mgw-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .mgw-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 14px;
    }

    .mgw-tabs-wrapper::before,
    .mgw-tabs-wrapper::after {
        content: "";
        position: absolute;
        top: 0;
        width: var(--fade-size);
        height: 100%;
        pointer-events: none;
        z-index: 5;
    }

    .mgw-tabs-wrapper::before {
        left: 0;
        background: linear-gradient(
            to right,
            #262626 0%,
            rgba(38,38,38,0.8) 40%,
            rgba(38,38,38,0) 100%
        );
    }

    .mgw-tabs-wrapper::after {
        right: 0;
        background: linear-gradient(
            to left,
            #262626 0%,
            rgba(38,38,38,0.8) 40%,
            rgba(38,38,38,0) 100%
        );
    }
}

.mgw-rec-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mgw-rec-overlay.mgw-rec-show {
    opacity: 1;
}

.mgw-rec-modal {
    position: relative;
    background: #232D36;
    color: #fff;
    border-radius: 15px;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 99999;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
    text-align: center;
    padding: 28px 24px 20px;
}

.mgw-rec-overlay.mgw-rec-show .mgw-rec-modal {
    transform: translateY(0) scale(1);
}

.mgw-rec-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.mgw-rec-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: rotate(90deg);
}

.mgw-rec-header {
    margin-bottom: 18px;
}

.mgw-rec-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #195C63;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.mgw-rec-modal-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: -0.3px;
}

.mgw-rec-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.mgw-rec-link-wrapper:hover {
    transform: translateY(-2px);
}

.mgw-rec-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mgw-rec-thumb-wrap {
    width: 100%;
    max-width: 180px;
    flex-shrink: 0;
}

.mgw-rec-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: box-shadow 0.3s ease;
}

.mgw-rec-link-wrapper:hover .mgw-rec-thumb {
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}

.mgw-rec-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.mgw-rec-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.3;
    text-align: center;
}

.mgw-rec-actions {
    margin-top: 6px;
    width: 100%;
}

.mgw-rec-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    background: #195C63;
    color: #fff;
    padding: 11px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.mgw-rec-btn-primary:hover {
    background: #146b74;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(25,92,99,0.3);
}

.mgw-rec-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    width: 100%;
}

.mgw-rec-dismiss {
    background: transparent;
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mgw-rec-dismiss:hover {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}

.mgw-rec-modal::-webkit-scrollbar {
    width: 6px;
}

.mgw-rec-modal::-webkit-scrollbar-track {
    background: transparent;
}

.mgw-rec-modal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

.mgw-rec-overlay-2 {
    background: rgba(0,0,0,0.85);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mgw-rec-card {
    position: relative;
    background: #232D36;
    border-radius: 15px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.mgw-rec-overlay.mgw-rec-show .mgw-rec-card {
    transform: translateY(0) scale(1);
}

.mgw-rec-image-wrap {
    position: relative;
    display: block;
}

.mgw-rec-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.mgw-rec-badge-2 {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #195C63;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 14px;
    border-radius: 50px;
    z-index: 3;
}

.mgw-rec-close-2 {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.mgw-rec-close-2:hover {
    background: rgba(0,0,0,0.6);
    transform: rotate(90deg);
}

.mgw-rec-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    text-align: left;
    z-index: 2;
}

.mgw-rec-modal-title-2 {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mgw-rec-title-2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.mgw-rec-footer-2 {
    padding: 16px;
    text-align: center;
}

.mgw-rec-dismiss-2 {
    width: 100%;
    max-width: 280px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mgw-rec-dismiss-2:hover {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}

@media (max-width: 640px) {
    .mgw-rec-overlay {
        padding: 16px;
        align-items: center;
    }
    .mgw-rec-modal {
        padding: 24px 20px 18px;
        max-width: 340px;
    }
    .mgw-rec-thumb-wrap {
        max-width: 150px;
    }
    .mgw-rec-title {
        font-size: 18px;
    }
    .mgw-rec-modal-title {
        font-size: 15px;
    }
    .mgw-rec-close {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    .mgw-rec-card {
        max-width: 320px;
    }
    .mgw-rec-title-2 {
        font-size: 18px;
    }
    .mgw-rec-modal-title-2 {
        font-size: 12px;
    }
}