/* Desktop trial only. Keep the mobile DOM, ordering and layout unchanged. */
@media(min-width:701px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels{
  display:flex;flex-direction:column;align-items:stretch;gap:22px;
 }
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels> :is(article,section){width:100%;min-width:0;margin:0;box-sizing:border-box}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>article:has(>.panel-heading a:is([href="#noutati"],[data-route-hash="#noutati"])){order:1}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos{order:2}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-video-gallery{order:3}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel{order:4}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-facebook{order:5;align-self:center;max-width:660px}

 /* Each event keeps its pastel group; its films sit side by side below text. */
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px;padding:16px;
 }
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial:has(>details.video-player-trial:nth-of-type(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial:not(:has(>details.video-player-trial:nth-of-type(2))){grid-template-columns:minmax(0,1fr);width:100%;max-width:700px;margin-inline:auto;box-sizing:border-box}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial>div{grid-column:1/-1;order:0;min-width:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial>details.video-player-trial{grid-column:auto;order:1;max-width:none;width:100%;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial:not(:has(>details.video-player-trial:nth-of-type(2)))>details.video-player-trial{max-width:480px;justify-self:center;margin-inline:auto}

 /* Moments uses the same event groups and player rows as News. */
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-video-gallery{display:block}

 /* Keep one activity photo compact rather than stretching it across the row. */
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos{
  display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:12px 24px;align-items:center;
 }
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.panel-heading{grid-column:1/-1;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.activity-photo-scene{grid-column:1;grid-row:2/5;width:100%;height:300px;min-height:0;margin:0;background:#e9eff0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos #activity-photo{object-fit:contain}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.gallery-navigation{grid-column:2;grid-row:2;align-self:end;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.gallery-description{grid-column:2;grid-row:3;align-self:center;text-align:center;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.activity-photo-album{grid-column:2;grid-row:4;align-self:start;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links>a{margin:0;min-width:0;box-sizing:border-box}
}
/* Desktop pair: give the photo gallery more room than the compact links. */
@media(min-width:701px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:22px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels> :is(article,section){grid-column:1/-1;grid-row:auto}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos{order:2;grid-column:1;display:flex;flex-direction:column;gap:12px;align-items:stretch;align-self:stretch}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel{order:3;grid-column:2;display:flex;flex-direction:column;align-self:stretch}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-video-gallery{order:4}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-facebook{justify-self:center}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.activity-photo-scene{height:300px;flex:none}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.gallery-navigation{align-self:center}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.gallery-description,
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.activity-photo-album{align-self:stretch}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:10px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links>a{display:flex;align-items:center;min-height:44px;margin:0}
}
@media(min-width:701px) and (max-width:1050px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-film-panel>.story-news.has-player-trial:has(>details.video-player-trial:nth-of-type(3)){grid-template-columns:repeat(2,minmax(0,1fr))}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links{grid-template-columns:minmax(0,1fr)}
}

/* Compact desktop activity card, with its album link beside the heading. */
@media(min-width:701px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos{gap:8px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.panel-heading h2{margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.panel-heading>.activity-photo-album{display:inline-block;margin:0;font-size:11px;line-height:1.4;text-align:right;max-width:55%}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.activity-photo-scene{height:360px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos .gallery-navigation{gap:8px;margin:0}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos .gallery-navigation button{width:32px!important;min-width:32px!important;height:30px!important;min-height:30px!important;padding:3px 7px!important;font-size:15px!important}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos .gallery-navigation .activity-photo-pause{width:auto!important;min-width:48px!important;font-size:10.5px!important}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos>.gallery-description{font-size:12px;line-height:1.4;margin:0}
}
@media(min-width:701px) and (pointer:coarse){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos .gallery-navigation button{min-width:44px!important;min-height:44px!important}
}

@media(min-width:701px){html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel:has(.useful-links>a:nth-child(8))>.useful-links{grid-template-columns:minmax(0,1fr)}}

@media(min-width:701px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos,
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel{grid-row:1!important;align-self:stretch}
}

/* One set of cards: useful links first on phones, the existing pair on desktop. */
html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel{order:0}
html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.dynamic-activity-photos{order:1}
html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>article:has(>.panel-heading a:is([href="#noutati"],[data-route-hash="#noutati"])){order:2}
html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.home-video-gallery{order:3}
@media(max-width:700px){
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 html.site-story-frame body.home-mobile-branding .site-shell #main .home-panels>.useful-panel>.useful-links>a{min-width:0;min-height:44px;white-space:normal}
}
