/*
 * @file: organi-sociali.css
 * @description: Stili specifici per la pagina degli organi sociali delle Unioni Consolari
 * @author: Altoprofilo Studio
 * @last-updated: 2025-05-22
 * @version: V.1.2
 */

/* ==========================================================================
   STRUTTURA GENERALE
   ========================================================================== */
#organi-sociali-ucoi {
  /* Variante per UCOI */
  --main-color: var(--primary-color);
  --hover-color: var(--primary-hover);
}

#organi-sociali-ucoim {
  /* Variante per UCOIM */
  --main-color: var(--secondary-color);
  --hover-color: var(--secondary-hover);
}

/* Titolo sezione con linea decorativa */
#organi-sociali-ucoi .section-title,
#organi-sociali-ucoim .section-title {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

#organi-sociali-ucoi .section-title::after,
#organi-sociali-ucoim .section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--main-color);
  transition: width 0.3s ease;
}

/* Animazione hover sul titolo sezione */
#organi-sociali-ucoi .section:hover .section-title::after,
#organi-sociali-ucoim .section:hover .section-title::after {
  width: 150px;
}

/* ==========================================================================
   GRID ORGANI SOCIALI
   ========================================================================== */
.organi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.organo-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
  border-top: 3px solid var(--main-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.organo-icon {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.organo-icon i {
  width: 3rem;
  height: 3rem;
  color: var(--main-color);
  stroke: var(--main-color);
  stroke-width: 1.5;
}

.organo-content {
  padding: 0 1.5rem 1.5rem;
  flex: 1;
}

.organo-content h4 {
  color: var(--main-color);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.organo-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ==========================================================================
   GRID MEMBRI
   ========================================================================== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.member-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.member-card:hover {
  transform: var(--hover-lift-small);
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--main-color);
}

.member-header {
  background-color: var(--bg-light);
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--main-color);
  font-weight: 600;
  text-align: center;
}

.member-content {
  padding: 1.5rem;
  flex: 1;
}

.member-content strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.member-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ==========================================================================
   STILI SPECIFICI PER INFO BOX
   ========================================================================== */
#organi-sociali-ucoi .info-box,
#organi-sociali-ucoim .info-box {
  display: flex;
  background-color: var(--bg-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--main-color);
}

.info-button {
  margin-top: 1rem;
}

/* ==========================================================================
   LEADERSHIP CONDIVISA
   ========================================================================== */
.shared-leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.leadership-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

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

.leadership-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.leadership-icon i {
  width: 28px !important;
  height: 28px !important;
  color: white !important;
  stroke: white !important;
  margin: 0;
}

.leadership-content h4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.leadership-roles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.role-label {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-title {
  font-weight: 500;
}

.ucoi-role {
  background: rgba(0, 51, 102, 0.1);
  color: var(--primary-color);
}

.ucoim-role {
  background: rgba(204, 153, 51, 0.1);
  color: var(--secondary-color);
}

.leadership-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   PANORAMICA UNIONI
   ========================================================================== */
.union-overview {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  border-left: 4px solid var(--primary-color);
}

.ucoim-overview {
  border-left-color: var(--secondary-color);
}

.union-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.union-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.ucoi-icon {
  background-color: var(--primary-color);
  color: white;
}

.ucoim-icon {
  background-color: var(--secondary-color);
  color: white;
}

.union-icon i {
  width: 28px !important;
  height: 28px !important;
  margin: 0;
  color: white !important;
  stroke: white !important;
}

.union-info h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.union-info p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ==========================================================================
   STRUTTURA ORGANI
   ========================================================================== */
.organs-structure {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.organ-level {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.organ-level h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.ucoim-overview .organ-level h4 {
  color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
}

.organ-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.member-badge {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.member-badge strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.25rem;
}

.ucoim-overview .member-badge strong {
  color: var(--secondary-color);
}

.council-summary {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.council-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.council-stat .number {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1;
}

.ucoim-overview .council-stat .number {
  color: var(--secondary-color);
}

.council-stat .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.control-organs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.control-organ {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.control-organ i {
  width: 20px !important;
  height: 20px !important;
  color: var(--primary-color) !important;
  stroke: var(--primary-color) !important;
  margin: 0;
}

.ucoim-overview .control-organ i {
  color: var(--secondary-color) !important;
  stroke: var(--secondary-color) !important;
}

.control-organ span {
  font-size: 0.9rem;
}

/* ==========================================================================
   RAPPRESENTANZA GEOGRAFICA (UCOIM)
   ========================================================================== */
.geographical-representation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.geo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.geo-area i {
  width: 20px !important;
  height: 20px !important;
  color: var(--secondary-color) !important;
  stroke: var(--secondary-color) !important;
  margin: 0;
}

.geo-area span {
  font-size: 0.9rem;
}

.control-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 6px;
  border-left: 3px solid #ffc107;
}

.status-item i {
  width: 20px !important;
  height: 20px !important;
  color: #ffc107 !important;
  stroke: #ffc107 !important;
  margin: 0;
}

.status-item span {
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* ==========================================================================
   TABELLA DI CONFRONTO
   ========================================================================== */
.comparison-container {
  margin: 2rem 0;
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.comparison-table-wrapper {
  min-width: 100%;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.comparison-table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table th:first-child {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.ucoi-header {
  background-color: var(--primary-color);
  color: white;
}

.ucoim-header {
  background-color: var(--secondary-color);
  color: white;
}

.comparison-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-dark);
  background-color: rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   INSIGHTS E CONFRONTI
   ========================================================================== */
.comparison-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.insight-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insight-icon i {
  width: 20px !important;
  height: 20px !important;
  color: var(--primary-color) !important;
  stroke: var(--primary-color) !important;
  margin: 0;
}

.insight-content h4 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.insight-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   SEZIONI E SPAZIATURE
   ========================================================================== */
.section {
  padding: 3rem 0;
}

.section.bg-light {
  background-color: var(--bg-light);
}

.section + .section {
  margin-top: 0;
}


/* Documenti grid */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.document-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition-normal);
}

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

.document-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.document-icon i {
  width: 28px !important;
  height: 28px !important;
  color: white !important;
  stroke: white !important;
  margin: 0;
}

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

.document-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  background: var(--bg-light);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .shared-leadership-grid {
    grid-template-columns: 1fr;
  }
  
  .leadership-roles {
    flex-direction: column;
  }
  
  .council-summary {
    flex-direction: column;
    gap: 1rem;
  }
  
  .comparison-insights {
    grid-template-columns: 1fr;
  }
  
  .comparison-table {
    font-size: 0.85rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 768px) {
  .union-header {
    flex-direction: column;
    text-align: center;
  }
  
  .union-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .organ-members {
    grid-template-columns: 1fr;
  }
  
  .geographical-representation {
    grid-template-columns: 1fr;
  }
  
  .insight-box {
    flex-direction: column;
    text-align: center;
  }
  
  .insight-icon {
    margin: 0 auto 1rem;
  }
  
  .quick-nav-list {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-nav-item {
    width: 200px;
    text-align: center;
  }
  
  .comparison-table-wrapper {
    padding: 0 1rem;
  }
  
  .comparison-table {
    font-size: 0.8rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.75rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .documents-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ANIMAZIONI
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-box {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

/* Effetto cascata per contenitori multipli */
.content-box:nth-child(2) {
  animation-delay: 0.1s;
}

.content-box:nth-child(3) {
  animation-delay: 0.2s;
}

.content-box:nth-child(4) {
  animation-delay: 0.3s;
}