/* ===== Language switcher ===== */
#block-olivero-customlanguageswitcher-2 {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  padding: 0 !important;
}

.lang-switcher a {
  padding: 4px 10px;
  border: 1px solid #003366;
  color: #003366;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
}

.lang-switcher a:hover {
  background: #003366;
  color: white;
}

/* Mostra solo lingua opposta */
.lang-switcher a {
  display: none;
}

html[lang="it"] .lang-en {
  display: inline-block;
}

html[lang^="en"] .lang-it {
  display: inline-block;
}

/* ===== Footer ===== */
.site-footer__inner,
.site-footer {
  background-color: #003366 !important;
}

/* ===== Header ===== */
.site-header__inner__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#block-ogs-theme-site-branding,
#block-ogs-theme-customlanguageswitcher-2 {
  display: flex;
  align-items: center;
}

#block-ogs-theme-customlanguageswitcher-2 {
  order: 1;
  margin-left: 10px;
}

#block-ogs-theme-site-branding {
  order: 0;
}

#header-nav {
  margin-left: auto;
}

.main-content__container {
  padding-top: 0 !important;
} 

/* Nasconde messaggio di revisione */
.node-imbarco-form [data-drupal-selector="edit-revision-log-message-0-value"],
.node-imbarco-form .field--name-revision-log-message,
.node-imbarco-form .form-item-revision-log-message-0-value {
  display: none !important;
}

/* ========================================================
   1. SFONDO GHIACCIO POLARE
   ======================================================== */
html, body {
  background-image: url('../images/bg-antartica.jpeg') !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-color: #0d1b2a !important;
}

/* ========================================================
   2. RESET GRIGLIE OLIVERO (RISOLVE LO SPOSTAMENTO A SINISTRA)
   ======================================================== */
#page-wrapper,
.page-wrapper,
.dialog-off-canvas-main-canvas,
.layout-main-wrapper,
.layout-container,
.layout-main,
.main-content,
.main-content__container,
main {
  background: transparent !important;
  display: block !important; /* Disattiva CSS Grid di Olivero */
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  grid-template-columns: none !important;
}

/* ========================================================
   3. SCHEDA CENTRALE UNICA CENTRATA
   ======================================================== */
.region--content,
#content {
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(4px);
  max-width: 1300px !important;
  width: 90% !important;
  margin: 2rem auto !important; /* Centra la scheda al centro dello schermo */
  padding: 2rem !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 35px rgba(0, 10, 25, 0.4) !important;
  box-sizing: border-box !important;
  display: block !important;
  float: none !important;
  grid-column: auto !important;
}

/* ========================================================
   4. IMMAGINE LAURA BASSI PERFETTAMENTE ADATTATA
   ======================================================== */
#block-ogs-theme-immaginelarabassi {
  position: static !important;
  transform: none !important;
  width: calc(100% + 4rem) !important;
  max-width: none !important;
  margin: -2rem -2rem 2rem -2rem !important;
  padding: 0 !important;
  display: block !important;
}

#block-ogs-theme-immaginelarabassi .block__content {
  margin: 0 !important;
  padding: 0 !important;
}

#block-ogs-theme-immaginelarabassi img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
}

/* ========================================================
   5. CONTENUTI INTERNI E TABELLA
   ======================================================== */
#block-ogs-theme-home,
.views-element-container,
.block-block-content,
table,
.views-table {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  grid-column: auto !important;
}
/* ========================================================
   FOOTER CON LOGHI E INFO
   ======================================================== */
.site-footer {
  background-color: #002244 !important; /* Blu scuro profondo */
  color: #ffffff !important;
  padding: 3rem 0 1.5rem 0 !important;
  margin-top: 4rem !important;
  border-top: 3px solid #0055a5;
}

.site-footer__inner {
  max-width: 1300px !important;
  width: 90% !important;
  margin: 0 auto !important;
  background-color: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
}

/* Griglia a colonne per Loghi e Info */
.footer-content-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 2rem !important;
  padding-bottom: 2rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Sezione Loghi */
.footer-logos {
  display: flex !important;
  align-items: center !important;
  gap: 2rem !important;
  flex-wrap: wrap !important;
}

.footer-logos img {
  max-height: 55px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1); /* Rende i loghi bianchi se necessario, rimuovi questa riga se preferisci i loghi a colori */
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-logos img:hover {
  opacity: 1;
}

/* Sezione Testo / Info */
.footer-info {
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  color: #d1e0f0 !important;
}

.footer-info h4 {
  color: #ffffff !important;
  margin: 0 0 0.5rem 0 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

.footer-info a {
  color: #64b5f6 !important;
  text-decoration: none !important;
}

.footer-info a:hover {
  text-decoration: underline !important;
}

/* Bottom copyright bar */
.footer-bottom {
  text-align: center !important;
  font-size: 0.8rem !important;
  color: #8ab4f8 !important;
}
/* ========================================================
   RESET COMPLETO E FORZATURA VISIBILITÀ FOOTER
   ======================================================== */
footer.site-footer,
.site-footer__inner,
.region--footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #002244 !important; /* Blu scuro PNRA/OGS */
  color: #ffffff !important;
  padding: 2rem 0 !important;
}

/* Forziamo la visibilità del blocco personalizzato */
.site-footer .block-block-content,
.site-footer .field--name-body,
.site-footer .footer-content-grid {
  display: flex !important;
  visibility: visible !important;
  color: #ffffff !important;
}

