﻿/**
 * Transfermarkt MLXG — edizione valori (mono-articolo).
 * Scope: .news-tm (non dipende dalla body class).
 */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Oswald:wght@500;600;700&display=swap");

.news-tm,
body.page-news-tm,
body:has(.news-tm) {
  --tm-paper: #f6f7f9;
  --tm-paper-deep: #e6e9ef;
  --tm-ink: #1a1a1b;
  --tm-ink-soft: #2c2c2e;
  --tm-muted: #4a4a4d;
  --tm-rule: rgba(26, 26, 27, 0.22);
  --tm-accent: #1e3a8a;
  --tm-link: #1d4ed8;
  --tm-serif: "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --tm-display: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
}

/* Foglio carta sull’area contenuto (sidebar resta dark) */
body.page-news-tm.pub-shell-layout .pub-shell__main > .page-content,
body.pub-shell-layout:has(.news-tm) .pub-shell__main > .page-content {
  background-color: #f6f7f9 !important;
  background-image:
    linear-gradient(180deg, rgba(246, 247, 249, 0.96), rgba(232, 235, 240, 0.98)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(30, 58, 138, 0.02) 3px,
      rgba(30, 58, 138, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(26, 26, 27, 0.012) 2px,
      rgba(26, 26, 27, 0.012) 3px
    );
  color: #1a1a1b !important;
  min-height: 70vh;
}

body.page-news-tm.pub-shell-layout .pub-shell__main > .page-content a:not(.xg-share-item):not(.btn),
body.pub-shell-layout:has(.news-tm) .pub-shell__main > .page-content a:not(.xg-share-item):not(.btn) {
  color: #1d4ed8;
}

/* Foglio a tutta larghezza dell’area main (sidebar esclusa) */
.news-tm {
  --tm-pad-x: clamp(0.75rem, 2.5vw, 2.25rem);
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.35rem var(--tm-pad-x) 2.75rem;
  color: #1a1a1b !important;
  font-family: var(--tm-serif);
}

/* —— Masthead + Condividi in alto a destra —— */
.news-tm__top {
  position: relative;
  display: block;
  margin: 0.15rem 0 0.35rem;
  min-height: 2.75rem;
}

.news-tm__brand {
  text-align: center;
  padding: 0 3.25rem; /* spazio simmetrico per il bottone a destra */
}

.news-tm__share {
  position: absolute;
  top: 0.15rem;
  right: 0;
  z-index: 5;
}

.news-tm__masthead {
  margin: 0.15rem 0 0.1rem;
  text-align: center;
  font-family: var(--tm-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 4.2vw, 3.15rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: #1a1a1b !important;
}

.news-tm__masthead span {
  color: #1e3a8a !important;
}

.news-tm__kicker {
  margin: 0 0 0.65rem;
  text-align: center;
  font-family: var(--tm-serif);
  font-size: 0.78rem;
  font-style: italic;
  color: #4a4a4d !important;
  letter-spacing: 0.02em;
}

.news-tm__rules {
  border: 0;
  border-top: 3px solid #1a1a1b;
  border-bottom: 1px solid #1a1a1b;
  height: 0.45rem;
  margin: 0 0 1rem;
  background: transparent;
}

/* Override banda community / glow titolo */
body.pub-shell-layout.nav-sec-community .news-tm .page-head,
.news-tm .page-head {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-bottom: 0.25rem;
}

body.pub-shell-layout.nav-sec-community .news-tm .page-head h1,
.news-tm .page-head h1 {
  text-shadow: none !important;
  color: #1a1a1b !important;
}

.news-tm .page-head .container {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.news-tm .breadcrumbs {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: #4a4a4d !important;
  margin-bottom: 0.75rem;
}

.news-tm .breadcrumbs a {
  color: #4a4a4d !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-tm .news-head-row {
  display: block;
  margin: 0;
}

.news-tm .news-head-row--tm h1,
.news-tm .page-head h1 {
  margin: 0;
  flex: none;
  width: 100%;
  max-width: none;
  font-family: var(--tm-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.4vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #1a1a1b !important;
}

.news-tm .news-share-bar__meta,
.news-tm .page-head .muted {
  margin: 0.55rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a4a4d !important;
}

.news-tm .xg-share-toggle.btn.outline,
.news-tm__share .xg-share-toggle.btn.outline {
  background: transparent !important;
  color: #1a1a1b !important;
  border: 1.5px solid #1a1a1b !important;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  box-shadow: none !important;
}

.news-tm .xg-share-toggle.btn.outline:hover,
.news-tm__share .xg-share-toggle.btn.outline:hover {
  background: #1a1a1b !important;
  color: #f6f7f9 !important;
}

/* Menu share su carta: apri verso sinistra (bottone a destra) */
.news-tm__share .xg-share-menu {
  right: 0;
  left: auto;
  border-radius: 0;
  border: 1px solid #1a1a1b;
  background: #f6f7f9;
  box-shadow: 4px 6px 0 rgba(26, 26, 27, 0.12);
}

.news-tm__share .xg-share-item {
  color: #1a1a1b !important;
  border-radius: 0;
}

.news-tm__share .xg-share-item:hover,
.news-tm__share .xg-share-item:focus-visible {
  background: rgba(26, 26, 27, 0.08) !important;
}

/* —— Corpo articolo (mono colonna, tutta larghezza) —— */
.news-tm .news-body {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 0 1.5rem !important;
  color: #1a1a1b !important;
}

.news-tm .news-body img,
.news-tm .news-cover-zoom,
.news-tm .news-cover-zoom img {
  border-radius: 0;
  box-shadow: none;
}

/* Cover a tutta colonna (edge-to-edge sul foglio) */
.news-tm .news-cover-zoom {
  display: block;
  width: calc(100% + (2 * var(--tm-pad-x)));
  max-width: none;
  margin: 0 calc(-1 * var(--tm-pad-x)) 1.35rem;
  border: 0;
  border-top: 1px solid rgba(26, 26, 27, 0.28);
  border-bottom: 1px solid rgba(26, 26, 27, 0.28);
  background: #e6e9ef;
}

.news-tm .news-cover-zoom img {
  width: 100%;
  height: auto;
  display: block;
}

.news-tm .news-cover-zoom__hint {
  border-radius: 0;
  background: rgba(26, 26, 27, 0.85);
  color: #f6f7f9;
  border-color: transparent;
  font-family: system-ui, sans-serif;
}

.news-tm .news-cover-zoom:hover .news-cover-zoom__hint,
.news-tm .news-cover-zoom:focus-visible .news-cover-zoom__hint {
  background: #1e3a8a;
  border-color: transparent;
}

.news-tm__prose {
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.75;
  color: #2c2c2e !important;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  max-width: none;
  width: 100%;
}

.news-tm .news-body p,
.news-tm__prose,
.news-tm__prose p,
.news-tm__prose > p {
  margin: 0 0 1em;
  color: #2c2c2e !important;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem) !important;
  line-height: 1.75 !important;
  font-family: var(--tm-serif) !important;
}

/* Capolettera sul primo paragrafo */
.news-tm__prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--tm-display);
  font-weight: 700;
  font-size: 3.35em;
  line-height: 0.82;
  padding: 0.08em 0.1em 0 0;
  color: #1e3a8a !important;
  text-transform: uppercase;
}

.news-tm__prose h2,
.news-tm__prose h3,
.news-tm .news-body h2,
.news-tm .news-body h3 {
  font-family: var(--tm-display);
  color: #1a1a1b !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 1.4em 0 0.5em;
  text-align: left;
}

.news-tm__prose h2,
.news-tm .news-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  border-bottom: 2px solid #1a1a1b;
  padding-bottom: 0.25rem;
}

.news-tm__prose h3,
.news-tm .news-body h3 {
  font-size: 1.12rem;
  font-weight: 600;
  color: #1e3a8a !important;
  border-bottom: 0;
}

.news-tm__prose strong,
.news-tm__prose b {
  color: #1a1a1b !important;
  font-weight: 700;
}

.news-tm__prose a,
.news-tm .news-body a:not(.xg-share-item) {
  color: #1d4ed8 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Colori TinyMCE (giallo su dark) → inchiostro su carta */
.news-tm__prose [style*="color"],
.news-tm .news-body [style*="color"] {
  color: inherit !important;
}

.news-tm__prose strong[style*="color"],
.news-tm__prose b[style*="color"],
.news-tm__prose span[style*="color"] strong,
.news-tm__prose span[style*="color"] b {
  color: #1a1a1b !important;
}

.news-tm__prose blockquote {
  margin: 1.25em 0;
  padding: 0.35em 0 0.35em 1em;
  border-left: 3px solid #1e3a8a;
  font-style: italic;
  color: #1a1a1b !important;
}

.news-tm__prose ul,
.news-tm__prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
  text-align: left;
  color: #2c2c2e !important;
}

.news-tm__prose li {
  margin: 0.25em 0;
  color: #2c2c2e !important;
}

.news-tm__prose img {
  margin: 1em 0;
  border: 1px solid rgba(26, 26, 27, 0.28);
}

.news-tm__prose table,
.news-tm .news-body table {
  display: table;
  width: 100%;
  border: 1px solid #1a1a1b;
  border-radius: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  background: #fff;
}

.news-tm__prose table th,
.news-tm__prose table td,
.news-tm .news-body table th,
.news-tm .news-body table td {
  border-bottom: 1px solid rgba(26, 26, 27, 0.22);
  color: #1a1a1b !important;
  white-space: normal;
}

.news-tm__prose table th,
.news-tm .news-body table th {
  background: #e6e9ef !important;
  color: #1a1a1b !important;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.news-tm__prose table tbody tr:hover td,
.news-tm .news-body table tbody tr:hover td {
  background: rgba(26, 26, 27, 0.04);
}

.news-tm__prose table caption {
  color: #4a4a4d !important;
}

/* Menzioni Wire su carta */
.news-tm .news-body .xg-wire-tag--user,
.news-tm .news-body .xg-wire-tag--team {
  color: #1d4ed8 !important;
}

.news-tm .news-body .xg-wire-tag--player {
  color: #6d28d9 !important;
}

.news-tm .news-body .xg-wire-tag--all {
  color: #1e3a8a !important;
}

/* Commenti su foglio */
.news-tm .news-comments {
  border-top: 2px solid #1a1a1b;
  margin-top: 2rem;
  padding-top: 1.25rem;
}

.news-tm .news-comments__title {
  font-family: var(--tm-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1a1a1b !important;
}

.news-tm .news-comments__title i {
  color: #1e3a8a !important;
}

.news-tm .news-comments__count {
  background: #1e3a8a;
  color: #fff !important;
  border-radius: 0;
}

.news-tm .news-comments__sub,
.news-tm .news-comments__when,
.news-tm .news-comments__empty,
.news-tm .news-comments__login {
  color: #4a4a4d !important;
}

.news-tm .news-comments__sub a,
.news-tm .news-comments__login a {
  color: #1d4ed8 !important;
}

.news-tm .news-comments__item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(26, 26, 27, 0.22);
  border-radius: 0;
}

.news-tm .news-comments__who,
.news-tm .news-comments__body {
  color: #1a1a1b !important;
}

.news-tm .news-comments__input {
  background: #fff !important;
  color: #1a1a1b !important;
  border: 1px solid rgba(26, 26, 27, 0.28) !important;
  border-radius: 0;
}

.news-tm .news-comments__input:focus {
  border-color: #1a1a1b !important;
}

.news-tm .news-comments__submit {
  background: #1a1a1b !important;
  border-radius: 0;
}

.news-tm .news-comments__submit:hover {
  background: #1e3a8a !important;
}

.news-tm .news-body > p a,
.news-tm .news-body > p {
  color: #2c2c2e !important;
}

/* —— Responsive: telefono / tablet / desktop —— */
@media (max-width: 719.98px) {
  .news-tm {
    --tm-pad-x: 0.75rem;
    padding-top: 0.15rem;
    padding-bottom: 2rem;
  }

  .news-tm__top {
    min-height: 2.5rem;
  }

  .news-tm__brand {
    padding: 0 2.75rem 0 0; /* su mobile titolo a sinistra, share a destra */
    text-align: left;
  }

  .news-tm__masthead {
    text-align: left;
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .news-tm__kicker {
    text-align: left;
    font-size: 0.7rem;
  }

  .news-tm__share {
    top: 0;
  }

  /* Su telefono: solo icona, meno spazio */
  .news-tm__share .xg-share-toggle__lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .news-tm__share .xg-share-toggle.btn.outline {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem !important;
  }

  .news-tm .news-head-row {
    display: block;
  }

  .news-tm .page-head h1 {
    flex: none;
    margin: 0.35rem 0 0.25rem;
  }

  .news-tm__prose,
  .news-tm .news-body p,
  .news-tm__prose > p {
    font-size: 1rem !important;
    text-align: left;
    hyphens: manual;
  }

  .news-tm__prose > p:first-of-type::first-letter {
    font-size: 2.6em;
  }

  .news-tm .news-cover-zoom__hint span {
    display: none;
  }
}

@media (min-width: 720px) and (max-width: 1099.98px) {
  .news-tm {
    --tm-pad-x: clamp(1rem, 2.5vw, 1.75rem);
  }

  .news-tm__prose,
  .news-tm .news-body p,
  .news-tm__prose > p {
    font-size: 1.06rem !important;
  }
}

@media (min-width: 1100px) {
  .news-tm {
    --tm-pad-x: clamp(1.25rem, 2vw, 2.5rem);
  }

  .news-tm__prose,
  .news-tm .news-body p,
  .news-tm__prose > p {
    font-size: 1.125rem !important;
    line-height: 1.78 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-tm .xg-share-toggle {
    transition: none;
  }
}
