/* ==========================================
   VES FROM THE STUDIO / BLOGS
   Clickable Images + Read More Links
   Desktop / Tablet / Mobile
========================================== */

#ves-studio {
    --ves-red: #E31E24;
    --ves-black: #000;
    --ves-grey: rgba(0, 0, 0, 0.40);

    width: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
    font-family: "Basier Circle", Arial, sans-serif;
    perspective: 1400px;
}

#ves-studio *,
#ves-studio *::before,
#ves-studio *::after {
    box-sizing: border-box;
}

/* ==========================================
   MAIN LAYOUT
========================================== */

.ves-studio-inner {
    width: 100%;
    max-width: 1430px;
    margin: 0 auto;
}

.ves-studio-header {
    width: 100%;
    text-align: center;
    margin: 0 0 34px;
}

/* Heading */

.ves-studio-header h2 {
    margin: 0;
    color: var(--ves-black);
    font-size: 50px;
    line-height: 1;
    font-weight: 600;
    word-wrap: break-word;
}

/* Heading clickable link */

.ves-studio-header h2 a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.ves-studio-header h2 a:hover {
    opacity: 0.8;
}

.ves-studio-header h2 span {
    color: var(--ves-red);
}

/* Subtitle */

.ves-studio-header p {
    margin: 7px 0 0;
    color: #000;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    font-style: italic;
    word-wrap: break-word;
}

/* Four-column grid */

.ves-studio-grid {
    width: 100%;
    max-width: 1430px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    column-gap: 30px;
    align-items: start;
    perspective: 1400px;
}

/* ==========================================
   CARD ENTRY ANIMATION
========================================== */

.ves-studio-card {
    width: 100%;
    min-width: 0;
    position: relative;
    text-align: center;

    opacity: 0;
    transform: translateY(42px) rotateX(7deg) scale(0.965);

    transform-style: preserve-3d;

    transition:
        opacity 0.8s ease,
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);

    will-change: transform, opacity;
}

/* Staggered layout */

.ves-studio-card-1,
.ves-studio-card-3 {
    margin-top: 53px;
}

.ves-studio-card-2,
.ves-studio-card-4 {
    margin-top: 0;
}

/* Reveal after section becomes visible */

#ves-studio.is-visible .ves-studio-card {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
}

#ves-studio.is-visible .ves-studio-card-1 {
    transition-delay: 0.05s;
}

#ves-studio.is-visible .ves-studio-card-2 {
    transition-delay: 0.18s;
}

#ves-studio.is-visible .ves-studio-card-3 {
    transition-delay: 0.31s;
}

#ves-studio.is-visible .ves-studio-card-4 {
    transition-delay: 0.44s;
}

/* Card wrapper does not move on hover */

.ves-studio-card-inner {
    position: relative;
    width: 100%;
    transform: none !important;
    filter: none !important;
    transition: none;
}

/* ==========================================
   CLICKABLE IMAGE LINK
========================================== */

.ves-studio-image-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Image box */

.ves-studio-image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 191 / 212;

    overflow: hidden;
    border-radius: 3px;
    background: #e9e9e9;

    box-shadow: 0 0 0 rgba(0, 0, 0, 0);

    transition: box-shadow 0.45s ease;
}

/* Image */

.ves-studio-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transform: scale(1);

    transition:
        transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
        filter 0.5s ease;
}

/* ==========================================
   IMAGE SHINE EFFECT
========================================== */

.ves-image-shine {
    position: absolute;
    top: 0;
    left: -120%;

    width: 70%;
    height: 100%;

    pointer-events: none;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );

    transform: skewX(-18deg);

    transition: left 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);

    z-index: 2;
}

/* ==========================================
   DESKTOP HOVER EFFECT
========================================== */

@media (min-width: 901px) {

    .ves-studio-card:hover .ves-studio-image {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }

    .ves-studio-card:hover .ves-studio-image img {
        transform: scale(1.055);
        filter: brightness(1.03) contrast(1.02);
    }

    .ves-studio-card:hover .ves-image-shine {
        left: 145%;
    }
}

/* ==========================================
   CARD TITLE
========================================== */

