@charset "UTF-8";

/**
 * UCOI/UCOIM Website - UI Components
 * 
 * @file        components.css
 * @version     2.7.0
 * @description Componenti UI riutilizzabili per tutto il sito con standard uniformi.
 *              Include buttons, cards, statistiche, feature boxes, hero sections,
 *              contact cards, footer e utilities
 * 
 * @author      Altoprofilo Studio
 * @created     2024-05-27
 * @modified    2025-11-01
 * 
 * @dependencies
 *   - base.css (variabili CSS custom)
 * 
 * @standards
 *   - UCOI/UCOIM Standards v3.1
 *   - Comments Standards v1.0
 * 
 * @changelog
 *   - v2.7.0 (2025-11-01): Correzione UTF-8, eliminazione duplicazioni,
 *                          risoluzione conflitti display, commenti conformi standard
 *   - v2.6.0 (2025-10-28): Fix selettore .stats-grid, altezza fissa 260px
 *   - v2.5.0 (2025-10-27): Ripristino classi statistiche e feature boxes originali
 *   - v2.4.0 (2025-10-27): Unificazione components, aggiunta news-grid
 *   - v2.3.0 (2025-10-24): Rimosso dark mode, fix contact cards background
 * 
 * ============================================================================
 * INDICE
 * ============================================================================
 * 1. Icone (Lucide)
 * 2. Buttons
 * 3. Card Istituzionali
 * 4. Statistiche e Numeri
 * 5. Feature Boxes
 * 6. Hero Sections
 * 7. Contact Cards
 * 8. Utilities
 * 9. Indicatori Stato
 * 10. Footer
 * 11. Responsive Design
 * 12. Print Styles
 * 13. Accessibility
 * ============================================================================
 */

/* ============================================================================
   1. ICONE (LUCIDE)
   ============================================================================
   Stili base per icone Lucide e varianti per sfondi scuri
   ========================================================================= */

/**
 * Stile base per tutte le icone Lucide
 * Dimensioni standard e colori primari
 */
i[data-lucide] {
  display: inline-block;
  height: 2rem;
  width: 2rem;
  margin-bottom: 1rem;
  stroke: var(--secondary-color);
  stroke-width: 1.8;
  color: var(--secondary-color);
}

/**
 * Variante icone bianche per sfondi scuri
 * Applicato a elementi con background primario/secondario
 */
.bg-primary i[data-lucide],
.feature-icon i[data-lucide],
[class*="bg-primary"] i[data-lucide],
[class*="bg-secondary"] i[data-lucide],
.honor-member-icon i[data-lucide],
.step-number i[data-lucide],
.eligibility-header i[data-lucide],
.document-icon i[data-lucide],
.leadership-icon i[data-lucide],
.union-icon i[data-lucide],
.info-icon i[data-lucide] {
  stroke: white !important;
  color: white !important;
  fill: none !important;
  stroke-width: 2px !important;
}

.bg-primary i[data-lucide] path,
.feature-icon i[data-lucide] path,
[class*="bg-primary"] i[data-lucide] path,
[class*="bg-secondary"] i[data-lucide] path,
.honor-member-icon i[data-lucide] path,
.step-number i[data-lucide] path,
.eligibility-header i[data-lucide] path,
.document-icon i[data-lucide] path,
.leadership-icon i[data-lucide] path,
.union-icon i[data-lucide] path,
.info-icon i[data-lucide] path {
  stroke: white !important;
  color: white !important;
}

.honor-member-icon svg.lucide.lucide-award,
.honor-member-icon svg.lucide.lucide-user-check,
.leadership-icon svg.lucide,
.union-icon svg.lucide,
.document-icon svg.lucide,
.info-icon svg.lucide {
  stroke: white !important;
  color: white !important;
  fill: none !important;
  stroke-width: 2px !important;
}

.bg-primary svg,
.feature-icon svg,
.document-icon svg,
.leadership-icon svg,
.union-icon svg,
.info-icon svg,
.step-number svg,
.eligibility-header svg {
  stroke: white !important;
  color: white !important;
}

/**
 * Variante icone colorate per sfondi chiari
 */
.document-icon-light i[data-lucide],
.document-icon-light svg.lucide {
  stroke: var(--primary-color) !important;
  color: var(--primary-color) !important;
  fill: none !important;
  stroke-width: 2px !important;
}

/**
 * Dimensioni specifiche per sezione UCOI/UCOIM
 */
