/*
Theme Name: AEI Premium Editoriale Copy Down
Description: Restyling editoriale di Auto Elettriche Italia con correzione dedicata alle immagini della homepage su smartphone.
Author: Auto Elettriche Italia
Template: auto-elettriche-italia-premium
Version: 2.7.2
Text Domain: aei-premium-editoriale
*/

.aei-desktop-header-source{display:none}

/* CTA della hero sempre ben visibile, anche prima del passaggio del mouse. */
html body .aei-video-hero__enter{
  background:#e21b2d!important;
  border-color:#e21b2d!important;
  color:#fff!important;
  box-shadow:0 8px 22px rgba(226,27,45,.28)!important;
}
html body .aei-video-hero__enter:hover,
html body .aei-video-hero__enter:focus-visible{
  background:#c91425!important;
  border-color:#c91425!important;
}

@media (min-width:901px){
  html body{
    --aei-editorial-ink:#071a2e;
    --aei-editorial-blue:#005ca8;
    --aei-editorial-cyan:#00a4d6;
    --aei-editorial-red:#e21b2d;
  }
  html body .container{width:min(1600px,calc(100% - 104px))!important}

  /* Una sola fascia: logo piccolo e quattro voci sulla medesima linea. */
  body .site-header>.header-branding-wrap,
  body .site-header>.main-navigation,
  body .site-header>.breaking-bar{display:none!important}
  /* Il parent prova a riattivare il vecchio menu durante lo scroll. */
  html body #primary-navigation.main-navigation,
  html body #primary-navigation.main-navigation.is-sticky{
    display:none!important;
    position:static!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    box-shadow:none!important;
  }
  html body.has-sticky-nav{padding-top:0!important}
  body .site-header{position:relative!important;z-index:1000!important;background:#fff!important;border:0!important;box-shadow:none!important}
  body .site-header .aei-desktop-header-source{display:block!important;background:#fff!important}
  body .site-header .aei-desktop-header{
    position:relative!important;
    display:grid!important;
    grid-template-columns:310px minmax(0,1fr)!important;
    align-items:start!important;
    gap:34px!important;
    height:78px!important;
    padding-top:24px!important;
    overflow:visible!important;
  }
  .aei-editoriale-logo{display:flex;align-items:flex-start;gap:10px;width:310px;height:42px;color:#101923;text-decoration:none;white-space:nowrap}
  .aei-editoriale-monogram{display:flex;align-items:flex-start;height:32px;font:900 italic 31px/1 Arial,Helvetica,sans-serif;letter-spacing:-7px}
  .aei-editoriale-monogram b{font-weight:900}
  .aei-editoriale-monogram b:last-child{margin-left:5px;color:var(--aei-editorial-blue)}
  .aei-editoriale-divider{width:1px;height:32px;margin-left:4px;background:#34414e}
  .aei-editoriale-wordmark{display:block;padding-top:1px;font-family:Arial,Helvetica,sans-serif}
  .aei-editoriale-wordmark strong{display:block;font-size:15px;line-height:1;font-weight:850;letter-spacing:2.1px;color:var(--aei-editorial-ink)}
  .aei-editoriale-wordmark small{display:block;margin-top:7px;text-align:center;font-size:7px;line-height:1;font-weight:800;letter-spacing:4px;color:var(--aei-editorial-blue)}

  .aei-mega-nav{min-width:0;margin:0;padding:0;transform:translateY(1px)}
  .aei-mega-nav>ul{display:flex;align-items:flex-start;justify-content:flex-start;gap:clamp(30px,3.4vw,58px);margin:0;padding:0;list-style:none;white-space:nowrap}
  .aei-mega-nav>ul>li{position:static;margin:0;padding:0 0 28px}
  .aei-mega-nav>ul>li>a{display:block;margin:0;padding:0;color:#101923;font:800 14px/1 Arial,Helvetica,sans-serif;text-decoration:none}
  .aei-mega-nav>ul>li>a::after{content:"⌄";display:inline-block;margin-left:7px;color:#3b6fa8;font-size:13px}
  .aei-mega-nav>ul>li.aei-menu-home{padding-bottom:24px}
  .aei-mega-nav>ul>li.aei-menu-home>a{
    display:grid!important;place-items:center!important;width:32px!important;height:32px!important;margin-top:-10px!important;
    border-radius:7px!important;background:#e9f3fa!important;color:var(--aei-editorial-blue)!important;font-size:23px!important;line-height:1!important;
  }
  .aei-mega-nav>ul>li.aei-menu-home>a::after{display:none!important;content:none!important}
  .aei-mega-nav>ul>li:hover>a,
  .aei-mega-nav>ul>li:focus-within>a{color:#3b6fa8}

  /* Mega menu editoriale con collegamenti e articoli aggiornati automaticamente. */
  .aei-mega-panel{
    position:absolute;z-index:1010;top:62px;left:0;right:0;
    display:grid;grid-template-columns:205px minmax(0,1fr);gap:28px;
    padding:23px 26px;
    visibility:hidden;opacity:0;transform:translateY(8px);pointer-events:none;
    background:#fff;border-top:3px solid #3b6fa8;
    box-shadow:0 18px 40px rgba(8,22,35,.16);
    transition:opacity .18s ease,transform .18s ease,visibility 0s linear .18s;
  }
  .aei-mega-nav>ul>li:hover>.aei-mega-panel,
  .aei-mega-nav>ul>li:focus-within>.aei-mega-panel{
    visibility:visible;opacity:1;transform:none;pointer-events:auto;transition-delay:0s;
  }
  .aei-mega-links{display:flex;flex-direction:column;gap:0;border-right:1px solid #e1e7ec}
  .aei-mega-links>a{padding:10px 20px 10px 0;color:#18232e;font-size:13px;font-weight:800;text-decoration:none;white-space:normal}
  .aei-mega-links>a:hover{color:#3b6fa8}
  .aei-mega-stories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
  .aei-mega-story{display:grid;grid-template-columns:100px minmax(0,1fr);gap:13px;align-items:start;min-width:0}
  .aei-mega-thumb{display:block;height:68px;overflow:hidden;border-radius:7px;background:#e9eef2}
  .aei-mega-thumb img{display:block;width:100%;height:100%;object-fit:cover}
  .aei-mega-thumb span{display:grid;height:100%;place-items:center;color:#3b6fa8;font-weight:900}
  .aei-mega-title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;color:#101923;font-size:12px;line-height:1.25;font-weight:800;text-decoration:none;white-space:normal}
  .aei-mega-title:hover{color:#3b6fa8}
  .aei-mega-story time{display:block;margin-top:6px;color:#75818c;font-size:10px}
  .aei-mega-panel--pages{grid-template-columns:1fr}
  .aei-mega-panel--pages .aei-mega-links{display:grid;grid-template-columns:repeat(3,1fr);border-right:0}

  /* Le card iniziano senza barre o linee intermedie. */
  html body .home-wrap{padding-top:36px!important;padding-bottom:72px!important}
  html body .home-editorial-layout{grid-template-columns:minmax(0,1fr) 300px!important;gap:36px!important;align-items:start!important}

  /* Hero semplice: grande fotografia piena e contenuto sotto. */
  html body .desktop-hero-carousel{
    height:clamp(582px,calc(100svh - 93px),692px)!important;
    min-height:0!important;margin:0 0 52px!important;
    overflow:hidden!important;border:0!important;outline:0!important;border-radius:13px!important;
    background:#fff!important;box-shadow:0 15px 42px rgba(7,21,34,.13)!important;isolation:isolate!important;
  }
  html body.admin-bar .desktop-hero-carousel{height:clamp(570px,calc(100svh - 125px),680px)!important}
  html body .desktop-hero-track{position:absolute!important;inset:0!important;width:auto!important;height:auto!important}
  html body .desktop-hero-slide{inset:0!important;background:#fff!important}
  html body .desktop-hero-media{
    position:absolute!important;inset:0 0 auto!important;width:100%!important;height:74%!important;
    overflow:hidden!important;border:0!important;outline:0!important;border-radius:13px 13px 0 0!important;background:var(--aei-editorial-ink)!important;
  }
  html body .desktop-hero-media::before,
  html body .desktop-hero-media::after{display:none!important;content:none!important}
  html body .desktop-hero-media img{
    position:relative!important;z-index:1!important;display:block!important;
    width:100%!important;height:100%!important;margin:0!important;
    object-fit:cover!important;object-position:center!important;transform:none!important;border:0!important;outline:0!important;
    filter:brightness(1.10) saturate(1.035) contrast(.995)!important;
  }
  html body .desktop-hero-slide.is-active .desktop-hero-image{transform:none!important}
  html body .desktop-hero-overlay{display:none!important;background:none!important}
  html body .desktop-hero-copy{
    position:absolute!important;z-index:3!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;
    display:block!important;width:100%!important;height:26%!important;max-width:none!important;
    padding:15px 155px 13px 27px!important;
    border:0!important;border-top:1px solid #e2e7eb!important;border-radius:0 0 13px 13px!important;
    background:#fff!important;color:var(--aei-editorial-ink)!important;box-shadow:none!important;
  }
  html body .desktop-hero-copy h2{max-width:930px!important;margin:7px 0 5px!important;color:var(--aei-editorial-ink)!important;font-size:clamp(24px,1.85vw,32px)!important;line-height:1.07!important;letter-spacing:-.032em!important;text-shadow:none!important}
  html body .desktop-hero-copy h2 a{
    display:block!important;
    width:100%!important;
    color:var(--aei-editorial-ink)!important;
    text-shadow:none!important;
    text-decoration:none!important;
    background:none!important;
    border:0!important;
    box-shadow:none!important;
    outline:0!important;
    -webkit-box-decoration-break:clone!important;
    box-decoration-break:clone!important;
  }
  html body .desktop-hero-copy .post-meta{color:#687582!important}
  html body .desktop-hero-arrow{
    top:auto!important;bottom:calc(26% + 18px)!important;width:42px!important;height:42px!important;
    transform:none!important;border:0!important;outline:0!important;border-radius:50%!important;
    background:var(--aei-editorial-ink)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    box-shadow:0 6px 18px rgba(0,0,0,.24)!important;font-size:27px!important;
  }
  html body .desktop-hero-prev{left:auto!important;right:66px!important}
  html body .desktop-hero-next{right:16px!important}
  html body .desktop-hero-arrow:hover{transform:none!important;background:#b81616!important}
  html body .desktop-hero-dots{right:124px!important;bottom:calc(26% + 34px)!important}

  /* Sidebar come pannello unico ordinato e allineato alla card. */
  html body .home-editorial-rail{margin:0!important;padding:0!important;align-self:start!important}
  html body .home-editorial-rail__scroll{
    position:relative!important;top:0!important;display:flex!important;flex-direction:column!important;gap:0!important;
    max-height:none!important;margin:-35px 0 0!important;padding:0!important;overflow:visible!important;
    border:0!important;border-radius:0!important;background:transparent!important;
    box-shadow:none!important;
  }
  html body .home-editorial-rail__scroll>section{width:100%!important;margin:0!important;padding:0 0 22px!important}
  html body .home-editorial-rail__scroll>section+section{padding-top:22px!important;border-top:1px solid #dfe6ec!important}
  html body .home-editorial-rail .rail-section-heading{min-height:0!important;margin:0 0 14px!important;padding:0 0 9px!important}
  html body .home-editorial-rail .rail-section-heading span{font-size:15px!important;line-height:1.1!important}
  html body .home-editorial-rail .rail-feature-image{margin:0!important;border-radius:8px!important}
  html body .home-editorial-rail .rail-feature-card h3{margin:10px 0 6px!important;font-size:16px!important;line-height:1.23!important}
  /* Niente micro-card: nella sidebar restano due articoli ampi e leggibili per gruppo. */
  html body .home-editorial-rail .rail-latest-item,
  html body .home-editorial-rail .rail-secondary-item{display:block!important;padding:0 0 21px!important}
  html body .home-editorial-rail .rail-latest>.rail-latest-item:nth-of-type(n+3){display:none!important}
  html body .home-editorial-rail .rail-latest-thumb,
  html body .home-editorial-rail .rail-secondary-thumb{display:block!important;width:100%!important;height:132px!important;margin:0 0 11px!important;overflow:hidden!important;border-radius:8px!important}
  html body .home-editorial-rail .rail-latest-thumb img,
  html body .home-editorial-rail .rail-secondary-thumb img{width:100%!important;height:100%!important;object-fit:cover!important;filter:brightness(1.06) saturate(1.035) contrast(1.01)!important}
  html body .home-editorial-rail .rail-latest-copy h4,
  html body .home-editorial-rail .rail-secondary-item h4{margin:0 0 6px!important;font-size:14px!important;line-height:1.28!important}
  html body .home-editorial-rail .rail-singleton:first-child{margin-top:0!important;padding-top:0!important}
  html body .home-editorial-rail .rail-singleton:first-child .rail-feature-card,
  html body .home-editorial-rail .rail-singleton:first-child .rail-feature-image{margin-top:0!important}

  /* Link social come righe editoriali, non come pulsanti colorati. */
  html body .home-editorial-rail .network-card{
    display:grid!important;grid-template-columns:38px minmax(0,1fr) 18px!important;
    min-height:54px!important;margin:0!important;padding:7px 0!important;
    border:0!important;border-bottom:1px solid #e2e7eb!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
  }
  html body .home-editorial-rail .network-card__icon{width:32px!important;height:32px!important;min-height:32px!important;align-self:center!important;border-radius:6px!important}
  html body .home-editorial-rail .network-card__copy{padding:4px 5px!important}
  html body .home-editorial-rail .network-card__copy strong{font-size:12px!important;color:#15202b!important}
  html body .home-editorial-rail .network-card__copy small{font-size:9px!important;color:#74808a!important}
  html body .home-editorial-rail .network-card__arrow{position:static!important;align-self:center!important;color:#3b6fa8!important}
  html body .home-editorial-rail .rail-network{order:99!important;margin-top:28px!important}
  html body .home-editorial-rail .network-card__icon--facebook,
  html body .home-editorial-rail .network-card__icon--magazine,
  html body .home-editorial-rail .network-card__icon--youtube{
    background:#eef3f7!important;color:#285f96!important;border:1px solid #dbe4eb!important;
  }
  html body .home-editorial-rail .network-card__youtube-play{color:#285f96!important}

  /* Il richiamo partner resta presente, ma non è più un riquadro scuro estraneo. */
  html body .home-editorial-rail .rail-partner{
    margin:30px 0 0!important;padding:22px 18px!important;border:0!important;border-left:3px solid #3b6fa8!important;
    border-radius:0!important;background:#f5f8fa!important;color:#172330!important;box-shadow:none!important;
  }
  html body .home-editorial-rail .rail-partner span{color:#3b6fa8!important}
  html body .home-editorial-rail .rail-partner h3{color:#172330!important;font-size:19px!important}
  html body .home-editorial-rail .rail-partner p{color:#64717d!important}
  html body .home-editorial-rail .rail-partner a{color:#285f96!important}
  html body .home-editorial-rail .network-card{grid-template-columns:54px minmax(0,1fr)!important;min-height:64px!important;margin-bottom:9px!important;border-radius:8px!important;box-shadow:none!important}
  html body .home-editorial-rail .network-card__icon{min-height:64px!important}
  html body .home-editorial-rail .network-card__copy{padding:10px 28px 9px 11px!important}
  html body .home-editorial-rail .rail-partner{margin:22px 0 0!important;padding:20px 18px!important;border-radius:10px!important;box-shadow:none!important}

  /* Ritmo editoriale più luminoso: ogni elemento ha spazio per respirare. */
  html body.home{background:#fff!important}
  html body .category-section{margin-top:72px!important}
  html body .section-heading{margin-bottom:29px!important;padding-bottom:13px!important}
  html body .section-heading h2{font-size:27px!important;line-height:1.1!important;letter-spacing:-.025em!important}
  html body .posts-grid{gap:38px 27px!important}
  html body .post-card .card-image{border-radius:10px!important;box-shadow:0 9px 24px rgba(9,21,33,.07)!important}
  html body .post-card .card-image img,
  html body .special-ev-section .carousel-card img{filter:brightness(1.06) saturate(1.035) contrast(1.01)!important}
  html body .post-card .card-body{padding-top:18px!important}
  html body .post-card h2,
  html body .post-card h3{
    display:-webkit-box!important;min-height:60px!important;max-height:60px!important;
    margin-top:9px!important;margin-bottom:10px!important;overflow:hidden!important;
    -webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;
    font-size:17px!important;line-height:20px!important;
  }
  html body .post-card h2 a,
  html body .post-card h3 a{display:contents!important}
  html body .post-card .post-meta{margin-top:10px!important;line-height:1.5!important}
  html body .post-card .card-excerpt{margin-top:13px!important;line-height:1.65!important;color:#687582!important}
  html body .special-ev-section{
    width:100%!important;margin:76px 0 0!important;padding:0!important;border-radius:0!important;
    background:#fff!important;border:0!important;box-shadow:none!important;color:#111c28!important;
  }
  html body .special-ev-section::before,
  html body .special-ev-section::after{display:none!important;content:none!important}
  html body .special-ev-section .section-heading,
  html body .special-ev-section .featured-heading{color:#111c28!important}
  html body .special-ev-section h2,
  html body .special-ev-section h3,
  html body .special-ev-section h2 a,
  html body .special-ev-section h3 a{color:#111c28!important;text-shadow:none!important}
  html body .special-ev-section .post-meta{color:#6f7c87!important}
  html body .special-ev-section .carousel-card{padding:0 0 18px!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;color:var(--aei-editorial-ink)!important}
  html body .special-ev-section .carousel-card-body{display:block!important;min-height:128px!important;padding:16px 3px 8px!important;visibility:visible!important;opacity:1!important}
  html body .special-ev-section .carousel-card h3{display:block!important;min-height:44px!important;margin:11px 0 8px!important;color:var(--aei-editorial-ink)!important;font-size:17px!important;line-height:1.28!important;visibility:visible!important;opacity:1!important}
  html body .special-ev-section .carousel-card h3 a{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;color:var(--aei-editorial-ink)!important;visibility:visible!important;opacity:1!important}
  html body .special-ev-section .carousel-btn{background:#fff!important;color:#1b344b!important;border:1px solid #d8e0e6!important;box-shadow:none!important}
  html body .special-ev-section .featured-carousel{gap:24px!important;padding-bottom:18px!important}
  html body .home-wrap>.special-ev-section,
  html body .home-wrap>.container>.special-ev-section{width:100%!important;max-width:none!important}
  html body .special-ev-section .featured-carousel{grid-auto-columns:calc((100% - 72px)/4)!important}
  html body .home-editorial-rail__scroll>section{padding-bottom:28px!important}
  html body .home-editorial-rail__scroll>section+section{padding-top:28px!important}

  /* Footer desktop più leggero, compatto e ordinato; il fondo scuro chiude la pagina senza appesantirla. */
  html body.home .site-content{padding-bottom:76px!important}
  html body footer.site-footer{
    margin-top:0!important;
    border-top:4px solid var(--aei-editorial-cyan)!important;
    background:linear-gradient(125deg,#061525 0%,#0a2239 58%,#0d304d 100%)!important;
    box-shadow:none!important;
  }
  html body footer.site-footer::after{display:block!important;content:""!important;opacity:.5!important;border-color:rgba(0,164,214,.24)!important}
  html body .site-footer .footer-grid{
    grid-template-columns:1.55fr .85fr .85fr .9fr!important;
    gap:58px!important;
    padding-top:48px!important;
    padding-bottom:43px!important;
    align-items:start!important;
  }
  html body .footer-aei-brand{gap:12px!important;margin-bottom:18px!important}
  html body .footer-aei-mark{font-size:47px!important;letter-spacing:-6px!important;color:#fff!important}
  html body .footer-aei-mark i{color:var(--aei-editorial-cyan)!important}
  html body .footer-aei-divider{height:48px!important;margin-left:3px!important;background:rgba(255,255,255,.5)!important}
  html body .footer-aei-name{font-size:18px!important;letter-spacing:1.35px!important;color:#fff!important}
  html body .footer-aei-news{color:var(--aei-editorial-cyan)!important}
  html body .footer-aei-news b{background:var(--aei-editorial-cyan)!important}
  html body .footer-aei-news{margin-top:6px!important;font-size:9px!important;letter-spacing:4px!important}
  html body .footer-aei-news b{width:42px!important;height:1px!important}
  html body .site-footer .footer-kicker{margin-top:0!important;margin-bottom:11px!important;font-size:10px!important}
  html body .site-footer .footer-kicker{color:var(--aei-editorial-cyan)!important}
  html body .site-footer .footer-description{max-width:420px!important;font-size:13px!important;line-height:1.7!important;color:#cbd8e2!important}
  html body .site-footer h3{margin-bottom:18px!important;padding-bottom:10px!important;font-size:14px!important;color:#fff!important}
  html body .site-footer h3::after{height:2px!important;width:32px!important}
  html body .site-footer li+li{margin-top:2px!important}
  html body .site-footer li a{padding:7px 0 7px 12px!important;font-size:12.5px!important;line-height:1.3!important;color:#dbe5ec!important}
  html body .site-footer li a::before{background:var(--aei-editorial-cyan)!important}
  html body .site-footer .footer-contact p{margin-bottom:13px!important;font-size:12.5px!important;line-height:1.6!important;color:#cbd8e2!important}
  html body .site-footer .footer-contact a{color:#fff!important}
  html body .site-footer .footer-bottom{padding:12px 0!important;background:#0b1118!important;border-top:1px solid rgba(255,255,255,.08)!important;font-size:11px!important}

  /* Intro più luminosa e senza la linea azzurra decorativa fuori stile. */
  html body .aei-video-hero__shade{
    background:linear-gradient(90deg,rgba(3,12,22,.46) 0%,rgba(3,12,22,.20) 46%,rgba(3,12,22,.03) 78%),linear-gradient(0deg,rgba(3,12,22,.22),rgba(3,12,22,0) 55%)!important;
  }
  html body .aei-video-hero__eyebrow::before{display:none!important;content:none!important}
  html body .aei-video-hero__eyebrow{gap:0!important;text-shadow:0 2px 12px rgba(0,0,0,.28)!important}
  html body .aei-video-hero__content{text-shadow:0 2px 15px rgba(0,0,0,.23)!important}

  /* Solo Chrome: geometria a pixel interi per evitare la riga di rasterizzazione. */
  html.aei-chrome body .desktop-hero-media{height:calc(100% - 154px)!important}
  html.aei-chrome body .desktop-hero-carousel{
    isolation:auto!important;
    contain:layout paint!important;
  }
  html.aei-chrome body .desktop-hero-media{
    background:#fff!important;
    contain:paint!important;
  }
  html.aei-chrome body .desktop-hero-media img{
    filter:none!important;
    opacity:.96!important;
  }
  html.aei-chrome body .desktop-hero-copy{height:154px!important}
  html.aei-chrome body .desktop-hero-copy h2{
    font-size:26px!important;
    line-height:28px!important;
    font-weight:800!important;
    letter-spacing:-1px!important;
  }
  html.aei-chrome body .desktop-hero-copy > .category-pill,
  html.aei-chrome body .desktop-hero-copy > h2,
  html.aei-chrome body .desktop-hero-copy > .post-meta{
    position:relative!important;
    top:19px!important;
  }
  html.aei-chrome body .desktop-hero-arrow{bottom:172px!important}
  html.aei-chrome body .desktop-hero-slide,
  html.aei-chrome body .desktop-hero-image,
  html.aei-chrome body .desktop-hero-copy,
  html.aei-chrome body .desktop-hero-copy *{
    transform:none!important;
    animation:none!important;
    will-change:auto!important;
  }
}

/* Sotto 901px il nuovo header desktop non esiste: resta integralmente il parent mobile. */

  /* Home 2.7.0: due card grandi per riga, senza cambiare query o contenuti. */
  html body.home .category-section .posts-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:46px 30px!important;
  }
  html body.home .category-section .post-card .card-image{
    aspect-ratio:16/9!important;
    height:auto!important;
  }
  html body.home .category-section .post-card .card-image img{
    width:100%!important;height:100%!important;object-fit:cover!important;
  }
  html body.home .category-section .post-card h2,
  html body.home .category-section .post-card h3{
    min-height:auto!important;max-height:none!important;
    font-size:20px!important;line-height:1.22!important;
    -webkit-line-clamp:3!important;
  }

  /* Sidebar in stile magazine: finestra autonoma, scroll lento e discreto. */
  html body.home .home-editorial-rail{
    position:sticky!important;top:22px!important;
  }
  /* 2.7.2: riallinea la finestra scroll al bordo superiore della card principale. */
  html body.home .home-editorial-rail__scroll{margin-top:0!important;}
  html body.home.admin-bar .home-editorial-rail{top:54px!important}
  html body.home .home-editorial-rail__scroll{
    height:min(680px,calc(100vh - 44px))!important;
    max-height:calc(100vh - 44px)!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    scroll-behavior:auto!important;
    scrollbar-width:thin!important;
    scrollbar-color:#b8c3cd transparent!important;
    padding-right:8px!important;
  }
  html body.home.admin-bar .home-editorial-rail__scroll{height:min(680px,calc(100vh - 76px))!important;max-height:calc(100vh - 76px)!important}
  html body.home .home-editorial-rail__scroll::-webkit-scrollbar{width:5px!important}
  html body.home .home-editorial-rail__scroll::-webkit-scrollbar-track{background:transparent!important}
  html body.home .home-editorial-rail__scroll::-webkit-scrollbar-thumb{background:#b8c3cd!important;border-radius:10px!important}

@media (max-width:900px){
  .aei-desktop-header-source{display:none!important}

  /* Header mobile ordinato: logo centrato e area hamburger separata. */
  html body .site-header .header-branding-wrap .branding-row{
    position:relative!important;
    min-height:74px!important;
    height:74px!important;
    padding:0 54px 0 12px!important;
  }
  html body .site-header .site-branding{
    width:100%!important;
    max-width:none!important;
    display:flex!important;
    justify-content:flex-start!important;
    align-items:center!important;
  }
  html body .site-header .site-branding .custom-logo-link,
  html body .site-header .site-branding .default-logo{
    width:225px!important;
    max-width:calc(100vw - 145px)!important;
  }
  html body .site-header .site-branding .custom-logo,
  html body .site-header .site-branding .default-logo img{
    width:100%!important;
    max-width:225px!important;
  }
  html body .site-header .aei-brand-lockup{
    max-width:calc(100vw - 118px)!important;
    margin:0!important;
    gap:8px!important;
    transform:none!important;
  }
  html body .site-header .aei-monogram{
    font-size:35px!important;
    line-height:.84!important;
    letter-spacing:-5.5px!important;
  }
  html body .site-header .aei-brand-divider{
    height:30px!important;
    margin-left:1px!important;
  }
  html body .site-header .aei-wordmark strong{
    font-size:12px!important;
    line-height:1!important;
    letter-spacing:.9px!important;
  }
  html body .site-header .aei-news-row{
    margin-top:4px!important;
  }
  html body .site-header .menu-toggle{
    position:absolute!important;
    top:50%!important;
    right:2px!important;
    left:auto!important;
    display:grid!important;
    align-content:center!important;
    justify-content:center!important;
    width:44px!important;
    height:44px!important;
    margin:0!important;
    padding:7px!important;
    transform:translateY(-50%)!important;
  }
  html body .site-header .menu-toggle span{
    width:24px!important;
    height:2px!important;
    margin:3px auto!important;
  }
  html body.menu-open .site-header .menu-toggle{
    position:fixed!important;
    top:14px!important;
    right:14px!important;
    transform:none!important;
  }

  /* Correzione esclusivamente mobile: elimina la sottile cucitura bianca
     che Chrome Android può creare durante il ridimensionamento delle hero-card. */
  html body .mobile-tablet-hero-grid .post-card .card-image{
    overflow:hidden!important;
    border:0!important;
    outline:0!important;
    line-height:0!important;
    isolation:isolate!important;
    background:#fff!important;
    box-shadow:none!important;
    background-position:center center!important;
    background-repeat:no-repeat!important;
    background-size:cover!important;
  }
  html body .mobile-tablet-hero-grid .post-card .card-image::before,
  html body .mobile-tablet-hero-grid .post-card .card-image::after{
    display:none!important;
    content:none!important;
    border:0!important;
    box-shadow:none!important;
    background:none!important;
  }
  html body .mobile-tablet-hero-grid .post-card .card-image picture{
    display:block!important;
    width:100%!important;
    height:100%!important;
    line-height:0!important;
  }
  html body .mobile-tablet-hero-grid .post-card .card-image img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    filter:none!important;
    object-fit:cover!important;
    position:relative!important;
    z-index:1!important;
    backface-visibility:visible!important;
    -webkit-backface-visibility:visible!important;
    transform:none!important;
    transition:none!important;
    animation:none!important;
    will-change:auto!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
  }
  html body .mobile-tablet-hero-grid .post-card .card-image.aei-mobile-seamless img{
    opacity:1!important;
  }
  html body .mobile-tablet-hero-grid .post-card h2 a,
  html body .mobile-tablet-hero-grid .post-card h2 a:hover,
  html body .mobile-tablet-hero-grid .post-card h2 a:focus,
  html body .mobile-tablet-hero-grid .post-card h2 a:active{
    display:block!important;
    width:100%!important;
    text-decoration:none!important;
    background:none!important;
    background-image:none!important;
    border:0!important;
    box-shadow:none!important;
    outline:0!important;
    -webkit-box-decoration-break:clone!important;
    box-decoration-break:clone!important;
  }
  html body .mobile-tablet-hero-grid .post-card .card-image.aei-pixel-aligned{
    aspect-ratio:auto!important;
    min-height:0!important;
    height:var(--aei-mobile-image-height)!important;
    flex:none!important;
  }
  html.aei-chrome body .mobile-tablet-hero-grid .hero-small .card-image.aei-pixel-aligned{
    height:calc(var(--aei-mobile-image-height) - 7px)!important;
  }
  html body .mobile-tablet-hero-grid,
  html body .mobile-tablet-hero-grid .post-card,
  html body .mobile-tablet-hero-grid .card-body,
  html body .mobile-tablet-hero-grid .card-body *{
    transform:none!important;
    transition:none!important;
    animation:none!important;
    will-change:auto!important;
  }
  html.aei-chrome body .mobile-tablet-hero-grid .post-card,
  html.aei-chrome body .mobile-tablet-hero-grid .card-image,
  html.aei-chrome body .mobile-tablet-hero-grid .card-body{
    isolation:auto!important;
    contain:layout paint!important;
  }
  html.aei-chrome body .mobile-tablet-hero-grid .hero-main h2{
    font-size:26px!important;
    line-height:31px!important;
    font-weight:800!important;
    letter-spacing:-1px!important;
  }
  html.aei-chrome body .mobile-tablet-hero-grid .hero-small h2{
    font-size:18px!important;
    line-height:22px!important;
    font-weight:800!important;
    letter-spacing:-.5px!important;
  }
}
