/**
 * Modern Post Grid Widget Styles
 * 20 Unique Grid Styles with extensive customization options
 */

/* Base Styles and CSS Variables */
.mpgw-container {
    --mpgw-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mpgw-title-color: #1a1a1a;
    --mpgw-text-color: #666666;
    --mpgw-accent-color: #2563eb;
    --mpgw-background-color: #ffffff;
    --mpgw-border-color: #e5e5e5;
    --mpgw-hover-color: #1e40af;
    --mpgw-gap-size: 24px;
    --mpgw-border-radius: 8px;
    --mpgw-columns-desktop: 3;
    --mpgw-columns-tablet: 2;
    --mpgw-columns-mobile: 1;

    font-family: var(--mpgw-font-family);
    color: var(--mpgw-text-color);
    background: var(--mpgw-background-color);
    margin: 0;
    padding: 0;
}

/* Grid Container */
.mpgw-grid {
    display: grid;
    gap: var(--mpgw-gap-size);
    grid-template-columns: repeat(var(--mpgw-columns-mobile), 1fr);
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .mpgw-grid {
        grid-template-columns: repeat(var(--mpgw-columns-tablet), 1fr);
    }
}

@media (min-width: 1024px) {
    .mpgw-grid {
        grid-template-columns: repeat(var(--mpgw-columns-desktop), 1fr);
    }
}

