/* ==========================================================================
   Single Post Lightweight — naturalnzeb.it
   Child theme BuddyBoss — Vanilla CSS, no build step
   Replica fedelmente il design BuddyBoss single post
   ========================================================================== */

/* --- CSS Variables (stesse della homepage) --- */
:root {
  --pl-verde: #BBBF26;
  --pl-arancio: #DD792D;
  --pl-marrone: #5A4A44;
  --pl-marrone-scuro: #3D3330;
  --pl-crema: #F7F4F0;
  --pl-grigio: #7A6E68;
  --pl-grigio-chiaro: #e7e9ec;
  --pl-white: #FFFFFF;
  --pl-radius: 5px;
  --pl-max-width: 760px;
  --pl-wide-width: 1100px;
  --pl-font: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   LAYOUT GENERALE
   ========================================================================== */

.post-light {
  font-family: var(--pl-font);
  color: var(--pl-marrone-scuro);
  line-height: 1.6;
  padding-bottom: 0;
}

.post-light *,
.post-light *::before,
.post-light *::after {
  box-sizing: border-box;
}

.post-light img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   ARTICOLO
   ========================================================================== */

.pl-article {
  max-width: var(--pl-max-width);
  margin: 0 auto;
  padding: 30px 20px 0;
}

/* ==========================================================================
   HEADER (titolo + meta)
   ========================================================================== */

.pl-header {
  margin-bottom: 30px;
}

.pl-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pl-marrone);
  margin: 0 0 20px;
}

.pl-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pl-meta__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
}

.pl-meta__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pl-meta__author {
  font-size: 14px;
  font-weight: 600;
  color: var(--pl-marrone);
  text-decoration: none;
}

.pl-meta__author:hover {
  color: var(--pl-verde);
}

.pl-meta__date {
  font-size: 13px;
  color: var(--pl-grigio);
}

.pl-meta__comments {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--pl-grigio);
  text-decoration: none;
  margin-left: auto;
}

.pl-meta__comments:hover {
  color: var(--pl-verde);
}

.pl-meta__comments svg {
  fill: currentColor;
}

/* ==========================================================================
   FEATURED IMAGE
   ========================================================================== */

.pl-article figure.pl-featured {
  margin: 0 0 40px;
}

.pl-featured__img {
  width: 100%;
  height: auto;
  border-radius: var(--pl-radius);
  display: block;
}

/* ==========================================================================
   CONTENUTO ARTICOLO (the_content)
   ========================================================================== */

.pl-content {
  font-size: 18px;
  line-height: 1.5;
  color: #4D5C6D;
  letter-spacing: -0.24px;
}

.pl-content p {
  margin: 0 0 30px;
}

.pl-content h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--pl-marrone);
  margin: 2em 0 0.8em;
}

.pl-content h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pl-marrone);
  margin: 1.8em 0 0.6em;
}

.pl-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--pl-marrone);
  margin: 1.5em 0 0.5em;
}

.pl-content a:not(.wp-element-button) {
  color: var(--pl-verde);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pl-content a:not(.wp-element-button):hover {
  color: #8E9118;
}

/* Pulsanti Gutenberg: bianco + figli ereditano.
   !important necessario per vincere su .pl-content strong { color: marrone } */
.pl-content .wp-block-button__link {
  color: #fff !important;
  text-decoration: none !important;
}

.pl-content .wp-block-button__link strong,
.pl-content .wp-block-button__link span,
.pl-content .wp-block-button__link em {
  color: inherit !important;
}

/* Rispetta colori impostati da Gutenberg (blocchi padre o link diretto) */
.pl-content .has-text-color a,
.pl-content a.has-text-color {
  color: inherit;
}

.pl-content .has-text-color a:hover,
.pl-content a.has-text-color:hover {
  opacity: 0.85;
}

.pl-content strong {
  font-weight: 700;
  color: var(--pl-marrone);
}

.pl-content em {
  font-style: italic;
}

/* Liste */
.pl-content ul,
.pl-content ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}

.pl-content li {
  margin-bottom: 0.5em;
}

.pl-content ul li {
  list-style-type: disc;
}

.pl-content ol li {
  list-style-type: decimal;
}

/* Blockquote / Callout */
.pl-content blockquote {
  background-color: #f9f7f4;
  border-left: 4px solid var(--pl-verde);
  margin: 1.5em 0;
  padding: 20px 24px;
  border-radius: 0 var(--pl-radius) var(--pl-radius) 0;
  font-style: normal;
}

