/*
 * TTB-NewPress Elementor Loop Grid layout.
 * Assign ttb-newpress-grid to the Loop Grid widget and ttb-newpress-card to
 * the root container in the Loop Item template. Typography stays in Elementor.
 */
.ttb-newpress-grid {
    box-sizing: border-box;
    width: calc(100% - 40px) !important;
    max-width: 1600px !important;
    min-width: 0;
    margin-inline: auto !important;
    left: auto !important;
    right: auto !important;
}

.ttb-newpress-grid .elementor-loop-container {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    column-gap: 14px;
    row-gap: 55px;
}

.ttb-newpress-grid .elementor-loop-container > .e-loop-item,
.ttb-newpress-grid .elementor-loop-container > .elementor-loop-item,
.ttb-newpress-grid .ttb-newpress-card {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

.ttb-newpress-grid .elementor-loop-container > .e-loop-item,
.ttb-newpress-grid .elementor-loop-container > .elementor-loop-item {
    align-self: start;
}

.ttb-newpress-card {
    position: relative;
    cursor: pointer;
}

.ttb-newpress-grid .ttb-featured-image,
.ttb-newpress-grid .ttb-featured-image > .elementor-widget-container,
.ttb-newpress-grid .ttb-featured-image a,
.ttb-newpress-grid .ttb-featured-image picture,
.ttb-newpress-grid .ttb-featured-image img {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
}

.ttb-newpress-grid .ttb-featured-image > .elementor-widget-container,
.ttb-newpress-grid .ttb-featured-image a,
.ttb-newpress-grid .ttb-featured-image picture {
    display: block;
}

.ttb-newpress-grid .ttb-featured-image img {
    display: block;
    height: auto;
    aspect-ratio: 1.47 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: 18px;
}

.ttb-newpress-grid .ttb-title {
    margin-top: 14px;
    margin-bottom: 20px;
}

.ttb-newpress-grid .ttb-excerpt {
    max-height: none !important;
    margin: 0;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

.ttb-newpress-card a:not(.ttb-newpress-card-link) {
    position: relative;
    z-index: 2;
}

.ttb-newpress-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 18px;
    text-indent: -9999px;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .ttb-newpress-grid {
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
    }

    .ttb-newpress-grid .elementor-loop-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: 24px;
        row-gap: 45px;
    }
}

@media (max-width: 767px) {
    .ttb-newpress-grid {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
    }

    .ttb-newpress-grid .elementor-loop-container {
        grid-template-columns: minmax(0, 1fr) !important;
        column-gap: 0;
        row-gap: 40px;
    }
}
