/* ============================================================
   Dipartimento di Ingegneria LUM – Global Styles
   Green color scheme to match the Botpress assistant
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --dark:      #0f172a;
  --text:      #334155;
  --muted:     #64748b;
  --border:    #e2e8f0;
  --bg-light:  #f8fafc;
  --white:     #ffffff;

  --font: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 60px rgba(22,101,52,.15);
  --shadow-xl: 0 25px 80px rgba(22,101,52,.22);

  --radius-sm: .5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; }
ul { list-style: none; }

/* ── Shared helpers ────────────────────────────────────────── */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-badge {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.section-badge-dark {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .75rem;
  line-height: 1.2;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  transition: transform .18s, box-shadow .18s, background .18s;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--white);
  color: var(--green-700);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }

.btn-secondary {
  background: rgba(255,255,255,.12);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-secondary:hover { background: rgba(255,255,255,.2); }

.btn-green {
  background: var(--green-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-green:hover { background: var(--green-700); box-shadow: var(--shadow-lg); }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* needed so the mobile dropdown is positioned relative to the navbar */
  isolation: isolate;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav-logo {
  height: 38px;
  width: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.nav-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green-800);
  line-height: 1.2;
}

.nav-name .nav-name-sub {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  transition: color .18s;
}
.nav-links a:hover { color: var(--green-600); }

.nav-cta {
  background: var(--green-600) !important;
  color: var(--white) !important;
  padding: .5rem 1.25rem !important;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  transition: background .18s, transform .18s !important;
}
.nav-cta:hover { background: var(--green-700) !important; transform: translateY(-1px); }

/* ── Language switcher ─────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.lang-switch {
  background: none;
  border: 1.5px solid transparent;
  border-radius: .3rem;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  padding: .25rem .45rem;
  transition: color .18s, border-color .18s, background .18s;
}
.lang-switch:hover {
  color: var(--green-700);
  border-color: var(--green-300);
}
.lang-switch.active {
  border-color: var(--green-500);
  color: var(--green-700);
  background: var(--green-50);
}

.lang-sep {
  color: var(--muted);
  font-size: .75rem;
  user-select: none;
}

/* ── i18n fade transition ──────────────────────────────────── */
body.i18n-transitioning {
  opacity: 0;
  transition: opacity .15s ease;
}
body {
  transition: opacity .15s ease;
}

/* Hamburger button – hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
/* Animate hamburger → × when open */
.navbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.navbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  padding: 6rem 2rem 5rem;
  color: var(--white);
}

/* Decorative blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .12;
  background: var(--white);
}
.hero::before {
  width: 600px; height: 600px;
  top: -200px; right: -150px;
}
.hero::after {
  width: 400px; height: 400px;
  bottom: -180px; left: -100px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content .section-badge {
  background: rgba(255,255,255,.18);
  color: var(--white);
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin: .75rem 0 1.25rem;
}

/*.hero-highlight {
  position: relative;
  display: inline-block;
}
.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: .1em; left: 0; right: 0;
  height: .1em;
  background: var(--green-300);
  border-radius: 9999px;
}*/

.hero-content p {
  font-size: 1.15rem;
  opacity: .88;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-counters {
  display: flex;
  gap: 2.5rem;
}

.hero-counter strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--green-300);
  line-height: 1;
}
.hero-counter span {
  font-size: .85rem;
  opacity: .8;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform .2s;
}
.hero-card:hover { transform: translateX(6px); }

.hero-card-icon {
  font-size: 2.25rem;
  flex-shrink: 0;
}

.hero-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .2rem;
}
.hero-card p {
  font-size: .85rem;
  opacity: .75;
  margin: 0;
}

/* ── Chat Section ──────────────────────────────────────────── */
.chat-section {
  background: var(--green-50);
  padding: 6rem 2rem;
}

.chat-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.chat-info h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: .75rem;
}

.chat-info p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  color: var(--dark);
}

.check-icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .78rem;
}

/* The webchat wrapper card */
.webchat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.webchat-header {
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.webchat-identity {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--white);
}

.webchat-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.webchat-identity h4 {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
}

.webchat-identity span {
  font-size: .78rem;
  opacity: .85;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  color: rgba(255,255,255,.9);
  font-weight: 500;
}

.status-dot {
  width: .55rem;
  height: .55rem;
  background: var(--green-300);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* The actual Botpress iframe container */
#webchat {
  width: 100%;
  height: 560px;
  display: block;
}

