/* ==================================================
   RESET
================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ==================================================
   STRUTTURA GENERALE
================================================== */

html {
  scroll-behavior: smooth;
}

body {
  background: #1b1c1e;
  color: #fff;
  line-height: 1.6;
  font-family: 'Merriweather Sans', sans-serif;
}

.container {
  max-width: 1100px;
  margin: auto;
}


/* ==================================================
   LINK
================================================== */

a {
  position: relative;
  color: #fff;
  text-decoration: none;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width 0.3s ease;
}

a:hover {
  color: #e63946;
}

a:hover::after {
  width: 100%;
}


/* ==================================================
   SELEZIONE TESTO
================================================== */

::selection {
  background: #e63946;
  color: #fff;
}


/* ==================================================
   TITOLI
================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Merriweather Sans', sans-serif;
  font-weight: 600;
}


/* ==================================================
   HEADER
================================================== */

.header {
  background: #000;
  padding: 28px 0 14px;
  text-align: center;
  border-bottom: 1px solid #222;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}


/* ==================================================
   LOGO
================================================== */

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  display: block;
  width: 170px;
  height: auto;
  margin: 0 auto 12px;
}


/* ==================================================
   MENU PRINCIPALE - DESKTOP
================================================== */

.nav {
  position: relative;
}

.menu {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 10px 0;
  list-style: none;
  border-top: 1px solid #222;
}

.menu > li {
  position: relative;
}

.menu a,
.submenu-toggle {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.menu a:hover,
.submenu-toggle:hover {
  opacity: 1;
}

/* Hamburger nascosto su desktop */
.menu-toggle {
  display: none;
}

/* POESIAS / POETAS */
.submenu-toggle {
  position: relative;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

.submenu-toggle:hover {
  color: #e63946;
}

/* Linea hover per POESIAS / POETAS */
.submenu-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width 0.3s ease;
}

.submenu-toggle:hover::before {
  width: 100%;
}


/* ==================================================
   SOTTOMENU
================================================== */

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 130px;
  padding: 10px;
  background: #000;
  text-align: left;
  list-style: none;
  border-top: 2px solid #e63946;
}

.menu > li:hover > .submenu {
  display: block;
}

.submenu li {
  padding: 5px 0;
}

.submenu a {
  display: block;
  font-size: 11px;
}


/* ==================================================
   MENU ATTIVO
================================================== */

.menu > li.active > a,
.menu > li.active > .submenu-toggle {
  color: #fff;
  opacity: 1;
}

.menu > li.active > a::after {
  width: 100%;
}

.menu > li.active > .submenu-toggle::before {
  width: 100%;
}


/* ==================================================
   BREADCRUMB
================================================== */

.breadcrumb {
  max-width: 1050px;
  margin: 35px auto 20px;
  padding: 0 20px;
  color: #c7c0b5;
  font-size: 0.9rem;
}

.breadcrumb a,
.breadcrumb span {
  margin-right: 8px;
}


/* ==================================================
   HERO RACCONTO
================================================== */

.racconto-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 45px;
  max-width: 1050px;
  margin: 30px auto 45px;
  padding: 38px 44px;
  background: #232426;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.racconto-hero-text {
  min-width: 0;
}

.categoria {
  margin-bottom: 14px;
  color: #e63946;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.racconto-hero-text h1 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  line-height: 1.1;
}

.sottotitolo {
  margin-bottom: 22px;
  color: #c7c0b5;
  font-size: 1rem;
}

