/* ==========================================
   YOTTABRAIN EVENTS
   Premium Event Gallery
   ========================================== */

.yb-event-gallery {
    padding: 90px 0 100px;
    background: #fff;
}

.yb-event-heading {
    max-width: 760px;
    margin: 0 auto 50px;
}

.yb-event-heading .yb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFF1F1;
    color: #C92027;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.yb-event-heading .yb-section-title {
    margin: 0 0 15px;
    color: #102A4C;
    font-size: 42px;
    line-height: 1.2;
    font-weight: 800;
}

.yb-event-heading .yb-section-subtitle {
    max-width: 680px;
    margin: 0 auto;
    color: #6B7C93;
    font-size: 16px;
    line-height: 1.8;
}


/* ==========================================
   GALLERY
   ========================================== */

.yb-event-grid {
    max-width: 1180px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
}

.yb-event-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #f4f6f8;
}

.yb-event-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transition:
        transform .45s ease,
        filter .45s ease;
}


/* ==========================================
   DIFFERENT IMAGE SIZES
   ========================================== */

.yb-event-large {
    grid-column: span 2;
    grid-row: span 2;
}

.yb-event-tall {
    grid-row: span 2;
}

.yb-event-wide {
    grid-column: span 2;
}


/* ==========================================
   HOVER
   ========================================== */

.yb-event-item::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(0,0,0,.18),
        transparent 45%
    );

    opacity: 0;
    transition: opacity .35s ease;
}

.yb-event-item:hover img {
    transform: scale(1.05);
}

.yb-event-item:hover::after {
    opacity: 1;
}


/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 991px) {

    .yb-event-gallery {
        padding: 70px 0 80px;
    }

    .yb-event-heading {
        margin-bottom: 40px;
    }

    .yb-event-heading .yb-section-title {
        font-size: 36px;
    }

    .yb-event-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
        gap: 14px;
    }

    .yb-event-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .yb-event-tall {
        grid-row: span 2;
    }

    .yb-event-wide {
        grid-column: span 2;
    }
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 767px) {

    .yb-event-gallery {
        padding: 55px 0 65px;
    }

    .yb-event-heading {
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .yb-event-heading .yb-section-title {
        font-size: 30px;
    }

    .yb-event-heading .yb-section-subtitle {
        font-size: 15px;
        line-height: 1.7;
    }

    .yb-event-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        gap: 10px;
    }

    .yb-event-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .yb-event-tall {
        grid-row: span 2;
    }

    .yb-event-wide {
        grid-column: span 2;
    }

    .yb-event-item {
        border-radius: 12px;
    }
}


/* ==========================================
   SMALL MOBILE
   ========================================== */

@media (max-width: 480px) {

    .yb-event-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .yb-event-large,
    .yb-event-tall,
    .yb-event-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .yb-event-heading .yb-section-title {
        font-size: 27px;
    }
}