/* ==========================================================================
   STILE CONTEMPORANEO: NERO E ROSSO GENOVA
   ========================================================================== */

body {
  padding-top: 70px;
  background-color: #f8f9fa;
  /* Grigio leggerissimo per far risaltare i riquadri bianchi */
  color: #333;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- NAVBAR ELEGANTE SCURA --- */
.navbar-default {
  background-color: #1a1a1a;
  /* Nero/Grigio molto scuro */
  border-color: transparent;
  border-bottom: 3px solid #ce1126;
  /* Accento Rosso Genova */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-default .navbar-brand {
  color: #fff;
}

.navbar-default .navbar-nav>li>a {
  color: #ddd;
  transition: color 0.3s ease;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>li.active>a,
.navbar-default .navbar-nav>.active>a:hover {
  color: #ce1126;
  background-color: transparent;
}

/* Modifica tendina Dropdown */
.dropdown-menu {
  border-top: 2px solid #ce1126;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-menu>li>a:hover {
  background-color: #fdf2f2;
  color: #ce1126;
}

/* --- TITOLI CON SFUMATURA ROSSO-NERA --- */
h3 {
  font-weight: bold;
  color: #1a1a1a;
  position: relative;
  padding-bottom: 12px;
  margin-top: 0;
}

h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ce1126, #1a1a1a);
  /* Sfumatura elegante */
  border-radius: 3px;
}

/* --- BOX WEBCAM E MAPPA (EFFETTO CARD) --- */
.webcam-box,
.conth {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid #eaeaea;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.webcam-box:hover,
.conth:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  /* Leggero effetto sollevamento al passaggio del mouse */
}

.img_full_width {
  width: 100%;
  height: auto;
  display: block;
}

.conth {
  width: 100%;
  padding: 0;
  margin-bottom: 15px;
}

.conth .outer {
  width: 100%;
  padding-top: 81.81%;
  /* definisce l'aspect ratio */
  position: relative;
}

.conth .outer .inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* --- DESCRIZIONE SEO --- */
.seo-descr {
  background-color: #fff;
  font-style: italic;
  color: #555;
  line-height: 1.5;
  border: none;
  border-left: 4px solid #ce1126;
  /* Riga rossa a sinistra invece della blu di default */
  border-radius: 0 4px 4px 0;
  padding: 15px;
  margin: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* --- UTILITIES E CAROSELLO --- */
.mb15 {
  margin-bottom: 15px;
}

iframe {
  overflow: hidden;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.carousel-control {
  opacity: 0;
}

.carousel-control.left,
.carousel-control.right {
  background: none;
}

.carousel-indicators {
  display: none;
  bottom: 36px;
  left: 40%;
  width: 80%;
}

/* c-fade - begin */
.carousel.c-fade .item {
  -webkit-transition: opacity 1s ease-in-out;
  transition: opacity 1s ease-in-out;
}

.carousel.c-fade .active.left,
.carousel.c-fade .active.right {
  left: 0;
  z-index: 2;
  opacity: 0;
}

.carousel.c-fade .next,
.carousel.c-fade .prev {
  left: 0;
  z-index: 1;
}

.carousel.c-fade .carousel-control {
  z-index: 3;
}

/* c-fade - end */

#whole_content {
  position: relative;
  left: 0;
  top: 0;
}

/* --- TASTI CONDIVISIONE --- */
.share_link {
  border-radius: 20px;
  /* Più moderni, a pillola */
  color: white;
  font-size: 12px;
  font-weight: bold;
  margin-right: 5px;
  padding: 6px 14px;
  transition: opacity 0.3s;
}

a.share_link:hover,
a.share_link:active,
a.share_link:visited {
  color: white;
  text-decoration: none;
  opacity: 0.8;
}

.share_fb {
  background: #3b5998;
}

.share_tw {
  background: #1da1f2;
}

.share_gp {
  background: #db4437;
}

/* Rendiamo tutto fluido per i dispositivi mobili */
@media (max-width: 767px) {
  .col-sm-6 {
    width: 100% !important;
    float: none;
  }

  #map {
    height: 300px !important;
    margin-top: 15px;
  }

  .navbar-brand {
    font-size: 14px;
  }
}

/* --- PULSANTI CONDIVISIONE MODERNI --- */
.modern-share-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  color: #1a1a1a;
  border: 1px solid #ddd;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-share:hover {
  border-color: #ce1126;
  /* Rosso Genova al passaggio del mouse */
  color: #ce1126;
  box-shadow: 0 4px 8px rgba(206, 17, 38, 0.15);
  transform: translateY(-1px);
}

.btn-share svg {
  transition: stroke 0.2s ease;
}

/* --- BARRA ETICHETTA WEBCAM --- */
.webcam-label-bar {
  background: #1a1a1a;
  /* Nero come la navbar */
  color: #ffffff;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 3px solid #ce1126;
  /* Il nostro rosso */
  border-radius: 0 0 8px 8px;
  /* Arrotonda solo gli angoli bassi */
  margin-top: -5px;
  /* La "attacca" visivamente all'immagine sopra */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- ANIMAZIONE CONTEMPORANEA --- */
.text-focus-in {
  animation: text-focus-in 0.6s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes text-focus-in {
  0% {
    filter: blur(8px);
    opacity: 0;
    transform: translateY(3px);
  }

  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   WIDGETS AREA (ARPAL & METEO) - UNIFIED STYLE
   ========================================================================== */

.widgets-sidebar {
  display: flex;
  flex-direction: row;
  /* Li mette affiancati */
  justify-content: flex-end;
  /* Li spinge a destra */
  gap: 10px;
  margin-bottom: 20px;
}

/* Base comune per entrambi i widget */
.genova-widget {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  width: 180px;
  /* Larghezza fissa per simmetria */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  /* Testo interno a sinistra */
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f5f5f5;
  margin-bottom: 8px;
  color: #1a1a1a;
  text-transform: uppercase;
}

.widget-footer {
  font-size: 8px;
  color: #bbb;
  text-transform: uppercase;
  text-align: right;
  margin-top: 8px;
}

/* Specifiche ARPAL (Colori Allerta) */
.arpal-monitor.allerta-verde {
  border-left: 4px solid #2ecc71;
}

.arpal-monitor.allerta-gialla {
  border-left: 4px solid #f1c40f;
}

.arpal-monitor.allerta-arancione {
  border-left: 4px solid #e67e22;
}

.arpal-monitor.allerta-rossa {
  border-left: 4px solid #ce1126;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.allerta-verde .dot {
  background-color: #2ecc71;
}

.allerta-gialla .dot {
  background-color: #f1c40f;
  animation: pulse 2s infinite;
}

.allerta-arancione .dot {
  background-color: #e67e22;
  animation: pulse 1s infinite;
}

.allerta-rossa .dot {
  background-color: #ce1126;
  animation: pulse 0.5s infinite;
}

.data-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 3px;
}

.data-row .label {
  color: #888;
  font-weight: bold;
}

.data-row .status-ok {
  color: #2ecc71;
  font-weight: bold;
}

/* Specifiche METEO */
.weather-monitor {
  border-left: 4px solid #1a1a1a;
}

.widget-content.main-data {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.temp-big {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
}

.wind-small {
  font-size: 10px;
  color: #666;
  text-align: right;
}

.wind-small span {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  color: #999;
}

/* --- ANIMAZIONE PULSE --- */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 767px) {
  .widgets-sidebar {
    justify-content: center;
    flex-wrap: wrap;
    /* Se non ci stanno, vanno a capo */
  }

  .genova-widget {
    width: 47%;
    /* Due affiancati quasi al 50% su mobile */
    min-width: 150px;
  }
}