html, body {
  overflow-x: hidden;
  font-family: "Open Sans", Georgia, serif;
  /* background-color: white; */
}

/* QUERY GENERICHE SU MOBILE */
/* Riduci h1 su mobile */
@media (max-width: 767px) {
  h1 {
    font-size: 1.8rem !important; /* Riduci da default ~2.5rem */
  }

  h2 {
    font-size: 1.5rem !important;
  }
}

/* CONTAINER GENERALI */
.container-home {
  z-index: 1;
  background-color: white;
  /* background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}

.container-new {
  margin: 0 auto;
  width: 75% !important;
  background-color: white;
  padding: 3.5%;
  /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}

.container-cards {
  height: auto;
}

.container {
  padding: 2.5%;
  z-index: 1;
  background-color: white;
  max-width: 90% !important;
  /* background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}

.about.container-fluid {
  padding: 2.5%;
  z-index: 1;
  background-color: white;
  max-width: 90% !important;
  /* background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
}

@media screen and (max-width: 992px) {
  .container-new, .container {
    padding-top: 30px !important
  }
}

.sub-img {
  position: fixed;
  z-index: -1;
  /* background-image: url('/static/gelo162/img/header.png'); */
  background-position: center;
  background-repeat: no-repeat;
  background-size: 140%;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.about-sub-img {
  position: fixed;
  top: 0;
  overflow: hidden;
  z-index: -1;
  background-image: url('/static/gelo162/img/about.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

/* IMMAGINE DI HEADER */
.abouthead {
  height: 45vh;
  min-height: 350px;
  position: relative;
}

.abouthead::after {
  content: "";
  background-image: url('/static/gelo162/img/about.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  background-attachment: fixed;
  z-index: -1;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0.5;
}

.contacthead {
  height: 50vh;
  min-height: 300px;
  position: relative;
}

.contacthead::after {
  content: "";
  background-image: url('/static/gelo162/img/contact.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: absolute;
  z-index: -1;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0.5;
}

/* LOADER */
.loader {
  margin: 0 auto 4rem auto;
  border: 5px solid #f3f3f3;
  /* Light grey */
  border-top: 5px solid #3498db;
  /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#topBtn {
  position: fixed;
  bottom: 20px;
  right: -100px;
  z-index: 100;
  border: none;
  outline: none;
  background-color: white;
  color: black;
  cursor: pointer;
  padding: 5px 25px;
  border-radius: 50px;
  font-size: 35px;
  -webkit-transition: all .3s ease;
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  transition: all .3s ease;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#topBtn:hover {
  background-color: #c6c6c6;
}

/* NAVBAR PRINCIPALE */
.header {
  width: 100%;
  height: auto;
  margin: 0 auto 0 auto;
  padding: 15px 0 10px 0;
  background-color: #f9f9f9;
  box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  color: black;
  font-family: "Cabin", Georgia, serif !important;
}

.header h1 {
  font-weight: 500;
  font-family: "Cabin", Georgia, serif !important;
  font-size: 2.0rem;
  margin: 0 !important;
}

.header-content {
  margin: 0 3.5%;
}

.header-content a {
  color: black;
  outline: none;
}

.header-content a:hover {
  color: black;
  text-decoration: none;
}

.header-logo {
  gap: 20px;
}

.header-logo img {
  width: 60px;
  height: auto;
}

.header-title {
  display: flex;
  align-items: center;
}

.header-link ul {
  gap: 5px;
}

.header-link li {
  margin: 0 !important;
  height: 100%;
}

/* Effetto hover per i link della navbar */
.header-link a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 20px 20px;
  font-size: 120%;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.header-link a:hover {
  background-color: rgba(0, 0, 0, 0.08);
  font-size: 125%;
  transform: translateY(-2px);
}

/* NAVBAR ON MOBILE */
/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #f8f9fa; /* Stesso colore navbar bg-light */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  z-index: 1000;
}

.mobile-menu-dropdown.active {
  max-height: 500px;
  opacity: 1;
}

.mobile-menu-list {
  list-style: none;
  padding: 20px 0;
  margin: 0;
}

.mobile-menu-item {
  margin: 0;
  opacity: 0;
  transform: translateY(-10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-dropdown.active .mobile-menu-item {
  animation: fadeInDown 0.4s ease-out forwards;
}

.mobile-menu-item:last-child {
  border-bottom: none;
}

.mobile-menu-item a {
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 30px;
  display: block;
  transition: all 0.3s ease;
}

.mobile-menu-item a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  padding-left: 35px;
}

/* Hamburger trasformazione in X */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  position: relative;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

.navbar-toggler-icon {
  position: relative;
  transition: all 0.3s ease;
}

.navbar-toggler.active .navbar-toggler-icon {
  background-image: none;
}

.navbar-toggler.active .navbar-toggler-icon::before,
.navbar-toggler.active .navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  left: 0;
  top: 50%;
  transition: all 0.3s ease;
}

.navbar-toggler.active .navbar-toggler-icon::before {
  transform: translateY(-50%) rotate(45deg);
}

.navbar-toggler.active .navbar-toggler-icon::after {
  transform: translateY(-50%) rotate(-45deg);
}

/* Animazione */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar position */
.navpost {
  position: relative;
}

/* NAVBAR PICCOLA */
nav {
  font-family: "Open Sans", Georgia, serif;
}

#lg-text-nav {
  margin: 0 !important;
}

#xs-text-nav {
  display: none;
}

@media screen and (max-width: 420px) {
  #lg-text-nav {
    /* display: none !important; */
    color: black;
  }

  #xs-text-nav {
    display: inline-block;
  }
}

