/* =========================================================
   FONT & ROOT VARIABLES
   ========================================================= */
@font-face {
  font-family: 'Piazzolla';
  src: url('fonts/piazzolla.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Flex';
  src: url('fonts/roboto-flex.woff2') format('woff2'),
       url('fonts/roboto-flex.woff') format('woff');
}

:root {
  --font-title: /*'Piazzolla'*/'Roboto Flex', serif;
  --font-body: 'Roboto Flex', sans-serif;

  --color-bg: #2c3b4e;
  --color-accent: #feb161;
  --color-light: #ffffff;
  --color-secondary: #c9c2b2;
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CONTENITORE PER STRINGERE IL CONTENUTO A 1200px */
.container { 
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  background: #2c3b4e;
  backdrop-filter: blur(4px);
  min-height: calc(100vh - 300px); /* px = altezza footer */
  display: flex; 
  flex-direction: column;
}

body {
  background: var(--color-bg);
  color: var(--color-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/sfondo.jpg");
  background-size: cover;
  background-position: center;
  z-index: -1;
}


/* =========================================================
   RESPONSIVE GLOBAL
   ========================================================= */

@media (max-width: 768px) {
  .container {
    min-height: auto;
  }
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  width: 60px;
}

/* NAVBAR */
.navbar ul {
  display: flex;
  gap: 40px;
}

.navbar a {
  font-size: 18px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.navbar a:hover {
  opacity: 0.7;
}

/* CTA HEADER */
.cta-header {
  background: var(--color-accent);
  padding: 10px 20px;
  border-radius: 8px;
}

.cta-text {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-bg);
}

/* =========================================================
   RESPONSIVE HEADER NAVBAR
   ========================================================= */

@media (max-width: 768px) {
  .header {
    padding: 16px 24px;
  }
  .navbar ul {
    gap: 20px;
  }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero { 
  /* height: 33vh;*/ /* altezza dell’hero: % dell’altezza dello schermo */
  aspect-ratio: 16 / 9; 
  width: 100%;
  max-height: 600px; /* opzionale */
  background: url("images/astro.png") center/cover no-repeat; /* immagine centrata e adattata */
  background-position: 50% 50%; /* centra l’immagine */
  /* background-size: contain;*/ /* SEMPRE visibile interamente */
  display: flex; /* permette l’allineamento del contenuto */
  align-items: center; /* centra verticalmente il contenuto */
  position: relative; /* utile per overlay o z-index */
  padding: 0 48px; /* spazio laterale interno */
  border-radius: 12px; /* angoli arrotondati */
  overflow: hidden; /* nasconde eventuali fuoriuscite di immagine o contenuto */
}

.hero-content { 
  position: relative; /* mantiene il contenuto sopra eventuali overlay */
  z-index: 2; /* porta il contenuto sopra lo sfondo */
  max-width: 1000px; /* limita la larghezza del testo */
  text-align: left; /* allinea il testo a sinistra */
  display: flex; /* impila gli elementi */
  flex-direction: column; /* uno sotto l’altro */
  gap: 32px; /* SPAZIO TRA TITOLO, SOTTOTITOLO E BOTTONE */
}

.hero-title { 
  font-family: var(--font-title); /* font personalizzato */
  font-size: 42px; /* dimensione grande */
  margin-bottom: 12px; /* piccolo spazio sotto */
  color: var(--color-secondary); /* colore del titolo */
  /* text-shadow: 3px 3px 10px #000000c7; ombra per migliorare la leggibilità */
  /*-webkit-text-stroke: 1px #ffffff46;*/
  background: #00000000; 
  padding: 24px; 
  border-radius: 12px; 
  /*backdrop-filter: blur(4px);*/
}

.hero-subtitle { 
  font-size: 20px; /* dimensione testo */
  margin-bottom: 28px; /* spazio sotto */
  opacity: 0.9; /* leggermente trasparente */
}

.hero-btn { 
  display: inline-block; /* permette padding e hover */
  max-width: 200px;
  padding: 12px 28px; /* dimensioni interne */
  background: var(--color-accent); /* colore del bottone */
  color: var(--color-bg); /* colore del testo */
  font-family: var(--font-title); /* font coerente col titolo */
  font-size: 20px; /* dimensione testo */
  font-weight: 700; /* grassetto */
  border-radius: 10px; /* angoli arrotondati */
  transition: 0.2s ease; /* animazione hover */
}

.hero-btn:hover { 
  opacity: 0.85; /* leggero fade */
  transform: translateY(-3px); /* si solleva */
}

/* =========================================================
   RESPONSIVE HERO
   ========================================================= */

@media (max-width: 768px) { 
  .hero {
     aspect-ratio: 1 / 1; 
     min-height: 400px; /* opzionale */
     padding: 0 24px; /* meno spazio laterale */
  }
  .hero-content { 
     gap: 12px; /* SPAZIO TRA TITOLO, SOTTOTITOLO E BOTTONE */
  }
  .hero-title {
    font-size: 24px; /* titolo più piccolo */
    margin-bottom: 4px; /* piccolo spazio sotto */
  }
  .hero-subtitle {
    font-size: 18px; /* sottotitolo più piccolo */
  }
}


/* =========================================================
   SEZIONI TESTO + IMMAGINE AFFIANCATE
   ========================================================= */
.feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 48px;
}

.feature.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
  font-family: var(--font-title);
  color: var(--color-light);
}

.feature-text h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--color-secondary);
}