.link-profilo {
  display: inline-block;
  padding-bottom: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.link-profilo::before {
  content: "→";
  margin-right: 8px;
  color: #e63946;
}

.racconto-hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.racconto-hero-image a::after {
  display: none;
}

.racconto-hero-image img {
  display: block;
  width: 215px;
  height: 215px;
  object-fit: cover;
  object-position: center;
  border: 4px solid #e63946;
  border-radius: 50%;
}

/* ==================================================
   IMMAGINE NEL RACCONTO
================================================== */

.immagine-racconto {
  max-width: 520px;
  margin: 0 auto 38px;
  text-align: center;
}

.immagine-racconto a::after {
  display: none;
}

.immagine-racconto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.immagine-racconto figcaption {
  margin-top: 10px;
  color: #666;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
}

/* ==================================================
   RIQUADRO RACCONTO
================================================== */

.racconto {
  max-width: 900px;
  margin: 40px auto;
  padding: 55px 52px;
  background: #f4f1ea;
  color: #1b1c1e;
  border-radius: 12px;
}

.intestazione-racconto {
  margin-bottom: 38px;
}

.tipo-contenuto {
  margin-bottom: 8px;
  color: #777;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

.titolo-racconto {
  margin: 0;
  color: #1b1c1e;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.titolo-racconto::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  margin-top: 8px;
  background: #e63946;
}


/* ==================================================
   TESTO DEL RACCONTO
================================================== */

.testo-racconto {
  padding-left: 22px;
  border-left: 2px solid #e63946;
}

.testo-racconto p {
  margin-bottom: 22px;
  color: #1b1c1e;
  font-size: 15.5px;
  line-height: 1.9;
}

.testo-racconto p:last-child {
  margin-bottom: 0;
}

.testo-racconto p.dialogo {
  color: #333;
  font-style: italic;
}

/* ==================================================
   NOTE E RICONOSCIMENTI
================================================== */

.note {
  margin-top: 48px;
  padding-top: 24px;
  color: #555;
  font-size: 0.92rem;
  border-top: 1px solid #d4cec4;
}

.note h3,
.note h4 {
  margin-bottom: 12px;
  color: #444;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
}

.note p {
  margin: 2px 0;
  color: #555;
  line-height: 1.7;
}

.note strong {
  color: #333;
}

/* ==================================================
   FOOTER
================================================== */

.footer {
  padding: 40px 20px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.footer p {
  margin-bottom: 8px;
}

.copyright {
  color: #aaa;
  font-size: 13px;
}


/* ==================================================
   RESPONSIVE - TABLET E SMARTPHONE
================================================== */

@media (max-width: 820px) {

  /* ==================================================
     STRUTTURA GENERALE
  ================================================== */

  .container {
    padding: 0 14px;
  }


  /* ==================================================
     HERO RACCONTO
  ================================================== */

  .racconto-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 22px auto 30px;
    padding: 26px 22px;
    text-align: center;
    border-radius: 16px;
  }

  .racconto-hero-text h1 {
    font-size: 2.15rem;
  }

  .racconto-hero-image {
    grid-row: 1;
  }

  .racconto-hero-image img {
    width: 175px;
    height: 175px;
  }


  /* ==================================================
     RIQUADRO RACCONTO
  ================================================== */

  .racconto {
    max-width: none;
    margin: 28px auto;
    padding: 34px 24px;
  }


  /* ==================================================
     TESTO RACCONTO
  ================================================== */

  .testo-racconto {
    padding-left: 16px;
  }

  .testo-racconto p {
    font-size: 14.5px;
    line-height: 1.8;
  }


  /* ==================================================
     NOTE
  ================================================== */

  .note {
    margin-top: 32px;
    padding: 16px 16px 16px 18px;
    font-size: 13px;
    border-top: none;
    border-left: 3px solid #e63946;
  }

  .note h3,
  .note h4 {
    font-size: 11px;
  }

}


/* ==================================================
   RESPONSIVE - MOBILE
================================================== */

@media (max-width: 768px) {

  /* ==================================================
     STRUTTURA GENERALE
  ================================================== */

  .container {
    padding: 0 14px;
  }


  /* ==================================================
     HEADER
  ================================================== */

  .header {
    padding: 14px 0 6px;
  }

  .header-top {
    margin-bottom: 4px;
  }

  .logo img {
    width: 122px;
    margin: 0 auto 3px;
  }


  /* ==================================================
     FASCIA MENU
  ================================================== */

  .nav {
    min-height: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }


  /* ==================================================
     MENU HAMBURGER
  ================================================== */

  .menu-toggle {
    display: flex;
    width: 32px;
    height: 29px;
    margin: 2px 14px 2px auto;
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin-left: auto;
    background: #fff;
    transition: 0.3s;
  }


  /* ==================================================
     MENU APERTO
  ================================================== */

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0;
    border-top: 1px solid #222;
    background: #000;
  }

  .menu.menu-open {
    display: flex;
  }

  .menu > li {
    width: 100%;
    border-bottom: 1px solid #222;
  }

  .menu > li > a,
  .submenu-toggle {
    display: block;
    width: 100%;
    padding: 11px 18px;
    color: #fff;
    text-align: left;
    font-size: 11px;
    letter-spacing: 1.2px;
    opacity: 0.9;
  }


  /* ==================================================
     VOCE ATTIVA
  ================================================== */

  .menu > li.active > a,
  .menu > li.active > .submenu-toggle {
    color: #e63946;
    font-weight: 600;
    opacity: 1;
  }


  /* ==================================================
     SOTTOMENU
  ================================================== */

  .submenu-toggle {
    position: relative;
  }

  .submenu-toggle::before {
    display: none;
  }

  .submenu-toggle::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 16px;
    line-height: 1;
  }

  .has-submenu.submenu-open > .submenu-toggle::after {
    content: "−";
  }

  .submenu {
    display: none;
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0;
    background: #111;
    border-top: none;
    text-align: left;
  }

  .has-submenu.submenu-open > .submenu {
    display: block;
  }

  /* Neutralizza il comportamento hover desktop */
  .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: 10px 18px 10px 30px;
    color: #bbb;
    font-size: 10.5px;
  }


  /* ==================================================
     ANIMAZIONE HAMBURGER → X
  ================================================== */

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }


  /* ==================================================
     BREADCRUMB
  ================================================== */

  .breadcrumb {
    margin: 14px auto 12px;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .breadcrumb a,
  .breadcrumb span {
    margin-right: 4px;
  }


  /* ==================================================
     HERO RACCONTO
  ================================================== */

  .racconto-hero {
    gap: 18px;
    margin: 14px auto 25px;
    padding: 22px 18px;
    text-align: center;
    border-radius: 14px;
  }

  .categoria {
    margin-bottom: 8px;
    font-size: 0.68rem;
    letter-spacing: 1.2px;
  }

  .racconto-hero-text h1 {
    margin-bottom: 7px;
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .sottotitolo {
    margin-bottom: 15px;
    font-size: 0.85rem;
  }

  .link-profilo {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .link-profilo::before {
    margin-right: 6px;
  }

  .racconto-hero-image img {
    width: 165px;
    height: 165px;
    border-width: 3px;
  }


  /* ==================================================
     RIQUADRO RACCONTO
  ================================================== */

  .racconto {
    margin: 25px auto;
    padding: 28px 19px;
    border-radius: 10px;
  }

  .intestazione-racconto {
    margin-bottom: 27px;
  }

  .tipo-contenuto {
    margin-bottom: 6px;
    font-size: 9.5px;
    letter-spacing: 1.4px;
  }

  .titolo-racconto {
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: 1.3px;
  }

  .titolo-racconto::after {
    width: 42px;
    margin-top: 6px;
  }


  /* ==================================================
     TESTO RACCONTO
  ================================================== */

  .testo-racconto {
    padding-left: 13px;
    border-left-width: 2px;
  }

  .testo-racconto p {
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.75;
  }

  .testo-racconto p.dialogo {
    font-style: italic;
  }


  /* ==================================================
     EVENTUALE IMMAGINE NEL RACCONTO
  ================================================== */

  .immagine-racconto {
    max-width: 100%;
    margin: 0 auto 27px;
  }

  .immagine-racconto img {
    border-radius: 7px;
  }

  .immagine-racconto figcaption {
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.5;
  }


  /* ==================================================
     NOTE E RICONOSCIMENTI
  ================================================== */

  .note {
    margin-top: 28px;
    padding: 14px 14px 14px 16px;
    font-size: 12.5px;
    line-height: 1.65;
  }

  .note h3,
  .note h4 {
    margin-bottom: 9px;
    font-size: 11px;
    letter-spacing: 1.3px;
  }


  /* ==================================================
     FOOTER
  ================================================== */

  .footer {
    padding: 27px 16px;
    font-size: 12px;
    line-height: 1.6;
  }

  .footer p {
    margin-bottom: 5px;
  }

  .copyright {
    font-size: 11px;
  }

}


/* ==================================================
   RESPONSIVE - SMARTPHONE PICCOLI
================================================== */

@media (max-width: 480px) {

  .racconto-hero {
    padding: 20px 16px;
  }

  .racconto-hero-text h1 {
    font-size: 1.7rem;
  }

  .racconto-hero-image img {
    width: 155px;
    height: 155px;
  }

  .racconto {
    padding: 25px 16px;
  }

  .titolo-racconto {
    font-size: 16px;
  }

  .testo-racconto {
    padding-left: 12px;
  }

  .testo-racconto p {
    margin-bottom: 17px;
    font-size: 13.5px;
    line-height: 1.75;
  }

}