
/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0d3b66;
  color: #ffffff;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2em;
}

.container-servizi {
  max-width: 900px;
  margin: 0 auto;
  padding: 2em 1.5em;
}

.section {
  padding: 4em 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ========== Header (Hero) ========== */
.hero {
  background-image: url('../assets/img/header-bg.jpeg');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 5em 2em;
  color: #fff;
}

.hero h1 {
  font-size: 2.8em;
  margin-bottom: 0.3em;
}

.hero p {
  font-size: 1.2em;
  color: #d2e0f1;
}

/* ========== Navbar ========== */
.main-nav {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1em;
  text-align: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
}

.main-nav a {
  color: #ffffff;
  font-weight: bold;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #a9d6ff;
}

/* ========== Sezioni con BG ========== */
#competenze {
  background-image: url('../assets/img/bg-competenze.jpeg');
}
#collaborazioni {
  background-image: url('../assets/img/bg-collaborazioni.jpeg');
}
#ai {
  background-image: url('../assets/img/bg-ai.jpeg');
}
#contatti {
  background-image: url('../assets/img/bg-contatti.jpeg');
}

/* ========== Sezione Profilo (Chi siamo) ========== */
.profilo-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: flex-start;
}

.profilo-testo {
  flex: 1 1 60%;
}

.profilo-img {
  flex: 1 1 35%;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2em; /* opzionale, per spingere un po’ più in basso */
}

.profilo-img img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 1em; /* aggiuntivo */
}

/* ========== Competenze con Icone SVG ========== */
.competenze-list {
  list-style: none;
  padding: 0;
}

.competenze-list li {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  margin-bottom: 2em;
}

.competenze-list .icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.competenze-list h3 {
  margin: 0 0 0.2em 0;
}

.competenze-list p {
  margin: 0;
  color: #ddd;
}

/* ========== Contatti ========== */
.contatti-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: center;
  justify-content: space-between;
}

/* ========== Footer ========== */
footer {
  background-color: #061e36;
  text-align: center;
  padding: 2em;
  font-size: 0.9em;
  color: #a9c2db;
}

#profilo {
  background-image: url('../assets/img/bg-profilo.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  color: #ffffff;
}

#profilo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45); /* ombra leggera per leggibilità testo */
  z-index: 0;
}

#profilo .container {
  position: relative;
  z-index: 1;
}

.home-link {
  text-decoration: none;
  color: inherit;
}

.home-link:hover {
  opacity: 0.8;
  cursor: pointer;
}

.servizi-bg {
  background-image: url('../assets/img/bg-servizi.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
}

.section h2 {
  font-size: 2.2rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 0.3em;
  margin-bottom: 1em;
}

.intro-servizi {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2em;
  color: #f0f0f0;
}

.servizio-card {
  background-color: rgba(0, 0, 0, 0.35);
  border-left: 4px solid #ffffff88;
  padding: 1.5em;
  margin-bottom: 1.5em;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.servizio-card h3 {
  font-size: 1.4em;
  margin-bottom: 0.5em;
  color: #fff;
}

.servizio-card:hover {
  transform: translateY(-2px);
}

.cta-servizi {
  font-style: italic;
  font-size: 1.05em;
  margin-top: 2.5em;
  color: #ddd;
  text-align: center;
}

.servizi-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* sfondo scuro leggero per contrasto */
  z-index: 0;
}

.servizi-bg .container-servizi {
  position: relative;
  z-index: 1;
}

.testo-sezione {
  background: linear-gradient(to bottom, #f9f9f9 0%, #cccccc);
  color: #0d3b66;
  padding: 4em 2em;
  line-height: 1.7;
}

.testo-sezione h2 {
  color: #0d3b66;
  font-size: 1.8rem;
  margin-bottom: 1em;
}

.testo-sezione p {
  margin-bottom: 1.2em;
  font-size: 1.05rem;
}

.logo-contatti {
  display: flex;
  margin-bottom: 0.8em;
}

.logo-contatti img {
  width: 160px;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 0.4em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ======= Ottimizzazioni accessibilità 2025 ======= */

/* === Accessibilità: contenuti nascosti ma leggibili dai lettori vocali === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Focus visibile sui link per accessibilità tastiera === */
a:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}


/* === Pagina 404 */

.page-404 {
  background-image: url('../assets/img/bg-404.png');
  background-size: cover;
  background-position: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.page-404 .container {
  background: rgba(0, 0, 0, 0.4);
  padding: 40px;
  border-radius: 12px;
}

.page-404 h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.page-404 p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .profilo-flex,
  .contatti-box {
    flex-direction: column;
  }

  .profilo-img,
  .contatti-qr {
    max-width: 100%;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1em;
  }
  
  .servizio-card {
    padding: 1.2em;
    font-size: 0.95em;
  }
}