.five-cards {
    width: 100%;
    padding: 80px 0;
    margin: 0;
    position: relative;
    margin-top: -80px;
}

.five-cards__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.five-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.five-cards__grid .five-cards__card:nth-child(4),
.five-cards__grid .five-cards__card:nth-child(5) {
    grid-column: span 1;
}

/* If there are only 4 or 5 cards, layout them properly */
.five-cards__grid .five-cards__card:nth-child(4):nth-last-child(2) {
    grid-column: 1 / 2;
}

.five-cards__grid .five-cards__card:nth-child(5):last-child {
    grid-column: 2 / 3;
}

.five-cards__card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.five-cards__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.five-cards__icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.five-cards__icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.five-cards__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.five-cards__title {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #162E44;
    margin: 0;
}

.five-cards__text {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #162E44;
    margin: 0;
}

/* Tablet */
@media (max-width: 1024px) {
    .five-cards {
        padding: 60px 0;
    }
    
    .five-cards__container {
        padding: 0 32px;
    }
    
    .five-cards__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Reset grid spans for tablet */
    .five-cards__grid .five-cards__card:nth-child(4),
    .five-cards__grid .five-cards__card:nth-child(5) {
        grid-column: span 1;
    }
    
    .five-cards__grid .five-cards__card:nth-child(4):nth-last-child(2) {
        grid-column: auto;
    }
    
    .five-cards__grid .five-cards__card:nth-child(5):last-child {
        grid-column: auto;
    }
    
    .five-cards__card {
        padding: 28px;
        gap: 20px;
    }
    
    .five-cards__icon {
        width: 56px;
        height: 56px;
    }
    
    .five-cards__title {
        font-size: 18px;
    }
    
    .five-cards__text {
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .five-cards {
        padding: 48px 0;
    }
    
    .five-cards__container {
        padding: 0 20px;
    }
    
    .five-cards__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .five-cards__card {
        padding: 24px;
        gap: 16px;
    }
    
    .five-cards__icon {
        width: 48px;
        height: 48px;
    }
    
    .five-cards__title {
        font-size: 17px;
    }
    
    .five-cards__text {
        font-size: 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .five-cards {
        padding: 40px 0;
    }
    
    .five-cards__container {
        padding: 0 16px;
    }
    
    .five-cards__card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .five-cards__icon {
        width: 56px;
        height: 56px;
    }
    
    .five-cards__title {
        font-size: 16px;
    }
    
    .five-cards__text {
        font-size: 14px;
    }
}

/* Full width alignment */
.alignfull.five-cards {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide.five-cards .five-cards__container {
    max-width: 1280px;
}

/* Gutenberg editor preview styles */
.is-root-container .five-cards {
    margin: 20px 0;
}

.acf-block-placeholder {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #666;
}

.acf-block-placeholder-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

