/* ============================================
   QUICKLINE - Complete Site Redesign
   Modern, Professional, Congress-focused
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --navy: #2b2b2b;
  --navy-light: #3a3a3a;
  --navy-dark: #1a1a1a;
  --gold: #b91420;
  --gold-light: #d42030;
  --gold-muted: rgba(185,20,32,0.12);
  --cream: #f9f8f7;
  --white: #ffffff;
  --gray-50: #f5f5f5;
  --gray-100: #ebebeb;
  --gray-200: #d9d9d9;
  --gray-300: #b0b0b0;
  --gray-400: #888888;
  --gray-500: #606060;
  --gray-600: #404040;
  --gray-700: #2e2e2e;
  --text: #1c1c1c;
  --text-light: #5a5a5a;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 20px rgba(185,20,32,0.2);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }
p { margin-bottom: 1.2em; color: var(--text-light); }
.lead { font-size: 1.15rem; line-height: 1.8; color: var(--gray-500); }
.accent-text { color: var(--gold); }
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--gold);
  margin-right: 12px;
  vertical-align: middle;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
}
.btn svg { width: 18px; height: 18px; }

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img {
  height: 48px;
  width: auto;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
}
.logo-text span {
  color: var(--gold);
}

/* Desktop Nav */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  position: relative;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--navy);
  background: var(--gray-50);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: pointer;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}
.nav-dropdown-menu a:hover {
  background: var(--gray-50);
  color: var(--navy);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 24px;
  overflow-y: auto;
  z-index: 999;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
}
.mobile-nav a:hover { color: var(--navy); }
.mobile-nav .sub-link { padding-left: 20px; font-size: 0.9rem; }

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}
.hero-home {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-light) 100%);
  color: var(--white);
}
.hero-home::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,20,32,0.10) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}
.hero-home::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,20,32,0.06) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-content h1 {
  margin-bottom: 24px;
  color: var(--white);
}
.hero-content h1 em {
  font-style: italic;
  color: var(--gold-light);
}
.hero-content .lead {
  color: rgba(255,255,255,0.7);
  margin-bottom: 40px;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(185,20,32,0.12);
  border: 1px solid rgba(185,20,32,0.25);
  color: var(--gold-light);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* Sub-page hero */
.hero-sub {
  min-height: 45vh;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
}
.hero-sub::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b91420' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-sub .hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.hero-sub h1 { margin-bottom: 16px; }
.hero-sub .lead { color: rgba(255,255,255,0.6); }
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: var(--gold-light); }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--gray-50);
}
.section-navy {
  background: var(--navy);
  color: var(--white);
}
.section-navy p { color: rgba(255,255,255,0.65); }
.section-navy .section-label { color: var(--gold-light); }
.section-navy .section-label::before { background: var(--gold-light); }
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gold);
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--gold-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--gold);
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.95rem; margin-bottom: 0; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}
.card-link:hover { gap: 10px; }

/* Feature card with number */
.feature-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 16px;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 80px;
}
.stat-item {
  padding: 40px 24px;
  text-align: center;
  background: rgba(255,255,255,0.04);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   SPLIT LAYOUT (text + visual)
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }
.split-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
}
.split-visual-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(255,255,255,0.08);
}
.split-text h2 { margin-bottom: 20px; }
.split-text .lead { margin-bottom: 32px; }
.check-list { margin: 24px 0; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text-light);
}
.check-list li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-muted);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   SERVICE LIST
   ============================================ */
.service-list {
  counter-reset: service;
}
.service-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: start;
}
.service-item::before {
  counter-increment: service;
  content: counter(service, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.4;
}
.service-item h4 { margin-bottom: 8px; color: var(--navy); }
.service-item p { margin-bottom: 0; font-size: 0.92rem; }

/* ============================================
   TESTIMONIAL / QUOTE
   ============================================ */
.quote-block {
  background: var(--gold-muted);
  border-left: 4px solid var(--gold);
  padding: 32px 40px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 40px 0;
}
.quote-block p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--navy);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,20,32,0.10), transparent 70%);
}
.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}
.cta-section p {
  color: rgba(255,255,255,0.6);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 80px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo-text { color: var(--white); margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
}
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--gold-light); }
.footer-legal { display: flex; gap: 24px; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   CONTACT INFO BLOCKS
   ============================================ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.contact-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--gold-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.contact-card h4 { margin-bottom: 8px; }
.contact-card p { margin-bottom: 0; font-size: 0.9rem; }
.contact-card a { color: var(--gold); font-weight: 600; }
@media (max-width: 768px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ============================================
   LEGAL / PRIVACY PAGES
   ============================================ */
.legal-content {
  padding: 80px 0;
}
.legal-content h2 {
  font-size: 1.6rem;
  margin: 48px 0 16px;
  color: var(--navy);
}
.legal-content h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
  color: var(--navy);
}
.legal-content p {
  font-size: 0.95rem;
  line-height: 1.8;
}
.legal-content ul {
  margin: 16px 0;
  padding-left: 24px;
}
.legal-content ul li {
  font-size: 0.95rem;
  color: var(--text-light);
  padding: 4px 0;
  list-style: disc;
}
.legal-content .last-update {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 32px;
}

/* ============================================
   LANGUAGES GRID
   ============================================ */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.lang-tag {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
  transition: var(--transition);
}
.lang-tag:hover {
  border-color: var(--gold);
  background: var(--gold-muted);
  color: var(--navy);
}

/* ============================================
   FORM
   ============================================ */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition);
  color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-muted);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ============================================
   CLIENT LOGOS
   ============================================ */
