/* Public home — CSS-only responsive shell (same URL `/`, no UA redirect).
   ≤768px: mobile-home visible, desktop-home hidden.
   ≥769px: desktop-home visible, mobile-home hidden. */

.desktop-home {
    display: block;
}

.mobile-home {
    display: none;
}

@media (min-width: 769px) {
    .desktop-home {
        display: block !important;
    }

    .mobile-home {
        display: none !important;
    }
}

@media (max-width: 768px) {
    html,
    body.pub.pub-home-mobile-active {
        overflow-x: hidden;
        max-width: 100%;
    }

    .desktop-home {
        display: none !important;
    }

    .mobile-home {
        display: block !important;
    }

    body.pub.pub-home-mobile-active .pub-main {
        min-width: 0;
        overflow-x: clip;
    }
}

/* ── Mobile home blocks (only inside .mobile-home) ── */

.mobile-home .mhome {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mobile-home .mhome *,
.mobile-home .mhome *::before,
.mobile-home .mhome *::after {
    box-sizing: border-box;
}

.mobile-home .mhome-section {
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.mobile-home .mhome-section + .mhome-section {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.mobile-home .mhome-section__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-section__subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.mobile-home .mhome-section__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-home .mhome-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pub-primary, #047857);
    text-decoration: none;
}

/* Hero */
.mobile-home .mhome-hero__title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-hero__subtitle {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

.mobile-home .mhome-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-home .mhome-hero__secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

/* Buttons */
.mobile-home .mhome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1.3;
    text-align: center;
}

.mobile-home .mhome-btn--primary {
    background: var(--pub-primary, #047857);
    color: #fff;
    border-color: var(--pub-primary, #047857);
}

.mobile-home .mhome-btn--outline {
    background: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.mobile-home .mhome-btn--sm {
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    width: auto;
    flex: 1 1 auto;
}

/* Categories grid */
.mobile-home .mhome-categories__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    width: 100%;
}

@media (max-width: 360px) {
    .mobile-home .mhome-categories__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.mobile-home .mhome-categories__item {
    min-width: 0;
}

.mobile-home .mhome-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
    padding: 0.875rem 0.5rem;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-category-card i {
    font-size: 1.25rem;
    color: var(--mhome-accent, var(--pub-primary, #047857));
}

/* Campaign cards */
.mobile-home .mhome-campaigns__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.mobile-home .mhome-campaign-card {
    width: 100%;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.mobile-home .mhome-campaign-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.mobile-home .mhome-campaign-card__media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-home .mhome-campaign-card__body {
    padding: 0.875rem;
    min-width: 0;
}

.mobile-home .mhome-campaign-card__cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pub-primary, #047857);
    margin-bottom: 0.35rem;
}

.mobile-home .mhome-campaign-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-campaign-card__title a {
    color: inherit;
    text-decoration: none;
}

.mobile-home .mhome-campaign-card__desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 0.5rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-home .mhome-campaign-card__amounts {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.mobile-home .mhome-campaign-card__target {
    color: #64748b;
    font-weight: 500;
}

.mobile-home .mhome-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.mobile-home .mhome-progress__bar {
    height: 100%;
    background: var(--pub-primary, #047857);
    border-radius: 999px;
}

.mobile-home .mhome-campaign-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Journey list */
.mobile-home .mhome-journey__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-home .mhome-journey__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #f8fafc;
    min-width: 0;
}

.mobile-home .mhome-journey__num {
    flex: 0 0 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: var(--pub-primary, #047857);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-home .mhome-journey__content {
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-home .mhome-journey__heading {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-journey__heading i {
    color: var(--pub-primary, #047857);
}

.mobile-home .mhome-journey__desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Stories */
.mobile-home .mhome-stories__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-home .mhome-story-card {
    width: 100%;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.mobile-home .mhome-story-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.mobile-home .mhome-story-card__media img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mobile-home .mhome-story-card__body {
    padding: 0.875rem;
    min-width: 0;
}

.mobile-home .mhome-story-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-home .mhome-story-card__title a {
    color: inherit;
    text-decoration: none;
}

.mobile-home .mhome-story-card__summary {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-home .mhome-stories__all {
    margin-top: 0.25rem;
}

/* Trust links */
.mobile-home .mhome-trust__links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-home .mhome-trust-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 600;
}

.mobile-home .mhome-trust-link i {
    color: var(--pub-primary, #047857);
}

.mobile-home img {
    max-width: 100%;
    height: auto;
}
