/* =========================================================
   TK Related Category Pages
   Image Accordion
   ========================================================= */

.tk-related-category-pages {
    width: 100%;
}


/* Heading */

.tk-rcp-heading {
    margin: 0 0 30px;
}


/* =========================================================
   Grid
   ========================================================= */

.tk-rcp-grid {
    display: grid;

    grid-template-columns:
        repeat(
            var(--tk-rcp-columns),
            minmax(0, 1fr)
        );

    gap: 20px;

    width: 100%;
}


/* =========================================================
   Accordion Item
   ========================================================= */

.tk-rcp-item {
    position: relative;

    display: block;

    height: 320px;

    overflow: hidden;

    background-color: #555;

    background-position: center;

    background-repeat: no-repeat;

    background-size: cover;

    text-decoration: none;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}


/* =========================================================
   Hover
   ========================================================= */

.tk-rcp-item:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.20);
}


/* =========================================================
   Overlay
   ========================================================= */

.tk-rcp-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: flex-end;

    padding: 25px;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.70),
            rgba(0, 0, 0, 0.05) 75%
        );

    transition:
        background 0.35s ease;
}


/* Hover overlay */

.tk-rcp-item:hover
.tk-rcp-overlay {
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.82),
            rgba(0, 0, 0, 0.15) 80%
        );
}


/* =========================================================
   Content wrapper
   ========================================================= */

.tk-rcp-content-wrap {
    width: 100%;

    transform:
        translateY(15px);

    transition:
        transform 0.35s ease;
}


/* Move content up on hover */

.tk-rcp-item:hover
.tk-rcp-content-wrap {
    transform:
        translateY(0);
}


/* =========================================================
   Title
   ========================================================= */

.tk-rcp-title {
    margin: 0 0 10px;

    padding: 0;

    font-size: 25px;

    line-height: 1.25;

    font-weight: 700;
}


.tk-rcp-title a {
    text-decoration: none;
}


/* =========================================================
   Additional Content
   ========================================================= */

.tk-rcp-content {
    max-height: 0;

    overflow: hidden;

    opacity: 0;

    font-size: 15px;

    line-height: 1.55;

    transition:
        max-height 0.4s ease,
        opacity 0.3s ease;
}


/* Show content on hover */

.tk-rcp-item:hover
.tk-rcp-content {
    max-height: 120px;

    opacity: 1;
}


/* =========================================================
   Read More
   ========================================================= */

.tk-rcp-read-more {
    display: inline-block;

    margin-top: 12px;

    font-size: 15px;

    font-weight: 600;

    text-decoration: none;

    opacity: 0.95;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1024px) {

    .tk-rcp-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

    .tk-rcp-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .tk-rcp-item {
        height: 280px;
    }


    .tk-rcp-overlay {
        padding: 20px;
    }


    .tk-rcp-title {
        font-size: 22px;
    }


    /*
     * On mobile, show content without
     * requiring hover.
     */
    .tk-rcp-content {
        max-height: 120px;

        opacity: 1;
    }


    .tk-rcp-content-wrap {
        transform: none;
    }

}