:root {
  --primary-color: #0056b3;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --navbar-bg: rgba(0, 0, 64, 0.9);
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --navbar-height: 12rem;
  /* Altezza della navbar */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Navbar styles */
#navbar {
  background-color: var(--navbar-bg);
  transition: var(--transition);
  padding: 0.5rem 0;
  /* position: fixed; */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand img.logo {
  width: 100px;
  height: auto;
  /* max-height: 50px !important;  */
  /* per rendere il logo rotondo eliminare max-height */
  object-fit: contain;
}

.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.navbar-nav {
  display: flex;
  list-style-type: none;
}

.nav-item {
  margin-left: 1rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.btn-responsive {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-responsive:hover {
  background-color: darken(var(--primary-color), 10%);
}

/* Hero section */
.sfondo {
  background-image: url("../immagini/earth-159123_1280.png") !important;
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}




.pianeta {
  background-position: right !important;
  background-repeat: no-repeat !important;
  background-image: url('../immagini/pianeta.jpg') !important;
  background-size: cover !important;
}

.sfondo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
}

.content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
}

.testo {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Card styles */
.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
  height: 200px;
  overflow: hidden;
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.card-text {
  color: #6c757d;
  font-size: 1rem;
  line-height: 1.6;
}

.card-footer {
  background-color: transparent;
  border-top: none;
  padding-top: 1rem;
}

/* Footer */
footer {
  background-color: rgba(0, 0, 64, 0.9);
  color: white;
  padding: 2rem 0;
}

/* Utility classes */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--primary-color);
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .navbar-toggler {
    display: block;
  }

  .navbar-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
  }

  .navbar-nav.show {
    display: flex;
  }

  .nav-item {
    margin: 0.5rem 0;
  }

  .btn-responsive {
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .navbar-brand img.logo {
    width: 80px;
  }

  .sfondo {
    min-height: 70vh;
  }

  .testo {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }

  .navbar-brand img.logo {
    width: 60px;
  }

  .btn-responsive {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  .card-img-wrapper {
    height: 150px;
  }
}

/* For extremely small devices like iPhone 4 */
@media (max-width: 320px) {
  html {
    font-size: 10px;
  }

  .navbar-brand img.logo {
    width: 50px;
  }

  .btn-responsive {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }

  .card-img-wrapper {
    height: 120px;
  }
}

/* Modern article list style */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  /* box-shadow: var(--card-shadow); */
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.article-excerpt {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.8rem;
  color: #adb5bd;
  display: flex;
  justify-content: space-between;
}

/* Ensure proper spacing for all sections */
section {
  padding: 4rem 0;
}

/* Form styles */
form input,
form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

form button {
  width: 100%;
}

/* Accordion styles */
.accordion-button:not(.collapsed) {
  background-color: var(--primary-color);
  color: white;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0, 0, 0, .125);
}

/* Additional responsive adjustments */
@media (max-width: 576px) {
  .article-list {
    grid-template-columns: 1fr;
  }

  .article-image {
    height: 150px;
  }
}


@media (max-width: 800px) {
  .w-25 {
    width: 100% !important;
  }

  .p-5 {
    padding: 5% !important;
  }

  .testo {
    font-size: 1.2rem;
  }
}


.img-fluid {
  border-radius: 8px !important;
  --transition: all 0.3s ease;
}

.img-fluid:hover {
  --transition: all 0.3s ease;
  -card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}

/*  */

.article-card:hover {
  background: white;
  border-radius: 8px;
  /* overflow: hidden; */
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
}


.navbar-toggler {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.navbar-collapse {
  max-height: calc(100vh - var(--navbar-height));
  /* overflow-y: auto; */
}


@media only screen and (max-height: 800px) {
  .sfondo {
    /* padding-top: var(--navbar-height); */
    height: auto !important;
  }
}


p,
h2,
h3,
div {
  text-align: justify !important;
}







/* toast */
.toast-container {
  z-index: 1060;
}

#customToast {
  background-color: #28a745;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#customToast .toast-body {
  padding: 16px 20px;
}

#customToast .btn-close {
  font-size: 18px;
  padding: 12px;
  margin-right: 10px;
}






/* overlay  */
.sito1 {
  position: relative;
  cursor: pointer;
}

.sito1 img {
  transition: opacity 0.3s ease;
}

.sito1 .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  /* Sovrapposizione semi-trasparente più scura */
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sito1:hover img {
  opacity: 0.8;
  /* L'immagine rimane visibile ma leggermente più scura */
}

.sito1:hover .overlay {
  opacity: 1;
  /* La sovrapposizione e il testo appaiono sopra l'immagine */
}