/* =============================================
   Ms Mean - Tag Posts v2.4
   ============================================= */

/* --- Tag Buttons (for post pages) --- */
.mtp-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.mtp-tag-link {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mtp-buttons .mtp-tag-link {
    background: #f3f0ff;
    color: #6b46c1;
    border: 1px solid #e2d9f3;
}

.mtp-buttons .mtp-tag-link:hover {
    background: #6b46c1;
    color: #fff;
    border-color: #6b46c1;
}

.mtp-pills .mtp-tag-link {
    background: transparent;
    color: #555;
    border: 1px solid #ddd;
}

.mtp-pills .mtp-tag-link:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}


/* --- Page Layout --- */
.mtp-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px 40px;
}


/* --- Page Title --- */
.mtp-page-header {
    text-align: center;
    padding: 30px 20px 40px;
}

.mtp-page-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0;
}


/* --- Posts Grid --- */
.mtp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- Card --- */
.mtp-card {
    display: block;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.mtp-card:hover {
    transform: translateY(-4px);
}

/* --- Square thumbnail using background-image --- */
.mtp-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #e8e0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s ease;
}

@supports not (aspect-ratio: 1 / 1) {
    .mtp-card-image {
        padding-bottom: 100%;
        height: 0;
    }
}

.mtp-card:hover .mtp-card-image {
    transform: scale(1.03);
}

.mtp-card-image img {
    display: none !important;
}

/* --- Card Title --- */
.mtp-card-title {
    padding: 12px 4px;
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.mtp-card:hover .mtp-card-title {
    color: #6b46c1;
}

.mtp-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mtp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mtp-page-title {
        font-size: 26px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .mtp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
