/* =====================================================
   AURORA HERO — 4 BLOCCHI PREMIUM
===================================================== */

.aurora-hero-four{
  margin-top:32px;
  display:grid;
  grid-template-columns:1.06fr 1fr 1fr 1fr;
  gap:24px;
  padding:30px;
  border-radius:38px;
  background:
    radial-gradient(circle at 18% 12%,rgba(74,185,255,.20),transparent 30%),
    radial-gradient(circle at 88% 14%,rgba(0,210,106,.12),transparent 28%),
    linear-gradient(145deg,#071523,#031018);
  border:1px solid rgba(142,216,255,.20);
  box-shadow:0 40px 95px rgba(0,0,0,.42);
}

.ah4-card{
  /* niente altezza fissa: la card cresce se la condizione va su due righe */
  min-height:430px;
  height:auto;
  border-radius:28px;
  overflow:visible;
  background:linear-gradient(180deg,rgba(255,255,255,.105),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.11);
  text-decoration:none;
  color:#fff;
  box-shadow:0 20px 48px rgba(0,0,0,.22);
}

/* METEO */
.ah4-weather-card{
  position:relative;
  padding:0;
}

.ah4-weather-card .aurora-weather-card{
  height:100%!important;
  min-height:0!important;
  border:0!important;
  border-radius:28px!important;
  padding:28px!important;
  background:transparent!important;
  box-shadow:none!important;
}

.ah4-weather-card .aw-location span{
  font-size:21px!important;
}

.ah4-weather-card .aw-location small{
  font-size:14px!important;
}

.ah4-weather-card .aw-temp{
  margin-top:34px!important;
}

.ah4-weather-card .aw-temp span{
  font-size:86px!important;
  line-height:.85!important;
  letter-spacing:-4px!important;
}

.ah4-weather-card .aw-temp p{
  font-size:25px!important;
  line-height:1.08!important;
}

.ah4-weather-card .aw-grid{
  margin-top:34px!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}

.ah4-weather-card .aw-grid div{
  padding:15px!important;
  border-radius:18px!important;
}

.ah4-weather-card .aw-grid small{
  font-size:12px!important;
}

.ah4-weather-card .aw-grid strong{
  font-size:20px!important;
}

.ah4-weather-link{
  position:absolute;
  left:28px;
  bottom:28px;
  color:#58bfff;
  font-weight:950;
  font-size:17px;
  text-decoration:none;
}

/* CARD GENERALI */
.ah4-tile{
  display:flex;
  flex-direction:column;
  transition:.22s ease;
}

.ah4-tile:hover{
  transform:translateY(-4px);
  border-color:rgba(126,210,255,.28);
}

.ah4-media{
  height:180px;
  flex:0 0 180px;
  position:relative;
  background-size:cover;
  background-position:center;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.ah4-media:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.46));
}

.ah4-media-analysis{
  background-image:
    linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.20)),
    url('/wp-content/uploads/automatiche/meteo-domani.jpg');
}

