
.pcec-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    --hover: 3;
    gap: 12px;
}

.pcec-row {
    display: flex;
    width: 100%;
    gap: 12px;
    margin-bottom: 12px;
}

.pcec-row:last-child {
    margin-bottom: 0;
}

.pcec-wrapper.horizontal .pcec-row {
    flex-wrap: nowrap;
}

.pcec-wrapper.horizontal .pcec-card {
    flex: 1;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0; /* Ensures cards can shrink below their content size */
}

.pcec-wrapper.horizontal .pcec-card:hover {
    flex: var(--hover);
}

.pcec-wrapper.vertical {
    flex-direction: column;
}

.pcec-wrapper.vertical .pcec-row {
    flex-direction: column;
}

.pcec-wrapper.masonry {
    column-count: 3;
    column-gap: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .pcec-wrapper[data-cards-per-row="4"] .pcec-row,
    .pcec-wrapper[data-cards-per-row="5"] .pcec-row,
    .pcec-wrapper[data-cards-per-row="6"] .pcec-row {
        flex-wrap: wrap;
    }
    
    .pcec-wrapper[data-cards-per-row="4"] .pcec-card,
    .pcec-wrapper[data-cards-per-row="5"] .pcec-card,
    .pcec-wrapper[data-cards-per-row="6"] .pcec-card {
        flex: 1 0 calc(33.333% - 9px);
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .pcec-wrapper {
        flex-direction: column;
    }
    
    .pcec-row {
        flex-direction: column;
    }
    
    .pcec-card {
        height: 50vh !important;
        text-align: center !important;
    }
    
    .pcec-wrapper[data-cards-per-row] .pcec-card {
        flex: 1 0 100% !important;
    }
}

.pcec-card {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    break-inside: avoid;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pcec-overlay {
    position: relative;
    width: 100%;
    padding: 30px;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.pcec-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 35px;
    line-height: 1.2;
    font-family: 'Glitten';
    font-weight: 400;
    text-transform: uppercase;
}

.pcec-button {
    display: inline-block;
    padding: 8px 40px;
    background: transparent;
    color: #fff6e9;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 0px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #c7a86d;
    font-size: 12px;
    font-family: 'Montserrat';
    
}

.pcec-card:hover .pcec-button {
    background: linear-gradient(90deg,rgba(199, 168, 109, 1) 1%, rgba(191, 160, 102, 1) 24%, rgba(227, 196, 136, 1) 42%, rgba(227, 196, 136, 1) 62%, rgba(164, 133, 76, 1) 83%, rgba(199, 168, 109, 1) 100%);
    color: #643e6c;
}

[dir="rtl"] .pcec-overlay {
    text-align:right;
}

/* Mobile styles are now included in the main responsive section */
