/* ==========================================================================
   Homepage Lightweight — naturalnzeb.it
   Child theme BuddyBoss — Vanilla CSS, no build step
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --hl-verde: #BBBF26;
  --hl-arancio: #DD792D;
  --hl-marrone: #5A4A44;
  --hl-crema: #FCE1B4;
  --hl-border: #b392df;
  --hl-white: #FFFFFF;
  --hl-radius: 5px;
  --hl-max-width: 1140px;
  --hl-font: 'Inter', -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;
  --hl-system: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* --- Reset & Base --- */
.home-light {
  font-family: var(--hl-system);
  color: var(--hl-marrone);
  line-height: 1.6;
}

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

.home-light img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Utility: centered container --- */
.hl-container {
  max-width: var(--hl-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --- Buttons --- */
.hl-btn {
  display: inline-block;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: var(--hl-radius);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  cursor: pointer;
  text-align: center;
}

.hl-btn--primary {
  background-color: var(--hl-verde);
  color: var(--hl-white);
  border: 2px solid var(--hl-verde);
}

.hl-btn--primary:hover {
  background-color: #a8ac22;
  border-color: #a8ac22;
  color: var(--hl-white);
}

.hl-btn--outline {
  background-color: transparent;
  color: var(--hl-verde);
  border: 2px solid var(--hl-verde);
}

.hl-btn--outline:hover {
  background-color: var(--hl-verde);
  color: var(--hl-white);
}

/* ==========================================================================
   SEZIONE 1: HERO
   Background image full-width, content box centered with semi-transparent overlay
   ========================================================================== */
.hl-hero {
  position: relative;
  z-index: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: -65px;
  height: 465px; /* 400 visibili + 65 dietro navbar */
  padding-top: 65px; /* spinge il contenuto sotto il navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('https://www.naturalnzeb.it/wp-content/uploads/2026/01/Naturalnzeb-edifici-naturali-a-emissioni-zero.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  box-sizing: border-box;
}

/* Semi-transparent box — smaller than the bg image */
.hl-hero__overlay {
  position: relative;
  width: 940px;
  max-width: calc(100% - 40px);
  background-color: rgba(90, 74, 68, 0.65);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hl-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 0;
  width: 100%;
}

.home-light .hl-hero__content h1 {
  font-family: var(--hl-font) !important;
  font-size: 45px;
  font-weight: 800;
  color: var(--hl-white);
  margin: 0 0 20px;
}

.hl-hero__content p {
  font-family: var(--hl-font);
  font-size: 20px;
  font-weight: 400;
  color: var(--hl-white);
  line-height: 1.7;
  max-width: 848px;
  margin: 0 auto 30px;
}

.hl-hero__cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 0 0;
}

.hl-hero__cta .hl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 20px;
  padding: 0 30px;
  height: 50px;
  line-height: 50px;
  border: none;
  justify-self: center;
}

/* ==========================================================================
   SEZIONE 2: STATS BAR
   ========================================================================== */
.hl-stats {
  padding: 17px 0;
  background-color: var(--hl-white);
  box-shadow: rgba(0, 0, 0, 0.5) 0px 8px 15px -17px;
}

.hl-stats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: var(--hl-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hl-stat {
  text-align: center;
}

.hl-stat__icon {
  color: var(--hl-crema);
  margin-bottom: 8px;
  line-height: 1;
}

.hl-stat__icon svg {
  fill: var(--hl-crema);
}

/* Inline SVG icons in buttons */
.hl-icon {
  vertical-align: middle;
  margin-right: 6px;
}

.hl-stat__number {
  font-family: var(--hl-system);
  font-size: 30px;
  font-weight: 600;
  color: var(--hl-marrone);
  line-height: 1.2;
}

.hl-stat__label {
  font-family: var(--hl-system);
  font-size: 16px;
  font-weight: 400;
  color: var(--hl-marrone);
}

/* ==========================================================================
   SEZIONE 3: DESCRIZIONE
   ========================================================================== */
.hl-about {
  padding: 50px 20px 0;
  text-align: center;
}

.hl-about p {
  font-family: var(--hl-system);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 1000px;
  margin: 0 auto;
  color: var(--hl-marrone);
}

.hl-about a {
  color: var(--hl-marrone);
  text-decoration: underline;
}

.hl-about a:hover {
  color: var(--hl-arancio);
}

/* ==========================================================================
   SEZIONE 4: PROVIDER CFP
   ========================================================================== */
.hl-provider {
  padding: 30px 20px 0;
  text-align: center;
}

.hl-provider p {
  font-family: var(--hl-system);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 890px;
  margin: 0 auto;
  color: var(--hl-arancio);
}

/* ==========================================================================
   SEZIONE 5-6: CORSI
   ========================================================================== */
.hl-courses {
  padding: 50px 20px;
  text-align: center;
}

.hl-courses h2,
.hl-blog h2 {
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hl-marrone);
  margin: 0 0 50px;
}

.hl-courses__subtitle {
  font-family: var(--hl-system);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 950px;
  margin: 0 auto 40px;
  color: var(--hl-marrone);
}

/* --- Card Grid (corsi + blog) --- */
.hl-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--hl-max-width);
  margin: 0 auto 40px;
}

