/* --- Block Portfolio
-------------------------------------------------------- */

.wp-block-heading-has-columns {
    max-width: 730px;
}

.wp-block-portfolio div.wp-block-columns+div.wp-block-columns {
    margin-block-start: 0;
}

.wp-block-portfolio .wp-block-cover {

    height: 100%;

    .wp-block-cover__background {
        opacity: 0 !important;
        transition: all 0.4s;
    }

    .wp-block-cover__image-background {
        transition: all 0.4s;
    }

    &:hover {
        .wp-block-portfolio-title {
            opacity: 1;
            visibility: visible;
        }

        .wp-block-cover__background.has-background-dim-10 {
            opacity: 0.1 !important;

        }

        .wp-block-cover__background.has-background-dim-20 {
            opacity: 0.2 !important;

        }

        .wp-block-cover__background.has-background-dim-30 {
            opacity: 0.3 !important;

        }

        .wp-block-cover__background.has-background-dim-40 {
            opacity: 0.4 !important;

        }

        .wp-block-cover__background.has-background-dim-50 {
            opacity: 0.5 !important;

        }

        .wp-block-cover__background.has-background-dim-60 {
            opacity: 0.6 !important;

        }

        .wp-block-cover__background.has-background-dim-70 {
            opacity: 0.7 !important;

        }

        .wp-block-cover__background.has-background-dim-80 {
            opacity: 0.8 !important;

        }

        .wp-block-cover__background.has-background-dim-90 {
            opacity: 0.9 !important;

        }
    }

    .wp-block-portfolio-title {
        top: 10px;
        left: 10px;
        right: 10px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s;

        a {
            font-size: var(--wp--preset--font-size--content-heading);
            font-weight: var(--wp--custom--typography--font-weight--semi-bold);
            font-family: var(--wp--preset--font-family--josefin-sans);
            text-decoration: none;
            line-height: var(--wp--custom--typography--line-height--heading-four);
        }
    }
}

.wp-block-portfolio.portfolio-full-width {
    div.wp-block-columns+div.wp-block-columns {
        margin-block-start: 1.5rem;
    }
}

.wp-block-portfolio.portfolio-full-width>.wp-block-columns.alignfull {
    padding-inline: var(--wp--custom--spacing--outer);
}

.wp-block-group.wp-block-years {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-wrap: wrap;
    text-align: center;
    padding-inline: 10%;
    gap: 0;

    &>* {
        width: 100%;
        margin: 0
    }
}

.block-editor-block-list__block.wp-block.is-selected.wp-rotating-text {
    width: auto;
    height: auto;
    text-align: center;
}

/* Position the play button container */
.wp-play-button {
    position: relative;

    svg {
        transition: all 0.4s;
    }

    &:hover svg {
        transform: scale(1.25);
    }
}

.fse-popup-video-play-button:hover svg,
.fse-popup-video-play-button:focus svg {
    fill: var(--wp--preset--color--button-color) !important;
}

/* Hide original text */
.wp-rotating-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Circular text container */
.circular-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 5;
    margin: 0;
}

/* Show on hover */
.fse-popup-video-play-button:hover~.circular-text-container,
.wp-play-button:hover .circular-text-container {
    opacity: 1;
    animation: rotate 10s linear infinite;
}

/* Individual letter positioning */
.circular-text-container .letter {
    position: absolute;
    left: 50%;
    top: 0;
    transform-origin: 0 80px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

// .fse-popup-video-play-button:after {
//     position: absolute;
//     width: 140px;
//     height: 140px;
//     left: 50%;
//     right: 50%;
//     content: '';
//     background: #fff;
//     border-radius: 50%;
//     transform: translate(-50%);
//     opacity: 1;
// }