/* Visualizzazione per tablet/desktop */
@media(min-width: 769px) {
  .main-container-ricetta .visual-desktop { display: table-row; }
  .main-container-ricetta .visual-mobile { display: none; }
}

/* Visualizzazione per mobile */
@media(max-width: 768px) {
  main { padding: 0px; }
  .body-container { width: 100%; }
  header .logo img { width: 50%; }

  /* Inserisci ricetta */
  .main-container-ricetta table td { font-size: 8px; }
  .main-container-ricetta .visual-desktop { display: none; }
  .main-container-ricetta .visual-mobile { display: table-row; }
}

/* =========================================
   🌙 LAYOUT GENERALE
   ========================================= */
h2 {
  font-size: 15px;
  margin-bottom: 16px;
  color: #222;
  text-transform: uppercase;
}

/* HEADER */
.flex-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
}
.icon-btns { display: flex; gap: 18px; }
.icon-btn { text-align: center; font-size: 12px; color: #444; text-decoration: none; }
.icon-btn i { display: block; font-size: 18px; margin-bottom: 2px; }
.icon-btn:hover { color: #a35d3c; }
h1 { margin-top: 4px; font-size: 22px; }
header p { margin-top: 8px; margin-bottom: 25px; font-size: 14px; color: #555; }
.logo-img { max-height: 80px; max-width: 200px; width: auto; height: auto; object-fit: contain; }

/* MENU INFERIORE FISSO */
.menu-bottom,
#menu-bottom,
footer.menu,
nav.menu {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #000;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
}
body { padding-bottom: 80px; }

/* =========================================
   🌸 NOVITÀ DELL’APP
   ========================================= */
.novita-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
}
.novita-item img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e0e0e0;
  padding: 5px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}
.novita-item p {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}
/* =========================================
   🌑 CALENDARIO LUNARE — ULTRA-COMPATTO MOBILE
   ========================================= */
@media (max-width: 768px) {

  .calendario-lunare {
    max-width: 90%;
    margin: 14px auto;
    padding: 4px 0;
    text-align: center;
  }

  .calendario-lunare h2 {
    font-size: 11px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
    letter-spacing: 0.4px;
  }

  .cal-date {
    font-size: 9.5px;
    color: #555;
    margin-bottom: 2px;
  }

  .fase-lunare {
    font-size: 9px;
    color: #666;
    margin-bottom: 4px;
  }

  .messaggio-energetico {
    background: #fdfaf8;
    border: 1px solid #eee2d9;
    color: #4a2c1b;
    font-size: 8.5px;
    line-height: 1.25;
    border-radius: 5px;
    padding: 4px 5px;
    margin: 4px auto 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    max-width: 82%;
  }

  /* --- icone micro --- */
  .icone-eventi {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    padding: 0;
  }

  .tooltip {
    width: 38px;   /* 👈 da 90 → 38 px */
    height: 38px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #e8e5e2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 1.5px rgba(0,0,0,0.04);
  }

  .tooltip img {
    width: 55%;
    height: 55%;
    object-fit: contain;
  }

  .tooltip .tooltip-text {
    font-size: 8px;
    width: 70px;
    padding: 2.5px;
    border-radius: 4px;
  }
}
/* =========================================
   🥗 NUTRIZIONE DI OGGI — MOBILE OTTIMIZZATO 2x2 GRANDI
   ========================================= */
@media (max-width: 768px) {

  .nutrizione-section {
    position: relative;
    width: 100%;
    max-width: 95%;
    margin: 50px auto;
    padding-left: 0;
    text-align: center;
  }

  .nutrizione-label {
    position: absolute;
    top: -25px;
    left: 0;
    transform: none;
    writing-mode: horizontal-tb;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    letter-spacing: 1px;
  }

  /* ✅ 2 card per riga ma più grandi */
  .nutrizione-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    justify-items: center;
    align-items: start;
    margin-top: 40px;
    max-width: 100%;
  }

  /* ✅ card più grandi e proporzionate */
  .card-nutrizione {
    width: 95%;
    height: 210px; /* aumentata */
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-decoration: none;
    color: #111;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .card-nutrizione:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  }

  /* ✅ immagine più alta */
  .card-nutrizione img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
  }

  .card-info {
    padding: 8px 10px 10px;
    background: #fff;
    text-align: center;
  }

  .card-title {
    font-weight: 700;
    font-size: 13px;
    color: #111;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .macros {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #555;
  }

  .macros span strong {
    display: block;
    font-size: 12px;
    color: #000;
    font-weight: 700;
    margin-bottom: 1px;
  }
}
/* =========================================
   📊 DATI PRINCIPALI DELLA GIORNATA — MOBILE FIX ORIZZONTALE
   ========================================= */