/* ── Features Section ──────────────────────────────────────── */
.features-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}

.feature-btn {
  margin-top: auto;
  align-self: flex-start;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200);
}

.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--green-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .6rem;
}

.feature-card p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* ── Corsi di Laurea Grid (2 × 2) ─────────────────────────── */
.corsi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.course-badge {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 2rem;
  margin-bottom: .75rem;
  align-self: flex-start;
}

.course-badge-master {
  background: #dbeafe;
  color: #1d4ed8;
}

.corsi-nav-area {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.corsi-nav-label {
  font-weight: 700;
  color: var(--dark);
  font-size: .9rem;
  white-space: nowrap;
}

.corsi-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ── Carriera e Servizi sub-headings ───────────────────────── */
.carriera-sub-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-800);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 2.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.carriera-sub-heading::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--green-100);
  border-radius: 1px;
}

/* ── Orientamento e Futuro Section ────────────────────────── */
.orientamento-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.orientamento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

/* ── Research Section ──────────────────────────────────────── */
.research-section {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  padding: 6rem 2rem;
  color: var(--white);
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.research-content h2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.research-content p {
  opacity: .85;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}

.tag {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 2rem;
}

.research-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.research-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: background .2s, transform .2s;
}
.research-card:hover {
  background: rgba(255,255,255,.17);
  transform: translateX(6px);
}

.research-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.research-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .2rem;
}
.research-card p {
  font-size: .85rem;
  opacity: .75;
  margin: 0;
}

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--green-800);
  padding: 3.5rem 2rem;
}

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

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--green-300);
  line-height: 1;
}

.stat-label {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  margin-top: .35rem;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 2rem;
}

.footer-brand-area {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

.footer-brand-sub {
  font-size: .8rem;
  color: var(--green-400);
  margin-top: .15rem;
}

.footer-desc {
  font-size: .875rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer-col ul li a {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  transition: color .18s;
}
.footer-col ul li a:hover { color: var(--green-400); }

.footer-col ul li {
  font-size: .875rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
}

.footer-badge {
  color: var(--green-400);
  font-weight: 600;
}

/* ── My LUM Ribbon ─────────────────────────────────────────── */
.mylum-ribbon {
  background: var(--green-800);
  padding: .6rem 2rem;
  position: sticky;
  top: 4.5rem;
  z-index: 99;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.mylum-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mylum-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--green-300);
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  flex-shrink: 0;
}

.mylum-links {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  justify-content: center;
}

.mylum-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  transition: color .18s, background .18s, transform .18s;
  padding: .35rem 0;
}
.mylum-link:hover { color: var(--green-300); }

.mylum-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-sm);
  padding: .45rem 1rem;
  color: var(--white);
}
.mylum-btn:hover {
  background: rgba(255,255,255,.22);
  color: var(--white);
  transform: translateY(-1px);
}

.mylum-icon { font-size: .9rem; }

/* ── Scroll offset for double sticky (4.5rem nav + ~3rem ribbon) ── */
section[id], div.stats-bar, footer {
  scroll-margin-top: 7.5rem;
}

/* ── Overlay ───────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* ── Off-canvas Panel ──────────────────────────────────────── */
.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100%;
  background: var(--white);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.offcanvas.active { transform: translateX(0); }

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.offcanvas-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}

.offcanvas-body {
  padding: 2rem;
  flex: 1;
}
.offcanvas-body p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-size: .95rem;
}
.offcanvas-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 1.5rem 0 .4rem;
}

.offcanvas-director {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--green-200);
}
.offcanvas-director-icon { font-size: 2.5rem; flex-shrink: 0; }
.offcanvas-director h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .2rem;
}
.offcanvas-director p {
  font-size: .85rem;
  color: var(--green-700);
  margin: 0;
}

/* ── Close Button ──────────────────────────────────────────── */
.close-btn {
  width: 2rem;
  height: 2rem;
  background: var(--green-50);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.close-btn:hover { background: var(--green-100); color: var(--dark); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.active { display: flex; }

.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
}

.modal-body {
  flex: 1;
  overflow: hidden;
  background: var(--bg-light);
}
.modal-body iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
  display: block;
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.modal-note {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

/* ── Modulistica Section ───────────────────────────────────── */
.modulistica-section {
  padding: 6rem 2rem;
  background: var(--bg-light);
}

.modulistica-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.modulo-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.modulo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200);
}

