:root{
  --primary: #5da9dd;
  --primary-600: #3a93d1;
  --bg: #ffffff;
  --text: #233;
  --muted: #6a7a8a;
}

*{box-sizing:border-box}
body{margin:0;font-family:"Open Sans",system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial; color:var(--text); background:var(--bg);}

.wrap{max-width:1080px;margin:0 auto;padding:0 16px}

.site-header{position:sticky;top:0;background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(8px); border-bottom:1px solid #e9eef3; z-index:10}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.logo img{width:36px;height:36px;object-fit:contain}
.logo .sitename{font-weight:700}
.main-nav a{margin:0 8px;padding:8px 10px;border-radius:10px;text-decoration:none;color:#234}
.main-nav a:hover{background:var(--primary);color:#fff}

.hero{
  position:relative;
  overflow: hidden; /* new cover  */
  background:linear-gradient(180deg, #eaf5ff, #fff);
}
.hero .cover{width:100%;height:300px;object-fit:cover;display:block}

.hero .overlay{
  /* position:absolute; */
  position: relative; /* new cover  */
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  text-shadow:0 2px 8px rgba(0,0,0,.35);
  font-family:"Lora",serif;
  background-image: url('https://parrocchiacaria.it/assets/img/chiesa-della-trasfigura.jpg');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  min-height: 400px;
}
/* ANGELI E STELLE in pseudo-elemento */
.hero .overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('https://parrocchiacaria.it/assets/img/angels-stars.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  pointer-events: none; /* così non blocca click o testo */
  z-index: 1; /* sopra lo sfondo ma sotto il testo */
}

.hero h1{
  position: relative;
  z-index: 2; /* sopra la pseudo-classe */
  font-size:clamp(1.8rem, 3.5vw, 3rem);
  margin:0;
  padding:0 16px;
  text-align:center
}

.section{padding:28px 0}
.grid{display:grid;gap:16px}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}

.card{border:1px solid #e9eef3;border-radius:16px;padding:16px;background:#fff;box-shadow:0 4px 14px rgba(32,79,124,.04)}
.card h3{margin-top:0;font-family:"Lora",serif}

.btn{display:inline-block;background:var(--primary);color:#fff;padding:10px 16px;border-radius:12px;text-decoration:none}
.btn:hover{background:var(--primary-600)}

.site-footer{border-top:1px solid #e9eef3;margin-top:32px;padding:24px 0;color:var(--muted)}
.site-footer .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px; flex-wrap:wrap}
.site-footer .icon{width:28px;height:28px;object-fit:contain;margin-right:6px;vertical-align:middle}

/* Stile base */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 11;
}
.menu-toggle span {
  display: block;
  height: 3px;
  background: #234;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Stato attivo: X animata */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu nascosto */
@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #e9eef3;
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
  }

  .main-nav a {
    margin: 10px 0;
    padding: 10px;
    display: block;
    font-size: 1.1em;
  }

  .menu-toggle {
    display: flex;
  }

  /* Quando attivo */
  .main-nav.open {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