#sezione-ucoi-ucoim .column .lucide,
#sezione-ucoi-ucoim .column [data-lucide] {
  width: clamp(32px, 2vw, 40px);
  height: clamp(32px, 2vw, 40px);
  stroke-width: 1.75;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

/**
 * Icone per card istituzionali
 * Centratura automatica
 */
.card-istituzionale .lucide,
.card-istituzionale [data-lucide] {
  margin-bottom: 1rem;
  stroke: var(--primary-color);
}

.card-istituzionale > svg,
.card-istituzionale > i > svg,
.card-istituzionale [data-lucide] {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/**
 * Icone per box UCOI/UCOIM
 * Centratura e spaziatura
 */
.ucoi-box i[data-lucide],
.ucoim-box i[data-lucide] {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 1.5rem !important;
}

.ucoi-box > i,
.ucoim-box > i,
.ucoi-box svg,
.ucoim-box svg {
  display: block !important;
  margin: 0 auto 1.5rem !important;
}

/* ============================================================================
   2. BUTTONS
   ============================================================================
   Sistema di bottoni con varianti primary, secondary, ghost e white-outlined
   ========================================================================= */

/**
 * Stile base bottoni
 * Usa inline-flex per allineamento icone
 */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}

/**
 * Bottone primario
 * Colore principale del sito
 */
.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: var(--hover-lift-small);
  box-shadow: var(--shadow-sm);
  color: #fff;
  text-decoration: none;
}

/**
 * Bottone secondario
 * Colore secondario del sito
 */
.btn-secondary {
  color: #fff;
  background-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: var(--hover-lift-small);
  box-shadow: var(--shadow-sm);
  color: #fff;
  text-decoration: none;
}

/**
 * Bottone ghost
 * Bordo colorato su sfondo trasparente
 */
.btn-ghost {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-ghost:hover {
  color: #fff;
  background-color: var(--primary-color);
  transform: var(--hover-lift-small);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/**
 * Bottone white-outlined
 * Per uso su sfondi scuri
 */
.white-outlined {
  border: 2px solid #fff;
  color: #fff;
}

.white-outlined:hover {
  background-color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  text-decoration: none;
}

/**
 * Bottone hero
 * Variante per sezioni hero
 */
.hero-btn,
.hero-btn:hover {
  border: 2px solid var(--primary-color);
}

/**
 * Icone nei bottoni
 * Dimensionamento e allineamento
 */
.btn i[data-lucide],
.btn svg[data-lucide] {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
}

.btn-small i[data-lucide],
.btn-small svg[data-lucide] {
  width: 16px !important;
  height: 16px !important;
}

.btn-large i[data-lucide],
.btn-large svg[data-lucide] {
  width: 20px !important;
  height: 20px !important;
}

/**
 * Fix globale allineamento icone Lucide
 */
i[data-lucide],
svg[data-lucide] {
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  line-height: 0;
}

/**
 * Container per gruppi di bottoni CTA
 * Layout responsive con flex/grid
 */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 500px;
}

.cta-buttons a.btn {
  text-align: center;
  white-space: nowrap;
  padding: 12px 24px;
  border-radius: var(--btn-radius, 12px);
  min-height: 48px;
}

/* ============================================================================
   3. CARD ISTITUZIONALI
   ============================================================================
   Card per contenuti istituzionali con icone, testo e bottoni
   ========================================================================= */

/**
 * Grid wrapper per card istituzionali
 */
.istituzionali-grid {
  display: contents;
}

/**
 * Colonna singola
 * Layout flessibile con altezza minima
 */
.column {
  padding: 2rem;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  flex: 1 1 300px;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
  justify-content: space-between;
}

.column:hover {
  box-shadow: var(--shadow-md);
}

.column h3 {
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.column p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  text-align: center;
}

.column .btn {
  margin-top: auto;
  align-self: center;
}

/**
 * Card istituzionale standard
 * Bordo superiore colorato
 */
.card-istituzionale {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  text-align: center;
  border-top: 3px solid var(--primary-color);
  height: 100%;
  min-height: 280px;
}

.card-istituzionale:hover {
  box-shadow: var(--shadow-lg);
  transform: var(--hover-lift-medium);
}

.card-istituzionale i[data-lucide] {
  width: 3rem !important;
  height: 3rem !important;
  margin: 0 auto 1.5rem;
  color: var(--primary-color) !important;
  stroke: var(--primary-color) !important;
  stroke-width: 1.5px !important;
  transition: var(--transition-normal);
}

.card-istituzionale:hover i[data-lucide] {
  transform: var(--hover-lift-small);
}

.card-istituzionale h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.card-istituzionale p {
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.card-istituzionale .btn {
  margin-top: auto;
  align-self: center;
}

/* ============================================================================
   4. STATISTICHE E NUMERI
   ============================================================================
   Componenti per visualizzare dati statistici con animazioni count-up
   ========================================================================= */

/**
 * Container per statistiche
 * Layout flex responsive
 */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  padding: 0 1rem;
}

/**
 * Singolo elemento statistico
 * Card con bordo superiore colorato
 */
.stat-item {
  flex: 1 1 200px;
  max-width: 250px;
  text-align: center;
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  border-top: 3px solid var(--primary-color);
}

.stat-item:hover {
  transform: var(--hover-lift-medium);
  box-shadow: var(--shadow-md);
}

/**
 * Numero statistico
 * Grande, bold, colore primario
 */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
  font-family: var(--font-heading);
}

