/* =====================================================
   CORSI PAGE – stili aggiuntivi
   Dipende da style.css (variabili, reset, utility)
   ===================================================== */

/* ─── HERO BANNER (immagine specifica della pagina) ──── */
.hero-banner-bg {
  background-image:
    linear-gradient(to bottom, rgba(65,84,44,0.93), rgba(65,84,44,0.79)),
    url('images/corsi-hero.jpg');
  background-position: center 35%;
}

/* ─── PAGE HERO ──────────────────────────────────────── */
.page-hero {
  position: relative;
  padding-top: calc(68px + 64px);
  padding-bottom: 0;
  overflow: hidden;
  background: var(--white);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--white);
  pointer-events: none;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-bottom: 56px;
}
.page-hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--secondary);
}
.page-hero-content .hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.7;
}

/* ─── TAB NAV ────────────────────────────────────────── */
.ini-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ini-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(255,255,255,.7);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(6px);
}
.ini-tab:hover {
  background: var(--white);
  color: var(--text);
  border-color: var(--honey);
}
.ini-tab.active {
  background: var(--honey);
  color: var(--white);
  border-color: var(--honey);
  box-shadow: 0 4px 16px rgba(232,160,32,.3);
}
.tab-icon { font-size: 1rem; }

/* ─── FORMAZIONE SPLIT (testo a sinistra, immagine a destra) ── */
.formazione-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  margin-bottom: 88px;
}
.formazione-text {
  text-align: left;
}
.formazione-text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--secondary);
}
.formazione-text .section-desc {
  max-width: none;
  margin-inline: 0;
  margin-bottom: 20px;
}
.formazione-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}
.formazione-media {
  /* top-left, top-right, bottom-right, bottom-left */
  border-radius: 72px var(--radius-lg) var(--radius-lg) 72px;
  overflow: hidden;
}
.formazione-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
}

/* ─── FEATURE GRID ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 56px;
}
.feature-item {
  text-align: left;
  padding: 8px 28px;
  border-left: 1px solid var(--border);
}
/* 4 columns: outer items flush to container edges */
.feature-item:nth-child(4n+1) { border-left: none; padding-left: 0; }
.feature-item:nth-child(4n)   { padding-right: 0; }
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
  color: var(--honey);
}
.feature-icon svg {
  width: 32px;
  height: 32px;
}
.feature-item h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--secondary);
}
.feature-item p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── CATALOGO ───────────────────────────────────────── */
#catalogo { background: #edf1e7; }

/* ─── CORSI GRID ─────────────────────────────────────── */
.corsi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.corso-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.corso-card-top { padding: 0; }

.corso-thumb {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  aspect-ratio: 4/3;
  background: var(--beige);
}
.corso-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.corso-thumb-caption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 40%, rgba(0,0,0,0) 100%);
  color: var(--white);
}
.corso-thumb-caption h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 6px;
  color: var(--white);
}
.corso-thumb-caption p {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--white);
}

.corso-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 20px 0;
  margin-bottom: 4px;
}
.corso-level {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.level-base,
.level-inter,
.level-adv   { background: #1a1a1a; color: #fff; }

.corso-status {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.status-open   { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #f5f5f5; color: #757575; }

.corso-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.corso-details {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 8px;
  font-size: .85rem;
  margin-bottom: 20px;
  flex: 1;
}
.corso-details dt,
.corso-details dd {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.corso-details dt:last-of-type,
.corso-details dd:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
}
.corso-details dt { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.corso-details dd { color: var(--text); }

.corso-card-actions { display: flex; gap: 10px; }
.corso-card-actions .btn { flex: 1; justify-content: center; }
.btn.is-disabled {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 960px) {
  .formazione-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .formazione-media { order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  /* 2 columns: divider only between the two columns, outer edges flush */
  .feature-item { border-left: 1px solid var(--border); padding-left: 28px; padding-right: 28px; }
  .feature-item:nth-child(2n+1) { border-left: none; padding-left: 0; }
  .feature-item:nth-child(2n)   { padding-right: 0; }
  .corsi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .ini-tabs { gap: 6px; }
  .ini-tab { padding: 8px 16px; font-size: .82rem; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  /* single column: divider becomes a horizontal line between items */
  .feature-item { border-left: none; padding: 28px 0; }
  .feature-item:not(:first-child) { border-top: 1px solid var(--border); }
}