#nav-scroll {
  visibility: hidden;
}

.navbar {
  -webkit-transition: all .3s ease;
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  transition: all .3s ease;
  padding: 5px 0;
  box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  font-weight: 400;
  font-family: "Cabin", Georgia, serif !important;
}

.navbar a {
  color: black !important;
  margin: 0 !important;
}

.navbar .logo p {
  font-size: 17px;
  margin: 0 !important;
}

.navbar .logo img {
  width: 42px;
  height: 42px;
}

@media screen and (max-width:1000px) {
  .navhome {
    background-color: #f8f9fa !important;
  }
}

/* NAVBAR ON TOP SCROLL */
#nav-on-scroll {
  -webkit-transition: all .3s ease;
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  transition: all .3s ease;
  top: -70px;
}

/* CAROUSEL */
.div-carousel-img {
  width: 120%;
  height: 500px;
  background-position: center;
  background-size: cover;
  opacity: .7;
}

/* .carousel-indicators li {
  border-radius: 0%;
  width: 36px;
  height: 12px;
} */
.carousel-indicators li.active {
  background-color: #05a1e4;
}

.carousel-caption h1 {
  text-shadow: 5px 5px 8px #000000, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black;
  text-align: center;
}

.carousel-caption a {
  color: white !important;
  outline: none;
}

.carousel-caption a:hover {
  color: white !important;
  outline: none;
  text-decoration: none;
}

.carousel-control-prev:hover {
  background-color: #aaaaaa;
  opacity: .3;
  transition: 0.5s;
}

.carousel-control-next:hover {
  background-color: #aaaaaa;
  opacity: .3;
  transition: 0.5s;
}

@media screen and (max-width: 768px) {
  .div-carousel-img {
    height: 250px;
  }

  .carousel-caption h1 {
    font-size: 2rem !important;
  }
}

/* HERO */
.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  max-height: 70vh;
  height: 70vh;
}

.hero-section .container-fluid {
  max-width: 85% !important;
}

.hero-section .row {
  height: 100%;
}

.hero-text-content {
  padding: 60px 0 60px 0; /* Padding equilibrato: sopra, destra, sotto, sinistra */
}

