
/* ========================================
   Posts Grid Widget
======================================== */

.shokamag-widget.widget-posts-grid {
    margin-bottom: 1.5rem;
}

.widget-posts-grid .posts-grid-title {
    margin-bottom: 1rem;
}

/* Grid layout */

.widget-posts-grid .posts-grid-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

/* Card */

.widget-posts-grid .posts-grid-card {
    position: relative;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.375rem;
    background: #e9ecef;
}

/* Image ratios */

.widget-posts-grid .posts-grid-track--landscape .posts-grid-card {
    aspect-ratio: 16 / 9;
}

.widget-posts-grid .posts-grid-track--square .posts-grid-card {
    aspect-ratio: 1 / 1;
}

.widget-posts-grid .posts-grid-track--portrait .posts-grid-card {
    aspect-ratio: 4 / 5;
}

/* Link and image */

.widget-posts-grid .posts-grid-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.widget-posts-grid .posts-grid-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.widget-posts-grid .posts-grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.05) 75%
        );
}

.widget-posts-grid .posts-grid-card-title {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    margin: 0;
    padding: 1rem 0.75rem;
    color: #fff;
    font-size: 1rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.widget-posts-grid .posts-grid-link:hover .posts-grid-image {
    transform: scale(1.04);
}

/* Desktop: four columns */

@media (min-width: 992px) {
    .widget-posts-grid .posts-grid-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Mobile: horizontal scrolling */

@media (max-width: 575.98px) {
    .widget-posts-grid .posts-grid-track {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        grid-template-columns: none;
        gap: 0.75rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .widget-posts-grid .posts-grid-card {
        scroll-snap-align: start;
    }
}



/* ========================================
   Horizontal Posts Widget
======================================== */

.shokamag-widget.widget-horizontal-posts {
    margin-bottom: 1.5rem;
}

/* Section title */

.widget-horizontal-posts .horizontal-posts-title {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: 1.7rem;
    line-height: 1.7;
}

/* Mobile first: horizontal columns */

.widget-horizontal-posts .horizontal-posts-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 88%;
    grid-template-rows: repeat(3, auto);
    grid-template-columns: none;

    gap: 1rem 1.25rem;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

/* Post item */

.widget-horizontal-posts .horizontal-posts-item {
    min-width: 0;
    scroll-snap-align: start;
}

/* Image right, title left */

.widget-horizontal-posts .horizontal-posts-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;

    color: inherit;
    text-decoration: none;
}

/* Thumbnail */

.widget-horizontal-posts .horizontal-posts-image {
    display: block;
    flex: 0 0 88px;
    width: 88px;
    height: auto;

    object-fit: cover;
    border-radius: 0.5rem;
}

/* Post title */

.widget-horizontal-posts .horizontal-posts-item-title {
    flex: 1;
    min-width: 0;

    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

/* Tablet: 3 rows, horizontally scrollable columns */

@media (min-width: 576px) {
    .widget-horizontal-posts .horizontal-posts-track {
        grid-auto-columns: 55%;
    }
}

/* Desktop: 3 columns, no horizontal scrolling */

@media (min-width: 992px) {
    .widget-horizontal-posts .horizontal-posts-track {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;

        overflow: visible;
        scroll-snap-type: none;
    }
}


/* ========================================
   featured posts showcase
======================================== */
.shokamag-featured-showcase__feature {
    position: relative;
    cursor: pointer;
}
.shokamag-featured-showcase__feature h2 {
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    position: absolute;
    z-index: 15;
    bottom: 00;
    color: #fff;
    margin-right: 7px;
    margin-left: auto;
    padding: 7px;

}
.shokamag-featured-showcase__feature img{
    object-fit: cover;
    height: 100%;
    width: 100%;
}




/* ========================================
   Shokamag Category Columns
======================================== */

.shokamag-category-columns {
    width: 100%;
    min-width: 0;
    direction: rtl;
    box-sizing: border-box;
}

.shokamag-category-columns *,
.shokamag-category-columns *::before,
.shokamag-category-columns *::after {
    box-sizing: border-box;
}

/* Main widget title */

.shokamag-category-columns__header {
    margin-bottom: 16px;
}

.shokamag-category-columns__title {
    margin: 0;
}

/* Mobile tab controls */

.shokamag-category-columns__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.shokamag-category-columns__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.shokamag-category-columns__tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 600;
}

.shokamag-category-columns__radio:nth-of-type(1):checked
~ .shokamag-category-columns__tabs
label:nth-child(1),
.shokamag-category-columns__radio:nth-of-type(2):checked
~ .shokamag-category-columns__tabs
label:nth-child(2),
.shokamag-category-columns__radio:nth-of-type(3):checked
~ .shokamag-category-columns__tabs
label:nth-child(3) {
    border-bottom-color: currentColor;
}

/* Mobile: one column at a time */

.shokamag-category-columns__viewport {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.shokamag-category-columns__track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    direction: ltr;
    transition: transform 0.35s ease;
    will-change: transform;
}

.shokamag-category-columns__column {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    direction: rtl;
    box-sizing: border-box;
}

/* Posts */

.shokamag-category-columns__posts {
    min-width: 0;
}

.shokamag-category-columns__item {
    min-width: 0;
    margin: 0 0 18px;
}

.shokamag-category-columns__link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding-bottom: 12px;
    direction: rtl;
    text-decoration: none;
    border-bottom: 0px solid #e5e5e5;
}


/* Category Columns - Consistent Thumbnail Images */

.shokamag-category-columns__image-wrap {
    flex: 0 0 90px;
    width: 90px;
    max-width: 90px;
    overflow: hidden;
    border-radius: 4px;
}

.shokamag-category-columns__image {
    display: block;
    width: 100%;
    /*height: 68px;
    aspect-ratio: auto;*/
    object-fit: cover;
    border-radius: 4px;
}


.shokamag-category-columns__content {
    flex: 1 1 auto;
    min-width: 0;
}

.shokamag-category-columns__post-title {
    font-size: 1rem;
    font-weight: bold;
    color: #272727;
    margin: 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.shokamag-category-columns__empty {
    margin: 0 0 18px;
}

/* Tablet: two columns and part of the third */

@media (min-width: 768px) and (max-width: 991.98px) {

    .shokamag-category-columns__tabs {
        display: none;
    }

    .shokamag-category-columns__viewport {
        overflow-x: auto;
        overflow-y: hidden;
        direction: rtl;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .shokamag-category-columns__track {
        display: flex;
        flex-wrap: nowrap;
        width: 120%;
        min-width: 120%;
        direction: rtl;
        transform: none !important;
        transition: none;
        will-change: auto;
    }

    .shokamag-category-columns__column {
        display: block;
        flex: 0 0 33.333333%;
        width: 33.333333%;
        min-width: 0;
        padding-inline: 8px;
    }
}

/* Desktop: three columns */

@media (min-width: 992px) {

    .shokamag-category-columns__tabs {
        display: none;
    }

    .shokamag-category-columns__viewport {
        overflow: visible;
    }

    .shokamag-category-columns__track {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        width: 100%;
        min-width: 0;
        direction: rtl;
        transform: none !important;
        transition: none;
        will-change: auto;
    }

    .shokamag-category-columns__column {
        width: auto;
        min-width: 0;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shokamag-category-columns__track {
        transition: none;
    }
}


/* Category Columns - Card Styling */

.shokamag-category-columns__column {
    background: rgba(0, 0, 0, .04);
    border-radius: 10px;
    padding: 15px;
}

/* Tablet: keep spacing between columns */
@media (min-width: 768px) and (max-width: 991.98px) {
    .shokamag-category-columns__column {
        margin-inline: 6px;
    }
}

/* Desktop: spacing between the three columns */
@media (min-width: 992px) {
    .shokamag-category-columns__track {
        column-gap: 16px;
    }
}

/* Category Columns - Section Headers */

.shokamag-category-columns__column-header {
    margin-bottom: 35px;
}

.shokamag-category-columns__column-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1;
    margin: 0 0 15px;
    padding-bottom: 15px;
    position: relative;
    border-bottom: 1px solid #E4E4E4;
    color: #272727;
}



/* ========================================
   Shokamag Category Columns
======================================== */
.shokamag_two_section_posts_col2{
    position: relative;
    cursor: pointer;
}
.shokamag_two_section_posts_col2 img{
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.shokamag_two_section_posts_col2 h2 {
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    position: absolute;
    z-index: 15;
    bottom: 00;
    color: #fff;
    margin-right: 7px;
    margin-left: auto;
    padding: 7px;
}