.courses-page .hero .hero-overlay {
  align-items: center;
}

.courses-page .hero .hero-image {
  display: block;
  background-image: url("../../images/academy/Corsi_Header.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.courses-page .hero .hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 16, 42, 0.84) 0%, rgba(6, 16, 42, 0.62) 38%, rgba(6, 16, 42, 0.2) 68%, rgba(6, 16, 42, 0) 100%),
    linear-gradient(180deg, rgba(6, 16, 42, 0.12) 0%, rgba(6, 16, 42, 0.44) 100%);
}

@media (max-width: 768px) {
  .courses-page .hero .hero-image {
    background-position: 68% center;
  }

  .courses-page .hero .hero-image::after {
    background:
      linear-gradient(90deg, rgba(6, 16, 42, 0.88) 0%, rgba(6, 16, 42, 0.66) 64%, rgba(6, 16, 42, 0.24) 100%),
      linear-gradient(180deg, rgba(6, 16, 42, 0.08) 0%, rgba(6, 16, 42, 0.48) 100%);
  }
}

.courses-page .hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--header-height) + 4rem) 20px 4rem;
}

.courses-page .hero h1 {
  max-width: 11ch;
  color: #fff;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: 0;
}

.courses-page .hero .lead {
  margin-bottom: 1.5rem;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.stats-band {
  margin: 0;
  padding: 2.5rem 0 var(--site-section-gap-compact);
  background: #fff;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
  border-right: 1px solid #e6e6e6;
}

.stat-item:last-child {
  border-right: 0;
}

.stat-value {
  margin-bottom: 0.5rem;
  color: #121212;
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.stat-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-title {
  color: #121212;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-description {
  max-width: 24ch;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.info-panels {
  margin-top: 2rem;
  position: relative;
  z-index: 3;
}

.courses-page .info-panel h3 {
  color: #214ecd;
}

.leone-history {
  margin-top: 1rem;
}

.leone-history .main-title {
  width: auto;
  max-width: 11ch;
}

.leone-history .sub-title {
  max-width: 13ch;
}

.leone-history .row-top .history-img-col::after {
  display: none;
}

.cards-section {
  padding-top: var(--site-section-gap);
  padding-bottom: var(--site-section-gap);
}

.cards-section .section-title-cards {
  color: #121212;
  margin-bottom: 2rem;
  max-width: 12ch;
  line-height: 1.1;
  letter-spacing: 0;
}

.cards-section + .cards-section {
  padding-top: 0;
}

.course-filter-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #dfe6f2;
}

.course-filter-group__title {
  margin: 0 0 0.8rem;
  color: #121212;
  font-size: 0.9rem;
  font-weight: 700;
}

.course-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.course-filter {
  min-height: 42px;
  padding: 0.6rem 1rem;
  border-color: #214ecd;
  background: #ffffff;
  color: #214ecd;
}

.course-filter[aria-pressed="true"] {
  border-color: #214ecd;
  background: #214ecd;
  color: #ffffff;
}

.course-filter[aria-pressed="true"]:hover,
.course-filter[aria-pressed="true"]:focus-visible {
  border-color: #163378;
  background: #163378;
  color: #ffffff;
}

.course-status {
  margin-bottom: 2.5rem;
}

.course-status[hidden] {
  display: none;
}

.course-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.course-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 4vw, 4rem);
  min-height: 0;
  padding: 2rem 2.25rem;
  border: 1px solid #dfe6f2;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(15, 31, 67, 0.05);
  cursor: pointer;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.course-row:hover,
.course-row:focus-within {
  transform: translateY(-4px);
  border-color: var(--blue-1);
  box-shadow: 0 20px 44px rgba(10, 22, 48, 0.12);
}

.course-row h3 {
  max-width: 100%;
  margin: 0;
  color: #0f3f24;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.course-row--implantologia {
  --blue-1: #ff0000;
}

.course-row--implantologia h3 {
  color: #ff0000;
}

.course-row--ortodonzia h3 {
  color: #214ecd;
}

.course-row--dsl h3 {
  color: #0a2b4c;
}

.course-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.course-row__tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-row__tag--dsl {
  border: 1px solid #0a2b4c;
  background: #eaf1f7;
  color: #0a2b4c;
}

.course-row__tag--ortodonzia {
  border: 1px solid #214ecd;
  background: #edf2ff;
  color: #214ecd;
}

.course-row__tag--implantologia {
  border: 1px solid #ff0000;
  background: #fff0f0;
  color: #ff0000;
}

.course-row__main > p {
  max-width: 42ch;
  margin: 0.85rem 0 0;
  color: #4d5563;
  line-height: 1.55;
}

.course-row__meta {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.4rem;
  color: #121212;
  font-size: 0.95rem;
  line-height: 1.45;
}

.course-row__meta strong {
  color: var(--blue-1);
}

.course-row__summary {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  margin-top: 0;
  padding-top: 0;
}

.course-row__summary p {
  max-width: 68ch;
  margin: 0;
  color: #4d5563;
  line-height: 1.65;
}

.course-row__link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  margin-top: 1.1rem;
  color: var(--blue-1);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.course-row__link::after {
  content: "";
  width: 28px;
  height: 1px;
  align-self: center;
  margin-left: 0.45rem;
  background: currentColor;
  transition: width 180ms ease;
}

.course-row__link:hover::after,
.course-row__link:focus-visible::after {
  width: 42px;
}

.course-list-actions {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

@media (max-width: 1024px) {
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .stat-item:nth-child(2) {
    border-right: 0;
  }

  .stat-item:nth-child(-n + 2) {
    border-bottom: 1px solid #e6e6e6;
  }
}

@media (max-width: 992px) {
  .info-panels {
    margin-top: 1.5rem;
  }

  .cards-section {
    padding-top: var(--site-section-gap);
    padding-bottom: var(--site-section-gap);
  }

  .course-row {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .course-row__summary {
    align-self: start;
  }
}

@media (max-width: 768px) {
  .course-filter-groups {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stats-inner {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
  }

  .stat-item {
    padding: 1.5rem 1rem;
    border-right: 0;
    border-bottom: 1px solid #e6e6e6;
  }

  .stat-item:last-child {
    border-bottom: 0;
  }

  .course-row h3 {
    font-size: 1.45rem;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .course-row__meta {
    font-size: 0.9rem;
  }

}

/* Course groups share the same rows and distinguish subject and actual venue. */
.course-location-group {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.course-location-group + .course-location-group { margin-top: 2rem; }
.course-location-group > h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  color: var(--blue-1);
}
.course-location-group[data-area="implantologia"] > h3 { color: #ff0000; }