/**
 * Simbolo "+" accanto al numero
 */
.stat-number .plus {
  font-size: 1.8rem;
  vertical-align: top;
}

/**
 * Etichetta statistica
 * Testo descrittivo sotto il numero
 */
.stat-label {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.4;
}

/**
 * Sezione statistiche con altezza uniforme (.stats-grid)
 * ⚠️ Fix critico v2.6: altezza fissa 260px per uniformità visiva
 */
.stats-grid .stat-item {
  height: 260px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/**
 * Uniforma altezza numeri per allineamento visivo
 */
.stats-grid .stat-number {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/**
 * Gradienti sfondo progressivi per .stats-grid
 * Dal più chiaro al più scuro
 */
.stats-grid .row > .col-6:nth-child(1) .stat-item {
  background-color: #ffffff;
}

.stats-grid .row > .col-6:nth-child(2) .stat-item {
  background-color: #f9f9f9;
}

.stats-grid .row > .col-6:nth-child(3) .stat-item {
  background-color: #f3f3f3;
}

.stats-grid .row > .col-6:nth-child(4) .stat-item {
  background-color: var(--bg-light);
}

/* ============================================================================
   5. FEATURE BOXES
   ============================================================================
   Layout standard per box con icone colorate e contenuti
   ========================================================================= */

/**
 * Container per feature boxes
 * Grid responsive con auto-fit
 */
.features-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 2rem 0;
}

/**
 * Feature box standard
 * Header colorato con icona + contenuto
 */
.feature-box {
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-normal);
  border-top: 2px solid var(--primary-color);
}

.feature-box:hover {
  box-shadow: var(--shadow-md);
  transform: var(--hover-lift-small);
}

/**
 * Header con icona
 * Sfondo colorato primario
 */
.feature-icon {
  align-items: center;
  background-color: var(--primary-color);
  display: flex;
  height: 80px;
  justify-content: center;
  width: 100%;
}

.feature-icon i {
  color: white !important;
  stroke: white !important;
  height: 40px !important;
  width: 40px !important;
  margin-bottom: 0;
}

/**
 * Contenuto feature box
 * Padding uniforme
 */
.feature-content {
  padding: 1.5rem;
  flex: 1;
}

.feature-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.feature-content p {
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ============================================================================
   6. HERO SECTIONS
   ============================================================================
   Sezioni hero con supporto immagini di sfondo e overlay
   ========================================================================= */

/**
 * Hero standard
 * Sfondo chiaro, testo centrato
 */
.hero {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--bg-light);
  margin-bottom: 0;
}

