/* =========================================================
   PALETTE E TEMA
   ========================================================= */

:root {
  --colore-bg: #050814;
  --colore-card: #0a1124;
  --colore-testo: #e5f1ff;
  --colore-grigio: #b9c9e8;
  --colore-accento: #00c2ff;
  --colore-accento-scuro: #008bb8;
  --colore-bordo: rgba(0, 194, 255, 0.25);
}

/* Tema chiaro */
body.theme-light {
  --colore-bg: #f4f7fb;
  --colore-card: #ffffff;
  --colore-testo: #1a1a1a;
  --colore-grigio: #444;
  --colore-accento: #0077cc;
  --colore-bordo: rgba(0, 119, 204, 0.25);
}

/* =========================================================
   BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at top, #0d1b3d 0%, #050814 70%);
  background-attachment: fixed;
  color: var(--colore-testo);
}

img {
  max-width: 100%;
  display: block;
}

/* Griglia decorativa */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

body.theme-light {
  background: linear-gradient(180deg, #ffffff 0%, #e8f0ff 100%);
}

body.theme-light::before {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
}

/* =========================================================
   NAVBAR
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(10, 20, 40, 0.55);
  border-bottom: 1px solid var(--colore-bordo);
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 14px 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.nav a {
  color: var(--colore-testo);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: 0.25s;
}

.nav a:hover,
.nav a.active {
  background: rgba(0, 200, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.35);
}

/* Hamburger */
.hamburger {
  display: none;
  position: absolute;
  left: 20px;
  font-size: 26px;
  background: none;
  border: none;
  color: var(--colore-testo);
  cursor: pointer;
}

/* Tema switch */
.theme-toggle {
  position: absolute;
  right: 20px;
  font-size: 22px;
  background: none;
  border: none;
  color: var(--colore-accento);
  cursor: pointer;
}

.theme-toggle img {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.4));
  transition: 0.25s;
}

.theme-toggle img:hover {
  transform: scale(1.15);
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px 20px;
  text-align: center;
}

.hero-logo {
  width: 420px;
  max-width: 95%;
  margin: 0 auto 35px;
  filter: drop-shadow(0 0 18px rgba(0, 194, 255, 0.35));
  transition: transform 0.25s ease;
}

.hero-logo:hover {
  transform: scale(1.03);
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 15px;
  text-shadow: 0 0 12px rgba(0, 194, 255, 0.25);
}

.hero p {
  color: var(--colore-grigio);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-buttons {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* =========================================================
   BOTTONI
   ========================================================= */

.btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s;
}

.btn.primary {
  background: linear-gradient(135deg, #00c2ff, #0077cc);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 194, 255, 0.4);
}

.btn.primary:hover {
  background: var(--colore-accento-scuro);
}

.btn.ghost {
  border: 2px solid var(--colore-accento);
  color: var(--colore-accento);
}

.btn.ghost:hover {
  background: var(--colore-accento);
  color: #fff;
}

/* =========================================================
   SEZIONI
   ========================================================= */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}

.section p {
  color: var(--colore-grigio);
  max-width: 800px;
  margin: 0 auto;
}

/* =========================================================
   CARDS
   ========================================================= */

.cards {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.card {
  background: var(--colore-card);
  border: 1px solid var(--colore-bordo);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: 0.25s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.card img {
  border-radius: 12px;
  margin-bottom: 12px;
}

/* Bordo animato */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,194,255,0.4), rgba(0,194,255,0));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
  0% { opacity: 0.2; }
  50% { opacity: 0.6; }
  100% { opacity: 0.2; }
}

/* =========================================================
   FORM CONTATTI
   ========================================================= */

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--colore-bordo);
  background: var(--colore-bg);
  color: var(--colore-testo);
  font-size: 1rem;
}

input:focus,
textarea:focus {
  border-color: var(--colore-accento);
  outline: none;
}

/* =========================================================
   PAGE HERO
   ========================================================= */

.page-hero {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 40px 20px;
  text-align: center;
}

.page-hero p {
  color: var(--colore-grigio);
}

/* =========================================================
   COOKIE BANNER — FIX DEFINITIVO
   ========================================================= */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 18px 20px;
  background: var(--colore-card) !important;
  color: var(--colore-testo) !important;
  border-top: 1px solid var(--colore-bordo);
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
}

#cookie-banner p,
#cookie-banner a {
  color: var(--colore-testo) !important;
}

#cookie-accept {
  background: var(--colore-accento) !important;
  color: #000 !important;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

#cookie-accept:hover {
  opacity: 0.85;
}

/* =========================================================
   ANIMAZIONI SCROLL
   ========================================================= */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.6s;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  text-align: center;
  padding: 20px 10px;
  border-top: 1px solid var(--colore-bordo);
  font-size: 0.9rem;
  color: var(--colore-grigio);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hamburger {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    background: var(--colore-card);
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    padding: 20px;
    border-bottom: 1px solid var(--colore-bordo);
  }

  .nav.show {
    display: flex;
  }
}
#cookie-banner {
  z-index: 999999 !important;
  pointer-events: auto !important;
}

footer,
.footer {
  z-index: 1 !important;
  position: relative !important;
}
.cta .btn {
  margin-top: 40px !important;
}

.card {
  position: relative;
  z-index: 1;
}

.card * {
  position: relative;
  z-index: 2;
}

.card::after {
  pointer-events: none !important;
}
.footer a,
.footer a:visited,
.footer a:hover {
  color: #ffffff !important;
  text-decoration: none;
}
.anni {
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 10px;
}
