
/* Footer Widget - Dimensioni Proporzionate e Mobile Responsive */

/* Tutte le immagini nei widget footer */
.footer-widget img,
.site-footer img {
  width: 100% !important;
  height: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  margin: 15px auto !important;
  display: block !important;
}

/* Widget footer centrati */
.footer-widget,
.footer-adv-widget {
  text-align: center !important;
  padding: 20px 10px !important;
}

/* Mobile: Widget uno sotto l'altro */
@media (max-width: 768px) {
  
  /* Layout verticale footer */
  .site-footer .ast-container,
  .footer-adv .ast-container {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  /* Ogni widget 100% larghezza */
  .footer-adv-widget,
  .footer-widget-area {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 30px !important;
  }
  
  /* Immagini più piccole su mobile */
  .footer-widget img,
  .site-footer img {
    max-width: 120px !important;
  }
}



/* Correzioni Mobile per Pagina 25 Anni di Storia */

/* 1. Hero - Proporzioni corrette tra immagine e titolo */
@media (max-width: 768px) {
  
  /* Hero Section */
  .hero-section,
  .page-header,
  .entry-header {
    min-height: auto !important;
    padding: 40px 20px !important;
  }
  
  /* Immagine Hero proporzionata */
  .hero-section img,
  .page-header img,
  .wp-post-image {
    width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
    object-fit: cover !important;
    margin-bottom: 20px !important;
  }
  
  /* Titolo Hero proporzionato */
  .hero-section h1,
  .page-header h1,
  .entry-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-top: 20px !important;
    padding: 0 15px !important;
  }
  
  /* 2. Media Gallery - Non sovrappone footer */
  .wp-block-gallery,
  .gallery,
  .media-gallery {
    margin-bottom: 60px !important;
    padding-bottom: 40px !important;
  }
  
  /* Spazio prima del footer */
  .site-footer {
    margin-top: 60px !important;
    clear: both !important;
  }
  
  /* Assicura che gallery sia contenuta */
  .wp-block-gallery figure,
  .gallery-item {
    margin-bottom: 20px !important;
  }
  
  /* Contenitore pagina con padding bottom */
  .entry-content,
  .page-content {
    padding-bottom: 60px !important;
  }
}

/* ============================================================
   MEGA MENU — DESKTOP (≥782px)
   ============================================================ */
@media (min-width: 782px) {

  /* Contenitore nav principale */
  .wp-block-navigation {
    position: relative;
  }

  /* Link primo livello */
  .wp-block-navigation > ul > li > a,
  .wp-block-navigation .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    color: #1A3F5C !important;
    padding: 8px 12px !important;
    transition: color 0.2s ease !important;
  }

  .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
    color: #1E6FA0 !important;
  }

/* Icona freccia desktop — visibile per voci con sottomenu */
  .wp-block-navigation__submenu-icon {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 4px !important;
    opacity: 0.7 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
  }

  .wp-block-navigation__submenu-icon svg {
    width: 12px !important;
    height: 12px !important;
    fill: #1A3F5C !important;
  }

  /* Ruota la freccia quando il mouse è sopra */
  .wp-block-navigation .has-child:hover > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon,
  .wp-block-navigation .has-child:focus-within > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon {
    transform: rotate(180deg) !important;
    opacity: 1 !important;
  }

  /* Freccia colorata al hover */
  .wp-block-navigation .has-child:hover > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon svg,
  .wp-block-navigation .has-child:focus-within > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon svg {
    fill: #1E6FA0 !important;
  }

  /* Submenu container desktop */
  .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
  .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 220px !important;
    background: #ffffff !important;
    border-top: 3px solid #1E6FA0 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    padding: 8px 0 !important;
    z-index: 9999 !important;
    margin-top: 2px !important;
  }

  /* Voci sottomenu desktop */
  .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1A3F5C !important;
    padding: 10px 20px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    display: block !important;
    width: 100% !important;
  }

  .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
    background: #EAF6FA !important;
    color: #1E6FA0 !important;
  }
}

/* ============================================================
   TABLEPRESS — DESIGN MODERNO GLOBALE
   ============================================================ */

/* Contenitore tabella */
.tablepress-table-description,
div.tablepress-scroll-wrapper {
  overflow-x: auto !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  margin-bottom: 32px !important;
}

table.tablepress {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 14px !important;
  color: #1A3F5C !important;
  background: #ffffff !important;
}

/* ---- INTESTAZIONE (prima riga) ---- */
table.tablepress thead th,
table.tablepress .row-1 td {
  background: #1A3F5C !important;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 14px 18px !important;
  border: none !important;
  white-space: nowrap !important;
}

/* Prima cella header (colonna edizione) */
table.tablepress .row-1 td:first-child {
  border-radius: 12px 0 0 0 !important;
}
table.tablepress .row-1 td:last-child {
  border-radius: 0 12px 0 0 !important;
}