/* .hero-section .col-md-6 {
  padding-top: 5% !important;
  padding-left: 15vw !important;
} */

/* Su mobile riduci il padding */
@media (max-width: 767px) {
  .hero-text-content {
    padding: 40px 20px;
  }
}


/* BIOGRAFIA HOME */
.btn-custom {
  background-color: #2c3e50;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-custom:hover {
  background-color: #34495e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Crea rapporto 1:1 (quadrato) */
  overflow: hidden;
  border-radius: 15px; /* Opzionale: bordi arrotondati */
}

.bioimage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

.about .row {
  margin-left: -30px;
  margin-right: -30px;
}

.about .row > [class*='col-'] {
  padding-left: 30px;
  padding-right: 30px;
}

/* CARDS DI COSA MI OCCUPO*/
.bg-grey-full {
  background-color: #778899; /* grigio scuro */;
  padding: 40px 0;
}

.bg-grey-full .container-fluid {
  background-color: transparent !important;
}

.card-square {
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  width: 100%;
  padding-bottom: 50%;
  overflow: hidden;
  border-radius: 15px;
}

.card-square img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Regola l'opacità qui (0.0 - 1.0) */
  z-index: 1;
}

.card-square .card-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2; /* Sopra l'overlay */
}

.card-square:hover {
  transform: scale(1.02);
}

/* EVENTI A CUI PARTECIPO */
.event-image-wrapper {
  position: relative;
  width: 100%;
  height: 70%;
  padding-bottom: 70%; /* Era 75%, ora dimezzato */
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.event-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.event-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
  border-radius: 15px;
}

.event-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 20px;
  color: white;
  z-index: 2;
}

.event-text h4 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.event-text p {
  font-size: 0.9rem;
  margin-bottom: 3px;
}

/* Stile controlli carosello */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

/* Indicatori */
.carousel-indicators {
  bottom: 10px;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators .active {
  background-color: white;
}

.btn-custom-events {
  background-color: #2c3e50;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-custom-events:hover {
  background-color: #34495e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* INFORMAZIONI PERSONALI HOME */
.map-wrapper {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.contact-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.contact-link {
  color: #2c3e50;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #3498db;
  text-decoration: none;
}

#social {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-block;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
}

#social img {
  width: 40px;
  height: 40px;
}

/* SOCIAL LINK */
#social img {
  height: 32px;
  width: 32px;
  margin: 5px 0;
}

#social a {
  outline: none;
  margin: 0px 5px;
  text-decoration: none
}

.bioimage {
  object-fit: cover;
}

@media screen and (max-width: 514px) {
  .microbio #textimage {
    text-align: center;
  }
}

/* BLOG POST */
.main-post-title {
  font-size: 2.5rem;
}

@media screen and (max-width: 992px) {
  .main-post-title {
    font-size: 2rem;
  }
}

