/*!
Theme Name: matichonweekly hybrid
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: matichonweekly
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.item-post {
    container-type: inline-size;
    container-name: item-post;
}

.item-post.white .post-info a,
.item-post.white .post-info .post-title,
.item-post.white .post-info .date,
.item-post.white .post-info .post-title a {
    color: #fff;
}

.item-post a .post-title:hover {
    color: #ff6d00;
}

.item-post.vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-post.vertical .post-info .post-title {
    line-height: 1.4;
    font-size: var(--wp--preset--font-size--medium);
}

.item-post.horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 8px;
}

.item-post .link-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
}

.item-post .link-image:hover img {
    scale: 1.05;
    transition: 0.3s all ease-in-out;
}

.item-post img {
    width: 100%;
    height: 100%;
    /* max-height: 450px; */
    /* aspect-ratio: 16/9; */
    display: block;
    object-fit: cover;
    scale: 1;
    transition: 0.3s all ease-in-out;
}

.item-post .post-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-post .post-info .group-category {
    display: flex;
    gap: 8px;
}

.item-post .post-info .group-category .category {
    padding: 0 8px;
    border-width: 1px;
    border-style: solid;
    border-image: linear-gradient(to right, red, rgba(255, 255, 255, 0)) 1 100%;
    border-image-slice: 1;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
}

.item-post .post-info a {
    text-decoration: none;
    color: #000;
}

.item-post .post-info .date {
    color: #686868;
    font-size: 0.75rem;
    font-weight: 400;
}

.item-post .post-info .post-title {
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.2;
    color: #000;
    font-weight: 500;
}

/* Container Query */
@container item-post (min-width: 400px) {
    .item-post.vertical .post-info .post-title {
        font-size: 1.625rem;
    }

    .item-post .post-info .date,
    .item-post .post-info .group-category .category {
        font-size: 1rem;
    }
}

.group-category {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;;
}

.category-tag {
    padding: 0 8px;
    border-width: 1px;
    border-style: solid;
    border-image: linear-gradient( to right, red, rgb(255, 255, 255, 0) ) 1 100%;
    border-image-slice: 1;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 500;
}

.breadcrumbs {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #878787;
    margin-inline: 0;
}

.breadcrumbs .taxonomy.category {
    color: #878787;
}

.breadcrumbs .taxonomy.category.current-item {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: text-bottom;
    color: #fff;
}

/* Block heading */
.block-heading {
    display: flex;
    gap: 24px;
    align-items: center;
}

.block-heading .link {
    color: #ED1C24;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.block-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 1.3304rem + 0.7752vw, 1.875rem);
}

/* template */
.block-post-category-template {
    display: flex;
    gap: 20px;
    flex-direction: column;
}

.block-post-category-template .group-post {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.block-post-category-template.white .heading {
    color: #fff;
}

.block-post-category-template-3 .group-post {
    grid-template-columns: 1fr 1fr;
}

.block-post-category-template-3 .group-post .item-post {
    grid-column: span 2;
}

.block-post-category-template-3 .group-post .item-post:nth-child(1),
.block-post-category-template-3 .group-post .item-post:nth-child(2) {
    grid-column: span 1;
}

.block-post-category-template-3 .block-heading {
    justify-content: center;
}


@media ( min-width: 992px ) {
    .block-post-category-template-1 .group-post {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }

    .block-post-category-template-1 .group-post .item-post:first-child {
        grid-column: 1;
        grid-row: span 3;
    }

    .block-post-category-template-2 .group-post {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .block-post-category-template-3 .group-post {
        grid-template-columns: repeat(6,1fr);
    }

    .block-post-category-template-3 .group-post .item-post:first-child,
    .block-post-category-template-3 .group-post .item-post:nth-child(2) {
        grid-column: span 3;
    }

    .block-post-category-template-3 .group-post .item-post {
        grid-column: span 2;
    }

    .block-post-category-template-4 .group-post {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .block-post-category-template-5 .group-post {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}