.ah4-media-short{
  background-image:
    radial-gradient(circle at 32% 30%,rgba(255,255,255,.60),transparent 16%),
    radial-gradient(circle at 70% 40%,rgba(74,185,255,.45),transparent 36%),
    linear-gradient(135deg,#1f8fe8,#87d9ff);
}

.ah4-media-long{
  background-image:
    radial-gradient(circle at 60% 40%,rgba(255,170,92,.55),transparent 24%),
    radial-gradient(circle at 30% 70%,rgba(139,92,246,.35),transparent 38%),
    linear-gradient(135deg,#2b2148,#ff8b5c);
}

.ah4-content{
  padding:24px 26px 26px;
  display:flex;
  flex-direction:column;
  flex:1;
}

.ah4-content small{
  text-transform:uppercase;
  letter-spacing:1.9px;
  font-size:12px;
  font-weight:950;
  margin-bottom:14px;
}

.ah4-analysis .ah4-content small,
.ah4-analysis .ah4-content strong{
  color:#67c7ff;
}

.ah4-short .ah4-content small,
.ah4-short .ah4-content strong{
  color:#5ee087;
}

.ah4-long .ah4-content small,
.ah4-long .ah4-content strong{
  color:#a879ff;
}

.ah4-content h2{
  margin:0;
  color:#fff;
  font-size:26px;
  line-height:1.12;
  letter-spacing:-.55px;
}

.ah4-content p{
  margin:18px 0 0;
  color:#d8e9f6;
  font-size:16px;
  line-height:1.45;
  font-weight:750;
}

.ah4-content strong{
  margin-top:auto;
  padding-top:20px;
  font-size:17px;
  font-weight:950;
}

@media(max-width:1200px){
  .aurora-hero-four{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:760px){
  .aurora-hero-four{
    grid-template-columns:1fr;
    padding:18px;
  }

  .ah4-card{
    height:auto;
    min-height:390px;
  }
}

/* =====================================================
   HERO METEO - LAYOUT DEFINITIVO 2x2
===================================================== */

.ah4-weather-card .aw-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    margin-top:28px !important;
}

.ah4-weather-card .aw-grid > div{
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    min-height:74px;
    padding:14px 16px !important;
    border-radius:16px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
}

.ah4-weather-card .aw-grid small{
    display:block;
    margin-bottom:6px;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:1px;
    color:#9fcfff;
}

.ah4-weather-card .aw-grid strong{
    display:block;
    font-size:21px;
    line-height:1.1;
    font-weight:800;
}


/* =====================================================
   HERO FINAL FIX — link in fondo e meteo pulito
===================================================== */

.ah4-weather-card .aurora-weather-card{
  padding-bottom:76px!important;
}

.ah4-weather-card .aw-grid{
  margin-bottom:0!important;
}

.ah4-weather-link{
  position:absolute!important;
  left:28px!important;
  right:auto!important;
  bottom:24px!important;
  z-index:20!important;
  display:inline-flex!important;
  align-items:center!important;
  width:auto!important;
  max-width:max-content!important;
  padding:0!important;
  background:transparent!important;
  color:#58bfff!important;
  font-size:17px!important;
  font-weight:950!important;
  line-height:1!important;
  text-decoration:none!important;
}

/* Tutte le card testuali: link sempre in basso */
.ah4-tile{
  display:flex!important;
  flex-direction:column!important;
}

.ah4-content{
  display:flex!important;
  flex-direction:column!important;
  flex:1!important;
}

.ah4-content strong{
  margin-top:auto!important;
  padding-top:22px!important;
  display:block!important;
  line-height:1.1!important;
}

/* Un filo di respiro sotto i testi */
.ah4-content p{
  margin-bottom:8px!important;
}

/* =====================================================
   HERO FIX MIRATO — meteo + solo link breve termine
===================================================== */

/* Annulla il precedente forcing globale dei link */
.ah4-content strong{
  margin-top:20px!important;
  padding-top:0!important;
}

/* Solo la card "Previsioni a breve termine" porta il link in fondo */
.ah4-short .ah4-content strong{
  margin-top:auto!important;
  padding-top:20px!important;
}

/* Dettagli meteo spostato in alto: non si sovrappone ai dati */
.ah4-weather-link{
  position:absolute!important;
  top:24px!important;
  right:28px!important;
  bottom:auto!important;
  left:auto!important;
  z-index:30!important;
  font-size:14px!important;
  line-height:1!important;
  padding:8px 12px!important;
  border-radius:999px!important;
  background:rgba(74,185,255,.12)!important;
  border:1px solid rgba(126,210,255,.22)!important;
  color:#8ed8ff!important;
  font-weight:950!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

/* Lascia respiro sotto la griglia meteo */
.ah4-weather-card .aw-grid{
  margin-top:30px!important;
  margin-bottom:0!important;
}

/* Evita che la scritta aggiornato e il bottone si pestino troppo */
.ah4-weather-card .aw-location{
  padding-right:120px!important;
}


/* =====================================================
   HERO FINAL ALIGN — dettagli meteo + link 48h
===================================================== */

/* Dettagli meteo accanto alla località */
.ah4-weather-link{
  position:absolute!important;
  top:34px!important;
  right:28px!important;
  bottom:auto!important;
  left:auto!important;
  z-index:30!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:34px!important;
  padding:0 15px!important;
  border-radius:999px!important;
  background:rgba(74,185,255,.16)!important;
  border:1px solid rgba(126,210,255,.28)!important;
  color:#9fe0ff!important;
  font-size:14px!important;
  line-height:1!important;
  font-weight:950!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

/* lascia spazio al bottone accanto al nome */
.ah4-weather-card .aw-location{
  padding-right:170px!important;
  align-items:flex-start!important;
}

/* aggiorna sotto il nome, non sulla stessa riga */
.ah4-weather-card .aw-location small{
  display:block!important;
  margin-top:10px!important;
  font-size:14px!important;
  line-height:1.1!important;
}

/* link della card 48 ore più in basso */
.ah4-short .ah4-content{
  display:flex!important;
  flex-direction:column!important;
}

.ah4-short .ah4-content strong{
  margin-top:auto!important;
  padding-top:26px!important;
}

/* non forzare gli altri link troppo in basso */
.ah4-analysis .ah4-content strong,
.ah4-long .ah4-content strong{
  margin-top:20px!important;
  padding-top:0!important;
}


/* =====================================================
   HERO - RIFINITURA FINALE
===================================================== */

/* 1. Elimina completamente il pulsante Dettagli meteo */
.ah4-weather-link{
    display:none!important;
}

/* 2. Ricentra il blocco superiore della card meteo */
.ah4-weather-card .aw-location{
    padding-right:0!important;
    text-align:center!important;
    justify-content:center!important;
}

.ah4-weather-card .aw-location span{
    display:block!important;
    width:100%;
    text-align:center!important;
}

.ah4-weather-card .aw-location small{
    display:block!important;
    margin-top:10px!important;
    text-align:center!important;
}

/* 3. Allineamento dei tre blocchi informativi */

/* Analisi del meteorologo: leggermente più in alto */
.ah4-analysis .ah4-content{
    padding-top:18px!important;
}

/* Previsioni 48 ore: leggermente più in basso */
.ah4-short .ah4-content{
    padding-top:34px!important;
}

/* Lungo termine: leggermente più in alto */
.ah4-long .ah4-content{
    padding-top:18px!important;
}


/* =====================================================
   HERO MICROFIX — meteo più alto + 48h allineato
===================================================== */

/* Griglia meteo più compatta e meno bassa */
.ah4-weather-card .aw-grid{
  margin-top:22px!important;
  gap:10px!important;
}

.ah4-weather-card .aw-grid > div{
  min-height:64px!important;
  padding:11px 14px!important;
}

.ah4-weather-card .aw-grid small{
  margin-bottom:4px!important;
  font-size:10.5px!important;
}

.ah4-weather-card .aw-grid strong{
  font-size:18px!important;
  line-height:1.08!important;
}

/* alza leggermente tutto il blocco meteo interno */
.ah4-weather-card .aw-temp{
  margin-top:26px!important;
}

.ah4-weather-card .aw-temp span{
  font-size:80px!important;
}

/* Secondo blocco: ancora un filo più giù */
.ah4-short .ah4-content{
  padding-top:40px!important;
}


/* =====================================================
   HERO - FIX ALLINEAMENTO CARD 48 ORE
===================================================== */

/* Riporta il titolo e il testo in alto come le altre card */
.ah4-short .ah4-content{
    padding-top:18px!important;
}

/* Solo il link va in fondo */
.ah4-short .ah4-content strong{
    margin-top:auto!important;
    display:block!important;
    padding-top:28px!important;
}


/* =====================================================
   ULTIMA RIFINITURA HERO
   Sposta SOLO il link della card "48 ore"
===================================================== */

.ah4-short .ah4-content strong{
    margin-top:auto!important;
    padding-top:0!important;
    transform:translateY(18px)!important;
}


/* =====================================================
   HERO PREMIUM
   Immagini leggermente più importanti
===================================================== */

.ah4-media{
    height:200px!important;
    flex:0 0 200px!important;
}

/* recuperiamo un po' di spazio nel testo */
.ah4-content{
    padding:20px 24px 24px!important;
}

.ah4-content h2{
    margin-bottom:10px!important;
}


/* =====================================================
   HERO DEFINITIVA — schema testo uniforme
===================================================== */

/* Tutte le card testuali hanno lo stesso ritmo verticale */
.ah4-tile .ah4-content{
  display:flex!important;
  flex-direction:column!important;
}

/* Descrizione sempre alta uguale: circa 4 righe */
.ah4-tile .ah4-content p{
  min-height:92px!important;
  max-height:92px!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
}

/* Link sempre allineato in basso */
.ah4-tile .ah4-content strong{
  margin-top:auto!important;
  padding-top:0!important;
  transform:none!important;
}

/* Annulla eventuali micro-spostamenti precedenti solo sulla 48h */
.ah4-short .ah4-content{
  padding-top:20px!important;
}

.ah4-short .ah4-content strong{
  margin-top:auto!important;
  padding-top:0!important;
  transform:none!important;
}


/* =====================================================
   HERO DEFINITIVA — schema testo uniforme
===================================================== */

/* Tutte le card testuali hanno lo stesso ritmo verticale */
.ah4-tile .ah4-content{
  display:flex!important;
  flex-direction:column!important;
}

/* Descrizione sempre alta uguale: circa 4 righe */
.ah4-tile .ah4-content p{
  min-height:92px!important;
  max-height:92px!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
}

/* Link sempre allineato in basso */
.ah4-tile .ah4-content strong{
  margin-top:auto!important;
  padding-top:0!important;
  transform:none!important;
}

/* Annulla eventuali micro-spostamenti precedenti solo sulla 48h */
.ah4-short .ah4-content{
  padding-top:20px!important;
}

.ah4-short .ah4-content strong{
  margin-top:auto!important;
  padding-top:0!important;
  transform:none!important;
}


/* =====================================================
   HERO DEFINITIVA — card cliccabili, niente link testuali
===================================================== */

/* Nasconde i link finali nelle tre card */
.ah4-tile .ah4-content strong{
  display:none!important;
}

/* Ogni card resta interamente cliccabile */
.ah4-tile{
  cursor:pointer;
}

/* Testo uniforme: sempre 4 righe */
.ah4-tile .ah4-content p{
  min-height:92px!important;
  max-height:92px!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
}

/* Più equilibrio senza il link finale */
.ah4-tile .ah4-content{
  justify-content:flex-start!important;
}

/* Hover leggero per far capire che il blocco è cliccabile */
.ah4-tile:hover{
  transform:translateY(-4px);
  border-color:rgba(126,210,255,.30);
  box-shadow:0 26px 58px rgba(0,0,0,.28);
}


/* Immagini editoriali dinamiche Aurora */
.ah4-media.has-dynamic-image {
    overflow: hidden;
    background-image: none !important;
}

.ah4-dynamic-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    object-position: center;
}

/* ===== GLASS EFFECT + TEMA DINAMICO GIORNO/NOTTE ===== */
.ah4-weather-card{
  position:relative;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  transition:background 1.2s ease;
  overflow:hidden;
}

.ah4-weather-card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  opacity:.9;
  transition:opacity 1.2s ease;
}

.ah4-weather-card .aurora-weather-card{
  position:relative;
  z-index:1;
}

.ah4-weather-card:has(.aurora-day){
  background:
    radial-gradient(circle at 20% 0%, rgba(255,196,90,.22), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(90,180,255,.16), transparent 55%),
    linear-gradient(160deg, rgba(30,60,110,.55), rgba(10,20,40,.65));
  border:1px solid rgba(255,210,140,.22);
}

.ah4-weather-card:has(.aurora-night){
  background:
    radial-gradient(circle at 15% 10%, rgba(100,120,255,.20), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(60,40,140,.22), transparent 55%),
    linear-gradient(160deg, rgba(8,12,28,.75), rgba(3,5,14,.85));
  border:1px solid rgba(130,140,255,.18);
}

.ah4-weather-card:hover{
  box-shadow:0 25px 60px rgba(0,0,0,.35);
}

/* --- Riequilibrio card hero: piu spazio per titolo e occhiello --- */
.ah4-card{
  /* niente altezza fissa: cresce se la condizione va su due righe */
  height:auto;
  min-height:400px;
}

.ah4-media{
  height:150px;
  flex:0 0 150px;
}

.ah4-content{
  padding:20px 24px 22px;
}

.ah4-content small{
  margin-bottom:10px;
}

.ah4-content h2{
  font-size:23px;
  line-height:1.15;
}

.ah4-content p{
  margin:12px 0 0;
  font-size:15px;
  line-height:1.4;
}

.ah4-content strong{
  padding-top:14px;
}

@media (max-width:900px){
  .ah4-card{
    height:auto;
    min-height:440px;
  }
}

/* L'occhiello non deve mai spingere fuori il richiamo all'azione */
.ah4-content p{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ah4-content h2{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ah4-content strong{
  flex-shrink:0;
}

/* Icona meteo nella card situazione attuale */
.aurora-weather-card .aw-icon{
  display:block;
  font-size:30px;
  line-height:1;
  margin:0 0 2px;
}
.ah4-weather-card .aw-icon{
  font-size:30px!important;
  line-height:1!important;
  margin:0 0 2px!important;
}
@media (max-width:600px){
  .aurora-weather-card .aw-icon,
  .ah4-weather-card .aw-icon{font-size:26px!important}
}

/* =====================================================
   HERO - COMPATTAZIONE CARD METEO (20/07)
===================================================== */
.ah4-weather-card .aurora-weather-card{
  padding:22px!important;
}

.ah4-weather-card .aw-temp{
  margin-top:10px!important;
}

.ah4-weather-card .aw-temp span{
  font-size:66px!important;
  line-height:1!important;
}

.ah4-weather-card .aw-grid{
  margin-top:14px!important;
  gap:8px!important;
}

.ah4-weather-card .aw-grid > div{
  min-height:54px!important;
  padding:9px 12px!important;
}

.ah4-weather-card .aw-icon{
  font-size:52px!important;
}