.modulo-icon {
  width: 4rem;
  height: 4rem;
  background: var(--green-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.modulo-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}
.modulo-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.btn-outline {
  background: transparent;
  color: var(--green-700);
  border: 2px solid var(--green-600);
  padding: .625rem 1.5rem;
  font-size: .9rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: background .18s, transform .18s;
}
.btn-outline:hover { background: var(--green-50); transform: translateY(-2px); }

/* ── News Section ──────────────────────────────────────────── */
.news-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.news-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.news-card-header {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-badge {
  font-size: .72rem;
  font-weight: 700;
  color: var(--white);
  background: rgba(255,255,255,.2);
  padding: .25rem .7rem;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.news-date {
  font-size: .78rem;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}

.news-card-body {
  padding: 1.5rem;
}
.news-card-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .6rem;
  line-height: 1.4;
}
.news-card-body p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.news-link {
  font-size: .88rem;
  font-weight: 600;
  color: var(--green-600);
  transition: color .18s;
}
.news-link:hover { color: var(--green-700); }

/* ── Comunicazione Sociale ─────────────────────────────────── */
.social-section {
  padding: 6rem 2rem;
  background: var(--bg-light);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--white);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.social-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.social-card-icon {
  font-size: 2.25rem;
  line-height: 1;
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
}

.social-card-body h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.social-card-body p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: .9rem;
}
.social-cta {
  font-size: .88rem;
  font-weight: 700;
  color: var(--green-600);
  transition: color .18s;
}
.social-card:hover .social-cta { color: var(--green-700); }

/* Accent left-border per canale */
.social-card-cop       { border-left: 4px solid var(--green-600); }
.social-card-instagram { border-left: 4px solid #e1306c; }
.social-card-linkedin  { border-left: 4px solid #0077b5; }
.social-card-youtube   { border-left: 4px solid #ff0000; }

.cop-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  margin: .85rem 0 .9rem;
}
.cop-qr {
  width: 110px;
  height: 110px;
  border-radius: .4rem;
  border: 1.5px solid var(--border);
  image-rendering: pixelated;
}
.cop-qr-hint {
  font-size: .76rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .social-grid { grid-template-columns: 1fr; }
}


.lum-help-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--green-700);
  color: var(--white);
  padding: .7rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .45rem;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.lum-help-float:hover {
  background: var(--green-800);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ── Segreteria Hours ──────────────────────────────────────── */
.segreteria-hours {
  margin-top: .9rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
}
.segreteria-hours strong {
  color: var(--green-400);
  font-weight: 600;
  display: block;
  margin-bottom: .1rem;
}

/* ── Documenti e Regolamenti ─────────────────────────────── */
.documenti-section {
  padding: 6rem 2rem;
  background: var(--bg-light);
}

.documenti-table {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: background .18s;
}
.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: var(--green-50); }

.doc-icon {
  font-size: 1.75rem;
  width: 2.5rem;
  text-align: center;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
}
.doc-info h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .2rem;
}
.doc-info p {
  font-size: .875rem;
  color: var(--muted);
}

.btn-sm {
  padding: .4rem 1rem;
  font-size: .825rem;
  white-space: nowrap;
}

.documenti-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.doc-box {
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-box-career {
  background: var(--green-50);
  border: 2px solid var(--green-200);
}

.doc-box-cv {
  background: #fffbeb;
  border: 2px solid #fde68a;
}

.doc-box-header {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.doc-box-icon {
  font-size: 2rem;
}

.doc-box-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}

.doc-box > p {
  font-size: .9rem;
  color: var(--muted);
}

.doc-box-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.doc-box-list li {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.5;
}

.doc-box-list a {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-box-list a:hover { color: var(--green-900); }


/* ── Modal: Social Preview ─────────────────────────────── */
.modal-social-dialog {
  max-width: 440px;
}

.modal-social-banner {
  position: relative;
  height: 110px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(135deg, #f09433, #e1306c, #bc1888);
  flex-shrink: 0;
}

.modal-social-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.25);
  color: var(--white);
  border: none;
}
.modal-social-close:hover {
  background: rgba(255,255,255,.4);
  color: var(--white);
}

.modal-social-avatar {
  position: absolute;
  bottom: -2.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4.5rem;
  height: 4.5rem;
  background: var(--white);
  border: 3px solid rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  box-shadow: var(--shadow-md);
  z-index: 1;
}

.modal-social-body {
  padding: 3.5rem 2rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.modal-social-badge {
  display: inline-block;
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 2rem;
}

.modal-social-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
}

.modal-social-desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  max-width: 340px;
}

.modal-social-meta {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-700);
  margin: 0;
}

