/*Search */
.ehrenamt-search {
    width: 100%;

    .row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;

        input, select {
            border: 1px solid black;
            border-radius: 10px;
            background-color: var(--color-white);
        }

        label {
            color: var(--color-primary);
            font-weight: bold;
        }
    }

    button[type=submit] {
        padding: 0.6em 1.2em;
        margin-top: 20px;
        background-color: var(--color-primary);
        color: var(--color-white);
        font-weight: bold;
        border-radius: 10px;
        transition: background-color 0.3s ease-in-out;
    }

    button[type=submit]:hover {
        background-color: var(--color-primary-d-1);
    }

    @media only screen and (max-width: 768px) {
        .row {
            grid-template-columns: 1fr;
        }
    }
}


/*OfferListe*/
.offerList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
    row-gap: 80px;
}

.offer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 10px;
    text-decoration: none;
    color: inherit;

    .offerContent {
        padding: 0 5%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100%;
        text-wrap: pretty;
        line-height: 1.7;
    }

    img {
        aspect-ratio: 16/9;
        object-fit: cover;
        border-radius: 30px;
    }

    h3 {
        color: var(--color-primary);
        font-size: var(--text-m);
        margin-bottom: auto;
    }

    .icon {
        display: flex;
        justify-content: end;
    }

    .icon svg {
        width: 40px;
        height: 40px;
        fill: var(--color-primary);
    }
}

.offer:hover {
    cursor: pointer;
}

.offer:hover .icon svg {
    transform: translateX(5px);
    transition: transform 0.2s ease-in-out;
}

@media only screen and (max-width: 1030px) {
    .offerList {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 478px) {
    .offerList {
        grid-template-columns: 1fr;
    }
}


/* Pagination */
.offerPaginationWrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.offerPagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.paginationInfo {
    color: var(--color-primary);
    font-size: var(--text-m);
    font-weight: bold;
}

.paginationLinks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.paginationLinks a,
.paginationLinks span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.paginationLinks a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.paginationLinks .pageCurrent {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.paginationLinks .pagePrev,
.paginationLinks .pageNext {
    padding: 0 15px;
}


/* Single Offer */
.single-offer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.single-offer-header-img img {
    height: 50vh;
    width: 100%;
    object-fit: cover;
}

.single-offer-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.single-offer-card {
    display: flex;
    flex-direction: row;
    background-color: #fff;
    border-radius: 85px;
    overflow: hidden;
    margin-top: -150px;
}

.single-offer-card>* {
    width: 50%;
}

.offer-title-wrapper {
    padding: 50px;
    display: flex;
    align-items: center;
}

.offer-title {
    color: var(--color-primary);
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
	hyphens: auto;
}

.offer-avatar {
    width: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16/9;
}

.offer-description {
    line-height: 1.8;
    color: var(--color-black);
    text-wrap: pretty;
}

.offer-meta {
    display: grid;
    gap: 30px;
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.offer-meta-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 8px;
    align-items: start;
}

.offer-meta-item h3 {
    color: var(--color-primary);
    font-size: var(--text-m);
    margin: 0;
    font-weight: 600;
    line-height: 1.7;
}

.offer-meta-value {
    margin: 0;
    color: var(--color-black);
    line-height: 1.6;
}

.offer-meta-value h4 {
    line-height: unset;
}

.offer-meta-value h4:not(:first-child) {
    margin-top: 10px;
}

.offer-meta-value a {
    text-decoration: underline;
    transition: color 0.3s ease-in-out;
}

.offer-meta-value a:hover {
    color: var(--color-primary);
}

.single-offer-back {
    margin-top: 20px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 0.4em 1em;
    border-radius: 10px;
    background-color: var(--color-primary);
    color: #fff;
}

.single-offer-back svg {
    width: var(--text-l);
    height: var(--text-l);
    fill: #fff;
}

/* Responsive Design for Single Offer */
@media only screen and (max-width: 768px) {
    .single-offer {
        padding: 15px;
    }
    
    .offer-title {
        font-size: 1.5rem;
    }
    
    .offer-avatar {
        max-height: 200px;
    }
    
    .offer-meta {
        padding: 15px;
    }
    
    .offer-meta-item {
        grid-template-columns: 1fr;
    }

    .single-offer-card {
        flex-direction: column-reverse;
    }

    .single-offer-card>* {
        width: 100%;
    }

    .single-offer-card .offer-title-wrapper {
        padding: 20px;
    }
}