/* gallery */
@media all {
    .ce-media-image {
        overflow: hidden;
        border-radius: var(--border-radius);
    }
    
    .ce-type-grid-fullwidth-content .ce-media-image {
        border-radius: 0;
    }
    
    [class*="ce-gallery-count"] .ce-nowrap .ce-media-image {
        overflow: hidden;
        border-radius: var(--border-radius-half);
    }

    .ce-gallery :is(
    .ce-media,
    .ce-media-caption,
    a,
    img) {
        display: block;
        height: auto;
        max-width: 100%;
    }

    .ce-gallery .ce-row {
        display: grid;
        gap: var(--gap-5);
        margin-bottom: var(--gap-5);
    }

    .ce-gallery .ce-row:last-child {
        margin-bottom: 0;
    }

    .ce-gallery .ce-column {
        width: 100%;
    }

    .ce-width-set .ce-gallery .ce-column {
        width: auto;
        display: inline-block;
        vertical-align: top;
    }

    .ce-height-set .ce-gallery .ce-column {
        width: auto;
        max-width: 100%;
    }

    .ce-gallery.ce-height-set .ce-column {
        width: auto;
    }
}

@media(min-width: 36rem) {
    .ce-gallery[data-ce-columns="2"] .ce-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ce-gallery[data-ce-columns="4"] .ce-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(min-width: 48rem) {
    .ce-gallery[data-ce-columns="3"] .ce-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ce-nowrap .ce-gallery[data-ce-columns="4"] .ce-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ce-gallery[data-ce-columns="4"] .ce-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}

/* embed */
@media all {
    .ce-embed {
        position: relative;
        height: 0;
        overflow: hidden;
        padding-bottom: 56.25%;
    }

    .ce-embed-default {
        padding-bottom: 56.25%;
    }

    .ce-embed-ratio-4-3 {
        padding-bottom: 75%;
    }

    .ce-embed-ratio-3-2 {
        padding-bottom: 66.6667%;
    }

    .ce-embed-ratio-16-10 {
        padding-bottom: 62.5%;
    }

    .ce-embed-ratio-16-9 {
        padding-bottom: 56.25%;
    }

    .ce-embed > * {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

    .ce-embed-audio {
        position: static;
        height: auto;
    }

    .ce-embed-audio > * {
        position: static;
        height: auto;
        min-height: 32px;
        overflow: visible;
    }
}

/* media */
@media all {
    .ce-media {
        margin: 0;
    }

    .ce-media img[src$=svg] {
        width: 100%;
        object-fit: contain;
    }

    .ce-media-copyright {
        position: absolute;
        z-index: 1;
        font-size: 50%;
        line-height: 1;
        text-transform: uppercase;
        text-align: right;
        color: rgba(var(--color-text-light-rgb), 0.75);
        text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25);
        left: var(--gap-3);
        right: var(--gap-3);
        bottom: var(--gap-2);
        pointer-events: none;
    }
    
    .ce-slider .ce-media-copyright {
        bottom: var(--gap-4);
    }

    .ce-media-image a {
        position: relative;
        display: block;
        text-decoration: none;
    }

    .ce-media-image a::before {
        content: "\f0c1";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        line-height: 1;
        position: absolute;
        z-index: 1;
        top: 100%;
        left: 100%;
        color: rgb(255, 255, 255);
        text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
        background: none;
        transition: var(--transition-default);
    }
    
    .ce-media-image a:hover::before {
        transform: translate(calc(-100% - 1rem), calc(-100% - 1rem));
    }

    .ce-media-image a.lightbox::before {
        content: "\f31e";
    }

    .ce-media-image .ce-media-caption a::before {
        content: none;
    }
}