.pl-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Immagini nel contenuto */
.pl-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pl-radius);
  display: block;
  margin: 1em 0;
}

.pl-content figure {
  margin: 1.5em 0;
}

.pl-content figcaption {
  font-size: 13px;
  color: var(--pl-grigio);
  text-align: center;
  margin-top: 8px;
}

/* Embed YouTube / iframe responsive */
.pl-content iframe {
  max-width: 100%;
  border-radius: var(--pl-radius);
  margin: 1.5em 0;
}

.pl-content .wp-block-embed,
.pl-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 1.5em 0;
}

.pl-content .wp-block-embed iframe,
.pl-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

/* Tabelle */
.pl-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

.pl-content th,
.pl-content td {
  padding: 10px 14px;
  border: 1px solid var(--pl-grigio-chiaro);
  text-align: left;
}

.pl-content th {
  background-color: var(--pl-crema);
  font-weight: 600;
}

/* Codice */
.pl-content code {
  background-color: var(--pl-crema);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.pl-content pre {
  background-color: var(--pl-crema);
  padding: 16px;
  border-radius: var(--pl-radius);
  overflow-x: auto;
  margin: 1.5em 0;
}

.pl-content pre code {
  background: none;
  padding: 0;
}

/* Separator */
.pl-content hr {
  border: none;
  border-top: 1px solid var(--pl-grigio-chiaro);
  margin: 2em 0;
}

/* ==========================================================================
   FOOTER ARTICOLO (categorie, tags, share)
   ========================================================================== */

.pl-footer {
  max-width: var(--pl-wide-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  padding: 30px 20px;
  border-top: 1px solid var(--pl-grigio-chiaro);
}

.pl-taxonomies {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-tax {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--pl-grigio);
  flex-wrap: wrap;
}

.pl-tax svg {
  fill: var(--pl-grigio);
  flex-shrink: 0;
}

.pl-tax span {
  font-weight: 400;
}

.pl-tax a {
  color: var(--pl-verde);
  text-decoration: none;
}

.pl-tax a:hover {
  text-decoration: underline;
}

.pl-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Override BuddyBoss button{...!important} che forza colore/bg/border/padding su tutti i <button> */
.pl-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  padding: 0 !important;
  color: var(--pl-grigio) !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: color 0.2s;
}

.pl-action:hover {
  color: var(--pl-verde) !important;
  background: none !important;
  background-color: transparent !important;
}

.pl-action svg {
  fill: var(--pl-grigio) !important;
}

.pl-action:hover svg {
  fill: var(--pl-verde) !important;
}

.pl-share-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pl-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--pl-grigio) !important;
  text-decoration: none;
  transition: color 0.2s;
}

.pl-share-link:hover {
  color: var(--pl-verde) !important;
}

.pl-share-link svg {
  fill: var(--pl-grigio) !important;
}

.pl-share-link:hover svg {
  fill: var(--pl-verde) !important;
}

/* ==========================================================================
   CTA: TESTO SX + FORM AWEBER DX
   ========================================================================== */

.pl-cta {
  max-width: var(--pl-wide-width);
  margin: 40px auto 0;
  padding: 50px 20px;
  border-top: 1px solid var(--pl-grigio-chiaro);
}

.pl-cta__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

/* Colonna sinistra: testo */
.pl-cta__text {
  text-align: left;
}

.pl-cta__heading {
  display: block;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pl-verde);
  text-decoration: none;
  margin-bottom: 12px;
}

.pl-cta__heading:hover {
  color: #8E9118;
}

.pl-cta__text p {
  font-size: 16px;
  color: var(--pl-marrone);
  margin: 0 0 8px;
}

.pl-cta__link {
  color: var(--pl-verde);
  font-weight: 600;
  text-decoration: none;
}

.pl-cta__link:hover {
  text-decoration: underline;
}

.pl-cta__text .pl-cta__community {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  margin: 30px 0;
}

.pl-cta__title {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--pl-marrone);
  margin: 0 0 16px;
}

.pl-cta__tools-img {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Colonna destra: form */
.pl-cta__form-wrap {
  max-width: 420px;
}

.pl-cta__form-intro {
  font-size: 16px;
  color: var(--pl-marrone);
  margin: 0 0 20px;
  text-align: left;
}

.pl-form__group {
  margin-bottom: 14px;
}

.pl-form__input {
  width: 100%;
  font-size: 16px;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: var(--pl-radius);
  color: var(--pl-marrone);
  background: var(--pl-white);
  transition: border-color 0.2s;
}

.pl-form__input:focus {
  outline: none;
  border-color: var(--pl-verde);
}

.pl-form__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--pl-marrone);
  margin-bottom: 18px;
}

