/* Theme Variables - Ottimizzato per performance */
:root {
--background-color: #fafafa;
--text-color: #1d1d1f;
--frame-color: #fafafa;
}

body.dark-mode {
--background-color: #000000;
--text-color: #f5f5f7;
--frame-color: #000000;
}

/* General Styles */
html, body {
  overflow-x: hidden !important;
  position: relative;
  touch-action: pan-y; /* Permette solo swipe verticale sul body */
}

body {
font-family: 'SF Pro Display', Arial, sans-serif;
color: var(--text-color);
margin: 0;
padding: 0;
background-color: var(--background-color);
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #d3d3d3 var(--background-color);
}

body.dark-mode {
scrollbar-color: #3a3a3c #000000;
}

/* Logo Styles */
.logo {
height: 25px;
width: auto;
}

/* Header Styles */
header {
background-color: #fafafa;
padding: 10px 20px;
position: fixed;
width: 100%;
top: 0;
z-index: 2500;
display: flex;
align-items: center;
justify-content: space-between;
transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

header.scrolled {
background-color: rgba(250, 250, 250, 0.8);
backdrop-filter: blur(5px);
}

body.dark-mode header {
background-color: rgba(0, 0, 0, 0.9);
}

body.dark-mode header.scrolled {
background-color: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(5px);
}

.header-container {
display: flex;
align-items: center;
width: 100%;
padding: 0 20px;
}

.logo-link {
display: inline-block;
margin-left: 15px;
flex-shrink: 0;
}

.desktop-nav {
flex: 1;
display: flex;
justify-content: center;
}

.nav-menu {
list-style: none;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
}

.nav-menu li {
margin: 0 20px;
}

.header-right {
display: flex;
align-items: center;
flex-shrink: 0;
}

.nav-menu li a {
text-decoration: none;
color: var(--text-color);
font-size: 13px;
font-weight: 525;
transition: color 0.3s ease;
}

body.dark-mode .nav-menu li a {
color: #f5f5f7;
}

.nav-menu li a:hover,
body.dark-mode .nav-menu li a:hover {
color: #45b6fe;
}

.theme-toggle {
background: none;
border: none;
cursor: pointer;
padding: 0;
width: 17px;
height: 17px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30px;
}

.theme-icon {
font-size: 17px;
color: var(--text-color);
transition: color 0.3s ease;
}

body.dark-mode .theme-icon {
color: #f5f5f7;
}

.theme-toggle:hover .theme-icon {
color: #45b6fe;
background: linear-gradient(90deg, #45b6fe, #d95bc5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

.theme-icon.moon {
display: none;
}

body.dark-mode .theme-icon.sun {
display: none;
}

body.dark-mode .theme-icon.moon {
display: block;
}

.hamburger {
display: block;
cursor: pointer;
margin-right: 15px;
z-index: 3000;
}

.hamburger span {
display: block;
width: 20px;
height: 3px;
background-color: var(--text-color);
margin: 6px 0;
transform-origin: center;
transition: transform 0.3s ease;
}

body.dark-mode .hamburger span {
background-color: #f5f5f7;
}

.hamburger.active span:nth-child(1) {
transform: rotate(45deg) translateY(6px);
}

.hamburger.active span:nth-child(2) {
transform: rotate(-45deg) translateY(-6px);
}

.mobile-menu {
transform: translateY(-100%);
transition: transform 1s ease;
position: fixed;
top: 0;
right: 0;
width: 100%;
height: 100%;
background: var(--background-color);
z-index: 2000;
text-align: center;
}

body.dark-mode .mobile-menu {
background: #000000;
}

.mobile-menu.open {
transform: translateY(0);
}

@keyframes slideIn {
0% { transform: translateY(-100%); opacity: 0; }
100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
0% { transform: translateY(0); opacity: 1; }
100% { transform: translateY(-100%); opacity: 0; }
}

.mobile-menu.hidden {
animation: slideOut 0.5s ease;
animation-fill-mode: forwards;
}

.mobile-menu ul li {
margin-bottom: 40px;
}

.mobile-menu ul li a {
text-decoration: none;
color: var(--text-color);
font-size: 30px;
font-weight: 600;
transition: color 0.3s ease;
}

body.dark-mode .mobile-menu ul li a {
color: #f5f5f7;
}

.mobile-menu ul li a:hover,
body.dark-mode .mobile-menu ul li a:hover {
color: #45b6fe;
}

.mobile-menu ul {
list-style: none;
padding: 0;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.mobile-menu .social-icons,
.footer .social-icons {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
}

.social-icon {
font-size: 24px;
color: var(--text-color);
transition: color 0.3s ease;
}

body.dark-mode .social-icon {
color: #f5f5f7;
}

.social-icon:hover {
color: #45b6fe;
background: linear-gradient(90deg, #45b6fe, #d95bc5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

/* Terms Section */
.terms-section {
background-color: var(--background-color);
padding: 100px 20px 60px;
text-align: left;
max-width: 800px;
margin: 0 auto;
}

.terms-container h1 {
font-size: 36px;
margin-bottom: 20px;
color: var(--text-color);
}

.terms-container h2 {
font-size: 24px;
margin-top: 40px;
margin-bottom: 10px;
color: var(--text-color);
}

.terms-container p, .terms-container ul {
font-size: 16px;
color: #6e6e73;
line-height: 1.6;
}

body.dark-mode .terms-container p, body.dark-mode .terms-container ul {
color: #a1a1a6;
}

.terms-container ul {
list-style-type: disc;
padding-left: 20px;
}

.terms-container a {
color: #45b6fe;
text-decoration: none;
}

.terms-container a:hover {
text-decoration: underline;
}

/* Footer */
.footer {
background-color: #f5f5f7;
padding: 40px 20px;
color: #1d1d1f;
}

body.dark-mode .footer {
background-color: #373737;
color: #f5f5f7;
}

.footer-container {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}

.footer-column {
margin: 10px;
min-width: 200px;
}

.footer-logo {
height: 50px;
width: auto;
margin-bottom: 10px;
}

.footer-column h3 {
font-size: 18px;
margin-bottom: 10px;
}

.footer-column ul {
list-style: none;
padding: 0;
}

.footer-column ul li {
margin-bottom: 5px;
}

.footer-column ul li a {
text-decoration: none;
color: #1d1d1f;
transition: color 0.3s ease;
}

body.dark-mode .footer-column ul li a {
color: #f5f5f7;
}

.footer-column ul li a:hover,
body.dark-mode .footer-column ul li a:hover {
color: #45b6fe;
}

.footer-bottom {
text-align: center;
margin-top: 20px;
font-size: 14px;
}

.footer-bottom a {
color: #1d1d1f;
text-decoration: none;
}

body.dark-mode .footer-bottom a {
color: #f5f5f7;
}

.footer-bottom a:hover {
color: #45b6fe;
}

/* Scrollbar WebKit */
body::-webkit-scrollbar {
width: 8px;
}

body::-webkit-scrollbar-track {
background: var(--background-color);
}

body::-webkit-scrollbar-thumb {
background-color: #d3d3d3;
border-radius: 10px;
}

body.dark-mode::-webkit-scrollbar-thumb {
background-color: #3a3a3c;
}

/* Gradient Text */
.gradient-text {
background: linear-gradient(90deg, #45b6fe, #d95bc5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 769px) {
.nav-menu {
display: none;
}
.hamburger {
display: block;
}
.terms-section {
padding: 80px 15px 40px;
}
.terms-container h1 {
font-size: 28px;
}
.terms-container h2 {
font-size: 20px;
}
}

/* Accessibilità: Focus */
:focus-visible {
outline: 2px solid #45b6fe;
outline-offset: 2px;
}

/* Media per tablet */
@media (max-width: 1024px) and (min-width: 769px) {
.terms-section {
padding: 90px 20px 50px;
}
}