/* CSS Document */

:root {
  --primary: #1b3c65;
  --accent: #7bcdf0;
  --dark: #333;
  --light: #ececec;
  --white: #fff;
}

body {
  /*font-family: 'Source Sans Pro', Arial, sans-serif;*/
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background-color: var(--white);
  margin-top: 56px; /* spazio per navbar fissa */
}

a {
  color: #1b3c65;
  text-decoration: underline;
}
a:hover {
  color: #7bcdf0;
}
.bg-primary { background-color: var(--primary) !important; }

.navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  background-image: url(../img/onda-top.png);
  background-repeat: no-repeat;
  background-position: center bottom;
}

.navbar-logo {
  height: 60px; /* aumenta/diminuisci per navbar più alta o più bassa così si vede l'ondina */
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-oroblu{
	text-transform: uppercase;
	font-size: 14px;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
    background-color: #1b3c65 !important;
    color: #ffffff !important;
}

/* ===== DROPDOWN SUBMENU DUE LIVELLI ===== */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 2px;
  border-radius: 6px;
  display: none;
}

.dropdown-submenu.open > .dropdown-menu {
  display: block;
}

/* freccia verso destra per le voci con sottomenu */
.dropdown-submenu > a.dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.5em;
  vertical-align: middle;
  border-top: 0.3em solid transparent;
  border-bottom: 0.3em solid transparent;
  border-left: 0.3em solid currentColor;
  border-right: none;
  content: "";
}

/* su mobile il sottomenu si apre sotto, non a destra */
@media (max-width: 991px) {
  .dropdown-submenu > .dropdown-menu {
    left: 0;
    top: 100%;
    margin-left: 1rem;
  }
}
/* ===== FINE DROPDOWN SUBMENU DUE LIVELLI ===== */


/* ===== Banner fullwidth sotto la navbar ===== */
.banner-img {
  margin-top: 56px; /* altezza navbar fissa per logo */
  overflow: hidden;
}

.banner-photo {
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.banner-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(27, 60, 101, 0.65); /* overlay blu trasparente */
  padding: 1rem 2rem;
  border-radius: 8px;
  max-width: 90%;
}

.banner-caption h2 {
  font-size: 1.75rem;
  color: #fff;
}

.banner-caption p {
  color: #7bcdf0;
  font-size: 1rem;
}
.btn-accent {
  background-color: var(--accent);
  color: var(--primary);
  border: none;
}
.btn-accent:hover { background-color: var(--primary); color: var(--white); }

.hero {
  height: 40vh;
}
.hero p{
font-size: 1rem !important;
}

footer {
  background-color: var(--primary);
}
/* ===== Footer ===== */
.site-footer {
  background-color: #1b3c65; /* blu profondo */
  background-image: url(../img/onda-bottom.png);
  background-repeat: no-repeat;
  background-position: center bottom;
  color: #fff;
}

