/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE */
body {
  font-family: 'Merriweather Sans', sans-serif;
  background: #1b1c1e;
  color: #fff;
  line-height: 1.6;
}

/* LINK */
a {
  color: #fff;
  text-decoration: none;
  position: relative;
  transition: 0.3s;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: 0.3s;
}

a:hover {
  color: #e63946;
}

a:hover::after {
  width: 100%;
}

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

/* HEADER E MENU CON SOTTOMENU */
.header-top {
  display: flex;
  justify-content: center;
	align-content: center;
	margin-bottom: 15px;
}

.header {
  background: #000;
  text-align: center;
  padding: 40px 0 10px 0;
  border-bottom: 1px solid #222;
}

/* LOGO */
.logo img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 15px auto;
}

.logo {
	display: flex;
	justify-content: center;
	align-content: center;
}
/* MENU */
.menu {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  padding: 10px 0;
  border-top: 1px solid #222;
  position: relative;
}

/* LINK MENU */
.menu a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.menu a:hover {
  opacity: 1;
}

.menu > li {
  position: relative;
}
/* Gestione Sottomenu */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  padding: 10px;
  min-width: 120px;
  text-align: left;
  list-style: none;
  z-index: 100;
  border-top: 2px solid #e63946;
}

.menu li:hover .submenu {
  display: block;
}

.submenu li {
  padding: 5px 0;
}

.submenu a {
  font-size: 11px;
  display: block;
}

/* HERO */
.hero {
  max-width: 1100px;
  margin: 40px auto;
  position: relative;
}

.hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.hero-text {
  position: absolute;
  bottom: 25px;
  left: 25px;
  max-width: 500px;
}

.hero-text h1 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #1b1c1e;
}

.hero-text p {
  font-size: 14px;
  color: #1b1c1e;
}

  /* RICERCA BOX*/	
/* RICERCA SITO MINIMAL */
.ricerca-sito-minimal {
  max-width: 620px;
  margin: -18px auto 28px;
  padding: 0 20px;
  text-align: center;
}

.ricerca-sito-minimal label {
  display: block;
  color: #aaa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.ricerca-linea {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #444;
}

.ricerca-linea input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 4px;
  color: #fff;
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 13px;
  outline: none;
  text-align: center;
}

.ricerca-linea input::placeholder {
  color: #777;
}

.ricerca-linea:focus-within {
  border-bottom-color: #e63946;
}

.ricerca-linea button {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 4px;
}

.ricerca-linea button:hover {
  color: #e63946;
}


/* DATA AGGIORNATA */
.meta-info {
  max-width: 1100px;
  margin: 10px auto 30px auto;
  padding: 0 20px;;
  font-size: 12px;
  color:#aaa;
  letter-spacing: 0.5px;
}

/* MEMORIAL */
.memorial {
  background: #111;
  padding: 80px 20px;
}

.memorial-inner {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: center;
}

.memorial-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: grayscale(100%);
}

.memorial-title {
  font-size: 30px;
}

.memorial-years {
  color: #e63946;
  margin-bottom: 15px;
}

.memorial-description {
  margin-bottom: 10px;
}

.memorial-quote {
  margin-top: 20px;
  font-style: italic;
  border-left: 2px solid #e63946;
  padding-left: 10px;
}

.memorial-link {
  display: inline-block;
  margin-top: 15px;
  color: #e63946;
}

/* SEZIONI */
.section {
  max-width: 1100px;
  margin: 40px auto;
  background: #f4f1ea;
  color: #000;
  padding: 40px 20px;
}

/* TITOLI */
.title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  position: relative;
}

.title::after {
  content: "";
  width: 50px;
  height: 2px;
  background: #e63946;
  display: block;
  margin-top: 8px;
}

.title a {
  color:  inherit;
  text-decoration: none;
}

.title a::after {
  display: none; /* rimuove la linea hover rossa */
}

/* GRID */
.grid-featured {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}

.grid-medium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-small {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* CARD */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.2s;
  padding: 15px;  color: #1b1c1e;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: 50% 20%;
	
}

.card-content {
  padding: 12px;
}

.card h3 {
  font-size: 15px;  color: #1b1c1e;
  margin-bottom: 5px;
}

.card p {
  font-size: 13px;
  color: #333;
}

/* BLOCCO INTRO */
.intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: center;
}

.intro img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

/* TAG */
.tag {
  font-size: 11px;
  color: #e63946;
  margin-top: 8px;
  display: inline-block;
}

/* CONTENUTI EDITORIALI */
.contenuti {
    max-width: 1100px;
    margin: 0 auto;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding: 40px 20px;
    border-top: 2px solid #e63946;
}