.feature-text p {
  font-size: 20px;
  line-height: 1.6;
}

.feature-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.feature-img img {
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  opacity: 0.9;
}

/* =========================================================
   FEATURES RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .feature,
  .feature.reverse {
    flex-direction: column;
    text-align: center;
  }

  .feature-img img {
    max-width: 300px;
  }
}

/* =========================================================
   CHI SIAMO
   ========================================================= */
.about {
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.about-text {
  font-family: var(--font-title);
  font-size: 26px;
  max-width: 800px;
  text-align: center;
}

.cta-siamo { 
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cta-siamo:hover { 
  opacity: 0.85;
  transform: translateY(-2px);
}

.img-siamo {
  border-radius: 12px;
  opacity: 0.8;
}

/* =========================================================
   RESPONSIVE CHI SIAMO
   ========================================================= */

@media (max-width: 768px) {
  .about {
    padding: 40px 24px;
  }
  .about-text {
    font-size: 20px;
  }
}

/* =========================================================
   CONTACT FORM
   ========================================================= */

.contact {
  padding-bottom: 14px;
}

.contact-form { 
  max-width: 600px;
  margin: 0 auto;
  padding: 32px;
  background: #00000099;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 20px #0000004d;
}

.contact-form input,
.contact-form textarea { 
  width: 100%;
  padding: 14px 14px;
  margin-bottom: 14px;
  border: 1px solid #444444;
  border-radius: 8px;
  background: #111111;
  color: #eeeeee;
  font-size: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-indent: 0; 
  padding-left: 16px; 
  margin-left: 0;
}

.contact-form input:focus,
.contact-form textarea:focus { 
  border-color: var(--color-accent);
  background: #1a1a1a;
  outline: none;
}

.contact-form textarea { 
  height: 140px;
  resize: none;
}

.contact-form button {
  width: 100%;
  padding: 14px;
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-form button:hover { 
  opacity: 0.85;
  transform: translateY(-2px);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: #000;
  padding: 60px 48px;
  display: grid; 
  grid-template-columns: repeat(5, 1fr);;
  gap: 12px; /* spazio tra le colonne */
  color: var(--color-light);
  margin-top: auto; /* spinge il footer in fondo */
  align-items: auto; 
  justify-items: auto;
  padding-bottom: 0; /* rimuove il padding inferiore per il copyright */
}

/* LOGO */
.footer-logo {
  width: 90px;
}

/* SLOGAN */
.footer-slogan {
  font-size: 10px;
  font-weight: 600;
}

/* MENU */
.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-menu li {
  font-size: 16px;
}

/* DOVE SIAMO */
.footer-location {
  font-size: 16px;
}

/* CONTATTI */
.footer-contacts {
  font-size: 16px;
}

/* ICONE SOCIAL */
.social-icons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-self: end; /* SEMPRE a destra della griglia */
}

.social-icons img {
  width: 28px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.social-icons img:hover {
  opacity: 0.6;
}

/* COPYRIGHT */
.footer-copy {
  grid-column: 1 / -1; /* OCCUPA SEMPRE TUTTA L’ULTIMA RIGA */
  font-size: 14px;
  margin-bottom: 14px;
  opacity: 0.7;
  justify-self: center; /* CENTRA ORIZZONTALMENTE */
}

/* =========================================================
   RESPONSIVE FOOTER
   ========================================================= */

@media (max-width: 768px) {

  .footer {
    grid-template-columns: 1fr; /* una colonna sola */
    gap: 24px; /* gap ridotto */
    text-align: center;
  }
  /* MENU */
  .footer-menu {
    flex-direction: row;
    gap: 14px;
    justify-self: center;
  }
  .social-icons {
    flex-direction: row;
    justify-self: center;
  }

  .footer-copy {
    margin-top: 14px;
  }

}

/* =========================================================
   COOKIE BANNER
   ========================================================= */

.cookie-banner { 
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background: rgba(0, 0, 0, 0.85);
  color: #eee;
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  z-index: 9999;
}

.cookie-banner button { 
  background: var(--color-accent);
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-banner button:hover { 
  opacity: 0.85;
  transform: translateY(-2px);
}
