:root {
  --progress-width: {{ corso_attivo.course_progress }}%;
}

body {
  background-color: #f9fafb;
}

html,
body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#logo-insureteach-registrazione {
  width: 20%;
}

.card-img-top-reg {
  width: 200px;
  height: 200px;
  text-align: center;
}

.img-header {
  width: 500px;
}


#carouselIndicators {
  width: 50%;
}

#progressSezione1 {
  width: 0%;
}

.survey-indicator {
  font-size:24px;
}

.survey-indicator:hover {
  cursor:pointer;
}

.evento-titolo {
  background-color: #e0e0e0; /* Grigio chiaro */
  border-radius: 5px; /* Bordi arrotondati */
  padding: 20px; /* Padding per un po' di spazio intorno al testo */
  margin: 15px; /* Margini per distanziare dal contenuto vicino */
}

#sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  width: 70px;
  height: 100vh;
  background-color: white;
  border-right: 1px solid #7777774b;
  transition: all ease-in-out 0.3s;
  z-index: 200;
  font-size: .9em;
}
/* 
.user-initial-icon {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1d2024;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  font-size: .6em;
} */


#custom-scroll-insurelab {
  width: calc(100vw - 70px);
  padding-bottom: 80px;
  gap: 10px;
  margin-left: 50px;
}

#navbar-insurelab {
  width: 100%;
  height: 65px;
  border-bottom: 1px solid #faddde;
  position: fixed;
  top: 0;
  z-index: 1000;
  background-color: #fff;
}

.nav-icon {
  color: #3c3c3bab;
  font-size: 1.4em;
}

.nav-icon-descript {
  font-size: 0.8em;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transform: translateX(-10px);
  white-space: nowrap;
  transition: opacity 0.2s ease-in-out 0.1s, width 0.3s ease-in-out;
  margin-left: 0;
}

#sidebar:hover .nav-icon-descript {
  opacity: 1;
  width: auto;
  margin-left: 10px;
}

#sidebar .nav-icon-descript:hover {
  color: rgba(0, 0, 0, 0.795);
}

#sidebar:hover {
  width: 200px;
}

#icona-utente-insurelab {
  font-size: 1.8rem;
}

#icona-utente-insurelab:hover {
  cursor: pointer;
}

#jumbo-insurelab {
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

#home-link-insurelab {
  border: none;
}

#logo-rp-insurelab {
  width: 70px;
  height: 70px;
  background-image: url("/static/images/IT_marchio.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}

#powered-logo-insurelab {
  width: 32%;
}

.progress-insurelab {
  height: 10px;
}

.progress-bar-insurelab {
  background-color: #3c3c3b !important;
  width: var(--progress-width);
  transition: width 1s ease-in-out;
}

.continua-lezione-btn {
  position: relative;
  overflow: hidden;
  padding: 12px 20px;
  font-size: 16px;
  height: 50px;
  border: none;
  background-color: #212529; /* Colore del pulsante */
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all ease-in 0.2s;
}


.truncate-multiline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.truncate-multiline-comingsoon {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coming-soon {
  background-color: #d6d9df;
  border: none;
  transition: all ease-in 0.2s;
  font-size: 0.9em;
}

.coming-soon:hover {
  scale: 1.02;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.295);
}

.badge-news {
  background-color: #fff5f2;
}

#news-main-container {
  margin-top: 80px;
}

.card-news {
  transition: all ease-in 0.2s;
  height: 100%;
  margin-bottom: 20px;
  width: 20rem;
}

.news-info-card .row {
  padding: 20px;
}

.card-news-link {
  text-decoration: none;
  color: black;
}

.card-news .card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.card-news h5 {
  min-height: 50px;
  display: flex;
  align-items: center;
}

.card-news:hover {
  scale: 1.02;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.295);
  cursor: pointer;
}


.sidebar-nav {
  display:none !important;
}

#coassemble-course-div {
  position: absolute;
  left: 70px; /* Larghezza della sidebar */
  top: 0;
  width: calc(100vw - 70px); /* Larghezza totale meno la sidebar */
  height: 100vh; /* Altezza intera della viewport */
  display: flex;
  justify-content: center;
  align-items: center;
}

#coassemble-iframe {
  width: 100%;
  height: 100%;
  border: none;  
  margin: -20px;
}

#insurelab-login {
  background-color: black;
}


#left-login {
  overflow: hidden;
  border-radius: 0 2% 2% 0;
}

