/* CSA RAL Reggio Emilia - Styles aggiornati (Ottobre 2025) */
/* Mobile-first, responsive e moderno */

:root {
  /* Colori CSA */
  --csa-primary: #0056b3;
  --csa-secondary: #f75104;
  --csa-accent: #fad221;
  --csa-dark: #1a1a1a;
  --csa-light: #f8f9fa;

  /* Colori Attività CSA */
  --csa-activity-primary: #28a745;
  --csa-activity-secondary: #17a2b8;
  --csa-video-accent: #e83e8c;

  /* Grigi */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
  overflow-x: hidden;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--csa-primary) 0%, #003d82 100%);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(250, 210, 33, 0.5);
  transition: all var(--transition-base);
  animation: pulse 3s ease-in-out infinite;
}

.logo-img:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px rgba(250, 210, 33, 0.8);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(250, 210, 33, 0.5);
  }

  50% {
    box-shadow: 0 0 30px rgba(250, 210, 33, 0.8);
  }
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Desktop Navigation - Nasconde su mobile */
.nav-links {
  display: none;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  align-items: center;
}

.social-links {
  display: none;
  gap: var(--spacing-sm);
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--csa-accent);
  transition: width var(--transition-base);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 80%;
}

/* Social Media Links */
.social-link {
  color: white;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  background: rgba(250, 210, 33, 0.3);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 210, 33, 0.4);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  z-index: 1001;
  margin-left: auto;
}

.mobile-menu-btn span {
  width: 28px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--csa-primary) 0%, #003d82 100%);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: 999;
  padding-top: 90px;
  overflow-y: auto;
}

.mobile-nav.show {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
}

.nav-link-mobile {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
  display: block;
  text-align: left;
}

.nav-link-mobile:hover,
.nav-link-mobile:active {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(10px);
}

/* Main Content */
.main {
  min-height: 100vh;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--csa-primary) 0%, #003d82 100%);
  color: white;
  padding: var(--spacing-2xl) var(--spacing-lg);
  text-align: center;
}

.hero-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}

.hero-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(250, 210, 33, 0.6);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.hero-subtitle {
  font-size: 15px;
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  line-height: 1.8;
  text-align: justify;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.stat {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.stat:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--csa-accent);
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 13px;
  opacity: 0.9;
}

/* Section */
.section {
  padding: var(--spacing-2xl) var(--spacing-lg);
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--csa-primary);
  margin-bottom: var(--spacing-md);
}

.section-header p {
  font-size: 15px;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto;
}

/* News Section Logo */
.news-section-logo,
.activities-section-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}

.section-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 86, 179, 0.4);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Territory Buttons */
.territory-buttons,
.activities-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}

.territory-btn,
.activity-btn {
  background: white;
  border: 2px solid var(--gray-200);
  color: var(--gray-700);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.territory-btn:hover,
.activity-btn:hover {
  border-color: var(--csa-primary);
  color: var(--csa-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.territory-btn.active {
  background: var(--csa-primary);
  border-color: var(--csa-primary);
  color: white;
  box-shadow: var(--shadow-lg);
}

.activity-btn {
  background: linear-gradient(135deg, var(--csa-activity-primary) 0%, var(--csa-activity-secondary) 100%);
  border: 2px solid transparent;
  color: white;
}

.activity-btn.active {
  background: linear-gradient(135deg, var(--csa-activity-secondary) 0%, var(--csa-activity-primary) 100%);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

/* CSA Activities Section */
.csa-activities-section {
  background: var(--csa-light);
}

.csa-activities-section .section-header h2 {
  color: var(--csa-activity-primary);
}

/* Specific Style for News Section - Deep Ocean Blue Theme */
#notizie {
  background: linear-gradient(135deg, #0d1033 0%, #233896 100%);
  color: white;
}

#notizie .section-header h2 {
  color: #e4d96f;
  /* Straw Yellow */
}

#notizie .section-header p {
  color: #fafbfc;
  /* Near White */
  opacity: 0.9;
}

#notizie .section-logo-img {
  box-shadow: 0 0 30px rgba(20, 94, 168, 0.6);
  /* Steel Blue Glow */
}

/* Specific Style for Territorial Activities - Autumn Earth Theme */
#attivita {
  background: linear-gradient(135deg, #6d7a64 0%, #c67b4f 100%);
  /* Olive to Terracotta */
  color: white;
}

#attivita .section-header h2 {
  color: #f6c34e;
  /* Warm Yellow Title */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

#attivita .section-header p {
  color: #fcfbf7;
  /* Off-White */
  opacity: 0.95;
}

