/* Shared landscape card for synchronized group ads on home and list pages. */
.home-section-ad { min-width: 0; }
.home-section-ad__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: #17171e;
    color: #f4f4f6;
    text-decoration: none;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.home-section-ad__poster {
    position: relative;
    display: block;
    flex: none;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #242030;
}
.home-section-ad__poster img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.home-section-ad__mark {
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 5px;
    background: rgba(0, 0, 0, .58);
    color: #eee;
    font-size: 10.5px;
    line-height: 1.4;
}
.home-section-ad__footer {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 12px;
}
.home-section-ad__brand {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff2f6d, #ff5a3d);
    color: #fff;
    font-size: 16px;
    font-weight: 750;
    line-height: 1;
}
.home-section-ad__copy { display: block; min-width: 0; }
.home-section-ad__copy strong,
.home-section-ad__copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-section-ad__copy strong { color: #f4f4f6; font-size: 13px; font-weight: 650; line-height: 1.5; }
.home-section-ad__copy small { margin-top: 2px; color: #8f8f9d; font-size: 10.5px; line-height: 1.5; }
.home-section-ad__cta {
    display: block;
    max-width: 112px;
    overflow: hidden;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff2f6d, #ff5a3d);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-section-ad__card:hover { color: #f4f4f6; border-color: rgba(255, 47, 109, .42); }
.home-section-ad__card:focus-visible { outline: 2px solid #ff6b95; outline-offset: 2px; }
@media (hover: hover) {
    .home-section-ad__card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
}
/* Group ad creatives retain the same portrait proportions as drama cards. */
.drama-grid .home-drama-ad__card,
.drama-d-related-grid .home-drama-ad__card { height: 100%; }
.home-drama-ad__poster {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #242030;
}
.home-drama-ad__poster img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.home-drama-ad__mark {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 4px;
    background: rgba(0, 0, 0, .6);
    color: #eee;
    font-size: 10.5px;
    line-height: 1.5;
}
.home-drama-ad__description { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Keep list/related ads within their row budgets as the grids change columns.
 * Ads precede ordinary cards, so these cutoffs leave content and home slots intact. */
@media (max-width: 1199px) {
    .drama-d-related-grid > .home-drama-ad:nth-child(n+5) { display: none; }
}
@media (max-width: 899px) {
    main.all-videos-page .all-videos-grid > .home-section-ad:nth-child(n+5),
    .gossip-page--list .gossip-grid > .home-section-ad:nth-child(n+5),
    .gossip-related .gossip-grid--related > .home-section-ad:nth-child(n+5) { display: none; }
}
@media (max-width: 767px) {
    .drama-d-related-grid > .home-drama-ad:nth-child(n+3) { display: none; }
}
@media (max-width: 767px) {
    .home-section-ad__card { border-radius: 10px; }
    .home-section-ad__footer {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 7px;
        padding: 8px;
    }
    .home-section-ad__brand { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
    .home-section-ad__copy strong { font-size: 12px; }
    .home-section-ad__copy small { font-size: 10px; }
    .home-section-ad__cta {
        grid-column: 1 / -1;
        max-width: none;
        padding: 7px 9px;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-section-ad__card { transition: none; }
    .home-section-ad__card:hover { transform: none; }
}
