/* Homepage editorial redesign for the classic PHP theme. */
.hm-home {
    --section-gap: 44px;
    --card-gap: 20px;
    --inner-padding: 18px;
    --hm-container: 1240px;
    --hm-bg: #f5f7fa;
    --hm-card: #ffffff;
    --hm-border: #e1e7ef;
    --hm-ink: #1f2933;
    --hm-muted: #6b7280;
    --hm-blue: #003366;
    --hm-red: #e21b2d;
    --hm-dark: #061b33;
    --hm-radius: 10px;
    background: var(--hm-bg);
    color: var(--hm-ink);
    font-family: "Noto Sans Devanagari", "Mukta", sans-serif;
    padding: 28px 0 52px;
}

/* Figma homepage alignment: deshsanchar-style dynamic news layout. */
.hm-home {
    --section-gap: 0;
    --card-gap: 18px;
    --inner-padding: 0;
    --hm-container: 1440px;
    --hm-bg: #ffffff;
    --hm-card: #ffffff;
    --hm-border: #ececec;
    --hm-ink: #000000;
    --hm-muted: #636363;
    --hm-blue: #000000;
    --hm-red: #f09705;
    --hm-radius: 3px;
    background: #ffffff;
    color: #000000;
    padding: 0 0 52px;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
}

.hm-container {
    width: min(100%, var(--hm-container));
}

.hm-section,
.hm-ad-banner,
.hm-trending-strip {
    margin-bottom: 0;
}

.hm-lead-stack {
    border-bottom: 1px solid var(--hm-border);
}

.hm-card.hm-lead-story {
    border: 0;
    border-bottom: 1px solid var(--hm-border);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: #ffffff;
}

.hm-lead-story .hm-hero-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 228px;
    padding: 10px 48px 16px;
    text-align: center;
}

.hm-lead-story .hm-category-badge,
.hm-lead-story .hm-excerpt,
.hm-lead-story time {
    display: none;
}

.hm-lead-story .hm-hero-title,
.hm-lead-story .hm-hero-title a {
    color: #000000;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
    font-size: clamp(36px, 4.03vw, 58px);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
    max-width: 1342px;
    text-decoration: none;
    word-break: break-word;
}

.hm-hero-byline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 35px;
    margin-top: 16px;
}

.hm-hero-author-avatar {
    border: 1px solid #ececec;
    border-radius: 999px;
    display: grid;
    height: 35px;
    place-items: center;
    width: 35px;
}

.hm-author-avatar-img {
    border-radius: 999px;
    display: block;
    height: 27px;
    object-fit: cover;
    width: 27px;
}

