/* Header e footer newsstand (Figma "Header sfogliatore"), caricato solo dalle pagine newsstand */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

/* ── Header ─────────────────────────────────────────────── */
header.nsHeader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
  padding: 0 40px;
  background-color: #edeff2;
  font-family: "Inter", sans-serif;
}

.nsHeader__brands {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nsHeader__brand {
  position: relative;
  display: flex;
  align-items: center;
  height: 80px;
  color: #9098a1;
}

.nsHeader__brand:hover,
.nsHeader__brand.is-active {
  color: #2a2e33;
}

/* Sottolineatura blu 64x4 centrata sotto il logo attivo */
.nsHeader__brand.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 64px;
  height: 4px;
  margin-left: -32px;
  border-radius: 0.5px;
  background-color: #256cb9;
}

/* Il logo è usato come maschera così il colore segue currentColor */
.nsHeader__logo {
  display: block;
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.nsHeader__brand--qn .nsHeader__logo { width: 61px; height: 32px; }
.nsHeader__brand--ilrestodelcarlino .nsHeader__logo { width: 228px; height: 24px; }
.nsHeader__brand--lanazione .nsHeader__logo { width: 192px; height: 20px; }
.nsHeader__brand--ilgiorno .nsHeader__logo { width: 206px; height: 20px; }

.nsHeader__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nsHeader__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background-color: #fff;
  color: #256cb9;
  font: 600 14px/1 "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.nsHeader__btn--primary {
  background-color: #256cb9;
  color: #fff;
}

.nsHeader .userMenu {
  margin: 0;
}

.nsHeader .userMenu .isUser {
  color: #256cb9;
  font-size: 14px;
}

.nsHeader .userMenu .userDropDown {
  top: 44px;
}

@media (max-width: 1279px) {
  .nsHeader__brands { gap: 24px; }
  .nsHeader__brand--qn .nsHeader__logo { width: 46px; height: 24px; }
  .nsHeader__brand--ilrestodelcarlino .nsHeader__logo { width: 171px; height: 18px; }
  .nsHeader__brand--lanazione .nsHeader__logo { width: 144px; height: 15px; }
  .nsHeader__brand--ilgiorno .nsHeader__logo { width: 155px; height: 15px; }
}

@media (max-width: 1023px) {
  header.nsHeader {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 20px 0;
  }

  .nsHeader__brands {
    order: 2;
    width: 100%;
    overflow-x: auto;
  }

  .nsHeader__brand {
    flex-shrink: 0;
    height: 56px;
  }

  .nsHeader__brand.is-active::after { bottom: 4px; }

  .nsHeader__actions { margin-left: auto; }
}

@media (max-width: 767px) {
  .nsHeader__btn { min-width: 0; }
}

/* ── Footer ─────────────────────────────────────────────── */
footer.nsFooter {
  display: block;
  height: auto;
  background-color: #fff;
  font-family: "Inter", sans-serif;
}

.nsFooter p {
  margin: 0;
}

.nsFooter__main {
  display: flex;
}

.nsFooter__brand {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex-shrink: 0;
  width: 483px;
  padding: 48px 40px;
  background-color: #256cb9;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

.nsFooter__logos {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nsFooter__logos img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 100%;
}

.nsFooter__initiative {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}

.nsFooter__qn {
  display: block;
  width: 49px;
  height: 26px;
  background-color: #fff;
  -webkit-mask: url(/images/logos/qn-mark.svg) center / contain no-repeat;
  mask: url(/images/logos/qn-mark.svg) center / contain no-repeat;
}

.nsFooter__quote {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nsFooter__quote p:last-child {
  opacity: 0.8;
}

/* shortcut: font "QN Shinka" del Figma non presente nel progetto, fallback serif finché non viene fornito */
.nsFooter__claim,
.nsFooter__col h2 {
  font-family: "QN Shinka", Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
}

.nsFooter__social {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.nsFooter__social > p {
  opacity: 0.7;
}

.nsFooter__social div {
  display: flex;
  gap: 16px;
}

.nsFooter__social img {
  display: block;
  width: 24px;
  height: 24px;
}

.nsFooter__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
  padding: 64px 40px 48px 16px;
}

.nsFooter__nav {
  display: flex;
  gap: 16px;
  padding-bottom: 48px;
  border-bottom: 1px solid #d9dce1;
}

.nsFooter__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.3;
  color: #5c636c;
}

.nsFooter__col h2 {
  margin: 0 0 6px;
  color: #16181b;
}

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

.nsFooter__col a:hover {
  text-decoration: underline;
}

.nsFooter__legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  font-size: 12px;
  line-height: 1.3;
  color: #5c636c;
}

.nsFooter__legal a {
  color: inherit;
  font-weight: 700;
}

.nsFooter__muted {
  color: #9098a1;
}

.nsFooter__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 40px;
  background-color: #1f2226;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
}

.nsFooter__bar > p {
  opacity: 0.8;
}

.nsFooter__bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.nsFooter__bar a {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 1279px) {
  .nsFooter__brand { width: 360px; }
  .nsFooter__nav { flex-wrap: wrap; row-gap: 32px; }
  .nsFooter__col { flex: 1 1 40%; }
}

@media (max-width: 767px) {
  .nsFooter__main { flex-direction: column; }
  .nsFooter__brand { width: 100%; padding: 40px 20px; }
  .nsFooter__content { padding: 40px 20px; }
  .nsFooter__bar { flex-direction: column; align-items: flex-start; padding: 20px; }
}
