@media (max-width: 1650px) {
    .gfrm-shell, .gfrm-shell-wide { width: min(calc(100% - 64px), var(--gfrm-shell)); }
    .gfrm-shell-wide { width: min(calc(100% - 64px), var(--gfrm-shell-wide)); }
    .gfrm-header-inner { gap: 28px; }
    .gfrm-brand .custom-logo { max-width: 280px; max-height: 62px; }
    .gfrm-header-navigation { gap: 28px; }
    .gfrm-menu { gap: 22px; }
    .gfrm-header-actions { gap: 20px; }
}

@media (max-width: 1450px) {
    .gfrm-header-inner { gap: 20px; }
    .gfrm-brand .custom-logo { max-width: 245px; max-height: 57px; }
    .gfrm-brand-name { display: none; }
    .gfrm-header-navigation { gap: 22px; }
    .gfrm-menu { gap: 18px; }
    .gfrm-menu a { font-size: 12px; }
    .gfrm-header-actions { gap: 15px; }
    .gfrm-header-join { padding-inline: 22px; }
    .gfrm-featured-grid { grid-template-columns: 1.18fr 1.08fr 1fr; }
}

@media (max-width: 1200px) {
    .gfrm-shell, .gfrm-shell-wide { width: min(calc(100% - 48px), var(--gfrm-shell)); }
    .gfrm-header-inner { min-height: 82px; }
    .gfrm-menu-toggle { display: block; }
    .gfrm-header-navigation { position: fixed; inset: 82px 0 0; display: block; visibility: hidden; margin: 0; padding: 32px 34px 46px; overflow-y: auto; background: var(--gfrm-black); pointer-events: none; transform: translateX(100%); transition: transform .24s ease, visibility 0s linear .24s; }
    .gfrm-header-navigation.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
    .gfrm-menu { display: block; }
    .gfrm-menu a { padding: 14px 4px; font-size: 19px; }
    .gfrm-menu > li.current-menu-item > a::after, .gfrm-menu > li.current_page_item > a::after { display: none; }
    .gfrm-menu .sub-menu { position: static; display: block; padding: 0 0 0 18px; background: transparent; box-shadow: none; }
    .gfrm-menu .sub-menu a { font-size: 15px; color: #b9bec5; }
    .gfrm-header-actions { display: grid; grid-template-columns: minmax(180px, 260px); margin-top: 30px; }
    .gfrm-members-link { padding: 12px 0; }
    .gfrm-hero { min-height: 650px; }
    .gfrm-hero-content { padding-top: 82px; }
    .gfrm-events-section .gfrm-events-grid { grid-template-columns: 1fr 1fr; }
    .gfrm-events-section .gfrm-event-card:last-child { grid-column: 1 / -1; }
    .gfrm-value-grid { grid-template-columns: 1fr 1fr; }
    .gfrm-value-item:nth-child(3)::before { display: none; }
    .gfrm-what-grid { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
    .gfrm-what-item:nth-child(4)::before { display: none; }
    .gfrm-photo-grid { grid-template-columns: repeat(4, 1fr); }
    .gfrm-featured-grid { grid-template-columns: 1fr 1fr; }
    .gfrm-feature-slot:last-child { grid-column: 1 / -1; }
    .gfrm-instagram-grid { grid-template-columns: repeat(4, 1fr); }
    .gfrm-final-cta-inner { align-items: flex-start; flex-direction: column; padding-block: 45px; }
    .gfrm-footer-main { grid-template-columns: 1.35fr repeat(3, 1fr); gap: 40px; }
    .gfrm-footer-description { max-width: 320px; }
    .gfrm-post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .gfrm-shell, .gfrm-shell-wide { width: min(calc(100% - 36px), var(--gfrm-shell)); }
    .gfrm-hero { min-height: 610px; }
    .gfrm-hero h1 { font-size: clamp(48px, 8vw, 64px); }
    .gfrm-value-grid { grid-template-columns: 1fr 1fr; }
    .gfrm-photo-grid { grid-template-columns: repeat(3, 1fr); }
    .gfrm-footer-main { grid-template-columns: 1fr 1fr; }
    .gfrm-footer-brand { grid-column: 1 / -1; }
    .gfrm-footer-description { max-width: 600px; }
    .gfrm-footer-legal { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 18px; }
}

@media (max-width: 640px) {
    .gfrm-shell, .gfrm-shell-wide { width: min(calc(100% - 24px), var(--gfrm-shell)); }
    .gfrm-header-inner { min-height: 72px; }
    .gfrm-header-navigation { inset: 72px 0 0; }
    .gfrm-brand-word { font-size: 29px; }
    .gfrm-brand-mark, .gfrm-brand-mark svg { width: 34px; height: 34px; }
    .gfrm-brand .custom-logo { max-width: 195px; max-height: 48px; }
    .gfrm-hero { min-height: 620px; }
    .gfrm-hero-media__image { object-position: 64% center; }
    .gfrm-hero-overlay { background: linear-gradient(90deg, rgba(5,8,11,.92), rgba(5,8,11,.43)), linear-gradient(0deg, rgba(0,0,0,.74), transparent 54%); }
    .gfrm-hero-content { padding-top: 72px; }
    .gfrm-hero h1 { font-size: 43px; }
    .gfrm-hero p { font-size: 18px; }
    .gfrm-hero-actions { gap: 12px; }
    .gfrm-hero-actions .gfrm-button { width: 100%; min-width: 0; }
    .gfrm-section { padding-block: 34px; }
    .gfrm-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .gfrm-section-heading h2 { font-size: 22px; }
    .gfrm-events-section .gfrm-events-grid { grid-template-columns: 1fr; }
    .gfrm-events-section .gfrm-event-card:last-child { grid-column: auto; }
    .gfrm-events-section .gfrm-event-card__media { aspect-ratio: 16 / 9; }
    .gfrm-value-grid { grid-template-columns: 1fr; }
    .gfrm-value-item + .gfrm-value-item::before { left: 20%; right: 20%; top: 0; bottom: auto; width: auto; height: 1px; }
    .gfrm-value-item:nth-child(3)::before { display: block; }
    .gfrm-what-grid { grid-template-columns: 1fr 1fr; }
    .gfrm-what-item:nth-child(odd)::before { display: none; }
    .gfrm-what-item:nth-child(4)::before { display: block; }
    .gfrm-photo-grid { grid-template-columns: repeat(2, 1fr); }
    .gfrm-featured-grid { grid-template-columns: 1fr; }
    .gfrm-feature-slot:last-child { grid-column: auto; }
    .gfrm-feature-slot { min-height: 245px; }
    .gfrm-feature-slot h3, .gfrm-feature-slot p { max-width: 64%; }
    .gfrm-instagram-grid { grid-template-columns: repeat(2, 1fr); }
    .gfrm-final-cta { min-height: 300px; }
    .gfrm-final-cta-inner { gap: 28px; padding-block: 42px; }
    .gfrm-final-cta h2 { font-size: 27px; }
    .gfrm-final-actions { width: 100%; flex-direction: column; gap: 12px; }
    .gfrm-final-actions .gfrm-button { width: 100%; min-width: 0; }
    .gfrm-footer-main { grid-template-columns: 1fr; gap: 38px; padding-top: 50px; padding-bottom: 45px; }
    .gfrm-footer-brand { grid-column: auto; }
    .gfrm-footer-column h2 { margin-bottom: 16px; }
    .gfrm-footer-menu { gap: 11px; }
    .gfrm-footer-legal nav { gap: 13px; }
    .gfrm-post-grid { grid-template-columns: 1fr; }
    .gfrm-page-hero { padding-top: 120px; }
    .gfrm-member-content { padding: 20px; }
}

@media (max-width: 980px) {
    .gfrm-community-showcase { grid-template-columns: 1fr; }
    .gfrm-month-photo__image { aspect-ratio: 16 / 9; }
}

@media (max-width: 680px) {
    .gfrm-community-block-heading--gallery { align-items: flex-start; flex-direction: column; gap: 10px; }
    .gfrm-challenge-mosaic__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gfrm-next-talk-card__content { max-width: 72%; padding: 22px; }
    .gfrm-next-talk-card__image { width: 42%; }
    .gfrm-next-talk-card h2 { font-size: 25px; }
}

@media (max-width: 1100px) {
    .gfrm-agenda-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gfrm-agenda-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .gfrm-agenda-grid,
    .gfrm-community-projects { grid-template-columns: 1fr; }
    .gfrm-agenda-grid > :last-child { grid-column: auto; }
    .gfrm-community-project { min-height: 260px; padding: 24px; }
    .gfrm-community-project__content { max-width: 72%; }
    .gfrm-community-project__image { width: 42%; opacity: .72; }
}

@media (max-width: 480px) {
    .gfrm-community-project__content { max-width: 100%; }
    .gfrm-community-project__image { opacity: .25; width: 58%; }
}

/* 1.14.95 — Revisió responsive global del theme. */
@media (max-width: 640px) {
    html { scroll-padding-top: 76px; }
    body { overflow-x: hidden; }

    .gfrm-site-header,
    .gfrm-site-header.is-overlay,
    .gfrm-site-header.is-solid,
    .gfrm-site-header.is-scrolled {
        position: relative !important;
        inset: auto !important;
        min-height: 72px;
        background: linear-gradient(90deg, #05080b 0%, #1a2633 100%);
        box-shadow: none;
    }
    .gfrm-site-header .gfrm-header-inner {
        width: calc(100% - 28px);
        min-height: 72px;
    }
    .gfrm-brand-fallback { gap: 8px; }
    .gfrm-brand-word { font-size: 28px; }
    .gfrm-brand-mark,
    .gfrm-brand-mark svg { width: 32px; height: 32px; }
    .gfrm-menu-toggle { width: 46px; height: 46px; padding: 8px; }
    .gfrm-header-navigation { inset: 72px 0 0; padding: 22px 22px 38px; }
    .gfrm-menu a { padding: 12px 4px; font-size: 17px; }
    .gfrm-header-actions { grid-template-columns: 1fr; width: 100%; margin-top: 22px; }

    /* Barra de proves identificada dinàmicament pel JS. */
    .gfrm-beta-toolbar {
        position: relative !important;
        inset: auto !important;
        z-index: 20 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 9px 12px 10px !important;
        overflow: hidden !important;
        background: #111 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    .gfrm-beta-toolbar__label {
        display: flex !important;
        align-items: center;
        min-height: 24px;
        margin: 0 0 8px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }
    .gfrm-beta-toolbar__actions {
        display: flex !important;
        gap: 7px !important;
        width: 100%;
        padding: 0 0 2px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .gfrm-beta-toolbar__actions::-webkit-scrollbar { display: none; }
    .gfrm-beta-toolbar__actions a,
    .gfrm-beta-toolbar__actions button {
        flex: 0 0 auto !important;
        min-height: 34px !important;
        margin: 0 !important;
        padding: 6px 12px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    main,
    #main-content,
    .site-main { min-width: 0; }

    .gfrm-page-hero { padding-top: 44px; }
    .gfrm-section { padding-block: 28px; }
    .gfrm-shell,
    .gfrm-shell-wide { width: calc(100% - 28px); }

    /* Home · Què fem: files compactes i completament clicables. */
    .gfrm-home .gfrm-what-section { padding-block: 28px; }
    .gfrm-home .gfrm-what-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        border-top: 1px solid #e1e4e7;
    }
    .gfrm-home .gfrm-what-item {
        min-height: 0;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #e1e4e7;
    }
    .gfrm-home .gfrm-what-item::before { display: none !important; }
    .gfrm-home .gfrm-what-item__link {
        position: relative;
        display: grid;
        grid-template-columns: 44px minmax(0,1fr) 18px;
        gap: 14px;
        align-items: center;
        min-height: 76px;
        padding: 14px 4px;
        text-align: left;
    }
    .gfrm-home .gfrm-what-item__link::after {
        content: "›";
        color: #8b9299;
        font-size: 25px;
        line-height: 1;
    }
    .gfrm-home .gfrm-what-icon {
        width: 42px;
        height: 42px;
        margin: 0;
        color: var(--gfrm-gold-dark);
    }
    .gfrm-home .gfrm-what-icon svg { width: 30px; height: 30px; }
    .gfrm-home .gfrm-what-item h3 {
        margin: 0;
        font-size: 16px;
        line-height: 1.2;
        text-align: left;
    }
}

/* Qui som: dades i valors realment compactes en mòbil. */
@media (max-width: 640px) {
    .gfrm-about-hero__inner { min-height: 220px; padding-block: 34px 28px; }
    .gfrm-about-hero h1 { font-size: 40px; }
    .gfrm-about-hero p { font-size: 16px; line-height: 1.5; }
    .gfrm-about-hero::after { width: 260px; right: -130px; opacity: .55; }

    .gfrm-about-band { margin-top: 18px; }
    .gfrm-about-band__grid { grid-template-columns: 1fr 1fr; }
    .gfrm-about-band__item,
    .gfrm-about-stat {
        min-height: 0;
        padding: 20px 16px;
        border-right: 1px solid rgba(255,255,255,.09);
        border-bottom: 1px solid rgba(255,255,255,.09);
        text-align: left;
    }
    .gfrm-about-band__grid > :nth-child(even) { border-right: 0; }
    .gfrm-about-band__icon,
    .gfrm-about-stat__icon { width: 34px; height: 34px; }
    .gfrm-about-band__icon svg,
    .gfrm-about-stat__icon svg { width: 25px; height: 25px; }
    .gfrm-about-band__item h3 { margin: 7px 0 5px; font-size: 16px; }
    .gfrm-about-band__item p { font-size: 12px; line-height: 1.45; }
    .gfrm-about-stat { justify-content: flex-start; }
    .gfrm-about-stat strong { margin: 4px 0 2px; font-size: 30px; }
    .gfrm-about-stat__label { font-size: 13px; }
    .gfrm-about-stat small { font-size: 11px; }

    .gfrm-about-details { padding-top: 26px; }
    .gfrm-about-values__grid { gap: 10px; }
    .gfrm-about-value-card {
        display: grid;
        grid-template-columns: 42px minmax(0,1fr);
        column-gap: 14px;
        align-items: start;
        padding: 18px;
        border-radius: 13px;
    }
    .gfrm-about-value-card__icon { grid-row: 1 / span 2; width: 40px; height: 40px; }
    .gfrm-about-value-card h3 { margin: 0 0 5px; font-size: 18px; }
    .gfrm-about-value-card p { font-size: 13px; line-height: 1.5; }
}

/* Reptes: hero menys llarg i dades compactes. */
@media (max-width: 620px) {
    .gfrm-challenges-hero { min-height: 0 !important; }
    .gfrm-challenges-hero__inner { padding-block: 38px 32px !important; }
    .gfrm-challenges-hero h1 { font-size: 2.45rem !important; }
    .gfrm-challenges-hero__lead { font-size: 1.05rem !important; line-height: 1.55 !important; }
    .gfrm-challenges-hero__facts { gap: 8px; margin-top: 22px; }
    .gfrm-challenges-hero__facts article {
        grid-template-columns: 38px minmax(0,1fr);
        min-height: 62px;
        padding: 10px 12px;
    }
    .gfrm-challenges-hero__fact-icon { width: 38px !important; height: 38px !important; }
    .gfrm-challenges-hero__facts article strong { font-size: .86rem; }
    .gfrm-challenges-hero__actions { margin-top: 18px; }
    .gfrm-challenges-hero__actions .gfrm-button { min-height: 46px; }
}

/* Lliga pública: hero, resum i buit més proporcionats. */
@media (max-width: 600px) {
    .gfrm-league-hero__content { padding: 38px 0 32px !important; }
    .gfrm-league-hero__content p { font-size: 16px !important; line-height: 1.55 !important; }
    .gfrm-league-status-grid {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        border-radius: 14px;
    }
    .gfrm-league-status-item {
        min-height: 112px;
        padding: 17px 14px !important;
        border-right: 1px solid var(--gfrm-grey-1) !important;
    }
    .gfrm-league-status-item:nth-child(even) { border-right: 0 !important; }
    .gfrm-league-status-item:nth-child(-n+2) { border-bottom: 1px solid var(--gfrm-grey-1) !important; }
    .gfrm-league-status-item:nth-child(n+3) { border-bottom: 0 !important; }
    .gfrm-league-empty { padding: 22px 18px; font-size: 15px; line-height: 1.55; }
    .gfrm-league-results-section { padding-block: 20px 30px; }
}

/* 1.15.01 · Reptes fotogràfics: composició mòbil compacta i llegible. */
@media (max-width: 620px) {
    body.gfrm-photo-challenges-page { overflow-x: hidden; }

    .gfrm-challenges-landing .gfrm-shell,
    .gfrm-challenge-gallery .gfrm-shell {
        width: min(calc(100% - 28px), 1180px);
    }

    .gfrm-challenges-hero__inner {
        min-height: 0 !important;
        padding-block: 34px 30px !important;
    }

    .gfrm-challenges-hero__copy { max-width: none; }

    .gfrm-challenges-hero h1 {
        max-width: none;
        font-size: clamp(2.2rem, 10.5vw, 2.7rem) !important;
        line-height: 1 !important;
        letter-spacing: -.05em;
    }

    .gfrm-challenges-hero__lead {
        margin-top: 14px !important;
        font-size: 1.02rem !important;
        line-height: 1.35 !important;
        letter-spacing: -.015em;
    }

    .gfrm-challenges-hero__copy > p:not(.gfrm-challenges-hero__lead) {
        margin-top: 14px;
        font-size: .94rem;
        line-height: 1.55;
    }

    .gfrm-challenges-hero__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        max-width: none;
        margin-top: 20px;
    }

    .gfrm-challenges-hero__facts article,
    .gfrm-challenges-hero__facts article:nth-child(3),
    .gfrm-challenges-hero__facts article:first-child {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        min-height: 70px;
        padding: 10px;
        border: 1px solid rgba(255,255,255,.13) !important;
        border-radius: 11px;
    }

    .gfrm-challenges-hero__fact-icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px;
    }

    .gfrm-challenges-hero__fact-icon svg {
        width: 18px;
        height: 18px;
    }

    .gfrm-challenges-hero__facts article small {
        margin-bottom: 3px;
        font-size: .55rem;
        letter-spacing: .07em;
    }

    .gfrm-challenges-hero__facts article strong {
        overflow: visible;
        font-size: .76rem;
        line-height: 1.2;
        white-space: normal;
    }

    .gfrm-challenges-hero__actions {
        gap: 10px;
        margin-top: 18px;
    }

    .gfrm-challenges-hero__actions .gfrm-button {
        min-height: 46px;
        padding-inline: 16px;
        font-size: .86rem;
    }

    .gfrm-challenges-how { padding-top: 18px; }

    .gfrm-challenges-how__panel {
        display: block;
        overflow: hidden;
        padding: 0;
        border-radius: 14px;
    }

    .gfrm-challenges-how__panel > header {
        display: block;
        padding: 21px 20px 18px;
        border-right: 0;
        border-bottom: 1px solid #eceef0;
    }

    .gfrm-challenges-how__panel > header::after {
        width: 44px;
        height: 3px;
        margin-top: 12px;
    }

    .gfrm-challenges-how h2 {
        margin: 0;
        font-size: 1.45rem;
        line-height: 1.12;
        letter-spacing: -.035em;
    }

    .gfrm-challenges-how__steps {
        display: block;
        padding: 2px 18px 6px;
    }

    .gfrm-challenges-how__steps article {
        position: relative;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 14px;
        align-items: start;
        min-height: 0;
        padding: 17px 0;
        border: 0;
        border-top: 1px solid #edf0f2;
    }

    .gfrm-challenges-how__steps article:first-child { border-top: 0; }

    .gfrm-challenges-how__icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 46px;
        height: 46px;
        margin: 0;
    }

    .gfrm-challenges-how__icon svg {
        width: 22px;
        height: 22px;
    }

    .gfrm-challenges-how__steps article b {
        position: absolute;
        top: 11px;
        left: 31px;
        width: 20px;
        height: 20px;
        margin: 0;
        border: 2px solid #fff;
        font-size: .62rem;
        line-height: 1;
        box-shadow: 0 2px 7px rgba(15,23,42,.14);
    }

    .gfrm-challenges-how__steps article h3 {
        grid-column: 2;
        grid-row: 1;
        margin: 1px 0 0;
        font-size: 1rem;
        line-height: 1.25;
    }

    .gfrm-challenges-how__steps article p {
        grid-column: 2;
        grid-row: 2;
        margin: 5px 0 0;
        font-size: .82rem;
        line-height: 1.45;
    }

    .gfrm-challenges-current__copy,
    .gfrm-challenges-winner__copy {
        padding: 22px 20px 24px;
    }

    .gfrm-challenges-current__media,
    .gfrm-challenges-winner__media {
        min-height: 210px;
    }

    .gfrm-challenges-current h2,
    .gfrm-challenges-winner__copy h2 {
        font-size: 1.85rem;
    }

    .gfrm-challenges-current__actions,
    .gfrm-challenges-winner__actions,
    .gfrm-challenges-conversion__actions {
        gap: 10px;
    }

    .gfrm-challenges-community-message__panel,
    .gfrm-challenges-conversion__panel {
        padding: 22px 20px;
    }
}

@media (max-width: 370px) {
    .gfrm-challenges-hero__facts { grid-template-columns: 1fr; }
}

/* 1.15.06 · Reptes: franja «Com funcionen» compacta (capa responsive final) */
@media (max-width:980px){
  .gfrm-challenges-how__panel{display:grid;grid-template-columns:1fr;overflow:visible;padding:0}
  .gfrm-challenges-how__panel>header{display:flex;min-height:auto;padding:15px 18px 13px;border-right:0;border-bottom:1px solid #e9ebed}
  .gfrm-challenges-how__panel>header::after{width:30px;height:2px;margin-top:8px}
  .gfrm-challenges-how h2{max-width:none;margin:0;font-size:1.06rem;line-height:1.14}
  .gfrm-challenges-how__steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 10px}
  .gfrm-challenges-how__steps article{
    display:grid;
    grid-template-columns:42px minmax(0,1fr);
    grid-template-rows:auto auto;
    column-gap:11px;
    align-content:center;
    min-height:88px;
    padding:12px 14px 12px 20px;
    border:0;
    border-left:1px solid #eceef0
  }
  .gfrm-challenges-how__steps article:first-child{border-left:0;border-top:0}
  .gfrm-challenges-how__steps article:nth-child(3){border-left:0;border-top:1px solid #eceef0}
  .gfrm-challenges-how__steps article:nth-child(4){border-top:1px solid #eceef0}
  .gfrm-challenges-how__icon{grid-column:1;grid-row:1 / span 2;width:38px;height:38px;margin:0}
  .gfrm-challenges-how__icon svg{width:19px;height:19px}
  .gfrm-challenges-how__steps article b{top:17px;left:12px;width:19px;height:19px;margin:0;border:2px solid #fff;font-size:.58rem}
  .gfrm-challenges-how__steps article h3{grid-column:2;grid-row:1;margin:0;font-size:.88rem;line-height:1.18}
  .gfrm-challenges-how__steps article p{grid-column:2;grid-row:2;margin:4px 0 0;font-size:.72rem;line-height:1.35}
}
@media (max-width:620px){
  .gfrm-challenges-how{padding-top:14px}
  .gfrm-challenges-how__panel{border-radius:12px;box-shadow:none}
  .gfrm-challenges-how__panel>header{padding:14px 16px 12px}
  .gfrm-challenges-how h2{font-size:1rem}
  .gfrm-challenges-how__steps{grid-template-columns:1fr;padding:2px 14px 4px}
  .gfrm-challenges-how__steps article{
    grid-template-columns:36px minmax(0,1fr);
    min-height:0;
    padding:11px 0 11px 10px;
    border-left:0;
    border-top:1px solid #eef0f2
  }
  .gfrm-challenges-how__steps article:first-child{border-top:0}
  .gfrm-challenges-how__steps article:nth-child(3),.gfrm-challenges-how__steps article:nth-child(4){border-left:0;border-top:1px solid #eef0f2}
  .gfrm-challenges-how__icon{width:32px;height:32px}
  .gfrm-challenges-how__icon svg{width:16px;height:16px}
  .gfrm-challenges-how__steps article b{top:6px;left:2px;width:17px;height:17px;font-size:.52rem}
  .gfrm-challenges-how__steps article h3{font-size:.86rem}
  .gfrm-challenges-how__steps article p{margin-top:2px;font-size:.7rem;line-height:1.32}
  .gfrm-challenges-winner{padding-top:14px}
}



/* 1.15.49 · Home mòbil sense desplaçament lateral.
   El scroll horitzontal el provocaven capes fixes/transformades del header
   i decoracions que augmentaven el scrollWidth fora del viewport. */
@media (max-width: 782px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip !important;
    }

    body.home,
    body.front-page,
    body.home #page,
    body.front-page #page,
    body.home .gfrm-home,
    body.front-page .gfrm-home,
    body.home .gfrm-site-header,
    body.front-page .gfrm-site-header,
    body.home .gfrm-site-footer,
    body.front-page .gfrm-site-footer {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    body.home .gfrm-home > *,
    body.front-page .gfrm-home > * {
        max-width: 100%;
        min-width: 0;
    }

    body.home .gfrm-shell,
    body.home .gfrm-shell-wide,
    body.front-page .gfrm-shell,
    body.front-page .gfrm-shell-wide {
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        min-width: 0 !important;
        margin-inline: auto !important;
    }

    body.home .gfrm-header-navigation,
    body.front-page .gfrm-header-navigation {
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        contain: layout paint;
    }

    body.home .gfrm-seasonal-card,
    body.front-page .gfrm-seasonal-card,
    body.home .gfrm-community-project,
    body.front-page .gfrm-community-project,
    body.home .gfrm-home-community-card,
    body.front-page .gfrm-home-community-card {
        max-width: 100%;
        min-width: 0;
    }

    body.home img,
    body.front-page img,
    body.home iframe,
    body.front-page iframe,
    body.home video,
    body.front-page video {
        max-width: 100%;
    }
}


/* 1.18.19 · QA responsive final: tablet, landscape, footer i toolbar. */
@media (max-width: 1200px) {
    .gfrm-header-navigation {
        top: 82px;
        right: 0;
        bottom: 0;
        left: 0;
        max-height: calc(100dvh - 82px - env(safe-area-inset-bottom, 0px));
        padding-bottom: max(32px, calc(20px + env(safe-area-inset-bottom, 0px)));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* El plugin d'Activitats passa la graella a 2 columnes a 820px, però el seu
   toolbar no s'apila fins a 780px. Unifiquem el breakpoint per evitar el buit
   781–820px que generava retall i overflow horitzontal. */
@media (max-width: 820px) {
    .post-type-archive-gfrm_activity .gfrm-activities-toolbar {
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: stretch;
        flex-direction: column;
    }
    .post-type-archive-gfrm_activity .gfrm-activities-toolbar .gfrm-activity-filters {
        width: 100%;
        min-width: 0;
    }
    .post-type-archive-gfrm_activity .gfrm-season-calendar-dropdown--toolbar {
        align-self: flex-start;
        max-width: 100%;
    }
    .post-type-archive-gfrm_activity .gfrm-season-calendar-dropdown--toolbar summary {
        max-width: 100%;
        white-space: normal;
    }
    .post-type-archive-gfrm_activity .gfrm-season-calendar-dropdown--toolbar .gfrm-season-calendar-menu {
        right: auto;
        left: 0;
        max-width: min(280px, calc(100vw - 36px));
    }

    /* Footer tablet: evita que la marca ocupi una fila sencera i redueix
       espais sense sacrificar la lectura ni les àrees tàctils. */
    .gfrm-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 36px;
        padding-top: 42px;
        padding-bottom: 36px;
    }
    .gfrm-footer-brand {
        grid-column: auto;
    }
    .gfrm-footer-description {
        margin: 16px 0 18px;
    }
    .gfrm-footer-social {
        margin-top: 18px;
    }
    .gfrm-footer-column h2 {
        margin-bottom: 15px;
    }
    .gfrm-footer-menu {
        gap: 10px;
    }
    .gfrm-footer-legal {
        min-height: 58px;
        padding-block: 14px;
    }
}

@media (max-width: 640px) {
    .gfrm-header-navigation {
        top: 72px;
        max-height: calc(100dvh - 72px - env(safe-area-inset-bottom, 0px));
        padding: 18px 22px max(26px, calc(16px + env(safe-area-inset-bottom, 0px)));
    }
    .gfrm-menu a {
        padding-block: 10px;
    }
    .gfrm-header-actions {
        margin-top: 16px;
    }

    .gfrm-footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 36px;
        padding-bottom: 32px;
    }
    .gfrm-footer-description {
        margin: 14px 0 16px;
    }
    .gfrm-footer-contact {
        gap: 8px;
    }
    .gfrm-footer-social {
        margin-top: 15px;
    }
    .gfrm-footer-column h2 {
        margin: 0 0 12px;
    }
    .gfrm-footer-legal {
        gap: 12px;
        min-height: 0;
        padding-block: 14px;
    }
}

/* Landscape baix: el menú ha de poder consumir només l'espai restant del
   viewport, amb scroll intern mentre el body continua bloquejat. */
@media (max-width: 1200px) and (max-height: 520px) {
    .gfrm-header-inner {
        min-height: 64px;
    }
    .gfrm-header-navigation {
        top: 64px;
        max-height: calc(100dvh - 64px - env(safe-area-inset-bottom, 0px));
        padding-top: 12px;
        padding-bottom: max(18px, calc(10px + env(safe-area-inset-bottom, 0px)));
    }
    .gfrm-menu a {
        padding-block: 8px;
        font-size: 16px;
    }
    .gfrm-menu .sub-menu a {
        padding-block: 6px;
        font-size: 14px;
    }
    .gfrm-header-actions {
        margin-top: 12px;
    }
}