.hero h1 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.hero .lead {
  margin: 0 auto 1.2rem;
  max-width: 700px;
  font-size: 2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/**
 * Hero ridotto
 * Versione compatta per pagine interne
 */
.hero-small {
  padding: 3rem 1rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-small h1 {
  font-size: 2.8rem;
}

.hero-small .lead {
  font-size: 1.2rem;
}

/**
 * Hero con immagine di sfondo
 * Overlay scuro per leggibilità testo
 */
.hero-image {
  position: relative;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
}

.hero-image .overlay {
  margin: 0 auto;
  max-width: 800px;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image h1,
.hero-image .lead {
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/**
 * Hero senza immagine (fallback)
 * Gradiente primario → secondario
 */
.hero:not(.with-image):not(.hero-image),
.hero.hero-image.image-error,
.hero.hero-no-image {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.hero:not(.with-image) h1,
.hero.hero-no-image h1 {
  color: white;
}

.hero:not(.with-image) .lead,
.hero.hero-no-image .lead {
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================================
   7. CONTACT CARDS
   ============================================================================
   Componenti riutilizzabili per pagina contatti con mappe
   ========================================================================= */

/**
 * Sezione contatti
 * Padding e sfondo bianco
 */
.contatti-info {
  padding: 4rem 0;
  background: #fff;
}

.contatti-info .subtitle {
  color: var(--text-muted, #6b7280);
  font-size: 1.125rem;
  margin-bottom: 3rem;
  text-align: center;
}

/**
 * Card singolo contatto
 * Header colorato + contenuto
 */
.contatto-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm, 0 4px 6px rgba(0, 0, 0, 0.05));
  border: 1px solid #e5e7eb;
  transition: var(--transition-normal, all 0.3s ease);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contatto-card:hover {
  box-shadow: var(--shadow-lg, 0 8px 25px rgba(0, 0, 0, 0.1));
  transform: var(--hover-lift-small, translateY(-2px));
}

/**
 * Header card contatto
 * Sfondo primario con icona
 */
.contatto-card .card-header {
  background: var(--primary-color, #036);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.contatto-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contatto-card .card-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.contatto-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

/**
 * Contenuto card contatto
 * Informazioni contatto strutturate
 */
.contatto-card .card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contatto-item {
  margin-bottom: 1.5rem;
}

.contatto-item:last-child {
  margin-bottom: 0;
}

.contatto-item strong {
  color: var(--text-color, #222);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.contatto-item small {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  display: block;
  margin-top: 0.25rem;
}

/**
 * Metodo di contatto (email, telefono, ecc.)
 * Layout flex con icona
 */
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-method i {
  width: 20px;
  height: 20px;
  color: var(--primary-color, #036);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.contact-method div {
  flex: 1;
}

/**
 * Link di contatto
 * Colore primario con hover
 */
.contact-link {
  color: var(--primary-color, #036);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  word-break: break-word;
}

.contact-link:hover {
  color: var(--secondary-color, #0066cc);
  text-decoration: underline;
}

/**
 * Info box
 * Contenitore per informazioni aggiuntive
 */
.info-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.info-box.highlight {
  background: #fff7ed;
  border-color: #fed7aa;
}

.info-box .info-icon {
  background: var(--primary-color, #036);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-box.highlight .info-icon {
  background: var(--accent-color, #f59e0b);
}

.info-box .info-icon i {
  width: 16px;
  height: 16px;
}

.info-box .info-content {
  flex: 1;
}

.info-box h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #222);
}

.info-box p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

/**
 * Blocco mappa
 * Container per mappe Leaflet
 */
.map-block {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.08));
  border: 1px solid #e5e7eb;
  transition: var(--transition-normal, all 0.3s ease);
}

.map-block:hover {
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));
}

.map-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-color, #003366);
}

.leaflet-map {
  width: 100%;
  height: 360px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   8. UTILITIES
   ============================================================================
   Classi utility e helpers
   ========================================================================= */

/**
 * Evidenziazione testo
 */
mark {
  background: var(--accent-100, #e6f0ff);
  color: inherit;
  padding: 0 0.15em;
  border-radius: 0.15rem;
}

/**
 * Spaziatura tra sezioni
 */
.section + .section {
  margin-top: 2rem;
}

/**
 * Separatore sezioni
 * Linea gradiente orizzontale
 */
.section-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 1.25rem 0 0 0;
}

/**
 * News Grid
 * Griglia responsive per card notizie
 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

/* ============================================================================
   9. INDICATORI STATO
   ============================================================================
   Loading spinners e messaggi di errore
   ========================================================================= */

/**
 * Loading spinner
 * Animazione rotazione
 */
.loading-spinner {
  text-align: center;
  padding: 30px;
  width: 100%;
}

.loading-spinner::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 10px auto;
  border-radius: 50%;
  border: 4px solid #ccc;
  border-top-color: var(--primary-color);
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/**
 * Messaggio di errore
 * Sfondo rosso con bordo sinistro
 */
.error-message {
  background-color: #ffebee;
  color: #b71c1c;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  text-align: center;
  border-left: 3px solid #b71c1c;
}

/* ============================================================================
   10. FOOTER
   ============================================================================
   Footer globale del sito
   ========================================================================= */

.global-footer {
  padding: 2.5rem 1rem 1rem;
  font-size: 0.9rem;
  color: #fff;
  background-color: var(--primary-color);
  margin-top: 3rem;
}

.footer-main {
  display: flex;
  gap: 2rem;
  margin: 0 auto 1.5rem;
  max-width: 1200px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-column {
  flex: 1 1 280px;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-column p,
.footer-links li {
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-column a {
  color: #fff;
  text-decoration: underline;
  transition: var(--transition-fast);
}

.footer-column a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration-thickness: 2px;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #bbb;
  margin: 0;
}

/* ============================================================================
   11. RESPONSIVE DESIGN
   ============================================================================
   Media queries per layout responsive
   ========================================================================= */

/**
 * Desktop large (min 992px)
 * CTA buttons in riga singola
 */
@media (min-width: 992px) {
  .cta-buttons {
    flex-wrap: nowrap;
  }

  .cta-buttons a.btn {
    min-width: 220px;
    flex: 0 0 auto;
  }
}

/**
 * Tablet (576px - 991.98px)
 * CTA buttons in griglia 2 colonne
 */
@media (min-width: 576px) and (max-width: 991.98px) {
  .cta-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    justify-content: center;
    align-items: stretch;
  }

  .cta-buttons a.btn {
    width: 100%;
  }
}

/**
 * Mobile small (max 575.98px)
 * CTA buttons full width
 */
@media (max-width: 575.98px) {
  .cta-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cta-buttons a.btn {
    width: 100%;
  }
}

/**
 * Tablet (max 992px)
 */
@media (max-width: 992px) {
  .hero-small {
    min-height: 350px;
  }
}

/**
 * Mobile (max 768px)
 */
@media (max-width: 768px) {
  .hero-small {
    min-height: 300px;
  }

  .hero-image .overlay {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .contatti-info {
    padding: 3rem 0;
  }

  .contatto-card .card-header {
    padding: 1rem;
  }

  .contatto-card .card-content {
    padding: 1rem;
  }

  .leaflet-map {
    height: 300px;
  }

  .map-block {
    padding: 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }

  /**
   * Statistiche su mobile
   */
  .stats-container {
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .stat-item {
    flex-basis: 100%;
    max-width: none;
    padding: 1.5rem 1rem;
  }

  /**
   * Mantieni altezza fissa anche su mobile per .stats-grid
   */
  .stats-grid .stat-item {
    height: 260px !important;
  }

  .stat-number {
    font-size: 2rem;
  }

  /**
   * Feature boxes responsive
   */
  .features-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-box {
    max-width: none;
  }
}

/**
 * Mobile very small (max 480px)
 */
@media (max-width: 480px) {
  .hero-small {
    min-height: 250px;
  }

  .contatti-info {
    padding: 2rem 0;
  }

  .contatti-info .subtitle {
    font-size: 1rem;
  }

  .contatto-card .card-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .contatto-card .card-icon {
    width: 40px;
    height: 40px;
  }

  .contatto-card .card-icon i {
    width: 20px;
    height: 20px;
  }

  .contatto-card h3 {
    font-size: 1.125rem;
  }

  .leaflet-map {
    height: 250px;
  }
}

/* ============================================================================
   12. PRINT STYLES
   ============================================================================
   Ottimizzazioni per la stampa
   ========================================================================= */

@media print {
  .contatto-card {
    box-shadow: none;
    border: 2px solid #000;
    margin-bottom: 1rem;
    page-break-inside: avoid;
  }

  .contatto-card .card-header {
    background: #000 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .map-block,
  .mappa-sedi {
    display: none;
  }

  .btn,
  .pagination,
  .filter-section {
    display: none;
  }

  .section {
    page-break-inside: avoid;
  }

  .card-istituzionale,
  .feature-box,
  .stat-item {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ============================================================================
   13. ACCESSIBILITY
   ============================================================================
   Supporto per preferenze utente e accessibilità
   ========================================================================= */

/**
 * Riduzione movimento
 * Disabilita animazioni per utenti sensibili
 */
@media (prefers-reduced-motion: reduce) {
  .contatto-card,
  .map-block {
    transition: none;
  }

  .contatto-card:hover,
  .map-block:hover {
    transform: none;
  }
}

/**
 * Focus visibile per navigazione da tastiera
 */
.contatto-card:focus-within {
  outline: 2px solid var(--primary-color, #036);
  outline-offset: 2px;
}

.contact-link:focus-visible {
  outline: 2px solid var(--primary-color, #036);
  outline-offset: 2px;
  border-radius: 2px;
}

/**
 * Contrasto elevato
 * Bordi più spessi per migliore visibilità
 */
@media (prefers-contrast: high) {
  .contatto-card {
    border-width: 2px;
    border-color: var(--text-color, #222);
  }

  .info-box {
    border-width: 2px;
  }
}

/* ============================================================================
   END OF FILE
   ========================================================================= */