.colonna {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.colonna h3 {
    font-size: 14px;
    letter-spacing: 2px;
    color: #e63946;
    margin-bottom: 10px;
}

.colonna a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
}

.colonna a:hover {
    color: #e63946;
}

.social .icone {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social img {
    width: 22px;
    transition: transform 0.2s;
}

.social img:hover {
    transform: scale(1.2);
}

/* FOOTER */
.footer {
  text-align: center;
  color: white;
  padding: 20px;
}

/* ==================================================
MENU HAMBURGER - BASE
================================================== */

/* Hamburger nascosto su desktop */
.menu-toggle {
display: none;
}

/* POESIAS / POETAS come normali voci menu su desktop */
.submenu-toggle {
background: none;
border: none;
color: #fff;
font-family: 'Merriweather Sans', sans-serif;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 1.5px;
opacity: 0.8;
cursor: pointer;
position: relative;
padding: 0;
transition: 0.3s;
}

.submenu-toggle:hover {
color: #e63946;
opacity: 1;
}

/* Su desktop il comportamento del sottomenu resta hover */
.menu > li:hover > .submenu {
display: block;
}




/* RESPONSIVE */
@media (max-width: 768px) {
   /* LOGO */
	.logo img {
		width: 140px;
  }	 
  /* MENU */
  .menu {
    flex-wrap: wrap;
	  gap: 15px;
  }

  .menu a {
    font-size: 11px;
  }
	
	/* ==================================================
MENU MOBILE
================================================== */

.nav {
position: relative;
}

/* PULSANTE HAMBURGER */
.menu-toggle {
  display: flex;
  width: 40px;
  height: 36px;
  margin: 0 18px 10px auto;
  padding: 9px 8px;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* TRE LINEE */
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-left: auto;
  background: #fff;
  transition: 0.3s;
}

/* MENU CHIUSO */
.menu {
display: none;
flex-direction: column;
width: 100%;
gap: 0;
padding: 0;
border-top: 1px solid #222;
background: #000;
}

/* MENU APERTO */
.menu.menu-open {
display: flex;
}

.menu > li {
width: 100%;
border-bottom: 1px solid #222;
}

/* LINK NORMALI */
.menu > li > a,
.submenu-toggle {
display: block;
width: 100%;
padding: 14px 20px;
text-align: left;
font-size: 12px;
letter-spacing: 1.5px;
color: #fff;
opacity: 0.9;
}

/* POESIAS / POETAS */
.submenu-toggle {
position: relative;
}

/* FRECCIA */
.submenu-toggle::after {
content: "+";
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
color: #e63946;
font-size: 18px;
line-height: 1;
}

/* QUANDO IL SOTTOMENU È APERTO */
.has-submenu.submenu-open > .submenu-toggle::after {
content: "−";
}

/* SOTTOMENU MOBILE */
.submenu {
display: none;
position: static;
width: 100%;
min-width: 0;
padding: 0;
background: #111;
border-top: none;
text-align: left;
}

/* APERTURA SOTTOMENU */
.has-submenu.submenu-open > .submenu {
display: block;
}

/* IMPORTANTE:
impedisce all'hover desktop di tenere aperto
il sottomenu sul mobile */
.menu li:hover .submenu {
display: none;
}

.menu li.submenu-open:hover .submenu,
.menu li.submenu-open .submenu {
display: block;
}

.submenu li {
padding: 0;
border-top: 1px solid #222;
}

.submenu a {
display: block;
padding: 12px 20px 12px 35px;
font-size: 11px;
color: #bbb;
}

/* Hamburger trasformato in X */
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

	
	/* GRID */
  .grid-featured,
  .grid-medium,
  .grid-small,
  .intro,
  .memorial-inner {
    grid-template-columns: 1fr;
  }

  /* HERO */
  .hero {
    margin: 20px 10px;
  }

  .hero img {
    height: 240px;
  }

  .hero-text {
    left: 15px;
    bottom: 15px;
  }

  .hero-text h1 {
    font-size: 18px;
  }

  /* MEMORIAL */
  .memorial-image img {
    width: 100%;
	height: auto;
	object-fit: contain;
  }

  /* CARD */
  .card img {
    height: 200px;
  }


  /* RICERCA BOX*/	
  .ricerca-sito button {
    padding: 14px;
  }


  /* CONTENUTI */
  .contenuti {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social .icone {
    justify-content: center;
  }
}

@media (max-width: 1024px) {

  .grid-featured {
    grid-template-columns: 1fr 1fr;
  }

  .grid-medium {
    grid-template-columns: 1fr 1fr;
  }
}