.client-list {
  columns: 3;
  column-gap: 32px;
}
.client-list li {
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--gray-500);
  break-inside: avoid;
  border-bottom: 1px solid var(--gray-100);
}
@media (max-width: 768px) {
  .client-list { columns: 2; }
}
@media (max-width: 500px) {
  .client-list { columns: 1; }
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  color: var(--white);
  padding: 20px 24px;
  z-index: 9999;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner.show { display: block; }
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  flex: 1;
}
.cookie-inner a { color: var(--gold-light); text-decoration: underline; }
.cookie-buttons {
  display: flex;
  gap: 12px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================
   QUICKLINE2 EXTENSIONS — team rotator, congressi cards, anni split
   ============================================ */

/* Team rotator: foto persone dietro la societa', cambia per congresso */
.team-rotator-section { background: var(--cream); }
.team-rotator {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.team-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.team-photo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: var(--white);
  padding: 32px 16px 14px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.team-photo-event {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-light);
}
.team-photo-caption {
  font-family: var(--font-display);
  line-height: 1.3;
}

/* Congressi grid (in evidenza) */
.congress-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.congress-card h3 { margin-top: 0; }
.congress-subtitle {
  color: var(--gray-500);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 16px;
}
.congress-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  font-size: 0.92rem;
  color: var(--gray-600);
}
.congress-meta li { padding: 4px 0; }
.badge-ecm {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Split-visual che porta il logo anniversario invece del testo decorativo */
.split-visual-anni {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream), var(--white));
  padding: 32px;
  border-radius: var(--radius-lg);
}
.split-visual-anni img {
  max-width: 360px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.08));
}

/* Mobile: rotator a colonna singola, badge ECM piu' piccolo */
@media (max-width: 720px) {
  .team-rotator { grid-template-columns: 1fr; }
  .badge-ecm { font-size: 0.6rem; padding: 3px 8px; }
}