.hm-hero-author-name {
    color: #000000;
    font-family: "Noto Sans Devanagari", "Mukta", Arial, sans-serif;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.hm-lead-story .hm-hero-media {
    aspect-ratio: auto;
    border-radius: 3px;
    height: 600px;
    margin: 0;
    width: 100%;
}

.hm-lead-story .hm-card-image {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.hm-lead-story-3 .hm-hero-media {
    display: none;
}

.hm-lead-stack > .hm-ad-banner,
.hm-home-content-column > .hm-ad-banner {
    border-bottom: 1px solid #ececec;
    padding: 24px 0;
}

.hm-ad-banner {
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.hm-ad-banner img,
.hm-ad-banner iframe {
    border-radius: 0;
    display: block;
    margin: 0 auto;
    max-height: 130px;
    object-fit: contain;
    width: 100%;
}

.hm-ad-placeholder {
    background: #f7f8ff;
    border: 1px dashed #d8d8d8;
    border-radius: 0;
    color: #8a8a8a;
    font-size: 15px;
    font-weight: 600;
    min-height: 105px;
}

.hm-trending-strip {
    border: 0;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px 0;
}

.hm-strip-label {
    background: #000000;
    border-radius: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-left: 0;
    padding: 8px 18px;
}

.hm-strip-items a {
    color: #000000;
    font-size: 16px;
    font-weight: 400;
}

.hm-home-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1071px) minmax(300px, 351px);
    gap: 18px;
    align-items: start;
    border-top: 0;
}

.hm-home-content-column {
    border-right: 1px solid #ececec;
    min-width: 0;
    padding-right: 18px;
}

.hm-home-content-column .hm-section {
    border-bottom: 1px solid #ececec;
    padding: 24px 0;
}

.hm-panel,
.hm-card {
    border-color: #ececec;
    border-radius: 3px;
    box-shadow: none;
}

.hm-panel {
    padding: 0;
}

.hm-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hm-section-header {
    border-bottom-color: #ececec;
    margin-bottom: 18px;
}

.hm-section-header::before {
    background: #f09705;
}

.hm-section-header h2,
.hm-dark-heading h2 {
    color: #000000;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.hm-section-header a {
    color: #f09705;
    font-weight: 400;
}

.hm-card h3,
.hm-list-item h3,
.hm-dark-card h3 {
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.hm-card p,
.hm-excerpt {
    color: #000000;
    font-size: 16px;
    line-height: 1.5;
}

.hm-card-media,
.hm-dark-media,
.hm-list-thumb {
    border-radius: 3px;
}

.hm-dark-highlight {
    background: #111111;
    border-radius: 0;
    margin-left: -1px;
    padding: 24px;
}

.hm-dark-highlight .hm-section-header h2,
.hm-dark-highlight .hm-card h3,
.hm-dark-highlight .hm-dark-card h3,
.hm-dark-highlight a {
    color: #ffffff;
}

.hm-video-section,
.hm-photo-grid-section {
    background: #ffffff;
}

@media (max-width: 1100px) {
    .hm-home-main-grid {
        grid-template-columns: 1fr;
    }

    .hm-home-content-column {
        border-right: 0;
        padding-right: 0;
    }
}

@media (max-width: 700px) {
    .hm-container {
        width: min(100% - 24px, var(--hm-container));
    }

    .hm-lead-story .hm-hero-body {
        min-height: auto;
        padding: 22px 0 18px;
    }

    .hm-lead-story .hm-hero-title,
    .hm-lead-story .hm-hero-title a {
        font-size: 32px;
        line-height: 1.28;
    }

    .hm-hero-author-name {
        font-size: 15px;
    }

    .hm-lead-story .hm-hero-media {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .hm-grid-two,
    .hm-grid-three {
        grid-template-columns: 1fr;
    }
}

.hm-container {
    width: min(100% - 32px, var(--hm-container));
    margin: 0 auto;
}

.hm-section,
.hm-ad-banner,
.hm-trending-strip {
    margin-bottom: var(--section-gap);
}

.hm-grid {
    display: grid;
    gap: var(--card-gap);
}

.hm-grid-two {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
}

.hm-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hm-panel,
.hm-card {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.hm-panel {
    padding: 20px;
}

.hm-card {
    overflow: hidden;
}

.hm-card-media,
.hm-dark-media,
.hm-list-thumb {
    display: block;
    overflow: hidden;
    background: #edf2f7;
    border-radius: 8px 8px 0 0;
}

.hm-card-media {
    aspect-ratio: 4 / 3;
}

.hm-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hm-card-body {
    padding: var(--inner-padding);
}

.hm-card h1,
.hm-card h3,
.hm-list-item h3,
.hm-dark-card h3 {
    margin: 0;
    letter-spacing: 0;
}

.hm-card a,
.hm-list-item a,
.hm-dark-card a {
    color: inherit;
}

.hm-card h3,
.hm-list-item h3,
.hm-dark-card h3 {
    font-size: 16px;
    line-height: 1.45;
}

.hm-card p,
.hm-excerpt {
    color: var(--hm-muted);
    line-height: 1.6;
    margin: 10px 0 0;
}

.hm-card time,
.hm-list-item time,
.hm-dark-card time {
    display: block;
    color: var(--hm-muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.hm-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 0 0 12px;
    border-top: 0;
    border-bottom: 1px solid var(--hm-border);
    position: relative;
}

.hm-section-header::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 56px;
    height: 3px;
    background: var(--hm-red);
}

.hm-section-header h2,
.hm-dark-heading h2 {
    color: var(--hm-ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.hm-section-header a {
    color: var(--hm-blue);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.hm-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
    align-items: start;
    gap: var(--card-gap);
}

.hm-hero-main {
    min-width: 0;
}

.hm-hero-main .hm-hero-media {
    aspect-ratio: 16 / 9;
    max-height: none;
}

.hm-hero-title {
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.32;
    font-weight: 900;
}

.hm-hero-side-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 104px;
}

.hm-hero-side-card .hm-card-media {
    width: 132px;
    height: 104px;
    aspect-ratio: auto;
    align-self: start;
}

.hm-hero-side-card .hm-card-body {
    align-self: center;
}

.hm-hero-side-list {
    display: grid;
    gap: var(--card-gap);
    min-width: 0;
}

.hm-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    border-radius: 4px;
    background: var(--hm-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 10px;
}

.hm-trending-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 12px 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.hm-strip-label {
    background: var(--hm-red);
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    padding: 7px 12px;
}

.hm-strip-items {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}

.hm-strip-items::-webkit-scrollbar {
    display: none;
}

.hm-strip-items a {
    color: var(--hm-ink);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.hm-news-stack {
    display: grid;
    gap: var(--card-gap);
}

.hm-large-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
}

.hm-large-card .hm-card-media {
    width: 190px;
    height: 126px;
    aspect-ratio: auto;
    border-radius: 8px 0 0 8px;
}

.hm-list-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hm-border);
}

.hm-list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hm-list-thumb {
    width: 112px;
    height: 76px;
    border-radius: 8px;
}

.korea-special-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
    align-items: stretch;
}

.korea-news-card {
    grid-column: span 2;
}

.korea-news-card,
.korea-ad-card {
    background: #fff;
    border: 1px solid var(--hm-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.korea-news-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 20px;
}

.korea-featured-news .hm-large-card {
    display: block;
}

.korea-featured-news .hm-large-card .hm-card-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
}

.korea-featured-news .hm-large-card h3 {
    font-size: 24px;
    line-height: 1.4;
}

.korea-small-news-list {
    display: grid;
    gap: 0;
}

.korea-small-news-list .hm-list-item {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.korea-small-news-list .hm-list-item:last-child {
    margin-bottom: 0;
}

.korea-small-news-list .hm-list-thumb {
    width: 110px;
    height: 75px;
}

.korea-ad-card {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: sticky;
    top: 20px;
    align-self: start;
}

.admin-bar .korea-ad-card {
    top: 52px;
}

.korea-ad-card .hm-ad-banner {
    width: 100%;
}

.korea-ad-card .hm-ad-vertical {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.korea-ad-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
}

.hm-panel-ad {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.hm-ad-banner {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-align: center;
}

.hm-ad-banner img,
.hm-ad-banner iframe {
    max-width: 100%;
}

.hm-ad-banner img {
    width: auto;
    height: auto;
    max-height: 110px;
    margin: 0 auto;
}

.hm-ad-placeholder {
    display: grid;
    min-height: 90px;
    place-items: center;
    background: #f1f5f9;
    border: 1px dashed #b8c5d6;
    border-radius: 8px;
    color: #52657a;
    font-weight: 900;
}

.hm-ad-full .hm-ad-placeholder {
    border-radius: 0;
}

.hm-ad-vertical {
    width: 100%;
    min-height: 100%;
    border: 1px dashed #9db7d5;
    border-radius: var(--hm-radius);
    padding: 12px;
    background: var(--hm-card);
}

.hm-ad-vertical .hm-ad-placeholder {
    min-height: 250px;
}

.hm-ad-vertical img {
    max-height: 250px;
    object-fit: contain;
}

.hm-dark-highlight {
    background: var(--hm-dark);
    border-radius: 12px;
    padding: 24px;
    overflow: hidden;
}

.hm-dark-heading {
    margin-bottom: 18px;
}

.hm-dark-heading h2,
.hm-dark-highlight .hm-section-header h2,
.hm-dark-highlight .hm-section-header a {
    color: #ffffff;
}

.hm-dark-highlight .hm-section-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.hm-dark-column {
    min-width: 0;
}

.hm-dark-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

.hm-dark-card:first-of-type {
    padding-top: 0;
}

.hm-dark-card:last-child {
    border-bottom: 0;
}

.hm-dark-media {
    width: 112px;
    height: 76px;
    border-radius: 8px;
}

.hm-dark-card time {
    color: rgba(255, 255, 255, 0.62);
}

.hm-video-section {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.hm-video-carousel {
    display: grid;
    grid-auto-columns: minmax(260px, 23%);
    grid-auto-flow: column;
    gap: var(--card-gap);
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.hm-video-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.hm-video-card {
    min-width: 0;
    scroll-snap-align: start;
}

.hm-video-media {
    position: relative;
    aspect-ratio: 16 / 9;
    height: auto;
}

.hm-play-icon {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(215, 25, 32, 0.94);
    color: #ffffff;
}

.hm-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--card-gap);
}

.hm-photo-grid .hm-card-media {
    height: 170px;
    aspect-ratio: auto;
}

.in-feed-ad-container,
.homepage-side-ad-widget,
.sidebar-ad-widget,
.single-article-ad-widget {
    width: 100%;
}

.ad-label-inline,
.hidden-title {
    display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
    .hm-card,
    .hm-list-item,
    .hm-dark-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .hm-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 32px rgba(15, 23, 42, 0.10);
    }

    .hm-card-media:hover .hm-card-image,
    .hm-list-thumb:hover .hm-card-image,
    .hm-dark-media:hover .hm-card-image {
        transform: scale(1.05);
    }

    .hm-card a:hover,
    .hm-list-item a:hover,
    .hm-dark-card a:hover,
    .hm-strip-items a:hover {
        color: var(--hm-blue);
    }
}

@media (max-width: 1024px) {
    .hm-hero-grid {
        grid-template-columns: 1fr;
    }

    .hm-hero-title {
        font-size: 24px;
    }

    .hm-grid-two,
    .hm-grid-three {
        grid-template-columns: 1fr;
    }

    .hm-large-card {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .hm-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hm-home {
        --section-gap: 30px;
        --card-gap: 14px;
        --inner-padding: 14px;
        padding-top: 16px;
    }

    .hm-container {
        width: min(100% - 24px, var(--hm-container));
    }

    .hm-section-header h2,
    .hm-dark-heading h2 {
        font-size: 20px;
    }

    .korea-special-wrapper,
    .korea-news-grid {
        grid-template-columns: 1fr;
    }

    .korea-news-card {
        grid-column: auto;
    }

    .korea-ad-card {
        position: static;
    }

    .hm-hero-title {
        font-size: 21px;
    }

    .hm-hero-side-card,
    .hm-large-card,
    .hm-list-item,
    .hm-dark-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .hm-hero-side-card .hm-card-media,
    .hm-large-card .hm-card-media,
    .korea-small-news-list .hm-list-thumb,
    .hm-list-thumb,
    .hm-dark-media {
        width: 110px;
        height: 78px;
        aspect-ratio: auto;
    }

    .hm-hero-main .hm-card-media {
        aspect-ratio: 16 / 9;
    }

    .hm-video-media {
        height: 129px;
    }

    .hm-photo-grid .hm-card-media {
        height: 180px;
    }

    .hm-hero-side-card .hm-card-body,
    .hm-large-card .hm-card-body {
        align-self: center;
        padding: 12px;
    }

    .hm-card h3,
    .hm-list-item h3,
    .hm-dark-card h3 {
        font-size: 15px;
    }

    .hm-card p,
    .hm-excerpt {
        display: none;
    }

    .hm-trending-strip {
        grid-template-columns: 1fr;
    }

    .hm-video-carousel {
        grid-auto-columns: minmax(230px, 78%);
    }

    .hm-photo-grid {
        grid-template-columns: 1fr;
    }

    .hm-ad-banner {
        width: 100%;
    }
}

/* Plain-space editorial layout: no boxed section system. */
.hm-home {
    --section-gap: 44px;
    --card-gap: 22px;
    --inner-padding: 0;
    --hm-bg: #ffffff;
    --hm-card: transparent;
    --hm-border: #e5e7eb;
    background: #ffffff;
}

.hm-section,
.hm-trending-strip,
.hm-ad-banner {
    margin-bottom: var(--section-gap);
}

.hm-panel,
.hm-card,
.korea-news-card,
.korea-ad-card,
.hm-video-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.hm-card {
    overflow: visible;
}

.hm-card-media,
.hm-list-thumb,
.hm-dark-media {
    background: #eef2f6;
    border-radius: 0;
}

.hm-card-body {
    padding: 12px 0 0;
}

.hm-section-header {
    margin-bottom: 18px;
    padding: 0 0 10px;
    border-bottom: 1px solid #d9dee7;
}

.hm-section-header::before {
    width: 42px;
    height: 3px;
}

.hm-section-header h2,
.hm-dark-heading h2 {
    font-size: 24px;
    color: #111827;
}

.hm-section-header a {
    color: #003366;
}

.hm-hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.72fr);
    gap: 28px;
    padding-top: 8px;
    padding-bottom: 34px;
    border-bottom: 1px solid #e5e7eb;
}

.hm-hero-main {
    position: relative;
    overflow: hidden;
}

.hm-hero-main .hm-card-media {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.hm-hero-main .hm-hero-body {
    position: absolute;
    inset: auto 0 0;
    padding: 90px 28px 28px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(6, 27, 51, 0) 0%, rgba(6, 27, 51, 0.88) 72%);
}

.hm-hero-main .hm-category-badge {
    margin-bottom: 12px;
}

.hm-hero-main .hm-hero-title,
.hm-hero-main .hm-hero-title a,
.hm-hero-main .hm-excerpt,
.hm-hero-main time {
    color: #ffffff;
}

.hm-hero-main .hm-excerpt {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
}

.hm-hero-side-list {
    gap: 20px;
}

.hm-hero-side-card {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-height: 0;
    padding: 0 0 18px;
    border-bottom: 1px solid #e5e7eb;
}

.hm-hero-side-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hm-hero-side-card .hm-card-media {
    width: 132px;
    height: 92px;
}

.hm-hero-side-card .hm-card-body {
    align-self: start;
    padding: 0;
}

.hm-hero-side-card h3 {
    font-size: 18px;
    line-height: 1.45;
}

.hm-trending-strip {
    grid-template-columns: auto minmax(0, 1fr);
    background: transparent;
    border: 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 0;
}

.hm-grid-two,
.hm-grid-three,
.korea-special-wrapper {
    gap: 34px;
}

.hm-grid-two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hm-news-stack {
    gap: 18px;
}

.hm-large-card {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.hm-large-card .hm-card-media {
    width: 180px;
    height: 118px;
    border-radius: 0;
}

.hm-large-card .hm-card-body {
    padding: 0;
}

.hm-large-card h3 {
    font-size: 18px;
}

.hm-list-item {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.hm-list-thumb {
    width: 104px;
    height: 70px;
}

.korea-special-wrapper {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    padding-bottom: 34px;
    border-bottom: 1px solid #e5e7eb;
}

.korea-news-card {
    grid-column: auto;
}

.korea-news-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.72fr);
    gap: 24px;
}

.korea-featured-news .hm-large-card {
    display: block;
    border-bottom: 0;
    padding-bottom: 0;
}

.korea-featured-news .hm-large-card .hm-card-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
}

.korea-small-news-list .hm-list-item {
    grid-template-columns: 104px minmax(0, 1fr);
}

.korea-small-news-list .hm-list-thumb {
    width: 104px;
    height: 70px;
}

.korea-ad-card {
    position: sticky;
    top: 20px;
    justify-content: flex-start;
}

.hm-ad-banner {
    padding: 0;
}

.hm-ad-full {
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.hm-ad-banner img {
    max-height: 96px;
}

.hm-ad-placeholder {
    background: #f8fafc;
    border: 1px dashed #ccd5e1;
    border-radius: 0;
}

.hm-ad-vertical {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.hm-dark-highlight {
    background: #061b33;
    border-radius: 0;
    padding: 26px 28px;
}

.hm-dark-highlight .hm-section-header {
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.hm-dark-card {
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

.hm-video-section {
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 0;
}

.hm-video-card {
    border: 0;
}

.hm-photo-grid {
    gap: 24px 18px;
}

.hm-photo-grid .hm-card {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 14px;
}

@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
    .hm-card:hover {
        box-shadow: none;
        transform: none;
    }

    .hm-card a:hover,
    .hm-list-item a:hover,
    .hm-dark-card a:hover,
    .hm-strip-items a:hover {
        color: #e21b2d;
    }
}

@media (max-width: 1024px) {
    .hm-hero-grid,
    .korea-special-wrapper,
    .korea-news-grid {
        grid-template-columns: 1fr;
    }

    .korea-ad-card {
        position: static;
    }
}

@media (max-width: 700px) {
    .hm-home {
        --section-gap: 32px;
        padding-top: 14px;
    }

    .hm-hero-main .hm-hero-body {
        position: static;
        padding: 14px 0 0;
        color: #111827;
        background: transparent;
    }

    .hm-hero-main .hm-hero-title,
    .hm-hero-main .hm-hero-title a,
    .hm-hero-main .hm-excerpt,
    .hm-hero-main time {
        color: #111827;
    }

    .hm-hero-main .hm-excerpt {
        color: #6b7280;
    }

    .hm-hero-side-card,
    .hm-large-card,
    .hm-list-item,
    .hm-dark-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .hm-hero-side-card .hm-card-media,
    .hm-large-card .hm-card-media,
    .korea-small-news-list .hm-list-thumb,
    .hm-list-thumb,
    .hm-dark-media {
        width: 104px;
        height: 72px;
    }
}

/* Final Figma homepage overrides. Kept last because this theme has legacy homepage layers above. */
.hm-home {
    --section-gap: 0;
    --card-gap: 18px;
    --inner-padding: 0;
    --hm-container: 1440px;
    --hm-bg: #ffffff;
    --hm-card: #ffffff;
    --hm-border: #ececec;
    --hm-ink: #000000;
    --hm-muted: #636363;
    --hm-blue: #000000;
    --hm-red: #f09705;
    --hm-radius: 3px;
    background: #ffffff;
    color: #000000;
    padding: 0 0 52px;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
}

.hm-home .hm-container {
    width: min(100%, var(--hm-container));
}

.hm-home .hm-section,
.hm-home .hm-ad-banner,
.hm-home .hm-trending-strip {
    margin-bottom: 0;
}

.hm-home .hm-lead-stack,
.hm-home .hm-card.hm-lead-story,
.hm-home .hm-home-content-column .hm-section,
.hm-home .hm-lead-stack > .hm-ad-banner,
.hm-home .hm-home-content-column > .hm-ad-banner {
    border-bottom: 1px solid #ececec;
}

.hm-home .hm-card.hm-lead-story {
    background: #ffffff;
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
    overflow: visible;
}

.hm-home .hm-lead-story .hm-hero-body {
    background: transparent;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 228px;
    padding: 10px 48px 16px;
    position: static;
    text-align: center;
}

.hm-home .hm-lead-story .hm-category-badge,
.hm-home .hm-lead-story .hm-excerpt,
.hm-home .hm-lead-story time {
    display: none;
}

.hm-home .hm-lead-story .hm-hero-title,
.hm-home .hm-lead-story .hm-hero-title a {
    color: #000000;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
    font-size: clamp(36px, 4.03vw, 58px);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
    max-width: 1342px;
    text-decoration: none;
    word-break: break-word;
}

.hm-home .hm-hero-byline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 35px;
    margin-top: 16px;
}

.hm-home .hm-hero-author-avatar {
    border: 1px solid #ececec;
    border-radius: 999px;
    display: grid;
    height: 35px;
    place-items: center;
    width: 35px;
}

.hm-home .hm-author-avatar-img {
    border-radius: 999px;
    display: block;
    height: 27px;
    object-fit: cover;
    width: 27px;
}

.hm-home .hm-hero-author-name {
    color: #000000;
    font-family: "Noto Sans Devanagari", "Mukta", Arial, sans-serif;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.hm-home .hm-lead-story .hm-hero-media {
    aspect-ratio: auto;
    border-radius: 3px;
    height: 600px;
    margin: 0;
    width: 100%;
}

.hm-home .hm-lead-story .hm-card-image {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.hm-home .hm-lead-story-3 .hm-hero-media {
    display: none;
}

.hm-home .hm-lead-stack > .hm-ad-banner,
.hm-home .hm-home-content-column > .hm-ad-banner {
    padding: 24px 0;
}

.hm-home .hm-ad-banner {
    background: #ffffff;
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    box-shadow: none;
}

.hm-home .hm-ad-banner img,
.hm-home .hm-ad-banner iframe {
    border-radius: 0;
    display: block;
    margin: 0 auto;
    max-height: 130px;
    object-fit: contain;
    width: 100%;
}

.hm-home .hm-ad-placeholder {
    background: #f7f8ff;
    border: 1px dashed #d8d8d8;
    border-radius: 0;
    color: #8a8a8a;
    font-size: 15px;
    font-weight: 600;
    min-height: 105px;
}

.hm-home .hm-trending-strip {
    border: 0;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
    box-shadow: none;
    padding: 14px 0;
}

.hm-home .hm-strip-label {
    background: #000000;
    border-radius: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 18px;
}

.hm-home .hm-strip-items a {
    color: #000000;
    font-size: 16px;
    font-weight: 400;
}

.hm-home .hm-home-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1071px) minmax(300px, 351px);
    gap: 18px;
    align-items: start;
}

.hm-home .hm-home-main-grid:not(:has(#secondary)) {
    grid-template-columns: 1fr;
}

.hm-home .hm-home-content-column {
    border-right: 1px solid #ececec;
    min-width: 0;
    padding-right: 18px;
}

.hm-home .hm-home-main-grid:not(:has(#secondary)) .hm-home-content-column {
    border-right: 0;
    padding-right: 0;
}

.hm-home .hm-home-content-column .hm-section {
    padding: 24px 0;
}

.hm-home .hm-panel,
.hm-home .hm-card {
    border-color: #ececec;
    border-radius: 3px;
    box-shadow: none;
}

.hm-home .hm-panel {
    padding: 0;
}

.hm-home .hm-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hm-home .hm-section-header {
    border-bottom-color: #ececec;
}

.hm-home .hm-section-header::before {
    background: #f09705;
}

.hm-home .hm-section-header h2,
.hm-home .hm-dark-heading h2 {
    color: #000000;
    font-family: "Mukta", "Noto Sans Devanagari", Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.hm-home .hm-section-header a {
    color: #f09705;
    font-weight: 400;
}

.hm-home .hm-card h3,
.hm-home .hm-list-item h3,
.hm-home .hm-dark-card h3 {
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.hm-home .hm-card p,
.hm-home .hm-excerpt {
    color: #000000;
    font-size: 16px;
    line-height: 1.5;
}

.hm-home .hm-card-media,
.hm-home .hm-dark-media,
.hm-home .hm-list-thumb {
    border-radius: 3px;
}

.hm-home .hm-dark-highlight {
    background: #111111;
    border-radius: 0;
    padding: 24px;
}

.hm-home .hm-dark-highlight .hm-section-header h2,
.hm-home .hm-dark-highlight .hm-card h3,
.hm-home .hm-dark-highlight .hm-dark-card h3,
.hm-home .hm-dark-highlight a {
    color: #ffffff;
}

@media (max-width: 1100px) {
    .hm-home .hm-home-main-grid {
        grid-template-columns: 1fr;
    }

    .hm-home .hm-home-content-column {
        border-right: 0;
        padding-right: 0;
    }
}

@media (max-width: 700px) {
    .hm-home .hm-container {
        width: min(100% - 24px, var(--hm-container));
    }

    .hm-home .hm-lead-story .hm-hero-body {
        min-height: auto;
        padding: 22px 0 18px;
    }

    .hm-home .hm-lead-story .hm-hero-title,
    .hm-home .hm-lead-story .hm-hero-title a {
        font-size: 32px;
        line-height: 1.28;
    }

    .hm-home .hm-hero-author-name {
        font-size: 15px;
    }

    .hm-home .hm-lead-story .hm-hero-media {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .hm-home .hm-grid-two,
    .hm-home .hm-grid-three {
        grid-template-columns: 1fr;
    }
}

/* Keep dynamic ad widgets visible in Customizer preview and frontend. */
.hm-home .hm-container > .hm-ad-banner:first-child,
.hm-home .hm-ad-banner.hm-ad-full {
    display: block !important;
    min-height: 90px;
    padding: 24px 0;
}

.hm-home .hm-ad-banner .in-feed-ad-container,
.hm-home .hm-ad-banner .lead-inline-ad-widget,
.hm-home .hm-ad-banner .homepage-side-ad-widget,
.hm-home .hm-ad-banner .widget,
.hm-home .hm-ad-banner .widget_media_image,
.hm-home .hm-ad-banner .wp-block-image {
    display: block !important;
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
    width: 100%;
}

.hm-home .hm-ad-banner img,
.hm-home .hm-ad-banner .wp-block-image img,
.hm-home .hm-ad-banner .widget_media_image img {
    display: block !important;
    height: auto !important;
    margin: 0 auto !important;
    max-height: none;
    max-width: 100% !important;
    object-fit: contain;
    width: auto;
}

.hm-home .hm-container > .hm-ad-banner:first-child img {
    width: min(970px, 100%) !important;
}

.hm-home .hm-ad-banner.hm-ad-vertical {
    display: grid !important;
    gap: 18px;
}

.hm-home .hm-ad-banner.hm-ad-vertical .homepage-side-ad-widget + .homepage-side-ad-widget,
.hm-home .hm-ad-banner.hm-ad-vertical .sidebar-ad-widget + .sidebar-ad-widget,
.hm-home .hm-ad-banner.hm-ad-vertical .widget + .widget {
    margin-top: 18px;
}

.hm-home .hm-dark-highlight {
    padding-left: clamp(18px, 2.5vw, 36px);
    padding-right: clamp(18px, 2.5vw, 36px);
}

.hm-home .hm-home-content-column > .hm-dark-highlight {
    box-sizing: border-box;
    padding: clamp(22px, 2.4vw, 36px) !important;
    width: auto;
}

@media (max-width: 700px) {
    .hm-home .hm-home-content-column > .hm-dark-highlight {
        margin-left: 0;
        margin-right: 0;
        padding: 20px 16px !important;
    }
}


.hm-home .hm-dark-highlight {
    padding-left: clamp(20px, 3vw, 42px);
    padding-right: clamp(20px, 3vw, 42px);
}

.hm-home .hm-dark-highlight .hm-grid-three {
    column-gap: clamp(24px, 3vw, 44px);
}

/* Final responsive gutters: keep tablet and mobile layouts away from viewport edges. */
.hm-home .hm-container {
    width: min(100% - clamp(24px, 4vw, 48px), var(--hm-container)) !important;
}

@media (max-width: 1100px) {
    .hm-home .hm-home-main-grid {
        row-gap: 32px;
    }
}

@media (max-width: 700px) {
    .hm-home .hm-container {
        width: min(100% - 24px, var(--hm-container)) !important;
    }
}

/* Final excerpt clamp: keep homepage summaries to two lines. */
.hm-home .hm-excerpt,
.hm-home .hm-card p,
.hm-home .hm-list-item p,
.hm-home .hm-hero-main .hm-excerpt,
.hm-home .hm-lead-story .hm-excerpt {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Final title clamp: keep homepage post titles to two lines. */
.hm-home .hm-card h3,
.hm-home .hm-list-item h3,
.hm-home .hm-dark-card h3,
.hm-home .hm-hero-side-card h3,
.hm-home .hm-large-card h3,
.hm-home .korea-featured-news .hm-large-card h3,
.hm-home .hm-card h3 a,
.hm-home .hm-list-item h3 a,
.hm-home .hm-dark-card h3 a {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
