/* Shared responsive rules, loaded after each page's component styles. */
:root{--header-space:120px;}
:is(.site-header,.content-header) .brand{min-width:0;flex-shrink:1;}
:is(.site-header,.content-header) .brand-logo{max-width:100%;height:auto;width:min(400px,32vw);max-height:85.333px;}
:is(.hero-copy,.content-body,.manifesto-copy,.project-copy,.research-discovery-search,.news-cover-carousel){min-width:0;}
:is(h1,h2,h3,h4,.button,.content-cta,.service-title,.news-project-label){overflow-wrap:break-word;}
:is(.button,.content-cta){max-width:100%;white-space:normal;}
.hero-actions>.button-primary,.hero-actions>.button-primary:is(:hover,:focus-visible,:active){color:#143666!important;-webkit-text-fill-color:#143666!important;}
.hero-actions>.button-primary span{color:inherit;}
.hero-actions{flex-wrap:wrap;}
.content-body :is(img,video,iframe){max-width:100%;}
.content-body iframe{width:100%;}
:is(.content-body,.research-row,.journey-card,.footer-company-grid) a{overflow-wrap:anywhere;}
:is(.content-header,.site-header){height:auto;min-height:var(--header-space);}
.search-panel{top:var(--header-space);max-height:calc(100dvh - var(--header-space));}
.content-page .content-hero{min-height:clamp(480px,64svh,760px);padding-top:calc(var(--header-space) + clamp(2.5rem,5vh,4rem));}
.content-page .content-hero :is(#content-title,.content-meta,.section-kicker){overflow-wrap:break-word;}
.news-cover-carousel .news-cover-tile{display:flex;flex-direction:column;height:auto;min-height:420px;padding:28px;}
.news-cover-carousel .news-cover-read{position:relative;top:auto;left:auto;flex:none;}
.news-cover-carousel .news-cover-copy{position:relative;left:auto;right:auto;bottom:auto;margin-top:auto;padding-top:32px;}
.news-cover-carousel .news-cover-track{min-width:0;max-width:100%;}
:is(.news-timeline-heading,.research-head,.about-actions,.advisor-actions){flex-wrap:wrap;}
.news-timeline-heading>span{white-space:normal;}
.regia-map{max-width:100%;min-width:0;}
/* Switch before the enlarged logo and the complete navigation compete for space. */
@media(max-width:1440px){
 .site-header{gap:.75rem;}
 .site-header .site-tools{margin-left:auto;flex:none;}
 .site-header .menu-toggle{display:flex;order:3;position:relative;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-width:44px;min-height:44px;padding:8px;font-size:0;flex-shrink:0;}
 .site-header .menu-toggle span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
 .site-header .menu-toggle i{display:block;width:24px;height:2px;background:currentColor;flex:none;}
 .site-header :is(nav,.content-nav){position:absolute;z-index:24;top:100%;left:0;right:0;margin:0;padding:1.5rem var(--pad);max-height:calc(100dvh - var(--header-space));overflow-y:auto;display:none;flex-direction:column;align-items:stretch;gap:1rem;background:linear-gradient(120deg,#123e7b,#126eac);}
 .site-header :is(nav,.content-nav).open{display:flex;}
 .site-header .expertise-nav{flex-wrap:wrap;}
 .site-header .expertise-submenu{position:static;width:100%;min-width:0;max-width:100%;box-shadow:none;}
 .content-header .content-back{display:none;}
 .site-header .search-panel{top:100%;max-height:calc(100dvh - var(--header-space));overflow-y:auto;}
}
@media(max-width:900px){
 :root{--header-space:94px;}
 .content-page .content-hero #content-title{font-size:clamp(2rem,5.5vw,3.5rem);}
 .content-page .content-hero :is(#content-title,.content-meta,.section-kicker){max-width:75%;}
 :is(.content-feature-grid,.project-tile-grid,.case-publications){grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
 :is(.site-header,.content-header){gap:.5rem;}
 :is(.site-header,.content-header) .brand-logo{width:min(280px,calc(100vw - 190px));max-width:100%;}
 .content-header .brand-logo{width:min(320px,calc(100vw - 100px));}
 .site-header .site-tools{gap:.5rem;}
 .site-header .language-switch{gap:.3rem;font-size:.75rem;}
 .content-page .content-hero{min-height:clamp(400px,65svh,560px);padding-top:calc(var(--header-space) + 2rem);padding-bottom:2.5rem;}
 .content-page .content-hero :is(#content-title,.content-meta,.section-kicker){max-width:100%;}
 .content-page .content-hero #content-title{font-size:clamp(1.9rem,8vw,3rem);line-height:1.15;}
 .content-page .content-hero>.content-hero-image{width:60%;opacity:.28;}
 .hero{padding-top:calc(var(--header-space) + 2rem);padding-bottom:3rem;}
 .hero h1{font-size:clamp(2rem,10vw,3.5rem);line-height:1.05;}
 :is(.manifesto-copy h2,.expertise h2,.projects-head h2,.news-head h2,.contact h2){font-size:clamp(1.9rem,8vw,3rem);line-height:1.15;}
 :is(.content-feature-grid,.project-tile-grid,.case-publications,.innovation-panel,.innovation-evidence){grid-template-columns:minmax(0,1fr);}
 .service button{grid-template-columns:32px minmax(0,1fr) auto;gap:.65rem;}
 .service-title{font-size:clamp(1.1rem,5vw,1.5rem);}
 .service.active .service-body{padding-left:0;}
 .news-cover-carousel .news-cover-tile{flex-basis:100%;min-height:380px;padding:22px;}
 .news-time-tree summary{flex-wrap:wrap;}
 .news-time-tree summary small{white-space:normal;}
 .news-project-label{white-space:normal;max-width:100%;}
 .research-book{grid-template-columns:4rem minmax(0,1fr);}
 .lum-advisor-launch{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px);}
 .lum-advisor{height:min(720px,calc(100dvh - 16px));}
 .lum-advisor :is(input,select,textarea),.content-body :is(input,select,textarea),.search-panel input{font-size:16px;min-width:0;}
 footer .footer-brand .brand-logo{max-width:100%;width:min(360px,100%);height:auto;}
}
@media(max-width:380px){
 .competency-cards-active .competency-flip-grid,.application-sectors .sector-grid{grid-template-columns:minmax(0,1fr)!important;}
 .application-sectors .sector-item:nth-child(n){grid-column:auto;}
 .application-sectors .sector-rotator{max-width:260px;margin-inline:auto;}
}
@media(max-height:500px) and (orientation:landscape){
 :root{--header-space:76px;}
 :is(.site-header,.content-header){min-height:76px;padding-block:8px;}
 :is(.site-header,.content-header) .brand-logo{width:220px;max-width:38vw;margin-block:0;}
 .hero,.content-page .content-hero{min-height:auto;padding-top:calc(var(--header-space) + 2rem);}
}

/* Keep the hero carousel aligned with the copy when two columns no longer fit. */
.hero>.hero-card{min-width:0;max-width:100%;}
@media(max-width:1200px){
 .hero.hero{grid-template-columns:minmax(0,1fr);align-items:start;align-content:start;gap:2rem;}
 .hero.hero>.hero-copy{width:100%;max-width:100%;justify-self:start;}
 .hero.hero>.hero-card{display:block;position:relative;inset:auto;grid-column:1;justify-self:start;align-self:start;float:none;margin:0 auto 0 0;transform:none;width:min(100%,420px);min-height:0;height:auto;aspect-ratio:auto;text-align:left;padding:24px;}
 .hero.hero>.hero-card .card-index{display:block;text-align:left;}
 .hero.hero>.hero-card p{margin:24px 0 12px;text-align:left;}
 .hero.hero>.hero-card strong{display:block;text-align:left;font-size:clamp(1.65rem,3.5vw,2.25rem);line-height:1.15;word-break:normal;overflow-wrap:break-word;}
 .hero.hero>.hero-card .mini-track{margin-top:24px;width:100%;}
 .hero.hero h1{font-size:clamp(2.2rem,7vw,5rem);line-height:1.02;max-width:100%;}
 .hero.hero .hero-actions{justify-content:flex-start;align-items:flex-start;gap:20px;flex-wrap:wrap;}
 .hero.hero .hero-actions>a{min-width:0;max-width:100%;white-space:normal;}
 .hero.hero .hero-actions>a>span{flex-shrink:0;}
}
@media(max-width:600px){
 .hero.hero{gap:24px;}
 .hero.hero .hero-actions{flex-direction:column;gap:16px;}
 .hero.hero>.hero-card{width:100%;max-width:420px;padding:20px;}
 .hero.hero .eyebrow{line-height:1.6;letter-spacing:.1em;}
 .hero.hero .hero-lead,.hero.hero .hero-proof{text-align:left;}
}

/* Home expertise: compact rows; panels open only on explicit button activation. */
#competenze .service,#competenze .service:last-child{min-height:0;grid-row:auto;padding:0 24px}
#competenze .service>button{min-height:76px;padding:16px 0;grid-template-columns:48px minmax(0,1fr) 44px;gap:16px}
#competenze .service .service-arrow{width:44px;height:44px}
#competenze .service-body[hidden]{display:none!important}
#competenze .service.active .service-body{max-height:none;opacity:1;padding:0 0 20px 64px;gap:16px}
#competenze .service-body p{margin:0}
@media(max-width:600px){#competenze .service{padding:0 16px}#competenze .service>button{grid-template-columns:28px minmax(0,1fr) 44px;gap:12px;min-height:72px;padding:14px 0}#competenze .service.active .service-body{padding-left:0;padding-bottom:18px}}

/* Home: bring digital maturity closer to News and trim the contact closing gap. */
body:not(.content-page) main>.news{padding-bottom:32px}
body:not(.content-page) main>.home-maturity{padding-top:24px;padding-bottom:32px}
body:not(.content-page) main>.contact{padding-bottom:32px;min-height:0}
body:not(.content-page)>footer{padding-top:32px}
@media(max-width:600px){body:not(.content-page) main>.news{padding-bottom:24px}body:not(.content-page) main>.home-maturity{padding-top:20px;padding-bottom:24px}body:not(.content-page) main>.contact{padding-bottom:24px}body:not(.content-page)>footer{padding-top:24px}}

/* Home method result: remove the outline around the closing statement. */
body:not(.content-page) #method-detail{border:0!important;box-shadow:none!important}

/* Home case-study tile: reduce the surrounding vertical section space. */
body:not(.content-page) main>.projects.projects-plain-section{padding-top:32px;padding-bottom:32px}
body:not(.content-page) .projects .featured-project--text-only{margin-block:0}
@media(max-width:600px){body:not(.content-page) main>.projects.projects-plain-section{padding-top:24px;padding-bottom:24px}}

/* Home method introduction uses the full row and wraps only when needed. */
body:not(.content-page) #come-operiamo .method-heading{max-width:100%;width:100%;min-width:0}
body:not(.content-page) #come-operiamo .method-heading .method-lead{max-width:none;width:100%;white-space:normal;text-wrap:wrap}