/* ============================================
   LISTA CONGRESSI page (estratto da demo lista-congressi.html)
   ============================================ */

    /* === Congress-specific styles === */
    .congress-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 48px;
      border-bottom: 2px solid var(--gray-100);
      padding-bottom: 0;
    }
    .congress-tab {
      padding: 14px 28px;
      font-family: var(--font-body);
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--gray-400);
      background: none;
      border: none;
      cursor: pointer;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      transition: var(--transition);
    }
    .congress-tab:hover { color: var(--gray-600); }
    .congress-tab.active {
      color: var(--gold);
      border-bottom-color: var(--gold);
    }
    .tab-content { display: none; }
    .tab-content.active { display: block; }

    /* Event cards */
    .event-card {
      display: grid;
      grid-template-columns: 110px 1fr auto;
      gap: 28px;
      align-items: start;
      padding: 32px 0;
      border-bottom: 1px solid var(--gray-100);
      transition: var(--transition);
    }
    .event-card:first-child { padding-top: 0; }
    .event-card:hover { background: var(--gray-50); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: var(--radius); }

    .event-date-block {
      background: var(--gray-50);
      border: 1px solid var(--gray-100);
      border-radius: var(--radius);
      padding: 16px 12px;
      text-align: center;
      min-width: 100px;
    }
    .event-date-block .day {
      font-family: var(--font-display);
      font-size: 1.8rem;
      color: var(--gold);
      line-height: 1;
    }
    .event-date-block .month {
      font-size: 0.78rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      color: var(--gray-500);
      margin-top: 4px;
    }
    .event-date-block .year {
      font-size: 0.75rem;
      color: var(--gray-400);
    }

    .event-info h3 {
      font-size: 1.15rem;
      margin-bottom: 8px;
      color: var(--navy);
      line-height: 1.4;
    }
    .event-info h3 a:hover { color: var(--gold); }
    .event-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      margin-top: 8px;
    }
    .event-meta span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.82rem;
      color: var(--gray-500);
    }
    .event-meta svg { width: 14px; height: 14px; opacity: 0.5; }

    .event-badge {
      display: inline-block;
      padding: 5px 14px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      border-radius: 50px;
      white-space: nowrap;
    }
    .badge-ecm {
      background: var(--gold-muted);
      color: var(--gold);
    }
    .badge-upcoming {
      background: rgba(34,160,90,0.1);
      color: #1a8a50;
    }
    .badge-past {
      background: var(--gray-50);
      color: var(--gray-400);
      border: 1px solid var(--gray-200);
    }

    /* Year dividers in archive */
    .year-divider {
      display: flex;
      align-items: center;
      gap: 16px;
      margin: 48px 0 24px;
      font-family: var(--font-display);
      font-size: 1.6rem;
      color: var(--gray-300);
    }
    .year-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--gray-100);
    }

    /* Upcoming highlight */
    .upcoming-highlight {
      background: linear-gradient(135deg, var(--navy-dark), var(--navy));
      border-radius: var(--radius-lg);
      padding: 48px;
      color: var(--white);
      margin-bottom: 48px;
      position: relative;
      overflow: hidden;
    }
    .upcoming-highlight::before {
      content: '';
      position: absolute;
      top: -50px;
      right: -50px;
      width: 250px;
      height: 250px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(185,20,32,0.15), transparent 70%);
    }
    .upcoming-highlight .event-date-block {
      background: rgba(255,255,255,0.08);
      border-color: rgba(255,255,255,0.1);
    }
    .upcoming-highlight .event-date-block .day { color: var(--gold-light); }
    .upcoming-highlight .event-date-block .month { color: rgba(255,255,255,0.6); }
    .upcoming-highlight .event-date-block .year { color: rgba(255,255,255,0.4); }
    .upcoming-highlight .event-info h3 { color: var(--white); font-size: 1.4rem; }
    .upcoming-highlight .event-info p { color: rgba(255,255,255,0.6); }
    .upcoming-highlight .event-meta span { color: rgba(255,255,255,0.5); }
    .upcoming-highlight .event-meta svg { opacity: 0.4; stroke: white; }
    .upcoming-highlight .badge-ecm { background: rgba(185,20,32,0.2); color: var(--gold-light); }

    @media (max-width: 768px) {
      .event-card { grid-template-columns: 1fr; gap: 12px; }
      .event-date-block { display: flex; gap: 8px; align-items: baseline; padding: 10px 16px; }
      .event-date-block .day { font-size: 1.2rem; }
      .upcoming-highlight { padding: 28px; }
      .congress-tab { padding: 10px 16px; font-size: 0.82rem; }
    }


/* ============================================
   IL NOSTRO TEAM — staff portrait grid
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.team-card {
  text-align: center;
}
.team-card img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  filter: grayscale(20%);
}
.team-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}
.team-card figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.team-card figcaption span {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

@media (max-width: 540px) {
  .team-grid { gap: 20px; }
  .team-card img { width: 120px; height: 120px; }
}

/* ============================================
   USER ACTIONS — login button + user dropdown nell'header
   ============================================ */
.user-actions {
  margin-left: 24px;
  display: flex;
  align-items: center;
}
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition);
}
.btn-login:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-1px);
}
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--gold-muted);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
}
.user-trigger:hover { background: var(--gold); color: var(--white); }
.user-email {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown .nav-dropdown-menu {
  right: 0;
  left: auto;
  min-width: 180px;
}

@media (max-width: 920px) {
  .user-actions { display: none; }
}

/* ============================================
   IAM LOGIN / OTP — pages/iam_login + iam_otp_verify
   ============================================ */
.login-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: var(--transition);
}
.login-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-200);
}
.login-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.login-card-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(185,20,32,0.25);
}
.login-card-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--navy);
}
.login-card > p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.login-form { margin: 0; }
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  -webkit-appearance: none;
}
.login-field input::placeholder { color: var(--gray-300); }
.login-field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185,20,32,0.10);
}
.login-form .btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* Google button: white card with Google G */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-google:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
}

/* Flash messages */
.login-flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.95rem;
  border-left: 4px solid;
}
.login-flash-error {
  background: var(--gold-muted);
  color: var(--gold);
  border-color: var(--gold);
}
.login-flash-info {
  background: var(--gray-50);
  color: var(--navy);
  border-color: var(--navy);
}

/* Helper text */
.login-help {
  text-align: center;
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-top: 28px;
  line-height: 1.7;
}
.login-help a { color: var(--gold); font-weight: 600; }
.login-help a:hover { color: var(--gold-light); }

/* OTP verify — single big code input */
.login-card-otp {
  text-align: left;
}
.login-otp-summary {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--cream);
  border-radius: var(--radius-sm);
}
.login-otp-summary strong { color: var(--navy); }
.login-otp-input {
  width: 100%;
  padding: 16px 14px;
  font-family: 'Courier New', monospace;
  font-size: 28px;
  letter-spacing: 10px;
  text-align: center;
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.login-otp-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185,20,32,0.10);
}
.login-otp-input::placeholder { color: var(--gray-200); letter-spacing: 10px; }

.login-divider {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 22px 0 18px;
}