.blog-post .landscape {
  height: 15em;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.blog-post .landscape-rel {
  height: 7rem;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* .card-body {
  width: 60% !important;
} */
.card-div-img {
  width: 40%;
  float: right;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media screen and (max-width: 992px) {
  .card-body {
    width: 100% !important;
  }

  .post-div-img {
    height: 200px;
  }
}

.post-div-img {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#all-search-bar {
  width: 30%;
}

#all-search-bar-min {
  width: 100%;
}

/* ASIDE */
aside p {
  line-height: 1.6rem;
}

/* ABOUT */
.about p {
  line-height: 1.8rem;
}

/* FOOTER */
.blog-footer {
  background-color: #778899;
  color: #ecf0f1;
  margin-top: auto;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 20px;
}

.blog-footer p {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.footer-logo {
  width: 60px;
  height: auto;
  border-radius: 50%;
}

.footer-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .footer-links {
    justify-content: flex-start;
  }
}

.footer-btn {
  display: inline-block;
  padding: 8px 16px;
  color: #000000;
  background-color: #95a5a6;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-btn:hover {
  background-color: #7f8c8d;
  color: #000000;
  text-decoration: none;
  transform: translateY(-2px);
}

.credit {
  font-size: 0.8rem;
  color: #ecf0f1;
  margin-top: 10px;
}



/* Rimuovi margini bianchi dal body */
body {
  margin: 0;
  padding: 0;
}

/* blog.css */
/* stylelint-disable selector-list-comma-newline-after */
.blog-header {
  line-height: 1;
  border-bottom: 1px solid #e5e5e5;
}

.blog-header-logo {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 2.25rem;
}

.blog-header-logo:hover {
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Libre Baskerville", Georgia, serif;
}

.blog-post-title a {
  color: black;
}

.blog-post-title-rel a {
  color: black;
  font-size: 100%;
}

.display-4 {
  font-size: 2.5rem;
}

@media (min-width: 768px) {
  .display-4 {
    font-size: 3rem;
  }
}

.nav-scroller {
  position: relative;
  z-index: 2;
  height: 2.75rem;
  overflow-y: hidden;
}

.nav-scroller .nav {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  padding-bottom: 1rem;
  margin-top: -1px;
  overflow-x: auto;
  text-align: center;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-scroller .nav-link {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: .875rem;
}

.card-img-right {
  height: 100%;
  border-radius: 0 3px 3px 0;
}

.flex-auto {
  -ms-flex: 0 0 auto;
  -webkit-box-flex: 0;
  flex: 0 0 auto;
}

.h-250 {
  height: 250px;
}

@media (min-width: 768px) {
  .h-md-250 {
    height: 250px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}

.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

/*
 * Blog name and description
 */
.blog-title {
  margin-bottom: 0;
  font-size: 2rem;
  font-weight: 400;
}

.blog-description {
  font-size: 2rem;
  font-weight: 500;
}

@media (min-width: 40em) {
  .blog-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 40em) {
  .blog-title {
    font-size: 2.5rem;
  }

  .blog-description {
    font-size: 1.5rem;
  }
}

/* Pagination */
.blog-pagination {
  margin-bottom: 4rem;
}

.blog-pagination>.btn {
  border-radius: 2rem;
}

/*
 * Blog posts
 */
.blog-post {
  margin-bottom: 4rem;
}

.blog-post p img {
  width: 98% !important;
  height: auto !important;
}

.blog-post p a {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;
  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.blog-post-title {
  margin-bottom: .25rem;
  font-size: 2rem;
}

.blog-post-body {
  font-size: 1.10rem;
  line-height: 1.8;
  font-family: "Open Sans", Georgia, serif;
}

.blog-post-meta {
  margin-bottom: 1.25rem;
  color: #838282;
}

.tag-link {
  color: grey;
}

/* 404 PAGE */
.title-404 {
  text-align: center;
  font-size: 800%;
}

.sub-404 {
  text-align: center;
}

.btn-404 {
  margin: 0 auto;
}

/* ANIMAZIONI DI BASE*/
/* Stato iniziale - elementi nascosti */
.animate-on-scroll {
  opacity: 0;
}

/* Fade In */
.animate-on-scroll.fade-in.animated {
  animation: fadeIn 0.6s ease-in forwards;
}

/* Slide Left */
.animate-on-scroll.slide-in-left {
  transform: translateX(-80px);
}

.animate-on-scroll.slide-in-left.animated {
  animation: slideInLeft 0.5s ease-out forwards;
}

/* Slide Right */
.animate-on-scroll.slide-in-right {
  transform: translateX(80px);
}

.animate-on-scroll.slide-in-right.animated {
  animation: slideInRight 0.5s ease-out forwards;
}

/* Hero - anima subito al caricamento */
.hero-section.fade-in {
  animation: fadeIn 0.5s ease-in forwards;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
