/**
 * Gremaza WPB Addons - Masonry Show Styles
 * Author: Marsel Preci
 */

/* ============================================
   Masonry Show Styles
   ============================================ */

.gremaza-masonry-show {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 350px 200px 350px;
    gap: 20px;
    margin: 0 0 30px 0;
    padding: 0;
}

.gremaza-masonry-item {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Grid positioning for each item */
/* Item 1: 50% width (cols 1-2), 550px height (rows 1-2) = 350 + 200 */
.gremaza-masonry-item-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

/* Item 2: 25% width (col 3), 550px height (rows 1-2) = 350 + 200 */
.gremaza-masonry-item-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}

/* Item 3: 25% width (col 4), 350px height (row 1 only) */
.gremaza-masonry-item-3 {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

/* Item 4: 25% width (col 1), 350px height (row 3) */
.gremaza-masonry-item-4 {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
}

/* Item 5: 25% width (col 2), 350px height (row 3) */
.gremaza-masonry-item-5 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

/* Item 6: 25% width (col 3), 350px height (row 3) */
.gremaza-masonry-item-6 {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
}

/* Item 7: 25% width (col 4), 550px height (rows 2-3) = 200 + 350 */
.gremaza-masonry-item-7 {
    grid-column: 4 / 5;
    grid-row: 2 / 4;
}

.gremaza-masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gremaza-masonry-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.gremaza-masonry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    transition: background 0.3s ease;
}

.gremaza-masonry-item:hover .gremaza-masonry-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.gremaza-masonry-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
}

.gremaza-masonry-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Masonry Responsive Styles */
@media (max-width: 1024px) {
    .gremaza-masonry-show {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .gremaza-masonry-item-1,
    .gremaza-masonry-item-2,
    .gremaza-masonry-item-3,
    .gremaza-masonry-item-4,
    .gremaza-masonry-item-5,
    .gremaza-masonry-item-6,
    .gremaza-masonry-item-7 {
        grid-column: auto !important;
        grid-row: auto !important;
        height: 400px !important;
    }

    .gremaza-masonry-title {
        font-size: 20px;
    }

    .gremaza-masonry-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .gremaza-masonry-show {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
    }

    .gremaza-masonry-item {
        height: 350px !important;
        border-radius: 15px;
    }

    .gremaza-masonry-title {
        font-size: 18px;
    }

    .gremaza-masonry-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gremaza-masonry-show {
        gap: 10px;
    }

    .gremaza-masonry-item {
        height: 280px !important;
        border-radius: 12px;
    }

    .gremaza-masonry-title {
        font-size: 16px;
    }

    .gremaza-masonry-content {
        padding: 15px;
    }
}
