:root{
  --brand:#0bb3b5;
  --dark:#0f172a;
  --ink:#0b1220;
  --accent:#ff7a29;
  --bg:#0a0f1f;
  --muted:#94a3b8;
  --card:#0e1a2f;
  --white:#ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  color: var(--white);
  background: var(--ink);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

/* Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   NAVBAR
========================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 16px 0;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11, 179, 181, 0.1);
  transition: all 0.3s ease;
}

.nav.scrolled {
  padding: 12px 0;
  background: rgba(11, 18, 32, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.menu {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
}

/* Forza visualizzazione desktop oltre 768px */
@media (min-width: 769px) {
  .menu {
    position: static !important;
    width: auto !important;
    height: auto !important;
    flex-direction: row !important;
    padding: 0 !important;
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
}

.menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  opacity: 0.9;
  transition: all 0.3s ease;
  position: relative;
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.3s ease;
}

.menu a:hover {
  opacity: 1;
  color: var(--brand);
}

.menu a:hover::after {
  width: 100%;
}

.menu a.cta {
  padding: 10px 24px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  background-size: 200% 200%;
  border-radius: 999px;
  font-weight: 600;
  animation: gradientShift 3s ease infinite;
  box-shadow: 0 4px 15px rgba(11, 179, 181, 0.3);
}

.menu a.cta::after {
  display: none;
}

.menu a.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 179, 181, 0.4);
  color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.1);
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: grayscale(0.1) contrast(1.1) saturate(1.15);
  animation: fadeIn 1s ease-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 40%, rgba(11,179,181,.3) 0%, transparent 60%), 
    linear-gradient(135deg, rgba(11,179,181,.15) 0%, rgba(255,122,41,.1) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.7), rgba(11,18,32,.95));
  animation: fadeIn 1.2s ease-out;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 40px 20px;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-content h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin: 0 0 20px;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #0bb3b5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-content p {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.9s both;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  font-size: 16px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  background-size: 200% 200%;
  padding: 16px 32px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(11, 179, 181, 0.35);
  animation: gradientShift 3s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(11, 179, 181, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-ghost {
  border: 2px solid rgba(255,255,255,.4);
  padding: 14px 30px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 179, 181, 0.25);
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 100px 0;
  background: linear-gradient(180deg, #0b1220 0%, #0e1a2f 100%);
  position: relative;
  margin: 0;
}

.section.alt {
  background: linear-gradient(180deg, #0e1a2f 0%, #0b1220 100%);
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11,179,181,0.3), transparent);
}

.section h2 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 20px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #0bb3b5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section .lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  margin-bottom: 24px;
}

.section .lead strong {
  color: var(--white);
  font-weight: 600;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================
   GRIDS
========================= */

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 18px;
}

/* =========================
   CARDS
========================= */

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11,179,181,0.1) 0%, rgba(255,122,41,0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(11, 179, 181, 0.5);
  box-shadow: 
    0 20px 40px rgba(11, 179, 181, 0.2),
    0 0 0 1px rgba(11, 179, 181, 0.1) inset;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--white);
  position: relative;
}

.card p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin: 0;
  position: relative;
}

/* =========================
   FACILITIES SECTION
========================= */

.facilities-section {
  background: linear-gradient(180deg, #0e1a2f 0%, #0b1220 100%);
  border-top: 1px solid rgba(11,179,181,.2);
  border-bottom: 1px solid rgba(11,179,181,.2);
}

/* =========================
   FOOTER
========================= */

.footer {
  background: #0a0f1f;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-logo.small {
  height: 28px;
}

.footer .copy {
  color: var(--muted);
  font-size: 14px;
}

.footer .social {
  display: flex;
  gap: 16px;
}

.footer .social a {
  color: #cfe8ff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer .social a:hover {
  opacity: 1;
}

.footer .legal-links {
  width: 100%;
  text-align: center;
  font-size: 13px;
}

.footer .legal-links a {
  color: rgba(207, 232, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer .legal-links a:hover {
  color: rgba(207, 232, 255, 1);
  text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
  }
  
  .nav-inner {
    padding: 0 20px;
  }

  .section {
    padding: 80px 0;
  }

  .hero {
    min-height: 90vh;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 12px 0;
  }

  .nav-logo {
    font-size: 20px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 64px);
    background: rgba(11, 18, 32, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 32px 0;
    border-left: 1px solid rgba(11, 179, 181, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .menu.active {
    right: 0;
  }

  .menu a {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .menu a::after {
    display: none;
  }

  .menu a.cta {
    margin: 16px 32px;
    width: calc(100% - 64px);
    text-align: center;
    border-bottom: none;
  }

  .hero {
    min-height: 85vh;
    padding-top: 64px;
  }

  .hero-content h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }

  .section {
    padding: 60px 0;
  }

  .section h2 {
    font-size: clamp(24px, 6vw, 36px);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px;
  }
}
