/*
Theme Name: SportNews
Description: Tema WordPress ottimizzato per Google Discover con infinite scroll intelligente
Author: SportNews Team
Version: 1.0.0
Text Domain: sportnews
*/

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Single Post Content – Complementary CSS
   ========================================================================== */
/* 1) Scope: solo all’interno di <article class="… text-justify"> in single.php */
.single-post article.text-justify {
  /* puoi aggiungere padding/margin extra se vuoi */
}

/* 2) Paragrafi */
.single-post article.text-justify p {
  margin-bottom: 1.5em;
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
}

/* 3) Headings (h1–h6) */
.single-post article.text-justify h1,
.single-post article.text-justify h2,
.single-post article.text-justify h3,
.single-post article.text-justify h4,
.single-post article.text-justify h5,
.single-post article.text-justify h6 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
  color: #111;
}
.single-post article.text-justify h1 { font-size: 2.5rem; }
.single-post article.text-justify h2 { font-size: 2rem; }
.single-post article.text-justify h3 { font-size: 1.75rem; }
@media (max-width: 768px) {
  .single-post article.text-justify h1 { font-size: 2rem; }
  .single-post article.text-justify h2 { font-size: 1.75rem; }
  .single-post article.text-justify h3 { font-size: 1.5rem; }
}

/* 4) Liste */
.single-post article.text-justify ul,
.single-post article.text-justify ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}
.single-post article.text-justify ul li,
.single-post article.text-justify ol li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}
.single-post article.text-justify ul li { list-style: disc inside; }
.single-post article.text-justify ol li { list-style: decimal inside; }


/* 9) Immagini & Media */
.single-post article.text-justify video,
.single-post article.text-justify embed,
.single-post article.text-justify iframe {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
}

/* 10) Responsive embed wrapper 16:9 */
.single-post article.text-justify .embed-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1.5em;
}
.single-post article.text-justify .embed-responsive iframe,
.single-post article.text-justify .embed-responsive video,
.single-post article.text-justify .embed-responsive embed,
.single-post article.text-justify .embed-responsive object {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ==========================================================================
   Tabelle 100% responsive su ogni viewport
   ========================================================================== */
/* Trasforma la table in un blocco scrollabile orizzontalmente */
.single-post article.text-justify table {
  display: block;                       /* per permettere overflow */
  width: 100%;                          /* occupa sempre tutta la larghezza */
  overflow-x: auto;                     /* scroll orizzontale se troppo larga */
  -webkit-overflow-scrolling: touch;    /* scroll più fluido su iOS */
  border-collapse: collapse;
  margin-bottom: 1.5em;
}

/* Celle impostate a white-space: nowrap per evitare il wrap indesiderato */
.single-post article.text-justify table th,
.single-post article.text-justify table td {
  padding: 0.75em 1em;
  border: 1px solid #ccc;
  text-align: left;
  white-space: nowrap;                  /* impedirà alle celle di andare a capo */
}

/* Larghezza minima opzionale per table desktop */
@media (min-width: 640px) {
  .single-post article.text-justify table {
    /* rimuovi display:block per tornare al comportamento table
       e mantenere il layout classico su schermi più larghi */
    display: table;
  }
  .single-post article.text-justify table th,
  .single-post article.text-justify table td {
    white-space: normal;                /* cellulare normale su desktop */
  }
}