.input-login-insurelab {
  border: none !important;   /* Rimuove tutti i bordi */
  border-bottom: 1px solid #0000006b !important;  /* Aggiunge solo il bordo inferiore */
  background-color: transparent !important; /* Rende lo sfondo trasparente */
  border-radius: 0 !important; /* Rimuove gli angoli arrotondati */
  box-shadow: none !important; /* Rimuove eventuali ombre */
  padding: 5px 10px; /* Aggiusta il padding */
  outline: none !important; /* Rimuove il bordo blu di focus */
}

/* Quando l'input è attivo (cliccato) */
.input-login-insurelab:focus {
  box-shadow: none !important; /* Evita l'ombra di Bootstrap */
}

#login-insurelab-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.primo-piano-new  {
  max-height: 550px;
}

.primo-piano-new img {
  height: 60%;
}






@keyframes fadeIn {
  from {
    opacity: 0;
  } to {
    opacity: 1;
  }
}

@keyframes width {
  from {
    width: 0%;
  } to {
    width: 100%;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  } to {
    transform: translateY(0%);
  }
}

#login-main-container {
  animation: fadeIn 2s forwards;
}

#insurelab-title-login  {
  font-size: 3em;
  transition: width 2s, height 4s;
  animation: fadeIn 4.2s forwards; 
  animation: fadeIn 4s;
}

#right-login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0; 
  animation: fadeIn 1s ease-in-out forwards;
  animation-delay: 2s;
}

.custom-dropdown-insurelab {
  position: absolute;
  bottom: 60px; /* Posiziona sopra l'icona */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  border-radius: 5px;
  list-style-type: none;
  padding: 8px 0;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.custom-dropdown-insurelab.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.custom-dropdown-insurelab li {
  padding: 2px 6px;
}

.custom-dropdown-insurelab a {
  display: block;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.877);
}

.custom-dropdown-insurelab a:hover {
  background: #f8f9fa;
}

#dropdownUser {
  margin-bottom: 15px;
}

#jumbo-news {
  position: relative;
  width: 100%;
  max-height: 500px;
}

#jumbo-news img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.7); 
}

#jumbo-news-details-container {
  position: absolute;
  bottom: -40px;  
  left: 50%;
  transform: translateX(-50%);
  max-width: 70%;
  text-align: center;
  padding: 15px;
}

#jumbo-news-details-container h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: start;
  font-weight: bold;
  max-width: 60%;
}

#jumbo-news-details {
  border: 1px solid rgba(48, 47, 47, 0.11);
  width: 100%;
}

#news-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 60px;
  text-align: justify;
  max-width: 70%;
}

#news-body h4 {
  margin-top: 30px;
}

#img-author-details {
  width: 13%;
  font-size: 1.5em;
}

#img-author {
  width: 100%;
}

.email-form-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.custom-header {
  background-color: #f8f9fa;
  color: white;
}

.card-header-style {
  background-color:#1c1f23;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border:gray;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px; /* Regola in base all'altezza dell'header */
}

.span-title-style {
  font-family: 'Kalam';
  font-size: 24px;
  color: white;
}

.img-header-style {
  width: 50px;
}

.button-background {
  background-color: #1c1f23;
  border: none;
}

.button-background:hover {
  background-color: #1c1f23ce;
}

.logo-login {
  width: 70px;
  height: 70px;
  background-image: url("/static/images/logo-insureteach-negativo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}



/* CATNAT */
.catnat-main-container {
  background-color: #e32c2cd8; 
  width: 100%;
  min-height: 100vh;
  padding: 20px;
}

.catnat-main-container > *:first-child {
  background-color: #ebebeb;
}

#start-section-catnat {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#progress-bar-catnat {
  width: 0%;
}

#start-section-abitazione {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#progress-bar-abitazione {
  width: 0%;
}

.carousel-inner {
  min-height: 500px; /* Altezza minima per evitare salti */
}

.carousel-item {
  display: none; /* Nasconde tutti gli elementi */
}

.carousel-item.active {
  display: block; /* Mostra solo l'elemento attivo */
}

#progress-bar-abitazione {
  opacity: 0;
  transition: opacity 0.3s ease-in-out; /* Animazione per evitare un salto visibile */
  transition: width 0.5s ease-in-out;
}

/* Aggiunge un asterisco rosso */
label[data-required="true"]::after {
  content: " *";
  color: red;
  margin-left: 3px;
}

/* Stile per i campi con errore */
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}


.checkmark-circle-reg {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2fb14dd0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -50px;
}

.checkmark-reg {
  font-size: 40px;
  color: white;
  font-weight: bold;
  padding: 10px;
  margin: 10px;
}

.container-reg-confermata {
  max-width: 500px;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
}

#mobile-logo-catnat {
  display: none;
}

#msgUbicazioni {
  display: none;
}

.primo-piano-img-container {
  display: block;
}