/* ---- RIGHE CORPO ---- */
table.tablepress tbody tr td,
table.tablepress tr:not(.row-1) td {
  padding: 13px 18px !important;
  border-bottom: 1px solid #e8f4f8 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  vertical-align: middle !important;
  line-height: 1.5 !important;
}

/* Righe alternate */
table.tablepress tr.even td,
table.tablepress tbody tr:nth-child(even) td {
  background: #f4fbfc !important;
}

table.tablepress tr.odd td,
table.tablepress tbody tr:nth-child(odd) td {
  background: #ffffff !important;
}

/* Hover riga */
table.tablepress tr:not(.row-1):hover td {
  background: #EAF6FA !important;
  transition: background 0.15s ease !important;
}

/* ---- TESTO IN GRASSETTO → TURCHESE ---- */
table.tablepress td strong,
table.tablepress td b {
  color: #2ABAAE !important;
  font-weight: 700 !important;
}

/* ---- PRIMA COLONNA (numeri edizione: I, II, III...) ---- */
table.tablepress td:first-child {
  font-family: 'Oswald', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #2ABAAE !important;
  letter-spacing: 0.04em !important;
  width: 60px !important;
  text-align: center !important;
}

/* ---- ULTIMA RIGA — bordo inferiore arrotondato ---- */
table.tablepress tr:last-child td:first-child {
  border-radius: 0 0 0 12px !important;
}
table.tablepress tr:last-child td:last-child {
  border-radius: 0 0 12px 0 !important;
}

/* ---- RIGA ANNO CORRENTE (ultima, evidenziata) ---- */
table.tablepress tr:last-child td {
  background: #EAF6FA !important;
  font-style: italic !important;
  color: #1E6FA0 !important;
  border-bottom: none !important;
}

table.tablepress tr:last-child td:first-child {
  color: #2ABAAE !important;
  font-style: normal !important;
}

/* ---- MOBILE ---- */
@media (max-width: 600px) {
  table.tablepress td,
  table.tablepress .row-1 td {
    font-size: 12px !important;
    padding: 10px 12px !important;
  }

  table.tablepress td:first-child {
    font-size: 13px !important;
    width: 44px !important;
  }
}
/* ============================================================
   TABELLE WORDPRESS (Blocco Gutenberg) — stesso design
   ============================================================ */

.wp-block-table {
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  margin-bottom: 32px !important;
}

.wp-block-table table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 14px !important;
  color: #1A3F5C !important;
  background: #ffffff !important;
}

/* Intestazione */
.wp-block-table thead th {
  background: #1A3F5C !important;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 14px 18px !important;
  border: none !important;
}

/* Celle corpo */
.wp-block-table tbody td {
  padding: 13px 18px !important;
  border: none !important;
  border-bottom: 1px solid #e8f4f8 !important;
  vertical-align: middle !important;
}

/* Righe alternate */
.wp-block-table tbody tr:nth-child(even) td {
  background: #f4fbfc !important;
}

.wp-block-table tbody tr:nth-child(odd) td {
  background: #ffffff !important;
}

/* Hover */
.wp-block-table tbody tr:hover td {
  background: #EAF6FA !important;
}

/* Grassetto → turchese */
.wp-block-table td strong,
.wp-block-table td b,
.wp-block-table th strong,
.wp-block-table th b {
  color: #2ABAAE !important;
  font-weight: 700 !important;
}

/* Footer tabella */
.wp-block-table tfoot td {
  background: #f4fbfc !important;
  font-style: italic !important;
  font-size: 12px !important;
  color: #1E6FA0 !important;
  border-top: 2px solid #2ABAAE !important;
  padding: 10px 18px !important;
  border-bottom: none !important;
}

/* Mobile */
@media (max-width: 600px) {
  .wp-block-table {
    overflow-x: auto !important;
    display: block !important;
  }

  .wp-block-table td,
  .wp-block-table th {
    font-size: 12px !important;
    padding: 10px 12px !important;
  }
}

/* ============================================================
   TABLEPRESS — 3 COLONNE UGUALI (Nome, Ruolo, Data nascita)
   ============================================================ */

table.tablepress {
  table-layout: fixed !important;
  width: 100% !important;
}

table.tablepress th,
table.tablepress td {
  width: 33.333% !important;
  text-align: left !important;
  vertical-align: middle !important;
}

/* ============================================================
   FOOTER — IMMAGINI PROPORZIONATE
   ============================================================ */

/* Tutte le immagini nel footer */
.wp-block-image img,
#colophon img,
.ast-footer-widget-area img,
.footer-widget-area img {
  max-height: 100px !important;
  width: auto !important;
  object-fit: contain !important;
	display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Mobile — leggermente più piccole */
@media (max-width: 768px) {
  .wp-block-image img,
  #colophon img,
  .ast-footer-widget-area img,
  .footer-widget-area img {
    max-height: 50px !important;
		
  }
}
@media (max-width: 781px) {
  .site-footer .wp-block-columns,
  #colophon .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .wp-block-image img {
    width: 100% !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
  }
}