.site-footer a.footer-link {
  color: #7bcdf0; /* accento azzurro */
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a.footer-link:hover {
  color: #fff; /* effetto hover chiaro */
  text-decoration: underline;
}
/* ===== Carousel Oro Blu ===== */
.carousel-section {
  position: relative;
  overflow: hidden;
}

.carousel-photo {
  height: 500px;
  object-fit: cover;
  object-position: center;
}

.caption-bg {
  background: rgba(27, 60, 101, 0.65); /* blu profondo trasparente */
  padding: 1rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.carousel-caption h5 {
  color: #fff;
  font-weight: 600;
}

.carousel-caption p {
  color: #7bcdf0;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* Indicatori */
.carousel-indicators [data-bs-target] {
  background-color: #7bcdf0;
}
.carousel-indicators .active {
  background-color: #fff;
}

/* ===== Modale press kit, listato link ===== */
.press-list a {
  color: #1b3c65;
  text-decoration: none;
  font-size: .95rem;
}

.press-list a:hover {
  color: #7bcdf0;
  text-decoration: underline;
}

/*============================================ PAGINA INTERNA ===================*/

/* ===== HERO SMALL ===== */
.hero-small {
  height: 250px;
  position: relative;
  overflow: hidden;
}

.hero-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
	rgba(0,0,0,0.70),
	rgba(27,60,101,0.50)
  );
}

/* ===== TITOLI INTERNI ===== */
h1 { color: #1b3c65; font-weight: 700; }
h2 { color: #7bcdf0; font-weight: 600; margin-top: 2rem; }

/* ===== SIDEBAR ===== */
.sidebar .card {colore:#CCC; border-radius: 8px; border: none; }
.sidebar h5 { color: #1b3c65; font-weight: 700; }
 
.sidebar .card-body a {
    color: #7bcdf0 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sidebar .card-body a:hover {
    color: #1b3c65 !important;
    text-decoration: none;
}

/* ===== BREADCRUMB ===== */
.slash-divider {
  margin: 0 6px;
  color: #1b3c65;
  opacity: 0.6;
}

/* ===== GALLERY LAUNCHER ===== */
.gallery-launcher {
  position: relative;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
}

.gallery-launcher img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.gallery-launcher:hover::after {
  content: "Apri galleria";
  position: absolute;
  inset: 0;
  background: rgba(27,60,101,0.55);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== ACCORDION ===== */
.accordion-body {
  max-height: 100px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease-in-out;
}

.accordion-body::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 40px;
  width: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
}

.accordion-collapse.show .accordion-body {
  max-height: 1200px;
}

.accordion-collapse.show .accordion-body::after {
  display: none;
}

/* ===== FIX: Header dell'accordion sempre BIANCO ===== */

.accordion-button {
  background-color: #ffffff !important;
  color: #1b3c65 !important;
  font-weight: 600;
  border-radius: 6px;
}

.accordion-button:not(.collapsed) {
  background-color: #ffffff !important;
  color: #1b3c65 !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  background-color: #ffffff !important;
  color: #1b3c65 !important;
  box-shadow: none !important;
}
/* ===== Box sidebar fondini =============*/
.card-body.aggiornamenti{
  background-image: url(../img/onda-sidebar1.png);
  background-position: left bottom;
  background-repeat: no-repeat;
}
.card-body.correlati{
  background-image: url(../img/onda-sidebar2.png);
  background-position: right bottom;
  background-repeat: no-repeat;
 }

.sdg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.sdg-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.sdg-item:hover img {
  opacity: 0.85;
}

/* ============================================
   STILE UNIFORMANTE PER CONTENUTI DA CKEDITOR
   ============================================ */

.richtext {
  color: #333;
  font-size: 1rem;
  line-height: 1.65;
}

.richtext h1, 
.richtext h2, 
.richtext h3 {
  font-family: 'Inter', sans-serif;
  color: #1b3c65 !important;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.richtext h2 {
  color: #7bcdf0 !important;
}

.richtext p {
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: justify;
}

.richtext ul, 
.richtext ol {
  margin-left: 1.2rem;
  margin-bottom: 1rem;
}

.richtext a {
  color: #1b3c65;
  text-decoration: underline;
}
.richtext a:hover {
  color: #7bcdf0;
}
/*
.richtext img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
*/
/* ============================
   CONTENUTI CKEDITOR – IMMAGINI
   ============================ */
.richtext img {
    max-width: 90%;         /* riduce drasticamente la dimensione */
    height: auto;
    display: block;
    margin: 0.9rem auto;     /* centra l'immagine */
    border-radius: 10px;    /* opzionale: rende le immagini più pulite */
}

/* Su schermi piccoli torna al 100% per evitare problemi */
@media (max-width: 576px) {
    .richtext img {
        max-width: 100%;
    }
}
.richtext figure {
    margin: 1.5rem 0;
    text-align: center;            /* centra solo la didascalia */
}

.richtext figcaption {
    font-size: 0.7rem;
    color: #555;                   /* grigio elegante */
    font-style: italic;
    /*margin-top: 0.5rem;*/
    line-height: 1.4;
    /*padding: 0.25rem 0.5rem;*/
}

/* Variante decorativa: una linea sottile sopra */
.richtext figcaption::before {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background-color: #7bcdf0;     /* colore Oro Blu */
    margin: 0.5rem auto 0.4rem;    /* linea centrata */
    opacity: 0.6;
}

/*============================================ PAGINA LISTA ===================*/

/* box sia per home che per lista */
.event-card img {
  height: 220px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}
.event-title {
  color: #1b3c65;
  font-weight: 700;
  font-size: 1.15rem;
}
.event-date {
  font-size: 0.9rem;
  color: #7bcdf0;
  font-weight: 600;
}
/* ===== PAGINAZIONE ORO BLU ===== */
.pagination .page-link {
  color: #1b3c65;
  border: 1px solid #1b3c65;
  font-weight: 600;
}
.pagination .page-link:hover {
  background-color: #7bcdf0;
  color: #1b3c65;
  border-color: #7bcdf0;
}
.pagination .active .page-link {
  background-color: #1b3c65 !important;
  border-color: #1b3c65 !important;
  color: #ffffff !important;
}
.pagination .disabled .page-link {
  background-color: #e9ecef;
  color: #aaaaaa;
  border-color: #dee2e6;
}

/* Struttura minima per evitare footer flottante */
main, section.page-wrapper {
    min-height: calc(100vh - 150px); /* navbar + footer */
    display: block;
}