.riepilogo-insurelab {
  max-width: 850px;
  padding: 50px 60px;
  border-radius: 15px;
  background-color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.course-card {
  padding: 20px;
}

.course-card > *:first-child {
  gap: 20px;
}

.expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1c1f23;
  color: #fff;
  border: none;
  border-radius: 999px;
  height: 48px;
  width: 48px;
  transition: width 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  position: relative;
  padding: 0;
}

/* ICONA freccia: visibile sempre, centrata */
.expand-btn i.icon-white {
  font-size: 1.2rem;
  color: #fff;
  z-index: 2;
  transition: transform 0.3s ease;
}

/* LABEL nascosta completamente finché non c'è hover */
.expand-btn .btn-label {
  position: absolute;
  left: 56px;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease 0.1s;
}

/* Espansione fluida su hover */
.expand-btn:hover {
  width: 200px;
  padding-left: 20px;
  padding-right: 20px;
  justify-content: flex-start;
}

/* Mostra il testo con delay */
.expand-btn:hover .btn-label {
  opacity: 1;
  position: static;
  margin-left: 8px;
  pointer-events: auto;
}

.expand-btn:hover i.icon-white {
  transform: translateX(4px);
}

.descrizione-corso {
  max-height: 220px;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
}



#all-certificates-container .certificate-link {
  display: flex;
  justify-content: start;
}

.primo-piano-card {
  display: flex;
  flex-direction: row;
}

#primo-piano-body {
  gap: 25px;
}


/* set per schermi molto piccoli */
@media (min-width: 310px) and (max-width: 424px) {
  #all-certificates-container h5 {
    font-size: 1.2em;
  }

  #all-certificates-container p {
    font-size: .9em;
  }

  .news-author {
    font-size: .8em;
  }
}

@media (max-width: 424px) {
  #jumbo-news-details-container {
    max-width: 100% !important; 
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin-top: 50px;
  }

  #jumbo-news-details-container h1 {
    margin-bottom: 5px;
  }

  .news-info-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}



@media (min-width: 425px) and (max-width: 767px) {
  #right-login > *:first-child {
    max-width: 80%; 
  }

  .news-info-card {
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  #sidebar {
    display: none; 
  }

  #powered-logo-insurelab {
    object-fit: contain;
    width: 200px;
  }

  .primo-piano-card {
    display: flex;
    flex-direction: column;
  }

  .primo-piano-book {
    order: -1;
  }

  .primo-piano-img-container {
    order: 0; /* va sopra */
    width: 100%;
  }

  .primo-piano-img-container img {
    max-height: 250px;
    object-fit: cover;
  }
  
  #primo-piano-body {
    order: 1;
    width: 100%;
    gap: 12px;
  }

  #primo-piano-body h5 {
    font-size: 1.1em;
  }

  #coassemble-course-div {
    position: absolute;
    top: 60px; /* Altezza della sidebar */
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px); /* Altezza dello schermo meno la sidebar */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  #coassemble-iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow-x: auto;
    white-space: nowrap;
  }

  .course-card {
    padding: 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    min-height: auto
  }

  .course-card h5 {
      font-size: 1rem; /* Riduce la dimensione del titolo per evitare righe eccessive */
  }

  .course-card small {
      font-size: 0.85rem; 
  }

  .course-card p {
    display: none;
  }

  .course-card > *:first-child {
    padding: 5px;
    gap: 10px;
  }

  .progress-insurelab {
    height: 8px !important; /* Riduce l'altezza della progress bar */
    margin-bottom: 8px !important;
  }

  .coming-soon h5 {
    font-size: 1rem;
  }


  #all-certificates-container {
    margin-top: 50px;
  } 

  #all-certificates-container .certificate-link {
    justify-content: center;
  }
  

  #mobile-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: white;
    border-bottom: 1px solid #ccc;
    padding: 0 15px;
    z-index: 1000;
  }

  .primo-piano-img-container {
    display: none;
  }

  #burger-menu {
    font-size: 1.5em;
    cursor: pointer;
  }

  #logo-rp-insurelab {
    height: 40px;
  }

  #jumbo-insurelab {
    margin-top: 100px;
    margin-bottom: 0;
  }

  #corsi-container {
    margin-bottom: 100px;
  }

  #all-courses-container {
    margin-top: 40px;
  }

  #jumbo-news-details-container {
    width: 70%;
    margin-top: 100px;
    bottom: -60px;  
    max-width: 90%;
  }

  #jumbo-news {
    height: 700px;
  }

  #jumbo-news img {
    height: 100%;
  }

  .news-info-card {
    font-size: .9em;
    width: 70%;
  }

  .news-info-card .row {
    padding: 8px;
  }


  #jumbo-news-details-container h1 {
    max-width: 100%;
    font-size: 1.5em;
  }

  .continua-lezione-btn {
    padding: 8px 12px !important; /* Rende il bottone più compatto */
    font-size: 0.9rem !important;
  } 

  .continua-lezione-btn .btn-text {
    display: none;
  }

  #news-body {
    max-width: 75%;
  }

  .card-news h5 {
      font-size: 1rem !important;
      line-height: 1.2;
  }

  .card-news small {
      font-size: 0.85rem !important;
  }

  .card-news img {
      max-height: 180px !important;
      object-fit: cover; /* Assicura che l'immagine si adatti bene */
  }

  .badge-news, .calendario-news {
      font-size: 0.75rem !important;
  }

  .card-news-link {
      padding-bottom: 5px !important;
  }

  #login-main-container {
    min-height: 100vh;
    gap: 80px;
  }

  #left-login {
    border-radius: 0 0 2% 2%;
    animation: slideDown 1.3s forwards;
    max-height: 280px;
    font-size: 75%;
    transform: translateY(-100%);
  }

  #right-login {
    justify-content: start;
    flex-grow: 1;
  }

  #login-footer {
    margin-top: 70px;
    padding: 10px;
  }

  #mobile-logo-catnat {
    display: block;
  }

  .catnat-main-container h2 {
    font-size: 1.2em;
  }

  .catnat-main-container  {
    background-image: none;
    padding: 20px;
  }

  #custom-scroll-insurelab {
    margin: 0;
    width: 100%;
  } 

  .learner-main  {
    padding: 30px;
  }
}