@media (max-width: 768px) {

  /* contenitore principale centrato */
  .riepilogo-giornata {
    width: 100%;
    max-width: 95%;
    margin: 40px auto;
    text-align: center;
    padding: 0 6px; /* 👈 aggiunge margine laterale */
  }

  .riepilogo-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: hidden;
  }

  .linea-divisoria {
    display: block !important;
    width: 1.5px;
    min-height: 140px;
    background: linear-gradient(to bottom, #d8b6a2, #f3e9e2, #d8b6a2);
    border-radius: 2px;
    align-self: center;
  }

  /* ✅ box sinistro più piccolo e spostato leggermente a destra */
  .riepilogo-box.sinistra {
  flex: 0 0 18%;          /* 🔥 più piccolo (da 20% → 18%) */
  max-width: 18%;
  margin-left: 10%;        /* 🔥 spostato più verso destra */
  background: linear-gradient(145deg, #fff, #f8f1ee);
  border-radius: 10px;
  padding: 7px 9px;        /* un po’ più compatto */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  text-align: left;
}

  /* ✅ box destro più piccolo e centrato */
  .riepilogo-box.destra {
    flex: 0 0 32%;         /* 👈 stessa larghezza ridotta */
    max-width: 32%;
    margin-right: 6%;      /* 👈 bilancia lo spazio laterale destro */
    background: linear-gradient(145deg, #fff, #f7ebe4);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* slider */
  .riepilogo-slider {
    position: relative;
    width: 100%;
    height: 90px;  /* 👈 un po’ più compatto */
    overflow: hidden;
  }

  .riepilogo-slider .slide i {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .riepilogo-slider .slide p {
    font-size: 11px;
  }

  /* testo dentro il box sinistro più piccolo */
  .riepilogo-box.sinistra .mini-voce {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .riepilogo-box.sinistra .mini-voce i {
    font-size: 13px;
  }

  .riepilogo-box.sinistra .mini-voce strong {
    font-size: 11.5px;
  }

  .riepilogo-box.sinistra .mini-voce small {
    font-size: 9px;
  }
}
/* =========================================
   🗺️ SOLO MAPPA — VERSIONE FULLSCREEN XXL MOBILE
   ========================================= */
@media (max-width: 768px) {

  /* Titolo “Mappa Attività” resta normale */
  .attivita-fitness h2 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  /* ✅ Solo la mappa (Leaflet o iframe) diventa quasi fullscreen */
  #mappaPercorso,
  .attivita-box iframe {
    display: block;
    width: 100%;
    height: 95vh;          /* 👈 95% dello schermo, quasi full-screen */
    min-height: 700px;     /* 👈 per telefoni grandi tipo iPhone Pro Max */
    max-height: 950px;     /* limite per evitare overflow su tablet */
    border-radius: 0;
    border: none;
    overflow: hidden;
    box-shadow: 0 0 0 transparent;
  }

  /* ✅ overlay proporzionato */
  .overlay-info {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) scale(1.05);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    padding: 14px 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    z-index: 99;
  }

  .info-box {
    font-size: 14.5px;
    font-weight: 600;
  }

  .info-box i {
    color: #b48a6c;
    font-size: 18px;
  }

  /* ✅ Pulsante geolocalizzazione sempre visibile e grande */
  #btnGeo {
    position: absolute;
    bottom: 28px;
    right: 20px;
    background: linear-gradient(135deg, #7b63ff, #a78bfa);
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: inline-block;
    z-index: 1000;
  }

  #btnGeo:hover {
    opacity: 0.9;
  }
}
/* =========================================
   🍰 RICETTE CONSIGLIATE — IMMAGINE CENTRATA MOBILE
   ========================================= */
@media (max-width: 768px) {

  .consigliate {
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 12px;
    text-align: center;
  }

  .consigliate h2 {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .consigliate .grid-3 {
    display: flex !important;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
  }

  /* CARD EQUILIBRATA */
  .consigliate .card-mini {
    flex: 0 0 calc(33.333% - 10px);
    width: calc(33.333% - 10px);
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;
    color: #111;
    transition: transform .2s ease;
  }

  .consigliate .card-mini:hover {
    transform: translateY(-2px);
  }

  /* ✅ IMMAGINE PIÙ CENTRALE E DOMINANTE */
  .consigliate .card-mini img {
    width: 100%;
    height: 72%;            /* da 65% → 72% */
    object-fit: cover;
    object-position: center center; /* centrata verticalmente */
    display: block;
    transition: transform .3s ease;
  }

  .consigliate .card-mini:hover img {
    transform: scale(1.05); /* leggera animazione */
  }

  /* TESTO SOTTO IMMAGINE */
  .consigliate .card-mini h4 {
    font-size: 11px;
    margin: 5px 0;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
    padding: 0 6px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
/* =========================================
   📱 MOBILE RIDUZIONE GLOBALE
   ========================================= */
@media(max-width:768px){
  html, body { font-size: 12px; zoom: 0.85; overflow-x: hidden; }
  h1 { font-size: 17px; }
  h2 { font-size: 13px; }
  header p { font-size: 12px; }
  .logo-img { max-height: 60px; }
  .ricetta img { height: 110px; }
  .ricetta h3 { font-size: 11px; }
}
