/* 239 - Főoldal teljes mobil/tablet reszponzív stabilizálás
   Kizárólag a publikus kezdőlapot érinti. */

html body.front.is-home,
html body.front.is-home * {
    box-sizing: border-box;
}

html body.front.is-home img,
html body.front.is-home iframe,
html body.front.is-home video,
html body.front.is-home canvas,
html body.front.is-home svg {
    max-width: 100%;
}

html body.front.is-home :where(
    .site-header,
    .top-info-row,
    .hero,
    .home-schedule-news-cluster,
    .home-schedule-instant-row,
    .today-schedule-section,
    .home-instant-slideshow-capsule,
    #helyi-hirek-fooldal,
    #hirek,
    #szavazasok,
    #kozossegi-frissitesek,
    #importalt-oldalak,
    #galeria
) {
    min-width: 0;
    max-width: 100%;
}

/* Tablet: a műsorújság és az Instant kapszula ne szoruljon egymás mellé. */
@media (max-width: 1040px) {
    html body.front.is-home .home-schedule-news-cluster > .home-schedule-instant-row {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    html body.front.is-home .home-schedule-instant-row > .today-schedule-section,
    html body.front.is-home .home-schedule-instant-row > .home-instant-slideshow-capsule {
        grid-column: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        align-self: start !important;
    }

    html body.front.is-home .home-instant-slideshow-stage {
        min-height: 0 !important;
        aspect-ratio: 16 / 9 !important;
    }
}

@media (max-width: 820px) {
    html,
    html body.front.is-home {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    html body.front.is-home .site-wrap {
        width: calc(100% - 18px) !important;
        max-width: 100% !important;
        margin-inline: auto !important;
    }

    html body.front.is-home main,
    html body.front.is-home .home-schedule-news-cluster,
    html body.front.is-home .home-schedule-news-cluster > *,
    html body.front.is-home .home-schedule-instant-row {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Fejléc és navigáció */
    html body.front.is-home .site-header {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home .site-header .brand {
        overflow: hidden;
    }

    html body.front.is-home .brand-copy {
        min-width: 0;
    }

    html body.front.is-home .brand-copy strong,
    html body.front.is-home .brand-copy em {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    html body.front.is-home .site-header .main-nav {
        max-width: 100% !important;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
    }

    html body.front.is-home .site-header .main-nav a {
        scroll-snap-align: start;
    }

    html body.front.is-home .site-search-box,
    html body.front.is-home .site-search-box input {
        width: 100%;
        min-width: 0 !important;
    }

    /* Dátum, időjárás és megjelenés */
    html body.front.is-home .top-info-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    html body.front.is-home .weather-pill,
    html body.front.is-home .top-info-row .appearance-panel {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home .weather-day-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    html body.front.is-home .weather-day-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Hero */
    html body.front.is-home .hero {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home .hero-copy,
    html body.front.is-home .broadcast-info-card {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
    }

    html body.front.is-home .hero-copy h1,
    html body.front.is-home .broadcast-info-card h2,
    html body.front.is-home .live-song-card strong,
    html body.front.is-home .next-show-teaser strong,
    html body.front.is-home .show-title-with-logo,
    html body.front.is-home .show-title-with-logo > span {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    html body.front.is-home .hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
    }

    html body.front.is-home .hero-actions > * {
        width: 100% !important;
        min-width: 0 !important;
        text-align: center;
    }

    html body.front.is-home .hero-app-download-card,
    html body.front.is-home .hero-app-download-card .app-download-links {
        width: 100% !important;
        max-width: 100% !important;
    }

    html body.front.is-home .hero-app-download-card .app-download-links {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    html body.front.is-home .broadcast-title-row,
    html body.front.is-home .next-show-teaser,
    html body.front.is-home .live-song-card {
        min-width: 0;
        max-width: 100%;
    }

    /* Műsorújság */
    html body.front.is-home .home-schedule-news-cluster {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    html body.front.is-home .home-schedule-news-cluster > .home-schedule-instant-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    html body.front.is-home .today-schedule-section {
        padding: 16px !important;
        overflow: hidden !important;
    }

    html body.front.is-home .today-schedule-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px !important;
        align-items: start !important;
    }

    html body.front.is-home .today-schedule-head > div {
        min-width: 0;
    }

    html body.front.is-home .today-schedule-action {
        width: auto !important;
        max-width: 100%;
        white-space: nowrap;
    }

    html body.front.is-home .today-schedule-switcher {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home .today-schedule-nav {
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
    }

    html body.front.is-home .today-day-tabs {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px 1px 7px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    html body.front.is-home .today-day-tabs::-webkit-scrollbar {
        display: none;
    }

    html body.front.is-home .today-day-tab {
        flex: 0 0 auto !important;
        min-width: 82px !important;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    html body.front.is-home .today-schedule-panels,
    html body.front.is-home .today-schedule-panel,
    html body.front.is-home .today-schedule-list {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home .today-schedule-list {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.front.is-home .today-schedule-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        overflow: hidden;
    }

    html body.front.is-home .today-schedule-content,
    html body.front.is-home .today-show-title-with-logo,
    html body.front.is-home .today-show-title-with-logo a {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }

    /* Instant képek diavetítés */
    html body.front.is-home .home-instant-slideshow-capsule {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 16px !important;
        border-radius: 24px !important;
        overflow: hidden !important;
    }

    html body.front.is-home .home-instant-slideshow-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px !important;
        align-items: start !important;
    }

    html body.front.is-home .home-instant-slideshow-head > div {
        min-width: 0;
    }

    html body.front.is-home .home-instant-slideshow-head h2 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    html body.front.is-home .home-instant-all-link {
        max-width: 100%;
        white-space: nowrap;
    }

    html body.front.is-home .home-instant-slideshow-stage {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 10 !important;
        border-radius: 20px !important;
    }

    html body.front.is-home .home-instant-slide,
    html body.front.is-home .home-instant-slide img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
    }

    html body.front.is-home .home-instant-slideshow-foot {
        min-width: 0;
        max-width: 100%;
    }

    html body.front.is-home .home-instant-dots {
        flex: 1 1 auto;
        flex-wrap: nowrap !important;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 1px;
        scrollbar-width: none;
    }

    html body.front.is-home .home-instant-dots::-webkit-scrollbar {
        display: none;
    }

    /* Hírek, szavazások, közösségi blokkok és galéria */
    html body.front.is-home :where(
        #helyi-hirek-fooldal .news-grid,
        #hirek .news-grid,
        #importalt-oldalak .news-grid,
        .poll-card-grid,
        .home-poll-grid,
        #kozossegi-frissitesek .social-embedded-grid,
        #galeria .gallery-card-grid,
        #galeria .compact-gallery-grid
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 11px !important;
        align-items: start !important;
    }

    html body.front.is-home :where(
        .news-card,
        .poll-capsule,
        .poll-card,
        #kozossegi-frissitesek .social-embedded-card,
        #galeria .gallery-card
    ) {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        align-self: start !important;
    }

    html body.front.is-home .home-schedule-news-cluster .news-card.has-home-thumb {
        grid-template-columns: 96px minmax(0, 1fr) !important;
    }

    html body.front.is-home .home-schedule-news-cluster .home-news-thumb,
    html body.front.is-home a.home-news-thumb {
        width: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
    }

    html body.front.is-home .poll-options label,
    html body.front.is-home .poll-open-answer input,
    html body.front.is-home .poll-draw-campaign-grid input {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home #kozossegi-frissitesek {
        overflow: visible !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embedded-card {
        overflow: hidden !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embed-frame-wrap,
    html body.front.is-home #kozossegi-frissitesek .social-facebook-frame,
    html body.front.is-home #kozossegi-frissitesek .social-youtube-feature,
    html body.front.is-home #kozossegi-frissitesek iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-youtube-feature {
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
    }

    html body.front.is-home .section-head {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    html body.front.is-home .site-wrap {
        width: calc(100% - 12px) !important;
    }

    html body.front.is-home .site-header {
        grid-template-columns: minmax(0, 1fr) 34px !important;
    }

    html body.front.is-home .site-header .brand {
        gap: 7px !important;
    }

    html body.front.is-home .brand-logo-animated {
        width: 78px !important;
        flex: 0 0 78px !important;
    }

    html body.front.is-home .brand-copy strong {
        font-size: 15px !important;
    }

    html body.front.is-home .brand-copy em {
        font-size: 10px !important;
        white-space: nowrap !important;
    }

    html body.front.is-home .site-header .main-nav {
        margin-inline: -1px !important;
    }

    html body.front.is-home .site-search-box button {
        padding-inline: 9px !important;
    }

    html body.front.is-home .hero-copy,
    html body.front.is-home .broadcast-info-card,
    html body.front.is-home .today-schedule-section,
    html body.front.is-home .home-instant-slideshow-capsule,
    html body.front.is-home #helyi-hirek-fooldal,
    html body.front.is-home #hirek,
    html body.front.is-home #szavazasok,
    html body.front.is-home #kozossegi-frissitesek,
    html body.front.is-home #importalt-oldalak,
    html body.front.is-home #galeria {
        padding: 14px !important;
        border-radius: 20px !important;
    }

    html body.front.is-home .hero-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.front.is-home .hero-app-download-card .app-download-links {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    html body.front.is-home .hero-app-download-card .official-store-badge {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
    }

    html body.front.is-home .hero-app-download-card .official-store-badge img {
        max-width: 100% !important;
    }

    html body.front.is-home .today-schedule-head {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.front.is-home .today-schedule-action {
        width: 100% !important;
        white-space: normal !important;
        text-align: center;
    }

    html body.front.is-home .today-schedule-switcher {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html body.front.is-home .today-schedule-nav {
        min-height: 38px !important;
        padding: 8px 9px !important;
        font-size: 12px !important;
    }

    html body.front.is-home .today-day-tab {
        min-width: 78px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    html body.front.is-home .today-schedule-item {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    html body.front.is-home .home-instant-slideshow-head {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.front.is-home .home-instant-all-link {
        width: 100% !important;
        white-space: normal !important;
        text-align: center;
    }

    html body.front.is-home .home-instant-slideshow-stage {
        aspect-ratio: 4 / 3 !important;
        border-radius: 17px !important;
    }

    html body.front.is-home .home-instant-slide-caption {
        padding: 44px 14px 13px !important;
    }

    html body.front.is-home .home-instant-slide-caption strong {
        font-size: 17px !important;
        line-height: 1.12 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    html body.front.is-home .home-instant-nav {
        width: 34px !important;
        height: 44px !important;
        border-radius: 12px !important;
        font-size: 25px !important;
    }

    html body.front.is-home .home-instant-nav.is-prev { left: 7px !important; }
    html body.front.is-home .home-instant-nav.is-next { right: 7px !important; }

    html body.front.is-home .home-instant-slideshow-foot {
        align-items: center !important;
        gap: 8px !important;
    }

    html body.front.is-home .home-schedule-news-cluster .news-card.has-home-thumb {
        grid-template-columns: 84px minmax(0, 1fr) !important;
        column-gap: 10px !important;
        padding: 10px !important;
    }

    html body.front.is-home .home-schedule-news-cluster .home-news-thumb,
    html body.front.is-home a.home-news-thumb {
        width: 84px !important;
        min-width: 84px !important;
        max-width: 84px !important;
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
    }

    html body.front.is-home .poll-draw-public-note,
    html body.front.is-home .poll-actions,
    html body.front.is-home .poll-result-row > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embedded-card-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 7px !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embedded-card-head h3 {
        text-align: left !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embed-frame-wrap,
    html body.front.is-home #kozossegi-frissitesek .social-facebook-frame {
        min-height: 430px !important;
        height: 430px !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embedded-action,
    html body.front.is-home .section-actions .secondary-action {
        width: 100% !important;
        justify-content: center !important;
        text-align: center;
    }

    html body.front.is-home #galeria .gallery-card a,
    html body.front.is-home #galeria .compact-gallery-grid .gallery-card a {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        min-height: 94px !important;
    }

    html body.front.is-home #galeria .gallery-card img,
    html body.front.is-home #galeria .compact-gallery-grid .gallery-card img {
        width: 96px !important;
        height: 94px !important;
        min-height: 94px !important;
    }

    html body.front.is-home #galeria .gallery-card div {
        padding: 10px !important;
    }
}

@media (max-width: 390px) {
    html body.front.is-home .site-wrap {
        width: calc(100% - 8px) !important;
    }

    html body.front.is-home .brand-logo-animated {
        width: 70px !important;
        flex-basis: 70px !important;
    }

    html body.front.is-home .brand-copy strong {
        font-size: 14px !important;
    }

    html body.front.is-home .hero-app-download-card .app-download-links {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.front.is-home .home-instant-slideshow-stage {
        aspect-ratio: 1 / 1 !important;
    }

    html body.front.is-home .home-instant-counter {
        font-size: 11px !important;
    }

    html body.front.is-home #kozossegi-frissitesek .social-embed-frame-wrap,
    html body.front.is-home #kozossegi-frissitesek .social-facebook-frame {
        min-height: 400px !important;
        height: 400px !important;
    }
}
