/*
Theme Name: KStories Prime Mag Child
Template: prime-mag
Description: KStories custom child theme for Prime Mag.
Version: 1.0.0
*/


#prime_mag_banner_section.kstories-hero-banner-v2 {
    width: 100%;
    clear: both;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(380px, 3fr);
    gap: 28px;
    align-items: start;
    width: 100%;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main,
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side {
    min-width: 0;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-card {
    width: 100%;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-image {
    display: block;
    width: 100%;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-image img {
    display: block;
    width: 100%;
    height: 470px;
    object-fit: cover;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-title {
    font-size: 32px;
    line-height: 1.32;
    margin: 14px 0 12px 0;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-bottom: 13px;
    border-bottom: 1px solid #e5e5e5;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image {
    display: block;
    width: 130px;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
    display: block;
    width: 130px;
    height: 98px;
    object-fit: cover;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-title {
    font-size: 15px;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

#prime_mag_banner_section.kstories-hero-banner-v2 a {
    text-decoration: none;
}

@media (max-width: 900px) {
    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-grid {
        grid-template-columns: 1fr;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-image img {
        height: auto;
    }
}

/* KStories: hide theme auto featured image on single posts only */
.single-post #primary article .post-thumbnail,
.single-post #primary article .blog-post-image,
.single-post #primary article .featured-image,
.single-post #primary article .entry-thumbnail {
    display: none !important;
}

/* keep images inside article body */
.single-post #primary article .entry-content img {
    display: inline-block !important;
}

/* KStories: hide only theme-level featured image on single posts */
.single-post #primary article > .post-thumbnail,
.single-post #primary article > .blog-post-image,
.single-post #primary article > .featured-image,
.single-post #primary article > .entry-thumbnail {
    display: none !important;
}

/* keep all images inside post content */
.single-post #primary article .entry-content img {
    display: inline-block !important;
    max-width: 100%;
    height: auto;
}

/* KStories: restore header logo size */
.site-branding img,
.site-logo img,
.custom-logo-link img,
img.custom-logo {
    max-width: 270px !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
}

/* KStories: prevent logo area from being squeezed */
.site-branding,
.site-logo,
.custom-logo-link {
    min-width: 240px !important;
}

/* KStories common: header search and multilingual font START */

/* Hide only header search box */
.site-header .search-form,
.site-header .header-search,
.site-header .header-search-form,
.site-header .search-box,
.site-header .search-container,
.site-header .search-wrapper,
.header-main-wrapper .search-form,
.header-main-wrapper .header-search,
.header-main-wrapper .header-search-form,
.header-main-wrapper .search-box,
.header-main-wrapper .search-container,
.header-main-wrapper .search-wrapper {
    display: none !important;
}

/* Global multilingual font stack */
body,
button,
input,
select,
textarea {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans",
        "Noto Sans KR",
        "Noto Sans JP",
        "Noto Sans SC",
        "Noto Sans TC",
        "Apple SD Gothic Neo",
        "Malgun Gothic",
        "Yu Gothic",
        "Meiryo",
        Arial,
        sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.main-navigation a,
.kstories-hero-main-title,
.kstories-hero-side-title,
.post-title,
.widget-title {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans",
        "Noto Sans KR",
        "Noto Sans JP",
        "Noto Sans SC",
        "Noto Sans TC",
        "Apple SD Gothic Neo",
        "Malgun Gothic",
        "Yu Gothic",
        "Meiryo",
        Arial,
        sans-serif !important;
}

/* KStories common: header search and multilingual font END */


/* KStories: side list text tuning */
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-title {
    font-size: 15px;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side .post-meta {
    font-size: 12px;
    line-height: 1.3;
}

/* KStories: final hero banner balance */
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-grid {
    grid-template-columns: minmax(0, 7.1fr) minmax(390px, 2.9fr) !important;
    gap: 30px !important;
    align-items: start !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-image img {
    height: 500px !important;
    object-fit: cover !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side {
    gap: 18px !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-card {
    grid-template-columns: 145px minmax(0, 1fr) !important;
    gap: 14px !important;
    min-height: 112px !important;
    padding-bottom: 17px !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image,
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
    width: 145px !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
    height: 105px !important;
    object-fit: cover !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-title {
    font-size: 15.5px !important;
    line-height: 1.38 !important;
    margin: 0 0 8px 0 !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-title {
    font-size: 32px !important;
    line-height: 1.35 !important;
    margin-top: 16px !important;
}

@media (max-width: 900px) {
    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-grid {
        grid-template-columns: 1fr !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-image img {
        height: auto !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-card {
        grid-template-columns: 120px minmax(0, 1fr) !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image,
    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
        width: 120px !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
        height: 88px !important;
    }
}

/* KStories: make right 4 articles fill hero height */
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-grid {
    align-items: stretch !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main {
    height: 100% !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-main-card {
    height: 100% !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 0 !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-card {
    flex: 1 1 0 !important;
    min-height: 128px !important;
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image,
#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
    width: 150px !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
    height: 108px !important;
    object-fit: cover !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-title {
    font-size: 15.5px !important;
    line-height: 1.38 !important;
    margin: 0 0 8px 0 !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

#prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side .post-meta {
    font-size: 12px !important;
    line-height: 1.3 !important;
}

@media (max-width: 900px) {
    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side {
        display: grid !important;
        gap: 14px !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-card {
        grid-template-columns: 120px minmax(0, 1fr) !important;
        min-height: auto !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image,
    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
        width: 120px !important;
    }

    #prime_mag_banner_section.kstories-hero-banner-v2 .kstories-hero-side-image img {
        height: 88px !important;
    }
}

/* KStories: show thumbnails in Related Posts */
.single-post #primary .related-posts article > .post-thumbnail,
.single-post #primary .related-posts article .post-thumbnail,
.single-post #primary .related-posts .post-thumbnail {
    display: block !important;
}

.single-post #primary .related-posts .post-thumbnail img {
    display: block !important;
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
}

/* KStories: Related Posts card layout */
.single-post #primary .related-posts .row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

.single-post #primary .related-posts .row > div {
    width: auto !important;
    max-width: none !important;
}

.single-post #primary .related-posts article {
    display: block !important;
}

.single-post #primary .related-posts .entry-title {
    font-size: 17px !important;
    line-height: 1.35 !important;
    margin-top: 10px !important;
}

.single-post #primary .related-posts .entry-content {
    font-size: 14px !important;
    line-height: 1.45 !important;
}

@media (max-width: 768px) {
    .single-post #primary .related-posts .row {
        grid-template-columns: 1fr !important;
    }

    .single-post #primary .related-posts .post-thumbnail img {
        height: auto !important;
    }
}

/* KStories: hide comment count icons and numbers */
.post-comment,
.comments-link,
span.post-comment,
.entry-meta .comments-link,
.post-meta .post-comment,
.fa-comment,
.fa-regular.fa-comment {
    display: none !important;
}