#attivita .section-logo-img {
  box-shadow: 0 0 30px rgba(246, 195, 78, 0.5);
  /* Yellow/Gold Glow */
}

/* Custom Buttons for Territorial Activities Section */
#attivita .activity-btn {
  background: #f6c34e;
  /* Warm Yellow */
  color: #3e382d;
  /* Dark Brown Text */
  border: none;
  font-weight: 700;
}

#attivita .activity-btn:hover,
#attivita .activity-btn.active {
  background: #c67b4f;
  /* Terracotta */
  color: white;
  box-shadow: 0 4px 12px rgba(62, 56, 45, 0.3);
}

/* Specific Style for National Activities - Dark Slate & Gold Theme */
#attivita-nazionale {
  background: linear-gradient(135deg, var(--csa-primary) 0%, var(--csa-dark) 100%);
  color: white;
}

#attivita-nazionale .section-header h2 {
  color: white;
  /* White Title */
}

#attivita-nazionale .section-header p {
  color: var(--gray-300);
  /* Light Grey Description */
}

#attivita-nazionale .section-logo-img {
  box-shadow: 0 0 30px rgba(218, 151, 16, 0.4);
  /* Gold Glow */
}

/* News Content */
.news-content,
.activities-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.news-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-card,
.activity-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border-left: 4px solid var(--csa-primary);
  height: 100%;
}

.news-card:hover,
.activity-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.activity-card {
  border-left-color: var(--csa-activity-primary);
}

.activity-card.video-card {
  border-left-color: var(--csa-video-accent);
}

.news-card-header,
.activity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.news-category {
  background: var(--csa-accent);
  color: var(--gray-900);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.activities-category {
  background: var(--csa-activity-primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.video-badge {
  background: var(--csa-video-accent);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.news-date,
.activity-date {
  color: var(--gray-500);
  font-size: 12px;
}

.news-title,
.activity-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
  line-height: 1.4;
}

.news-content-preview,
.activity-content-preview {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.news-source {
  font-size: 12px;
  color: var(--gray-600);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--gray-200);
  font-weight: 600;
}

/* Specific Style for Competitions Section - Retro Pop Theme */
#concorsi {
  background: linear-gradient(135deg, #1f1e24 0%, #35333d 100%);
  /* Dark Charcoal */
  color: white;
}

#concorsi .section-header h2 {
  color: #6ac5c7;
  /* Aqua Blue */
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

#concorsi .section-header p {
  color: #edebd8;
  /* Beige/Off-White */
  opacity: 0.95;
}

/* Custom Buttons for Competitions */
.competition-link {
  background: #bf3028;
  /* Retro Red */
  color: #ffffff;
  /* White Text */
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.competition-link:hover {
  background: #6ac5c7;
  /* Aqua Blue */
  color: #1f1e24;
  /* Dark Text */
  box-shadow: 0 4px 15px rgba(106, 197, 199, 0.4);
  transform: translateY(-2px);
}

.load-more-btn {
  background: #bf3028;
  border: 2px solid #bf3028;
  color: white;
}

.load-more-btn:hover {
  background: transparent;
  color: #bf3028;
  border-color: #bf3028;
}

/* PDF Documents Gallery */
.pdf-documents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.pdf-document-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border-left: 4px solid var(--csa-secondary);
  cursor: pointer;
}

.pdf-document-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.pdf-document-thumbnail {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--gray-200);
}

.pdf-document-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-sm);
}

.pdf-document-date {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: var(--spacing-md);
}

.pdf-document-description {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--csa-secondary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.pdf-download-btn:hover {
  background: #d64503;
  transform: translateX(5px);
}

/* Competitions Grid - Card Style */
.competitions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.competition-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border-top: 4px solid var(--csa-secondary);
}