/* --- Card singola --- */
.hl-card {
  background: var(--hl-white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e7e9ec;
  box-shadow: none;
  transition: box-shadow 0.3s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.hl-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

.hl-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hl-card__body {
  padding: 16px 20px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* Badge "Iscritto" */
.hl-card__badge {
  position: absolute;
  top: 15px;
  left: 0;
  z-index: 9;
  font-size: 11px;
  font-weight: 400;
  line-height: 11px;
  text-transform: uppercase;
  letter-spacing: 0.23px;
  color: var(--hl-white);
  background: var(--hl-verde);
  padding: 5px 12px;
  border-radius: 0 15px 15px 0;
}

.hl-card__thumb-wrap {
  position: relative;
}

.hl-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.24;
  color: var(--hl-marrone);
  margin: 0 0 10px;
}

.hl-card__title a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 54px;
}

.hl-card__title a:hover,
a.hl-card:hover .hl-card__title {
  color: var(--hl-verde);
}

.hl-card__excerpt {
  font-size: 14px;
  color: #4d5c6d;
  line-height: 1.2;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 37.8px;
}

.hl-card__cta {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--hl-white);
  background-color: var(--hl-verde);
  padding: 6px 12px;
  border-radius: 100px;
  text-decoration: none;
  margin-top: auto;
  margin-bottom: 10px;
  transition: background-color 0.3s;
  line-height: 20px;
}

.hl-card__cta:hover {
  background-color: #a8ac22;
  color: var(--hl-white);
}

.hl-card__meta {
  font-size: 13px;
  color: #999;
  margin-top: auto;
  padding-top: 10px;
}

/* Section CTA button (below grids) — match old homepage spacing */
.hl-courses > .hl-btn {
  margin-top: 28px; /* grid margin-bottom 40 + 28 = 68px total gap */
}
.hl-blog > .hl-btn {
  margin-top: 30px; /* grid margin-bottom 40 + 30 = 70px total gap */
}

/* ==========================================================================
   SEZIONE 7-8: BLOG
   ========================================================================== */
.hl-blog {
  padding: 50px 20px 10px;
  text-align: center;
}

.hl-blog h2 {
  margin-bottom: 50px;
}

/* ==========================================================================
   SEZIONE 9: CTA + FORM AWEBER
   ========================================================================== */
.hl-cta {
  padding: 80px 20px;
}

.hl-cta__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--hl-max-width);
  margin: 0 auto;
}

/* Author box */
.hl-cta__author {
  text-align: center;
}

.hl-cta__author img {
  width: 50%;
  max-width: 220px;
  border-radius: var(--hl-radius);
  margin: 0 auto 20px;
}

.hl-cta__author h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--hl-marrone);
  margin: 0 0 8px;
}

.hl-cta__author p {
  font-size: 16px;
  font-weight: 400;
  color: var(--hl-marrone);
  margin: 0;
}

.hl-cta__author a {
  color: inherit;
  text-decoration: none;
}

/* Form box */
.hl-cta__form {
  max-width: 580px;
}

.hl-cta__form h3 {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--hl-marrone);
  margin: 0 0 10px;
}

.hl-cta__form > p {
  font-size: 18px;
  color: var(--hl-marrone);
  margin: 0 0 24px;
}

/* Form fields */
.hl-form__group {
  margin-bottom: 16px;
}

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

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

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

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

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

.hl-form__submit {
  font-size: 20px;
  font-weight: 600;
  padding: 14px 30px;
  border: 2px solid var(--hl-verde);
  border-radius: var(--hl-radius);
  background: var(--hl-white);
  color: var(--hl-verde);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  width: 100%;
}

.hl-form__submit:hover {
  background-color: var(--hl-verde);
  color: var(--hl-white);
}

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

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

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

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

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .hl-hero__content h1 {
    font-size: 38px;
  }

  .hl-hero__content p {
    font-size: 18px;
  }

  .hl-stats__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .hl-stat__number {
    font-size: 24px;
  }

  .hl-stat__label {
    font-size: 14px;
  }

  .hl-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hl-about p {
    font-size: 20px;
  }

  .hl-courses__subtitle {
    font-size: 20px;
  }

  .hl-cta__grid {
    gap: 40px;
  }

  .hl-cta__form h3 {
    font-size: 22px;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .hl-hero {
    height: auto;
    min-height: 350px;
    margin-top: -50px;
    padding-top: 50px;
  }

  .hl-hero__overlay {
    width: calc(100% - 32px);
    margin: 20px 0;
  }

  .hl-hero__content {
    padding: 30px 16px;
  }

  .hl-hero__cta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hl-hero__cta .hl-btn {
    width: 100%;
  }

  .hl-hero__content h1 {
    font-size: 32px;
  }

  .hl-hero__content p {
    font-size: 17px;
  }

  .hl-hero__cta .hl-btn {
    font-size: 16px;
    padding: 12px 24px;
    width: 100%;
  }

  .hl-stats {
    display: none;
  }

  .hl-about p {
    font-size: 18px;
  }

  .hl-provider p {
    font-size: 16px;
  }

  .hl-courses h2,
  .hl-blog h2 {
    font-size: 24px;
  }

  .hl-courses__subtitle {
    font-size: 18px;
  }

  .hl-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hl-cta {
    padding: 50px 16px;
  }

  .hl-cta__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hl-cta__form {
    max-width: 100%;
    margin: 0 auto;
  }

  .hl-cta__form h3 {
    font-size: 20px;
  }

  .hl-cta__form > p {
    font-size: 16px;
  }

  .hl-form__submit {
    font-size: 18px;
  }

  .hl-btn {
    font-size: 16px;
    padding: 12px 24px;
  }

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