/* Base Post Item Styles */
.mpgw-post-item {
    position: relative;
    background: var(--mpgw-background-color);
    border-radius: var(--mpgw-border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.mpgw-post-thumbnail {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.mpgw-post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mpgw-post-content {
    padding: 20px;
}

.mpgw-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px 0;
}

.mpgw-post-title a {
    color: var(--mpgw-title-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mpgw-post-title a:hover {
    color: var(--mpgw-hover-color);
}

.mpgw-post-category {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mpgw-accent-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mpgw-post-category a {
    color: var(--mpgw-accent-color);
    text-decoration: none;
}

.mpgw-post-meta {
    font-size: 0.875rem;
    color: var(--mpgw-text-color);
    margin-bottom: 12px;
    opacity: 0.8;
}

.mpgw-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.mpgw-post-read-more {
    margin-top: auto;
}

.mpgw-read-more-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mpgw-accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mpgw-read-more-link:hover {
    color: var(--mpgw-hover-color);
    transform: translateX(4px);
}

.mpgw-read-more-link::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.mpgw-read-more-link:hover::after {
    transform: translateX(4px);
}

/* View All Link */
.mpgw-view-all-container {
    text-align: center;
    margin-top: 40px;
}

.mpgw-view-all-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--mpgw-accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--mpgw-border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.mpgw-view-all-link:hover {
    background: var(--mpgw-hover-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.mpgw-view-all-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.mpgw-view-all-link:hover::after {
    transform: translateX(4px);
}

/* Grid Style 1: Classic Grid */
.mpgw-style-1 .mpgw-post-item {
    border: 1px solid var(--mpgw-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mpgw-style-1 .mpgw-post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Grid Style 2: Minimal Grid */
.mpgw-style-2 .mpgw-post-item {
    background: transparent;
    border: none;
    box-shadow: none;
}

.mpgw-style-2 .mpgw-post-content {
    padding: 16px 0;
}

.mpgw-style-2 .mpgw-post-title {
    font-size: 1.1rem;
    font-weight: 400;
}

.mpgw-style-2 .mpgw-post-thumbnail {
    border-radius: 4px;
    overflow: hidden;
}

/* Grid Style 3: Card Grid */
.mpgw-style-3 .mpgw-post-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.mpgw-style-3 .mpgw-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.mpgw-style-3 .mpgw-post-thumbnail {
    border-radius: 16px 16px 0 0;
}

/* Grid Style 4: Magazine Grid */
.mpgw-style-4 .mpgw-post-item:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.mpgw-style-4 .mpgw-post-item:first-child .mpgw-post-thumbnail {
    height: 300px;
}

.mpgw-style-4 .mpgw-post-item:first-child .mpgw-post-title {
    font-size: 2rem;
}

.mpgw-style-4 .mpgw-post-item {
    border: 1px solid var(--mpgw-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Grid Style 5: Masonry Grid */
.mpgw-style-5 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mpgw-style-5 .mpgw-post-item {
    break-inside: avoid;
    margin-bottom: var(--mpgw-gap-size);
    border: 1px solid var(--mpgw-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mpgw-style-5 .mpgw-post-item:nth-child(3n+1) {
    grid-row: span 2;
}

/* Grid Style 6: Overlay Grid */
.mpgw-style-6 .mpgw-post-item {
    position: relative;
    min-height: 300px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mpgw-style-6 .mpgw-post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mpgw-style-6 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.mpgw-style-6 .mpgw-post-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.mpgw-style-6 .mpgw-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    color: white;
    background: transparent;
}

.mpgw-style-6 .mpgw-post-title a,
.mpgw-style-6 .mpgw-post-category,
.mpgw-style-6 .mpgw-post-meta {
    color: white;
}

/* Grid Style 7: Bento Grid */
.mpgw-style-7 {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
}

.mpgw-style-7 .mpgw-post-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.mpgw-style-7 .mpgw-post-item:nth-child(4) {
    grid-column: span 2;
    grid-row: span 1;
}

.mpgw-style-7 .mpgw-post-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mpgw-style-7 .mpgw-post-thumbnail {
    height: 100%;
}

.mpgw-style-7 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.mpgw-style-7 .mpgw-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

/* Grid Style 8: Broken Grid */
.mpgw-style-8 {
    grid-template-columns: repeat(3, 1fr);
    position: relative;
}

.mpgw-style-8 .mpgw-post-item:nth-child(odd) {
    transform: translateY(20px);
}

.mpgw-style-8 .mpgw-post-item:nth-child(even) {
    transform: translateY(-20px);
}

.mpgw-style-8 .mpgw-post-item:hover {
    transform: translateY(0);
}

.mpgw-style-8 .mpgw-post-item {
    border: 2px solid var(--mpgw-accent-color);
    background: white;
    transition: transform 0.4s ease;
}

/* Grid Style 9: Timeline Grid */
.mpgw-style-9 {
    grid-template-columns: 1fr;
    position: relative;
}

.mpgw-style-9::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--mpgw-accent-color);
    z-index: 1;
}

.mpgw-style-9 .mpgw-post-item {
    position: relative;
    padding-left: 80px;
    border: none;
    background: transparent;
}

.mpgw-style-9 .mpgw-post-item::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 30px;
    width: 16px;
    height: 16px;
    background: var(--mpgw-accent-color);
    border-radius: 50%;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--mpgw-accent-color);
}

.mpgw-style-9 .mpgw-post-content {
    background: white;
    border-radius: var(--mpgw-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.mpgw-style-9 .mpgw-post-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 30px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

/* Grid Style 10: Horizontal Grid */
.mpgw-style-10 {
    grid-template-columns: 1fr;
    gap: 32px;
}

.mpgw-style-10 .mpgw-post-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
    border: 1px solid var(--mpgw-border-color);
    border-radius: 12px;
    overflow: hidden;
}

.mpgw-style-10 .mpgw-post-thumbnail {
    height: 200px;
}

.mpgw-style-10 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.mpgw-style-10 .mpgw-post-content {
    padding: 24px;
}

/* Grid Style 11: Metro Grid */
.mpgw-style-11 {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
}

.mpgw-style-11 .mpgw-post-item:nth-child(6n+1),
.mpgw-style-11 .mpgw-post-item:nth-child(6n+4) {
    grid-column: span 2;
    grid-row: span 2;
}

.mpgw-style-11 .mpgw-post-item {
    position: relative;
    border: none;
    overflow: hidden;
}

.mpgw-style-11 .mpgw-post-thumbnail {
    height: 100%;
}

.mpgw-style-11 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mpgw-style-11 .mpgw-post-item:hover .mpgw-post-thumbnail img {
    transform: scale(1.1);
}

.mpgw-style-11 .mpgw-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.mpgw-style-11 .mpgw-post-title a,
.mpgw-style-11 .mpgw-post-category {
    color: white;
}

/* Grid Style 12: Photography Grid */
.mpgw-style-12 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.mpgw-style-12 .mpgw-post-item {
    position: relative;
    border: none;
    background: transparent;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.mpgw-style-12 .mpgw-post-thumbnail {
    height: 100%;
}

.mpgw-style-12 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.mpgw-style-12 .mpgw-post-item:hover .mpgw-post-thumbnail img {
    filter: grayscale(0%);
}

.mpgw-style-12 .mpgw-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mpgw-style-12 .mpgw-post-item:hover .mpgw-post-content {
    transform: translateY(0);
}

.mpgw-style-12 .mpgw-post-title a,
.mpgw-style-12 .mpgw-post-category {
    color: white;
}

/* Grid Style 13: Editorial Grid */
.mpgw-style-13 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.mpgw-style-13 .mpgw-post-item:first-child {
    grid-row: span 2;
}

.mpgw-style-13 .mpgw-post-item {
    border: none;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.mpgw-style-13 .mpgw-post-item:first-child .mpgw-post-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.mpgw-style-13 .mpgw-post-item:not(:first-child) .mpgw-post-thumbnail {
    height: 120px;
}

.mpgw-style-13 .mpgw-post-item:not(:first-child) .mpgw-post-content {
    padding: 16px;
}

/* Grid Style 14: Portfolio Grid */
.mpgw-style-14 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mpgw-style-14 .mpgw-post-item {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.mpgw-style-14 .mpgw-post-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.mpgw-style-14 .mpgw-post-thumbnail {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.mpgw-style-14 .mpgw-post-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--mpgw-accent-color), var(--mpgw-hover-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.mpgw-style-14 .mpgw-post-item:hover .mpgw-post-thumbnail::before {
    opacity: 0.8;
}

.mpgw-style-14 .mpgw-post-content {
    padding: 24px;
}

/* Grid Style 15: News Grid */
.mpgw-style-15 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.mpgw-style-15 .mpgw-post-item {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.mpgw-style-15 .mpgw-post-thumbnail {
    height: 160px;
    flex-shrink: 0;
}

.mpgw-style-15 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.mpgw-style-15 .mpgw-post-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mpgw-style-15 .mpgw-post-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.mpgw-style-15 .mpgw-post-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Grid Style 16: Creative Grid */
.mpgw-style-16 {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mpgw-style-16 .mpgw-post-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.mpgw-style-16 .mpgw-post-item:nth-child(even) {
    transform: rotate(2deg);
}

.mpgw-style-16 .mpgw-post-item:hover {
    transform: rotate(0deg) scale(1.05);
}

.mpgw-style-16 .mpgw-post-item {
    background: white;
    border: 3px solid var(--mpgw-accent-color);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.mpgw-style-16 .mpgw-post-thumbnail {
    border-radius: 12px 12px 0 0;
}

/* Grid Style 17: Elegant Grid */
.mpgw-style-17 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.mpgw-style-17 .mpgw-post-item {
    background: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mpgw-style-17 .mpgw-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.mpgw-style-17 .mpgw-post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.mpgw-style-17 .mpgw-post-content {
    padding: 24px;
}

/* Grid Style 18: Modern Grid */
.mpgw-style-18 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.mpgw-style-18 .mpgw-post-item {
    background: #fafbfc;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mpgw-style-18 .mpgw-post-item:hover {
    background: white;
    border-color: var(--mpgw-accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mpgw-style-18 .mpgw-post-thumbnail {
    height: 180px;
}

.mpgw-style-18 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

/* Grid Style 19: Dynamic Grid */
.mpgw-style-19 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mpgw-style-19 .mpgw-post-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.mpgw-style-19 .mpgw-post-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mpgw-style-19 .mpgw-post-thumbnail {
    height: 150px;
}

.mpgw-style-19 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mpgw-style-19 .mpgw-post-item:hover .mpgw-post-thumbnail img {
    transform: scale(1.1);
}

/* Grid Style 20: Artistic Grid */
.mpgw-style-20 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mpgw-style-20 .mpgw-post-item {
    position: relative;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    color: white;
    transition: all 0.4s ease;
}

.mpgw-style-20 .mpgw-post-item:nth-child(2n) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.mpgw-style-20 .mpgw-post-item:nth-child(3n) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.mpgw-style-20 .mpgw-post-item:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.mpgw-style-20 .mpgw-post-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px;
    border-radius: 12px;
    color: white;
}

.mpgw-style-20 .mpgw-post-title a,
.mpgw-style-20 .mpgw-post-category,
.mpgw-style-20 .mpgw-post-meta {
    color: white;
}

.mpgw-style-20 .mpgw-read-more-link {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.mpgw-style-20 .mpgw-read-more-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Grid Style 21: Glassmorphism Grid */
.mpgw-style-21 .mpgw-post-item {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.mpgw-style-21 .mpgw-post-content {
    background: transparent;
}

/* Grid Style 22: Neomorphism Grid */
.mpgw-style-22 {
    background-color: #e0e5ec;
    padding: 20px;
    border-radius: 20px;
}

.mpgw-style-22 .mpgw-post-item {
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: 9px 9px 16px rgb(163, 177, 198, 0.6), -9px -9px 16px rgba(255, 255, 255, 0.5);
    border: none;
}

.mpgw-style-22 .mpgw-post-thumbnail {
    border-radius: 16px;
    margin: 15px;
    box-shadow: inset 6px 6px 10px 0 rgba(163, 177, 198, 0.7), inset -6px -6px 10px 0 rgba(255, 255, 255, 0.8);
}

/* Grid Style 23: Brutalist Grid */
.mpgw-style-23 .mpgw-post-item {
    border: 4px solid #000;
    border-radius: 0;
    box-shadow: 8px 8px 0 #000;
    background: #fff;
    transition: all 0.2s ease;
}

.mpgw-style-23 .mpgw-post-item:hover {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 #000;
}

.mpgw-style-23 .mpgw-post-title {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -1px;
}

/* Grid Style 24: Isometric Grid */
.mpgw-style-24 {
    perspective: 1000px;
    padding: 40px;
}

.mpgw-style-24 .mpgw-post-item {
    transform: rotateX(10deg) rotateY(-10deg) rotateZ(0deg);
    transition: transform 0.4s ease;
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.2);
    background: #fff;
    border-radius: 12px;
}

.mpgw-style-24 .mpgw-post-item:hover {
    transform: rotateX(0) rotateY(0) rotateZ(0) scale(1.05);
    z-index: 10;
}

/* Grid Style 25: Polaroid Grid */
.mpgw-style-25 .mpgw-post-item {
    background: #fff;
    padding: 15px 15px 40px 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.mpgw-style-25 .mpgw-post-item:nth-child(even) {
    transform: rotate(2deg);
}

.mpgw-style-25 .mpgw-post-item:hover {
    transform: rotate(0) scale(1.05);
    z-index: 5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.mpgw-style-25 .mpgw-post-thumbnail {
    border: 1px solid #eee;
    margin-bottom: 15px;
    aspect-ratio: 1/1;
}

.mpgw-style-25 .mpgw-post-content {
    padding: 0;
    text-align: center;
}

.mpgw-style-25 .mpgw-post-title {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5rem;
    color: #333;
}

/* Grid Style 26: Hexagon Grid */
.mpgw-style-26 .mpgw-post-item {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #fff;
    transition: transform 0.3s;
    margin-bottom: -20px;
    /* Overlap slightly */
}

.mpgw-style-26 .mpgw-post-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.mpgw-style-26 .mpgw-post-content {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.9);
}

/* Grid Style 27: Parallax Grid */
.mpgw-style-27 .mpgw-post-item {
    overflow: hidden;
    border-radius: 8px;
}

.mpgw-style-27 .mpgw-post-thumbnail img {
    transform: scale(1.2);
    transition: transform 0.5s ease-out;
}

.mpgw-style-27 .mpgw-post-item:hover .mpgw-post-thumbnail img {
    transform: scale(1.0) translateY(10px);
}

.mpgw-style-27 .mpgw-post-content {
    position: relative;
    z-index: 2;
    background: #fff;
    margin: -40px 20px 20px 20px;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Grid Style 28: Glitch Grid */
.mpgw-style-28 .mpgw-post-item {
    position: relative;
    background: #111;
    color: #fff;
    border: 1px solid #333;
}

.mpgw-style-28 .mpgw-post-item:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

.mpgw-style-28 .mpgw-post-title a {
    color: #0ff;
    text-shadow: 2px 2px #f0f;
}

/* Grid Style 29: Typographic Grid */
.mpgw-style-29 .mpgw-post-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.mpgw-style-29 .mpgw-post-thumbnail {
    display: none;
    /* Hide standard thumbnail, use as BG via JS or just overlay */
}

/* Since we can't easily set BG image from CSS without inline styles, we'll style the overlay heavily */
.mpgw-style-29 .mpgw-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.mpgw-style-29 .mpgw-post-content {
    position: relative;
    z-index: 2;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    margin: 20px;
}

.mpgw-style-29 .mpgw-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.mpgw-style-29 .mpgw-post-title a {
    color: #fff;
}

/* Grid Style 30: Split Screen Grid */
.mpgw-style-30 {
    grid-template-columns: 1fr;
    gap: 0;
}

.mpgw-style-30 .mpgw-post-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
    border-radius: 0;
}

.mpgw-style-30 .mpgw-post-item:nth-child(even) {
    direction: rtl;
    /* Swap image and text */
}

.mpgw-style-30 .mpgw-post-item:nth-child(even) .mpgw-post-content {
    direction: ltr;
    /* Reset text direction */
}

.mpgw-style-30 .mpgw-post-thumbnail {
    height: 100%;
}

.mpgw-style-30 .mpgw-post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.mpgw-style-30 .mpgw-post-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: #fff;
}

/* Grid Style 31: Floating Card Grid */
.mpgw-style-31 .mpgw-post-item {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.mpgw-style-31 .mpgw-post-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.mpgw-style-31 .mpgw-post-thumbnail {
    border-radius: 24px;
    margin: 10px;
    overflow: hidden;
}

/* Grid Style 32: Neon Grid */
.mpgw-style-32 {
    background: #050505;
    padding: 20px;
}

.mpgw-style-32 .mpgw-post-item {
    background: #111;
    border: 1px solid #333;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.2);
    transition: all 0.3s;
}

.mpgw-style-32 .mpgw-post-item:hover {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6), inset 0 0 10px rgba(0, 255, 255, 0.4);
    border-color: #0ff;
}

.mpgw-style-32 .mpgw-post-title a {
    color: #fff;
}

.mpgw-style-32 .mpgw-post-item:hover .mpgw-post-title a {
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Grid Style 33: Retro Grid */
.mpgw-style-33 .mpgw-post-item {
    background: #f4e4bc;
    border: 1px solid #d4c49c;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.mpgw-style-33 .mpgw-post-thumbnail img {
    filter: sepia(0.8) contrast(1.2);
    transition: filter 0.3s;
}

.mpgw-style-33 .mpgw-post-item:hover .mpgw-post-thumbnail img {
    filter: sepia(0) contrast(1);
}

.mpgw-style-33 .mpgw-post-title {
    font-family: 'Georgia', serif;
    color: #4a3b2a;
}

/* Grid Style 34: Minimalist Line Grid */
.mpgw-style-34 .mpgw-post-item {
    border-top: 1px solid #000;
    border-radius: 0;
    background: transparent;
    padding-top: 20px;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    align-items: start;
}

.mpgw-style-34 .mpgw-post-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.mpgw-style-34 .mpgw-post-content {
    padding: 0;
}

.mpgw-style-34 .mpgw-post-title {
    font-size: 1.5rem;
    font-weight: 300;
}

/* Grid Style 35: Overlap Grid */
.mpgw-style-35 .mpgw-post-item {
    position: relative;
    padding-bottom: 40px;
}

.mpgw-style-35 .mpgw-post-thumbnail {
    width: 90%;
    border-radius: 8px;
}

.mpgw-style-35 .mpgw-post-content {
    width: 90%;
    margin-left: auto;
    margin-top: -60px;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mpgw-style-4 .mpgw-post-item:first-child {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .mpgw-style-6 .mpgw-post-item {
        min-height: 250px;
    }

    .mpgw-style-7 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mpgw-style-10 .mpgw-post-item {
        grid-template-columns: 1fr;
    }

    .mpgw-style-11 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mpgw-style-13 {
        grid-template-columns: 1fr;
    }

    .mpgw-style-16 {
        grid-template-columns: 1fr;
    }

    .mpgw-style-30 .mpgw-post-item {
        grid-template-columns: 1fr;
    }

    .mpgw-style-30 .mpgw-post-item:nth-child(even) {
        direction: ltr;
    }

    .mpgw-style-34 .mpgw-post-item {
        grid-template-columns: 1fr;
    }

    .mpgw-style-34 .mpgw-post-thumbnail {
        width: 100%;
        height: 200px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .mpgw-style-7 {
        grid-template-columns: 1fr;
    }

    .mpgw-style-11 {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
@keyframes mpgwFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mpgw-post-item {
    animation: mpgwFadeInUp 0.6s ease forwards;
}

.mpgw-post-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mpgw-post-item:nth-child(2) {
    animation-delay: 0.2s;
}

.mpgw-post-item:nth-child(3) {
    animation-delay: 0.3s;
}

.mpgw-post-item:nth-child(4) {
    animation-delay: 0.4s;
}

.mpgw-post-item:nth-child(5) {
    animation-delay: 0.5s;
}

.mpgw-post-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mpgw-post-item {
        animation: none;
        transition: none;
    }

    .mpgw-post-item:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mpgw-post-item {
        border: 2px solid;
    }

    .mpgw-post-title a {
        text-decoration: underline;
    }
}