.global-visual > .global-visual-picture { display: none; }
@media (max-width: 767px) {
    .page.global-visual:not(.global-mobile-legacy) {
        display: grid !important; grid-template-columns: minmax(0, 1fr);
        height: auto !important; min-height: 0 !important; padding: 0 !important;
        overflow: visible; background-image: none !important;
        scroll-snap-align: none; scroll-snap-stop: normal;
    }
    .global-visual:not(.global-mobile-legacy)::after { display: none; }
    .global-visual:not(.global-mobile-legacy) > .global-visual-picture {
        display: block; grid-area: 1 / 1; align-self: center; width: 100%; min-width: 0; pointer-events: none;
    }
    .global-visual:not(.global-mobile-legacy) > .global-visual-picture img {
        display: block; width: 100%; max-width: var(--global-mobile-width); height: auto; margin: 0 auto; object-fit: contain;
    }
    .global-visual.global-mobile-custom > .global-visual-picture img { height: var(--global-mobile-height); }
    /* The form can be taller than the chosen image height. Cover its whole surface. */
    .page.rsvp-section.global-visual:not(.global-mobile-legacy) {
        background-image: var(--global-mobile-background) !important;
        background-size: cover !important; background-position: center !important;
    }
    .rsvp-section.global-visual:not(.global-mobile-legacy) > .global-visual-picture { visibility: hidden; }
    .global-visual:not(.global-mobile-legacy) > .card-overlay,
    .global-visual:not(.global-mobile-legacy) > .rsvp-glass-card {
        grid-area: 1 / 1; position: relative; z-index: 1; height: auto; min-width: 0; box-sizing: border-box;
        width: 100% !important; max-width: var(--global-mobile-width) !important; justify-self: center;
    }
    .global-visual:not(.global-mobile-legacy) > .card-overlay { align-self: stretch; padding: 24px 5%; }
    .home.global-visual:not(.global-mobile-legacy) .card-content { min-height: 0; }
    .home.global-visual:not(.global-mobile-legacy) .card-content::before,
    .home.global-visual:not(.global-mobile-legacy) .card-content::after { content: none; }
    .home.global-visual:not(.global-mobile-legacy) .hero-main { transform: none; width: 100%; }
    .home.global-visual:not(.global-mobile-legacy) .hero-main::before,
    .home.global-visual:not(.global-mobile-legacy) .hero-main::after {
        position: static; transform: none; flex: 0 0 1px;
        width: min(180px, 60%); height: 1px;
        background: linear-gradient(to right, transparent, var(--gold), transparent);
    }
    .home.global-visual:not(.global-mobile-legacy) .hero-main::before { margin-bottom: 20px; }
    .home.global-visual:not(.global-mobile-legacy) .hero-main::after { margin-top: 20px; }
    .home.global-visual:not(.global-mobile-legacy) #countdown-wrapper { margin-top: 24px; }
    .global-visual:not(.global-mobile-legacy) > .rsvp-glass-card { width: calc(100% - 24px) !important; max-width: 620px !important; margin: 24px auto !important; }
    .global-visual:not(.global-mobile-legacy) .submit-btn { position: static !important; }
}
@media (min-width: 768px) {
    .page.global-visual:not(.global-desktop-legacy) {
        display: grid !important; grid-template-columns: minmax(0, 1fr);
        height: auto !important; min-height: 0 !important; padding: 0 !important;
        overflow: visible; background-image: none !important;
        scroll-snap-align: none; scroll-snap-stop: normal;
    }
    .global-visual:not(.global-desktop-legacy)::after { display: none; }
    .global-visual:not(.global-desktop-legacy) > .global-visual-picture {
        display: block; grid-area: 1 / 1; align-self: center; width: 100%; min-width: 0; pointer-events: none;
    }
    .global-visual:not(.global-desktop-legacy) > .global-visual-picture img {
        display: block; width: 100%; max-width: var(--global-desktop-width); height: auto; margin: 0 auto; object-fit: contain;
    }
    .global-visual.global-desktop-custom > .global-visual-picture img { height: var(--global-desktop-height); }
    .page.rsvp-section.global-visual:not(.global-desktop-legacy) {
        background-image: var(--global-desktop-background) !important;
        background-size: cover !important; background-position: center !important;
    }
    .rsvp-section.global-visual:not(.global-desktop-legacy) > .global-visual-picture { visibility: hidden; }
    .global-visual:not(.global-desktop-legacy) > .card-overlay,
    .global-visual:not(.global-desktop-legacy) > .rsvp-glass-card {
        grid-area: 1 / 1; position: relative; z-index: 1; height: auto; min-width: 0; box-sizing: border-box;
        width: 100% !important; max-width: var(--global-desktop-width) !important; justify-self: center;
    }
    .global-visual:not(.global-desktop-legacy) > .card-overlay { align-self: stretch; padding: 24px 5%; }
    .home.global-visual:not(.global-desktop-legacy) .card-content { min-height: 0; }
    .home.global-visual:not(.global-desktop-legacy) .card-content::before,
    .home.global-visual:not(.global-desktop-legacy) .card-content::after { content: none; }
    .home.global-visual:not(.global-desktop-legacy) .hero-main { transform: none; width: 100%; }
    .home.global-visual:not(.global-desktop-legacy) .hero-main::before,
    .home.global-visual:not(.global-desktop-legacy) .hero-main::after {
        position: static; transform: none; flex: 0 0 1px;
        width: min(180px, 60%); height: 1px;
        background: linear-gradient(to right, transparent, var(--gold), transparent);
    }
    .home.global-visual:not(.global-desktop-legacy) .hero-main::before { margin-bottom: 20px; }
    .home.global-visual:not(.global-desktop-legacy) .hero-main::after { margin-top: 20px; }
    .home.global-visual:not(.global-desktop-legacy) #countdown-wrapper { margin-top: 24px; }
    .global-visual:not(.global-desktop-legacy) > .rsvp-glass-card { width: min(620px, calc(100% - 32px)) !important; max-width: 620px !important; margin: 24px auto !important; }
    .global-visual:not(.global-desktop-legacy) .submit-btn { position: static !important; }
}

@media (max-width: 767px) { .menu-section.global-visual:not(.global-mobile-legacy) > .menu-overlay { min-height: 0; } }
@media (min-width: 768px) { .menu-section.global-visual:not(.global-desktop-legacy) > .menu-overlay { min-height: 0; } }
