body, html {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  scroll-behavior: smooth; 
}

.servizi-section {
  scroll-margin-top: 40px;
}

.clienti-section {
  scroll-margin-top: -20px;
}

.contatti-section {
  scroll-margin-top: 20px;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

h1 {
  font-size: 50px;
}

h2 {
  font-size: 46px;
}

.topnav {
  display: flex;
  align-items: center;
  position: fixed;
  top: 30px;
  width: auto; 
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.557); 
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 2px solid #e0e0e0;
  border-radius: 25px;
  z-index: 1000;
  padding: 0 15px;
  box-sizing: border-box; 
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
  height: 54px;
  overflow: hidden; 
  box-shadow: 0 4px 10px rgba(33, 18, 0, 0.08); 
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.toplink {
  display: flex;
  align-items: center;
  gap: 0px;
  white-space: nowrap;
  transition: max-width 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
              max-height 0.4s ease,
              opacity 0.3s ease, 
              visibility 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  white-space: nowrap; 
}

.brand-name {
  color: #363636;
  font-weight: bold;
  font-size: 20px;
}

.topnav a {
  color: #363636;
  text-align: center;
  padding: 14px 10px;
  padding-right: 5px;
  text-decoration: none;
  font-size: 18px;
}

.topnav a:hover {
  color: rgb(162, 162, 162);
}

.topnav a.active {
  color: #ff913c;
}

.punti-menu {
  display: flex;
  gap: 5px;
  align-items: center;
  cursor: pointer;
  max-width: 0;
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.4s ease, 
              visibility 0.4s ease;
}

.punto {
  width: 6px;
  height: 6px;
  background-color: #363636;
  border-radius: 50%;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  padding: 80px 10% 10px 10%;
  gap: 50px;
  background-color:#fffcfa;
  box-sizing: border-box;
}

.hero-logo {
  width: 115px;
  max-width: 160px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  padding-bottom: 15px;
}

.hero-text h1 {
  font-size: 52px;
  line-height: 1.1;
  font-weight: bold;
  color: #1a1a1a;
  margin: 0 0 20px 0;
}

.hero-text h1 span { color: #ff913c; }

.hero-text p {
  font-size: 18px;
  line-height: 1.6;
  color: #666666;
  margin: 0 0 40px 0;
  max-width: 500px;
}

.hero-buttons { display: flex; gap: 15px; }

.hero-buttons a {
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 50px;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-primary { background-color: #ffffff8c; color: #ff913c; }
.btn-primary:hover {
  background-color: #ff913c; color: #ffffff; border-bottom-color: #e27a28;
  transform: translateY(-2px); box-shadow: 0 6px 14px rgba(255, 145, 60, 0.2);
}

.btn-secondary { background-color: #ffffff8c; color: #363636; }
.btn-secondary:hover {
  background-color: #363636; color: #ffffff; border-bottom-color: #1a1a1a;
  transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.hero-images {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.image-stack {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
}

.hero-images .card {
  position: absolute;
  width: 100%;
  height: 280px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
}

.hero-images .card.card-1 { transform: rotate(-6deg) translate(-40px, -70px); z-index: 1; }
.hero-images .card.card-2 { transform: rotate(6deg) translate(65px, 15px); z-index: 2; }
.hero-images .card.card-3 { transform: rotate(-2deg)translate(-2px, 100px); z-index: 3; }

.hero-images .card:hover {
  z-index: 10 !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.22) !important;
}

.hero-images .card.card-1:hover { transform: rotate(0deg) translate(-50px, -45px) scale(1.06) !important; }
.hero-images .card.card-2:hover { transform: rotate(0deg) translate(40px, -5px) scale(1.06) !important; }
.hero-images .card.card-3:hover { transform: rotate(0deg) translate(-10px, 80px) scale(1.06) !important; }

.hero-images.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.servizi-section {
  min-height: auto;
  padding: 40px 10% 20px 10%;
  background-color: #fffcfa;
  box-sizing: border-box;
}

.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { color: #1a1a1a; margin-bottom: 10px; }
.section-title p { color: #666666; font-size: 16px; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-top: 50px;
}

.service-card-wrapper {
  background: #ffffff;
  border-radius: 20px;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-bottom-color 0.4s ease;
}

.service-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-text { padding: 25px; }
.card-text h3 { margin: 0 0 10px 0; font-size: 22px; color: #1a1a1a; }
.card-text p { margin: 0; color: #666666; font-size: 15px; line-height: 1.5; }

.service-card-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-bottom-color: #ff913c;
}

.service-card-wrapper:hover .service-img { transform: scale(1.04); }

.clienti-section {
  min-height: 80vh; 
  padding: 100px 10% 100px 10%;
  background-color: #fffcfa; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.reviews-slider {
  position: relative;
  width: 100%;
  max-width: 800px; 
  min-height: 250px; 
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.review-item {
  position: absolute;
  top: 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, visibility 0.6s ease;
}

.review-item.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  position: relative; 
}

.review-item.exit {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
}

.review-item .stars {
  font-size: 24px;
  color: #ff913c; 
  margin-bottom: 20px;
}

.review-item .review-text {
  font-size: 20px; 
  line-height: 1.6;
  color: #1a1a1a;
  font-weight: bold;
  margin: 0 0 25px 0;
}

.review-item .review-author {
  font-size: 18px;
  color: #363636;
  margin: 0;
}

.review-item .author-info {
  color: #888888;
  font-weight: normal;
}

.podcast-section {
  padding: 60px 10%;
  background-color: #fffcfa;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.podcast-container {
  width: 100%;
  max-width: 1100px;
}

.podcast-card {
  background: #ffffff;
  border-radius: 25px;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 35px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
}

.podcast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-bottom-color: #ff913c;
}

.podcast-badge-wrapper { flex-shrink: 0; }

.podcast-icon-box {
  width: 90px;
  height: 90px;
  background-color: #fff6ef;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffe3ce;
}

.podcast-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.podcast-tag {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ff913c;
  margin-bottom: 6px;
}

.podcast-content h2 {
  font-size: 28px;
  color: #1a1a1a;
  margin: 0 0 10px 0;
}

.podcast-content p {
  font-size: 16px;
  color: #666666;
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-width: 650px;
}

.btn-podcast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  color: #ff913c;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 50px;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-podcast:hover {
  background-color: #ff913c;
  color: #ffffff;
  border-bottom-color: #e27a28;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 145, 60, 0.2);
}

.contatti-section {
  min-height: 100vh;
  padding: 100px 10% 80px 10%;
  background-color: #fffcfa;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.contact-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  width: 100%;
  max-width: 1100px;
  align-items: center;
}

.contact-form-block h2 {
  color: #1a1a1a;
  margin: 0 0 10px 0;
}

.contact-form-block p {
  font-size: 16px;
  line-height: 1.6;
  color: #666666;
  margin: 0 0 35px 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: bold;
  color: #363636;
}

.contact-form input, 
.contact-form textarea {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  background-color: #ffffff;
  color: #363636;
  border: 1px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 15px;
  box-sizing: border-box;
  outline: none;
  transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
  border-color: #ff913c;
  border-bottom-color: #e27a28;
  box-shadow: 0 4px 12px rgba(255, 145, 60, 0.1);
}

.btn-submit {
  align-self: flex-start;
  background-color: #ffffff;
  color: #ff913c;
  font-size: 16px;
  font-weight: bold;
  padding: 14px 32px;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-submit:hover {
  background-color: #ff913c;
  color: #ffffff;
  border-bottom-color: #e27a28;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 145, 60, 0.2);
}

.contact-form-block .privacy-note {
  color: #b3b3b3; 
  font-style: italic;
  font-size: 15px; 
  margin-top: -15px; 
}

.contact-image-block {
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.profile-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.profile-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background-color: rgba(257, 257, 257, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid #e0e0e0;
  border-radius: 18px;
  padding: 15px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.profile-badge h4 { margin: 0 0 4px 0; font-size: 18px; color: #1a1a1a; }
.profile-badge p { margin: 0; font-size: 14px; color: #666666; }

.profile-card:hover .profile-img { transform: scale(1.03); }

.main-footer {
  background-color: #fffcfa;
  border-top: 2px solid #e0e0e0;
  padding: 80px 10% 30px 10%;
  box-sizing: border-box;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-column h3 {
  font-size: 18px;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  font-weight: bold;
}

.brand-info .footer-brand-name {
  font-size: 24px;
  font-weight: bold;
  color: #363636;
  display: block;
  margin-bottom: 15px;
}

.brand-info p {
  font-size: 15px;
  line-height: 1.6;
  color: #666666;
  margin: 0 0 25px 0;
  max-width: 320px;
}

.footer-socials { display: flex; gap: 12px; }

.footer-socials a {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f2f2f2;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 50%;
  color: #363636;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.footer-socials a:hover {
  background-color: #ff913c;
  color: #ffffff;
  border-bottom-color: #e27a28;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(255, 145, 60, 0.2);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  color: #666666;
  font-size: 15px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: #ff913c;
  padding-left: 4px;
}

.footer-contact p {
  font-size: 15px;
  line-height: 1.6;
  color: #666666;
  margin: 0 0 12px 0;
}

.footer-contact p strong { color: #363636; }

.footer-bottom {
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #888888;
  margin: 0;
}

.footer-bottom a,
.designer-credits a {
  color: #ff913c;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.2s ease;
}

.footer-bottom a:hover,
.designer-credits a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.designer-credits {
  margin-top: 8px !important;
  font-size: 12px !important;
  color: #a0a0a0 !important;
}

@media (min-width: 769px) {
  .topnav {
    flex-direction: row !important; 
    height: 54px !important;
  }

  .topnav .toplink {
    max-width: 500px !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: 10px;
  }

  .topnav .punti-menu {
    max-width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    padding-left: 0 !important;
  }

  .topnav.scrolled:not(.menu-open) {
    width: 290px !important; 
    padding: 0 18px !important; 
  }

  .topnav.scrolled:not(.menu-open) .toplink {
    max-width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .topnav.scrolled:not(.menu-open) .nav-header {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between !important; 
  }

  .topnav.scrolled:not(.menu-open) .brand {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .topnav.scrolled:not(.menu-open) .punti-menu {
    max-width: 50px !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: 54px;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-right: -4px !important; 
  }

  .topnav.scrolled.menu-open {
    width: auto !important; 
    padding: 0 15px !important;
  }

  .topnav.scrolled.menu-open .toplink {
    max-width: 500px !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: 10px;
  }

  .topnav.scrolled.menu-open .punti-menu {
    max-width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    padding-left: 0 !important;
    margin-right: 0 !important; 
  }
}

@media (max-width: 768px) {

  html {
    scroll-padding-top: 50px;
  }

  h2 {
  font-size: 34px;
  }
  
  .topnav {
    width: 290px; 
    flex-direction: column; 
    align-items: stretch;
    padding: 0 18px;
  }

  .topnav .nav-header {
    width: 100%;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between; 
  }

  .topnav .brand {
    display: flex;
    align-items: center;
    padding-left: 0 !important; 
    padding-right: 0 !important;
  }

  .topnav .punti-menu {
    max-width: 50px !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: 54px;
    padding-left: 0 !important; 
    padding-right: 0 !important; 
  }

  .topnav .toplink {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100% !important;
    opacity: 0;
    visibility: hidden;
    padding-top: 5px;
    padding-left: 5px; 
  }

  .topnav .toplink a {
    width: 100%;
    text-align: left;
    padding: 10px 5px;
    border-bottom: none !important; 
    transform: translateX(-40px); 
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  }

  .topnav.menu-open {
    height: 240px !important; 
    background-color: rgba(247, 247, 247, 0.85) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }

  .topnav.menu-open .toplink {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topnav.menu-open .toplink a {
    transform: translateX(0);
    opacity: 1;
  }

  .topnav.menu-open .toplink a:nth-child(1) { transition-delay: 0.04s; }
  .topnav.menu-open .toplink a:nth-child(2) { transition-delay: 0.10s; }
  .topnav.menu-open .toplink a:nth-child(3) { transition-delay: 0.16s; }
  .topnav.menu-open .toplink a:nth-child(4) { transition-delay: 0.22s; }

  .hero-logo {
    width: 160px;
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-section { 
    grid-template-columns: 1fr; 
    text-align: center; 
    padding: 120px 30px 40px 30px;
  }

  .hero-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 34px;
    line-height: 1.2;
    width: 100%;
    margin: 0 0 20px 0;
  }

  .hero-text p {
    font-size: 16px;
    max-width: 100%;
    margin: 0 auto 30px auto;
  }

  .hero-buttons { 
    justify-content: center; 
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-images { display: none; }

  .servizi-section {
    padding: 10px 30px 10px 30px;
  }

  .services-grid { grid-template-columns: 1fr; }

  .clienti-section {
    padding: 60px 30px 60px 30px;
  }

  .review-item .review-text {
    font-size: 18px; 
    padding: 0 10px;
  }
  .review-item .stars {
    font-size: 20px;
  }

  .podcast-section {
    padding: 50px 30px 50px 30px;
  }

  .podcast-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
    gap: 20px;
  }

  .podcast-content {
    align-items: center;
  }

  .podcast-content h2 {
    font-size: 22px;
  }

  .podcast-content p {
    font-size: 15px;
  }

  .contatti-section {
    padding: 60px 10%;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .contact-form-block h2 { font-size: 32px; text-align: center; }
  .contact-form-block p { text-align: center; }
  
  .btn-submit {
    align-self: center;
    width: 100%;
    text-align: center;
  }

  .profile-img {
    height: 380px;
  }

  .main-footer {
    padding: 60px 10% 30px 10%;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .brand-info p {
    margin: 0 auto 20px auto;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-bottom {
    margin-top: 40px;
  }
}