.pl-form__checkbox input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: var(--pl-verde);
}

.pl-form__checkbox a {
  color: var(--pl-verde);
  text-decoration: underline;
}

.pl-form__checkbox label {
  font-size: 15px;
  margin-bottom: 0.1rem;
}

.pl-form__submit {
  display: block;
  width: 100%;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 30px;
  border: none;
  border-radius: var(--pl-radius);
  background-color: var(--pl-verde);
  color: var(--pl-white);
  cursor: pointer;
  transition: background-color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pl-form__submit:hover {
  background-color: #8E9118;
}

.pl-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pl-form__error {
  color: var(--pl-arancio);
  text-align: center;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
}

.pl-form__success {
  display: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--pl-arancio);
  padding: 20px 16px;
  text-align: center;
}

/* Honeypot */
.hl-form__hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ==========================================================================
   AUTHOR BOX
   ========================================================================== */

.pl-author {
  max-width: var(--pl-max-width);
  margin: 0 auto;
  padding: 30px 20px;
}

.pl-author__link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.pl-author__link img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.pl-author__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--pl-marrone);
}

.pl-author__link:hover .pl-author__name {
  color: var(--pl-verde);
}

/* ==========================================================================
   ARTICOLI CORRELATI
   ========================================================================== */

.pl-related {
  max-width: var(--pl-wide-width);
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid var(--pl-grigio-chiaro);
}

.pl-related__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--pl-marrone);
  margin: 0 0 30px;
}

.pl-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Card correlato */
.pl-rcard {
  background: var(--pl-white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--pl-grigio-chiaro);
  transition: box-shadow 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.pl-rcard:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.pl-rcard__thumb-link {
  display: block;
}

.pl-rcard__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.pl-rcard__body {
  padding: 18px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pl-rcard__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
}

.pl-rcard__title a {
  color: var(--pl-marrone);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pl-rcard__title a:hover {
  color: var(--pl-verde);
}

.pl-rcard__excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--pl-grigio);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pl-rcard__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--pl-grigio);
  margin-top: auto;
}

.pl-rcard__meta time {
  white-space: nowrap;
}

.pl-rcard__author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--pl-marrone);
  font-weight: 500;
  min-width: 0;
}

.pl-rcard__author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-rcard__author:hover {
  color: var(--pl-verde);
}

.pl-rcard__author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.pl-rcard__comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.pl-rcard__comments svg {
  fill: currentColor;
}

/* ==========================================================================
   COMMENTI
   ========================================================================== */

.pl-comments {
  max-width: var(--pl-max-width);
  margin: 0 auto;
  padding: 40px 20px 60px;
  border-top: 1px solid var(--pl-grigio-chiaro);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet (<=1024px) */
@media (max-width: 1024px) {
  .pl-title {
    font-size: 28px;
  }

  .pl-content {
    font-size: 16px;
  }

  .pl-cta__grid {
    gap: 30px;
  }

  .pl-related__grid {
    gap: 20px;
  }
}

/* Mobile (<=768px) */
@media (max-width: 768px) {
  .pl-article {
    padding: 20px 16px 0;
  }

  .pl-title {
    font-size: 24px;
  }

  .pl-meta {
    gap: 8px;
  }

  .pl-meta__comments {
    margin-left: auto;
  }

  .pl-content {
    font-size: 16px;
    line-height: 1.7;
  }

  .pl-content h2 {
    font-size: 21px;
  }

  .pl-content h3 {
    font-size: 18px;
  }

  .pl-footer {
    flex-direction: row;
    align-items: center;
  }

  .pl-actions {
    margin-left: auto;
  }

  .pl-cta {
    padding: 30px 16px;
  }

  .pl-cta__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .pl-cta__form-wrap {
    max-width: 100%;
  }

  .pl-related {
    padding: 30px 16px;
  }

  .pl-related__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pl-author {
    padding: 20px 16px;
  }

  .pl-comments {
    padding: 30px 16px 40px;
  }

  .pl-form__checkbox label {
    font-size: 15px;
    margin-bottom: 0.1rem;
  }
}