/* ── Feed Section ──────────────────────────────────────── */
.feed-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.feed-block {
  margin-bottom: 3rem;
}

.feed-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.25rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
}

.feed-block-instagram {
  background: linear-gradient(90deg, #e6683c, #e1306c, #bc1888);
}

.feed-block-linkedin {
  background: #0077b5;
}

.feed-view-all {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  transition: color .18s;
}
.feed-view-all:hover { color: var(--white); }

/* Instagram reel grid */
.feed-reels-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.feed-reel-slot {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  overflow: hidden;
}

/* When a real Instagram embed replaces the placeholder */
.feed-reel-slot .instagram-media,
.feed-reel-slot blockquote {
  flex: 1;
  margin: 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-radius: var(--radius-md) !important;
}

/* Override min-width on the iframe injected by embed.js */
.feed-reel-slot iframe {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.feed-reel-ph {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  transition: border-color .18s;
}
.feed-reel-ph:hover { border-color: #e1306c; }

.feed-reel-ph-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem;
}

.feed-reel-ph-icon {
  font-size: 2.5rem;
}

.feed-reel-ph-inner strong {
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark);
}

.feed-reel-ph-inner span {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
}

.feed-reel-ph-link {
  margin-top: .5rem;
  font-size: .8rem;
  font-weight: 700;
  color: #e1306c;
  transition: color .18s;
}
.feed-reel-ph-link:hover { color: #bc1888; }

/* LinkedIn grid */
.feed-linkedin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.feed-li-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-left: 4px solid #0077b5;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.feed-li-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.feed-li-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.feed-li-card-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 2.5rem;
  text-align: center;
}

.feed-li-card-header strong {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.feed-li-card-header span {
  font-size: .8rem;
  color: var(--muted);
}

.feed-li-card p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.feed-li-cta {
  font-size: .85rem;
  font-weight: 700;
  color: #0077b5;
  transition: color .18s;
}
.feed-li-card:hover .feed-li-cta { color: #005885; }

/* Feed responsive */
@media (max-width: 1024px) {
  .feed-reels-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .feed-reels-row { grid-template-columns: 1fr; }
  .feed-linkedin-grid { grid-template-columns: 1fr; }
  .feed-block-header { flex-direction: column; align-items: flex-start; gap: .4rem; }
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p { max-width: 100%; }
  .hero-buttons  { justify-content: center; }
  .hero-counters { justify-content: center; }
  .hero-visual   { display: none; }

  .chat-grid { grid-template-columns: 1fr; }
  .chat-info { text-align: center; }
  .check-list { align-items: center; }

  .research-grid { grid-template-columns: 1fr; }
  .research-content { text-align: center; }
  .tag-cloud { justify-content: center; }

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

  .footer-top { grid-template-columns: 1fr 1fr; }

  .modulistica-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .orientamento-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Show hamburger button */
  .nav-toggle { display: flex; }

  /* Hide links by default; show as full-width dropdown when open */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem 1rem;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .navbar.nav-open .nav-links { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a {
    display: block;
    padding: .65rem 0;
    font-size: 1rem;
  }
  .nav-cta {
    margin-top: .25rem;
    text-align: center;
    display: block !important;
  }

  .features-grid { grid-template-columns: 1fr; }
  .corsi-grid { grid-template-columns: 1fr; }
  .corsi-nav-area { flex-direction: column; align-items: flex-start; }
  .orientamento-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }

  #webchat { height: 460px; }

  .modulistica-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .documenti-boxes { grid-template-columns: 1fr; }
  .doc-row { flex-wrap: wrap; }
  .btn-sm { width: 100%; justify-content: center; }

  .lum-help-float { bottom: 1.25rem; right: 1.25rem; }

  .modal-body iframe { min-height: 360px; }

  /* Language switcher in mobile menu */
  .lang-switcher {
    padding: .5rem 0;
    justify-content: center;
  }
  .lang-switch {
    font-size: .9rem;
    padding: .35rem .7rem;
  }
}

@media (max-width: 480px) {
  .hero-counters { flex-direction: column; align-items: center; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-buttons { flex-direction: column; align-items: center; }

  .mylum-label { display: none; }
}
