/* Nascondere il logo di Spline */
spline-viewer {
  position: relative;
  /* RIMUOVI pointer-events: none; da qui */
}

/* Overlay che copre SOLO l'area del logo e blocca i click */
spline-viewer::after {
  content: "";
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 160px;
  height: 50px;
  background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
  z-index: 9999;
  pointer-events: auto; /* ← CAMBIA QUESTA RIGA: auto blocca i click */
}

@media (max-width: 991px) {
  .spline-container {
    display: none !important;
  }
}

/* Opzionale: centra il testo su mobile */
@media (max-width: 991px) {
  .col-12.col-lg-6.text-center.text-lg-start {
    text-align: center !important;
  }
}

/* =================
   FIX SCROLL ORIZZONTALE MOBILE
   ================= */

/* Previeni overflow orizzontale globale */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

spline-viewer {
  position: relative;
  touch-action: none;
}

/* inter-300 - latin */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local(""), url("../fonts/inter-v12-latin-300.woff2") format("woff2"),
    url("../fonts/inter-v12-latin-300.woff") format("woff");
}

/* inter-400 - latin */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local(""), url("../fonts/inter-v12-latin-regular.woff2") format("woff2"),
    url("../fonts/inter-v12-latin-regular.woff") format("woff");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local(""), url("../fonts/inter-v12-latin-500.woff2") format("woff2"),
    url("../fonts/inter-v12-latin-500.woff") format("woff");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local(""), url("../fonts/inter-v12-latin-700.woff2") format("woff2"),
    url("../fonts/inter-v12-latin-700.woff") format("woff");
}

/* =================
   BURGER MENU STYLES
   ================= */

/* Nascondi il menu desktop su mobile */
@media (max-width: 991px) {
  .navbar-nav.desktop-menu {
    display: none !important;
  }

  .btn.desktop-cta {
    display: none !important;
  }
}

/* Mostra il burger solo su mobile */
.navbar-toggler {
  display: none;
  border: none;
  padding: 0.25rem 0.5rem;
  background: transparent;
}

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

/* Stili per il menu mobile */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 80px 30px 30px;
}

.mobile-menu.show {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

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

.mobile-menu li {
  margin-bottom: 2rem;
}

.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: #6c757d;
}

/* Burger icon animato */
.burger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  transform: rotate(0deg);
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: white;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.burger-icon span:nth-child(1) {
  top: 0px;
}

.burger-icon span:nth-child(2) {
  top: 8px;
}

.burger-icon span:nth-child(3) {
  top: 16px;
}

.burger-icon.open span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

.burger-icon.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.burger-icon.open span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

/* Nascondere il logo di Spline */
spline-viewer {
  position: relative;
}

spline-viewer::after {
  content: "";
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 160px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  pointer-events: auto;
}

@media (max-width: 991px) {
  .spline-container {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .col-12.col-lg-6.text-center.text-lg-start {
    text-align: center !important;
  }
}

/* Fix scroll orizzontale mobile */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* STILI COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 1.5rem;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.cookie-btn-accept {
  background: #1e7e34; /* Verde più scuro invece di #28a745 */
  color: white;
}

.cookie-btn-accept:hover {
  background: #155724; /* Verde ancora più scuro per hover */
  color: white;
}

.cookie-btn-decline {
  background: transparent;
  color: white; /* ← Bianco invece di grigio */
  border: 2px solid white; /* ← Bordo bianco e più spesso */
}

.cookie-btn-decline:hover {
  background: white;
  color: #000; /* ← Testo nero su sfondo bianco */
  border: 2px solid white;
}

@media (max-width: 768px) {
  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    justify-content: center;
  }
}

.logo-secondary {
  filter: brightness(0) saturate(100%) invert(60%) sepia(5%) saturate(416%)
    hue-rotate(333deg) brightness(92%) contrast(89%);
}

.stack-column-dynamic {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .stack-column-dynamic {
    margin-top: clamp(15rem, 20vh, 25rem);
  }
}

@media (max-width: 991px) {
  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar-brand {
    margin-right: 0 !important;
  }
}

/* Su desktop mantieni il layout originale */
@media (min-width: 992px) {
  .navbar .container {
    display: flex;
    align-items: center;
  }
}

@media (max-width: 991px) {
  .container.py-vh-4.mt-5 {
    margin-top: 2rem !important; /* Riduce da mt-5 a circa mt-3 */
    padding-top: 3rem !important; /* Riduce anche il padding top */
  }
}

/* Fix per titolo coperto dall'header */
@media (min-width: 768px) and (max-width: 1440px) {
  .py-vh-5 {
    padding-top: 3rem !important; /* Aumentato per macbook */
  }
}

/* Per desktop più grandi */
@media (min-width: 1441px) {
  .py-vh-5 {
    padding-top: 3rem !important;
  }
}

/* Mantieni il fix mobile esistente */
@media (max-width: 767px) {
  .py-vh-5 {
    padding-top: 3rem !important;
  }
}

/* Fix per titolo coperto dall'header aboutme */
@media (min-width: 768px) and (max-width: 1440px) {
  .py-vh-5-am {
    padding-top: 10rem !important; /* Aumentato per macbook */
  }
}

/* Per desktop più grandi */
@media (min-width: 1441px) {
  .py-vh-5-am {
    padding-top: 9rem !important;
  }
}

/* Mantieni il fix mobile esistente */
@media (max-width: 767px) {
  .py-vh-5-am {
    padding-top: 8rem !important;
  }
}

/* Ridimensiona finestra + centra robot */
.spline-container spline-viewer {
  width: 100% !important;
  height: 300px !important; /* Finestra più piccola */
}

/* MacBook - finestra ancora più piccola */
@media (min-width: 1000px) and (max-width: 1200px) {
  .spline-container spline-viewer {
    width: 100% !important;
    height: 300px !important; /* Robot più piccolo */
    margin: 0 auto !important;
  }
}

/* Desktop normali */
@media (min-width: 1200px) and (max-width: 1600px) {
  .spline-container spline-viewer {
    width: 100% !important;
    height: 450px !important;
    margin: 0 auto !important;
  }
}

/* Monitor grandi */
@media (min-width: 1600px) {
  .spline-container spline-viewer {
    width: 100% !important;
    height: 500px !important;
    margin: 0 auto !important;
  }
}

.navbar-name {
  margin-top: 0.25rem;
  font-weight: 700;
  margin-left: 0.5rem;
  font-family: system-ui, -apple-system, sans-serif;
  color: white;
  display: inline-block;
}

@media (min-width: 992px) {
  .navbar-name {
    margin-left: 0;
    margin-right: 3rem;
  }
}