.ves-studio-card h3 {
    width: 100%;
    max-width: 100%;

    margin: 25px auto 0;
    padding: 0 4px;

    color: #000;

    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;

    text-align: center;
    letter-spacing: -0.15px;

    text-wrap: balance;
    overflow-wrap: anywhere;

    transform: none;
}

.ves-studio-card h3 span {
    display: inline;
    color: var(--ves-red);
}

/* ==========================================
   READ MORE LINK
========================================== */

.ves-studio-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    margin-top: 10px;

    color: #e31e24 !important;

    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 400;

    text-decoration: none !important;

    transition: color 0.25s ease;
}

.ves-studio-read-more:hover {
    color: rgba(0, 0, 0, 0.7) !important;
    transform: none;
}

/* Read More arrow */

.ves-studio-read-more span {
    display: inline-block;

    font-size: 15px;
    line-height: 1;

    color: #e31e24;

    transition: transform 0.3s ease;
}

.ves-studio-read-more:hover span {
    transform: translate(2px, -2px);
}

/* Keyboard accessibility */

#ves-studio a:focus-visible {
    outline: 2px solid var(--ves-red);
    outline-offset: 4px;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 900px) {

    .ves-studio-inner {
        width: 100%;
        max-width: 100%;
        padding: 35px 25px;
    }

    .ves-studio-header h2 {
        font-size: 40px;
        line-height: 1.1;
    }

    .ves-studio-header p {
        font-size: 18px;
        line-height: 1.35;
    }

    .ves-studio-grid {
        width: 100%;
        max-width: 100%;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        column-gap: 35px;
        row-gap: 25px;
    }

    .ves-studio-card {
        width: 100%;
        max-width: none;
    }

    .ves-studio-image {
        width: 100%;
        height: auto;
        aspect-ratio: 191 / 212;
    }

    .ves-studio-card-1,
    .ves-studio-card-3 {
        margin-top: 53px;
    }

    .ves-studio-card-2,
    .ves-studio-card-4 {
        margin-top: 0;
    }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

    #ves-studio {
        perspective: none;
    }

    .ves-studio-inner {
        width: 100%;
        max-width: 100%;
        padding: 35px 20px;
    }

    .ves-studio-header {
        margin-bottom: 35px;
    }

    .ves-studio-header h2 {
        font-size: 32px;
        line-height: 1.15;
    }

    .ves-studio-header p {
        max-width: 330px;

        margin-left: auto;
        margin-right: auto;

        font-size: 16px;
        line-height: 1.35;
    }

    .ves-studio-grid {
        width: 100%;
        max-width: 100%;

        grid-template-columns: 1fr;
        justify-content: center;

        row-gap: 25px;
        perspective: none;
    }

    .ves-studio-card-1,
    .ves-studio-card-2,
    .ves-studio-card-3,
    .ves-studio-card-4 {
        margin-top: 0;
    }

    .ves-studio-card {
        width: 100%;
        max-width: 360px;

        margin-left: auto;
        margin-right: auto;

        transform: translateY(30px) scale(0.98);
    }

    #ves-studio.is-visible .ves-studio-card {
        transform: translateY(0) scale(1);
    }

    .ves-studio-image {
        transform: none;
    }

    .ves-studio-image img {
        transition: transform 0.6s ease;
    }

    .ves-studio-card h3 {
        margin-top: 20px;
    }
}

/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 400px) {

    .ves-studio-inner {
        padding: 35px 15px;
    }

    .ves-studio-header h2 {
        font-size: 28px;
        line-height: 1.15;
    }

    .ves-studio-header p {
        font-size: 15px;
    }

    .ves-studio-card {
        width: 100%;
        max-width: 100%;
    }

    .ves-studio-grid {
        row-gap: 28px;
    }
}

/* ==========================================
   REDUCED MOTION ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

    .ves-studio-card {
        opacity: 1;
        transform: none !important;
        transition: none !important;
        will-change: auto;
    }

    .ves-studio-image img,
    .ves-image-shine,
    .ves-studio-read-more,
    .ves-studio-read-more span,
    .ves-studio-image,
    .ves-studio-header h2 a {
        transition: none !important;
    }
}