.competition-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.competition-header {
  margin-bottom: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.competition-entity {
  background: var(--csa-primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-badge {
  background: var(--csa-accent);
  color: var(--csa-dark);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.competition-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.competition-deadline {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: var(--spacing-md);
}

.competition-deadline strong {
  color: var(--csa-secondary);
  font-weight: 700;
}

.competition-link {
  display: inline-block;
  background: var(--csa-secondary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.competition-link:hover {
  background: #d64503;
  transform: translateX(5px);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: var(--spacing-xl);
}

.load-more-btn {
  background: var(--csa-primary);
  color: white;
  border: none;
  padding: var(--spacing-md) var(--spacing-2xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.load-more-btn:hover {
  background: #003d82;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.load-more-btn:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
}

/* Contact Section - Deep Ocean Blue Theme */
#contatti {
  background: linear-gradient(135deg, #0d1033 0%, #233896 100%);
  /* Navy to Royal Blue */
  color: white;
}

#contatti .section-header h2 {
  color: white;
  /* White Title */
}

#contatti .section-header p {
  color: #fafbfc;
  /* Near White */
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Contact Section Grid */
.contact-grid {
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

#contatti .contact-item {
  color: #000000;
}

#contatti .contact-item strong {
  color: #000000;
}

#contatti .contact-item a {
  color: #000000;
  text-decoration: underline;
}

#contatti .contact-item a:hover {
  text-decoration: none;
  opacity: 0.8;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.contact-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.contact-item a {
  color: var(--csa-primary);
  text-decoration: none;
  font-weight: 600;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Convenzioni Section - Vibrant & Fresh Theme */
#convenzioni {
  background: linear-gradient(135deg, #2bd685 0%, #fce474 100%);
  /* Green to Yellow */
  color: #1a1a1a;
}

#convenzioni .section-header h2 {
  color: #1a1a1a;
  /* Dark Contrast */
}

#convenzioni .section-header p {
  color: #2c3e50;
  /* Darker Grey */
  opacity: 0.9;
  font-weight: 500;
}

.convenzioni-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.convenzione-card {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top-width: 5px !important;
}

/* Override inline styles for palette consistency */
.convenzione-card:nth-child(1) {
  border-top-color: #f24957 !important;
}

/* Red */
.convenzione-card:nth-child(1) h3,
.convenzione-card:nth-child(1) div {
  color: #f24957 !important;
}

.convenzione-card:nth-child(2) {
  border-top-color: #2bd685 !important;
}

/* Green */
.convenzione-card:nth-child(2) h3,
.convenzione-card:nth-child(2) div {
  color: #2bd685 !important;
}

.convenzione-card:nth-child(3) {
  border-top-color: #fce474 !important;
}

/* Yellow */
.convenzione-card:nth-child(3) h3,
.convenzione-card:nth-child(3) div {
  color: #dcb300 !important;
}

/* Darker Yellow for text */

.convenzione-card:nth-child(4) {
  border-top-color: #fa9682 !important;
}

/* Peach */
.convenzione-card:nth-child(4) h3,
.convenzione-card:nth-child(4) div {
  color: #fa9682 !important;
}

.convenzione-card:nth-child(5) {
  border-top-color: #85fa7a !important;
}

/* Light Green */
.convenzione-card:nth-child(5) h3,
.convenzione-card:nth-child(5) div {
  color: #4db344 !important;
}

/* Darker Green for text */

.convenzione-card:nth-child(6) {
  border-top-color: #f24957 !important;
}

/* Red Loop */
.convenzione-card:nth-child(6) h3,
.convenzione-card:nth-child(6) div {
  color: #f24957 !important;
}

.convenzione-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

.convenzioni-intro {
  background: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  border-left: 5px solid #f24957;
  /* Red Accent */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.convenzioni-intro h3 {
  color: #f24957 !important;
}

.convenzioni-cta {
  margin-top: var(--spacing-2xl);
  text-align: center;
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, #ff6b00 0%, #ff9e1f 100%);
  /* Orange Gradient */
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: 0 10px 30px rgba(255, 107, 0, 0.4);
}

.convenzioni-cta a {
  display: inline-block;
  background: #fce474;
  /* Yellow Button */
  color: #1a1a1a;
  /* Dark Text */
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.convenzioni-cta a:hover {
  transform: scale(1.05);
  background: #fff;
  color: #f24957;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Disclaimer Section - Autumn Earth Palette */
.disclaimer-section {
  background: #ffffff;
  border-top: 4px solid #6d7a64;
  /* Olive */
  border-bottom: 4px solid #c67b4f;
  /* Terracotta */
}

.disclaimer-section .section-header h2 {
  color: #c67b4f;
  /* Terracotta Title */
  font-weight: 900;
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.disclaimer-content {
  background: #6d7a64;
  /* Olive Background */
  color: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(109, 122, 100, 0.3);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  border: 3px solid #f6c34e;
  /* Warm Yellow Border */
  text-align: center;
}

.disclaimer-content p {
  margin-bottom: var(--spacing-md);
  color: #fcfbf7;
}

.disclaimer-content strong {
  color: #f6c34e;
  /* Warm Yellow Highlight */
  font-size: 20px;
  display: block;
  margin-bottom: 8px;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: white;
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
}

.footer-logo {
  max-width: 280px;
  height: auto;
  margin: 0 auto var(--spacing-lg);
  display: block;
  border-radius: var(--radius-md);
}

.footer-text {
  font-size: 13px;
  margin-bottom: var(--spacing-sm);
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.footer-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: var(--csa-accent);
  transform: translateY(-2px);
}

.footer-social-links {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

.footer-social-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--csa-accent);
  transform: translateY(-2px);
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-xl);
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--csa-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tablet */
@media (min-width: 768px) {
  .logo-text {
    font-size: 18px;
  }

  .logo-img {
    width: 55px;
    height: 55px;
  }

  .nav-links {
    display: flex;
  }

  .social-links {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero h2 {
    font-size: 22px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

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

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

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

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

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

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

  .section-header h2 {
    font-size: 28px;
  }

  .section-logo-img {
    width: 100px;
    height: 100px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 40px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .hero-logo {
    width: 120px;
    height: 120px;
  }

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

  .news-content,
  .activities-content {
    grid-template-columns: repeat(3, 1fr);
  }

  .competitions-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pdf-documents-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .convenzioni-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Print styles */
@media print {

  .header,
  .mobile-nav,
  .footer {
    display: none;
  }

  .hero {
    background: white;
    color: black;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 3px solid var(--csa-accent);
  outline-offset: 2px;
}

/* New Social Button Styles - Replicating Tailwind classes from user snippet */

/* Base container visibility matches .social-links behavior */
.social-links-new {
  display: none;
  gap: var(--spacing-md);
  align-items: center;
}

@media (min-width: 768px) {
  .social-links-new {
    display: flex;
  }
}

/* Base button styles */
.social-btn-new {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  /* rounded-full */
  font-size: 1.5rem;
  /* text-2xl */
  display: flex;
  align-items: center;
  justify-content: center;
  transition-duration: 500ms;
  /* duration-500 */
  text-decoration: none;
  background-color: white;
  /* bg-white */
  border-width: 2px;
  border-style: solid;
  position: relative;
  transform: translateY(0);
  transition-property: all;
}

.social-btn-new:hover {
  transform: translateY(-0.75rem);
  /* hover:-translate-y-3 */
}

/* Facebook specific */
.social-btn-facebook {
  border-color: #2563eb;
  /* border-blue-600 */
  color: #2563eb;
  /* text-blue-600 */
}

.social-btn-facebook:hover {
  background-color: #2563eb;
  /* hover:bg-blue-600 */
  color: white;
  /* hover:text-white */
}

/* Instagram specific */
.social-btn-instagram {
  border-color: #ec4899;
  /* border-pink-500 */
  color: #db2777;
  /* text-pink-600 */
}

.social-btn-instagram:hover {
  border-color: transparent;
  /* hover:border-0 equivalent */
  /* bg-gradient-to-b from-indigo-600 via-pink-600 to-yellow-500 */
  background-image: linear-gradient(to bottom, #4f46e5, #db2777, #eab308);
  color: white;
  /* hover:text-white */
}

/* Mobile Social Links Visibility */

/* Ensure social links are displayed in the mobile menu regardless of screen size filters on the main class */
.mobile-nav .social-links-new {
  display: flex !important;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* Pulsante Neon Formazione - Versione Migliorata */
.btn-neon-training {
  display: inline-block !important;
  margin-top: 15px !important;
  padding: 10px 22px !important;
  background-color: #000b1d !important;
  color: #00f2ff !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  font-size: 12px !important;
  border: 2px solid #00f2ff !important;
  border-radius: 50px !important;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.3), inset 0 0 10px rgba(0, 242, 255, 0.1) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn-neon-training:hover {
  background-color: #00f2ff !important;
  color: #000b1d !important;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.8), 0 0 40px rgba(0, 242, 255, 0.4) !important;
  transform: translateY(-2px) !important;
}

.btn-neon-training i {
  margin-right: 6px !important;
}

/* ====================================================== */
/* Carosello Volantini                                    */
/* ====================================================== */
.flyers-carousel-wrapper {
  position: relative;
  margin-top: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 50px;
}

.flyers-carousel {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.flyers-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.flyer-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.flyer-slide img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 16px;
}

/* Frecce carosello */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.25);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
  backdrop-filter: blur(4px);
  padding: 0;
  margin-top: -25px;
}

.carousel-btn:hover {
  background: rgba(0, 86, 179, 0.8);
  border-color: #38bdf8;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
  left: -24px;
}

.carousel-btn-next {
  right: -24px;
}

@media (max-width: 640px) {
  .carousel-btn-prev {
    left: 6px;
  }

  .carousel-btn-next {
    right: 6px;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  display: block;
}

.carousel-dot.active {
  background: #38bdf8;
  transform: scale(1.3);
}


/* ====================================================== */
/* Animazione Banner CCNL - GSAP Gradient Text            */
/* ====================================================== */
.ccnl-banner-animation {
  width: 100%;
  padding: 40px 30px;
  background-color: #111416;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

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

.ccnl-list li {
  --color-hover: #cb54ac;
  --color-active: #ffffff;
  --color-start: #010406;
  --stop-hover: 0%;
  --stop-active: 0%;

  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.4rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(90deg,
      var(--color-hover) var(--stop-hover),
      var(--color-active) var(--stop-hover),
      var(--color-active) var(--stop-active),
      var(--color-start) var(--stop-active));
  width: fit-content;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.48s cubic-bezier(0.475, 0.425, 0, 0.995);
  cursor: default;
  user-select: none;
}

.ccnl-list li:hover {
  transform: translateX(0.3ch);
}

.ccnl-list li:nth-child(1) {
  --color-hover: #fad089;
}

.ccnl-list li:nth-child(2) {
  --color-hover: #ff9c5b;
}

.ccnl-list li:nth-child(3) {
  --color-hover: #f5634a;
}

.ccnl-list li:nth-child(4) {
  --color-hover: #27ade4;
}

.ccnl-list li:nth-child(5) {
  --color-hover: #60b99a;
}

/* Custom CodePen Effect */
.codepen-wrapper {
  background: linear-gradient(135deg, var(--csa-primary) 0%, #003d82 100%);
  padding: 5% 10%;
  width: 100%;
}

.codepen-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 150vh;
}

.codepen-text {
  font-family: "Inter", "Poppins", sans-serif;
  font-size: 5vw;
  letter-spacing: -0.01em;
  line-height: 100%;
  margin: 0;
  padding: 1vw 0;

  width: 100%;
  color: rgb(182, 182, 182, 0.2);
  background: linear-gradient(to right, #b6b6b6, #b6b6b6) no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 0%;
  transition: background-size cubic-bezier(0.1, 0.5, 0.5, 1) 0.5s;

  border-bottom: 1px solid #2f2b28;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;

  animation-name: reveal;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-timeline: view();
  animation-range: entry 100% cover 50%;
}

@keyframes reveal {
  to {
    background-size: 100%;
  }
}

.codepen-text>span {
  position: absolute;
  width: 100%;
  height: 100%;

  left: 0;
  background-color: var(--csa-accent, #fad221);
  color: #1a1a4e;

  clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);
  transform-origin: center;
  transition: all cubic-bezier(0.1, 0.5, 0.5, 1) 0.4s;

  display: flex;
  align-items: center;
}

.codepen-text:hover>span {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

@media (max-width: 768px) {
  .codepen-text {
    font-size: 7vw;
  }

  .codepen-wrapper {
    padding: 10% 5%;
  }
}

/* News Banners */
.news-banners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: var(--spacing-xl) 0;
  flex-wrap: wrap;
}

.news-banner-img {
  max-width: 45%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-base);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.news-banner-img:hover {
  transform: scale(1.02);
  border-color: var(--csa-accent);
}

@media (max-width: 768px) {
  .news-banner-img {
    max-width: 100%;
  }

  .news-banners {
    gap: 20px;
  }
}

/* Sezione Punti Critici Riforma */
.points-section {
  background: linear-gradient(135deg, var(--csa-primary) 0%, #003d82 100%);
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.points-content {
  max-width: 1100px;
  margin: 0 auto;
}

.points-content p {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--spacing-xl);
  opacity: 1;
  text-align: justify;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .points-content p {
    font-size: 22px;
    text-align: left;
  }
}

.points-content p:last-child {
  margin-bottom: 0;
}