.content {
    width: 100%;
    margin-top: 20px;
}

.content-header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.templates {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* odstęp między kartami */
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop - 4 karty w rzędzie */
@media screen and (min-width: 993px) {
    .template-card {
        flex: 0 0 calc((100% - 3*20px)/4); /* 4 karty + 3x gap */
        box-sizing: border-box;
    }
}

/* Tablet - 2 karty w rzędzie */
@media screen and (max-width: 992px) and (min-width: 577px) {
    .template-card {
        flex: 0 0 calc((100% - 20px)/2); /* 2 karty + 1x gap */
        box-sizing: border-box;
    }
}

/* Mobile - 1 karta w rzędzie */
@media screen and (max-width: 576px) {
    .template-card {
        flex: 0 0 100%;
        box-sizing: border-box;
    }
}

/* Stała wysokość obrazka */
.template-preview {
    width: 100%;
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--light);
}

@media screen and (max-width: 992px) {
    .template-preview {
        height: 220px;
    }
}

@media screen and (max-width: 576px) {
    .template-preview {
        height: 180px;
    }
}

/* Karty */
.template-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    background-color: var(--dark);
    border: 1px solid var(--light);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.template-card:hover {
    border-color: var(--yellow);
    transform: translateY(-3px);
}

.template-info {
    padding: 8px 12px;
    width: 100%;
}

.template-name {
    font-family: 'HelveticaNeue', sans-serif;
    font-size: 0.95rem;
    color: var(--light);
    text-transform: capitalize;
    margin-bottom: 4px;
}

.template-ratio {
    font-family: 'HelveticaNeue', sans-serif;
    font-size: 0.8rem;
    color: var(--yellow);
    text-transform: uppercase;
}
