/*
Theme Name: InBox Projects
Journal Carousel CSS
Version: 1.0
*/

/*--------------------------------------------------------------
>>> JOURNAL-CAROUSEL.CSS TABLE OF CONTENTS:
--------------------------------------------------------------*/

/* ── Section wrapper — constrained width for header ── */

.journal_carousel_wrapper {
    background-color: var(--wp--preset--color--lightest-grey);
    overflow: hidden;
    padding-top: 50px;
    padding-bottom: 90px;
    margin-bottom: -2rem;
}
.journal-section {
    padding: 0 0 0 0;
    overflow: visible;
    max-width: 1408px;
    margin: 0 auto;
    position: relative;
}
.journal-header {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    align-content: stretch;
    gap: 8px;
    margin-bottom: 32px;
    padding-right: 40px;
}
@media ( min-width: 640px ) {
    .journal-header {
        flex-direction: row;
    }
}


/* ── Carousel track breakout ─────────────────────── */
.journal-carousel {
    width: 100%;
}
.journal-carousel .splide__track {
    overflow: visible;
}

/* ── Cards ───────────────────────────────────────── */

.journal-carousel li.splide__slide {
    padding-right: 4%;
}

.journal-carousel .splide__slide a {
    display: block;
    text-decoration: none;
    position: relative;
    outline: 0;
}

.journal-carousel .splide__slide .card_image {
    overflow: hidden;
    max-width: 400px;
    height: 400px;
}

.journal-carousel .splide__slide img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.journal-carousel .splide__slide a:hover img {
    transform: scale(1.03);
}

.journal-carousel p {
    display: none;
}

/* ── Caption overlay ─────────────────────────────── */
.journal-carousel .card-caption {
    position: absolute;
    bottom: 50px;
    left: 20px;
    right: -20px;
    background-color: var(--wp--preset--color--darkest-grey);
    color: #ffffff;
    padding: 10px 40px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.412 18.411'%3E%3Cpath d='M16.402.171V14.98L1.421 0 0 1.42l14.981 14.981H.171v2.01h18.241V.171z' style='fill:%23fff'/%3E%3C/svg%3E");
    background-size: 20px auto;
    background-position: bottom 10px right 10px;
    background-repeat: no-repeat;
    transition: all 150ms ease-in-out;
}
.journal-carousel .splide__slide a:hover .card-caption {
    background-position: bottom 5px right 5px;
}
.journal-carousel .card-caption h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #fff;
}

/* ── Arrows ──────────────────────────────────────── */

.journal-carousel-footer {
    position: absolute;
    bottom: 17px;
    right: 0;
}

.journal-nav-arrows {
    display: flex;
    gap: 12px;
    position: absolute;
    right: 0;
}

.journal-arrow-prev,
.journal-arrow-next {
    width: 35px;
    height: 30px;
    background: transparent;
    background-size: 25px auto;
    background-repeat: no-repeat;
    color: var(--wp--preset--color--darkest-grey);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border: 0;
    outline: 0;
}

.journal-arrow-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24.916 22.425'%3E%3Cpath d='m13.704 0-1.415 1.414 8.799 8.799H0v2h21.088l-8.799 8.798 1.415 1.414 11.212-11.212z' style='fill:%231d1d1d'/%3E%3C/svg%3E");
    background-position: left center;
}
.journal-arrow-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24.916 22.425'%3E%3Cpath d='m0 11.213 11.213 11.212 1.414-1.414-8.799-8.798h21.088v-2H3.828l8.799-8.799L11.213 0z' style='fill:%231d1d1d'/%3E%3C/svg%3E");
    background-position: right center;
}
.journal-arrow-next:hover {
    background-position: right center;
}
.journal-arrow-prev:hover {
    background-position: left center;
}


/* Hide Splide's pagination and re-render in our footer */
.journal-carousel .splide__pagination {
    position: static;
    justify-content: flex-start;
    padding: 0;
    gap: 8px;
}

@media ( max-width: 1024px ) {
    .journal-carousel-footer {
        padding-right: 24px;
    }
}

@media ( max-width: 640px ) {
    .journal-carousel-footer {
        padding-right: 16px;
    }
    .journal-carousel .splide__pagination {
        display: none;
    }
}

/* ── Pagination dots ─────────────────────────────── */

.journal-carousel .splide__pagination {
    position: static;
    justify-content: flex-start;
    padding: 0;
    margin-top: 20px;
    gap: 8px;
}

.journal-carousel .splide__pagination__page {
    width: 14px;
    height: 16px;
    border-radius: 0;
    background: transparent;
    border: 2px solid var(--wp--preset--color--darkest-grey);
    opacity: 1;
    margin: 0;
    transition: background 0.2s, border-color 0.2s;
}

.journal-carousel .splide__pagination__page.is-active {
    background: var(--wp--preset--color--darkest-grey);
    border-color: var(--wp--preset--color--darkest-grey);
    transform: none;
}

/* ── Responsive ──────────────────────────────────── */
@media ( max-width: 1024px ) {
    .journal-section {
        padding-left: 24px;
    }
    .journal-header,
    .journal-carousel .splide__arrows {
        padding-right: 24px;
    }
}

@media ( max-width: 640px ) {
    .journal-section {
        padding-left: 16px;
    }
    .journal-header,
    .journal-carousel .splide__arrows {
        padding-right: 16px;
    }
    .journal-carousel .splide__pagination {
        display: none;
    }
}