@media (min-width: 768px) and (max-width: 1024px) {

    #jumbo-news-details-container {
      max-width: 80%;
      width: 100%;
    }

    #jumbo-news-details-container h1 {
      max-width: 80%;
      width: 100%;
      font-size: 1.7em;
    }

    #mobile-logo-catnat {
      display: block;
    }

    #all-certificates-container {
      margin-left: 30px;
    }

    .continua-lezione-btn .btn-text,
    .continua-lezione-btn .arrow {
      display: inline-block;
      vertical-align: middle;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .continua-lezione-btn .arrow {
      position: absolute;
      left: -50px; 
      font-size: 28px; 
      opacity: 0;
      transition: transform 0.2s ease-out, opacity 0.4s ease-out, left 0.3s ease-out;
      color: #fff;
      margin-top: 2px;
      margin-left: 4px;
    }

    .continua-lezione-btn:hover .btn-text {
      opacity: 0;
      transform: translateX(20px);
      scale: 1.02;
      box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.295);
    }

    .continua-lezione-btn:hover .arrow {
      opacity: 1;
      left: 50%;
      transform: translateX(0);
    }

    #all-courses-container {
      margin-left: 25px;
    }

    #left-login {
      width: 65%;
    }

    #right-login {
      width: 35%;
    }

  }


@media (min-width: 1024px) and (max-width: 3840px) {

  #jumbo-news-details-container,
  #jumbo-news-details-container h1{
    max-width: 100%;
  }

  #right-login > *:first-child {
      max-width: 60%; 
  }

  #left-login {
    animation: width 2s forwards;
  }

  .catnat-main-container {
    background-image: url('/static/images/ICON_WHITE_RP_SEVERAL.svg');
    background-repeat: no-repeat;
    background-position: top 0 left 0;
    background-size: 150px auto; /* Regola la dimensione del logo */
    padding: 40px;
  }

  .catnat-main-container > *:first-child {
    width: 80%;
  }

  #all-certificates-container {
    margin-left: 20px;
  }

  .continua-lezione-btn .btn-text,
  .continua-lezione-btn .arrow {
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .continua-lezione-btn .arrow {
    position: absolute;
    left: -50px; 
    font-size: 28px; 
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.4s ease-out, left 0.3s ease-out;
    color: #fff;
  }

  .continua-lezione-btn:hover .btn-text {
    opacity: 0;
    transform: translateX(20px);
    scale: 1.02;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.295);
  }

  .continua-lezione-btn:hover .arrow {
    opacity: 1;
    left: 50%;
    transform: translateX(0);
  }

  #all-courses-container {
    margin-left: 35px;
  }

}

@media (min-width: 3840px) {
  #right-login > *:first-child {
      max-width: 60%; 
  }

  #left-login {
    animation: width 2s forwards;
  }

  .catnat-main-container {
    background-image: url('/static/images/ICON_WHITE_RP_SEVERAL.svg');
    background-repeat: no-repeat;
    background-position: top 0 left 0;
    background-size: 150px auto; /* Regola la dimensione del logo */
    padding: 20px;
    margin: 50px;
  }

  .catnat-main-container > *:first-child {
    width: 80%;
  }
}