/* Griglia e testo */
.footer-content-grid {
  max-width: 1300px !important;
  width: 90% !important;
  margin: 0 auto !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
}

.footer-info, 
.footer-info p, 
.footer-info h4,
.footer-bottom,
.footer-bottom p {
  color: #ffffff !important; /* Forza il testo a essere BIANCO ben visibile */
  display: block !important;
}

.footer-info a {
  color: #64b5f6 !important;
}

.footer-logos {
  display: flex !important;
  gap: 1.5rem !important;
  align-items: center !important;
}

.footer-logos img {
  max-height: 50px !important;
  width: auto !important;
  display: inline-block !important;
}
/* ========================================================
   GESTIONE TABS AMMINISTRATIVI (Visualizza, Modifica, ecc.)
   ======================================================== */

/* Contenitore principale dei tab */
.tabs-wrapper,
[data-drupal-nav-primary-tabs] {
  max-width: 1300px !important;
  width: 90% !important;
  margin: 1.5rem auto -1rem auto !important; /* Lo aggancia subito sopra la scheda bianca */
  padding: 0 !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Lista dei tab */
ul.tabs,
ul.tabs--primary {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  padding: 0.5rem !important;
  margin: 0 !important;
  list-style: none !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(4px);
  border-radius: 8px 8px 0 0 !important;
  border-bottom: 2px solid #003366 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Singolo pulsante/tab */
.tabs__tab {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Link del tab */
.tabs__link,
a.tabs__link {
  display: inline-block !important;
  padding: 8px 16px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #003366 !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  background-color: #eef4f8 !important;
  transition: all 0.2s ease-in-out !important;
  border: 1px solid #d0e0f0 !important;
}

/* Hover sui pulsanti */
.tabs__link:hover {
  background-color: #003366 !important;
  color: #ffffff !important;
}

/* Tab Attivo (pagina corrente) */
.tabs__tab.is-active .tabs__link,
.tabs__link.is-active {
  background-color: #003366 !important;
  color: #ffffff !important;
  border-color: #003366 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

/* Nasconde l'icona a 3 pallini/hamburger se non necessaria */
.tabs__trigger {
  display: none !important;
}

/*
////////////////////////////////////////////////////
button homepage
////////////////////////////////////////////////////
*/

/* Estensione bottoni grandi per sotto-tema Olivero */
.button.button--large {
  font-size: 1.125rem; /* ~18px */
  padding: 0.875rem 2rem; /* Aumenta l'area cliccabile */
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-in-out;
  margin-top: 0.75rem;
}

/* Effetto al passaggio del mouse (Hover) */
.button.button--large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Personalizzazione stato Success (Visualizza dati) integrato con Olivero */
.button--success {
  background-color: #0d8a41;
  color: #ffffff;
  border: 2px solid #0d8a41;
}

.button--success:hover,
.button--success:focus {
  background-color: #08632e;
  color: #ffffff;
  border-color: #08632e;
}

/* Stile per il testo di avviso primo inserimento */
.cta-message {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text, #222326);
  margin-bottom: 1rem;
}
/* ==========================================================================
   1. HEADER BAR: Logo a sinistra, Lingua e Pulsante "Menu" a destra
   ========================================================================== */

.site-header__inner__container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important; /* Fa toccare il blu al bordo sinistro */
}

/* Blocco Logo esteso */
#block-ogs-theme-site-branding {
  background-color: #005fec; /* Colore blu dell'header */
  padding: 15px 30px !important;
  min-width: 320px;
  flex-shrink: 0 !important;
}

.site-branding__inner {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

/* Spinge Selettore Lingua e Pulsante Menu a destra */
#block-ogs-theme-customlanguageswitcher-2 {
  margin-left: auto !important;
  margin-right: 15px !important;
  width: 0% !important;
}
/* ==========================================================================
   FORM RESPONSIVE & LAYOUT FIX (Node Add / Edit)
   ========================================================================== */

/* 1. Reset Box-Sizing e limiti per evitare l'uscita dei campi dai bordi */
.node-form,
.node-form *,
.node-form *::before,
.node-form *::after {
  box-sizing: border-box !important;
}

.node-form {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* Garantisce che nessun input/select superi la larghezza della sua colonna */
.node-form .form-element,
.node-form input[type="text"],
.node-form input[type="email"],
.node-form input[type="tel"],
.node-form select,
.node-form textarea,
.node-form .form-item {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important; /* Impedisce l'overflow dentro le griglie CSS */
}

/* Previene lo sbordamento dei riquadri fieldset */
.node-form fieldset {
  width: 100% !important;
  max-width: 100% !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
  overflow: hidden;
}

.node-form .form-item {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 2. MOBILE (sotto i 768px): 1 sola colonna verticale ordinata */
.node-form fieldset .fieldset__wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* 3. DESKTOP / TABLET (da 768px in su): 2 colonne bilanciate */
@media (min-width: 768px) {
  .node-form fieldset .fieldset__wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* minmax(0,1fr) blocca la fuoriuscita */
    gap: 16px 24px !important;
    align-items: start;
  }

  /* Elementi a larghezza intera che devono occupare entrambe le colonne */
  .node-form .field--type-string-long,
  .node-form .field--type-text-long,
  .node-form .field--type-boolean,
  .node-form [id*="edit-field-leg"],
  .node-form .form-type--checkbox {
    grid-column: span 2 !important;
  }
}


