/*
 Theme Name:   Newspaper Child — Centralmente
 Theme URI:    https://www.centralmente.com/
 Description:  Child theme di Newspaper per la rivista Centralmente. Non modifica i file del tema a pagamento.
 Author:       Centralmente
 Template:     Newspaper
 Version:      1.0.0
 Text Domain:  newspaper-child
*/

/* Rivista: carta, inchiostro, meno chrome da template */
body.td-standard-pack,
body.home-page-centralmente,
#td-outer-wrap {
  background-color: #f7f4ee;
}

.td-excerpt,
.td-post-content,
.tdb-block-inner p {
  color: #2a2622;
}

/* Testata da rivista: nameplate in alto, ricerca e numero in una riga */
.td-header-desktop-wrap {
  display: none !important;
}

#tdi_18 {
  position: relative;
  z-index: 8;
  height: 0;
  margin: 0 !important;
  overflow: visible;
}

#tdi_18:not(:has(.tdb_header_search)) {
  display: none !important;
}

body .tdi_22 {
  position: absolute;
  top: 10px;
  right: 24px;
  margin-left: 0 !important;
  width: auto !important;
}

.tdi_27 {
  display: none !important;
}

body .tdi_24 {
  padding-top: 10px !important;
}

@media (min-width: 1019px) {
  body .tdi_24 {
    padding-top: 12px !important;
  }
}

@media (max-width: 767px) {
  body .tdi_24 {
    padding-top: 8px !important;
  }
}

.centralmente-masthead {
  position: relative;
  z-index: 30;
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid #1c1916;
  box-shadow: 0 3px 0 #1c1916;
  animation: centralmente-masthead-in 0.5s ease;
}

.centralmente-masthead-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #c9c2b6;
}

.centralmente-masthead-issue {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  line-height: 1;
}

.centralmente-masthead-issue:empty {
  visibility: hidden;
}

.centralmente-masthead-date {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a453e;
}

.centralmente-masthead-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4a453e;
}

.centralmente-masthead-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1c1916;
  font-variant-numeric: tabular-nums;
}

.centralmente-masthead .tdi_22,
.centralmente-masthead .tdi_28 {
  position: relative;
  top: auto;
  right: auto;
  margin: 0 !important;
  width: auto !important;
}

.centralmente-masthead .tdi_22 {
  flex: 0 0 auto;
  z-index: 6;
}

.centralmente-masthead .tdb-head-search-btn i,
.centralmente-masthead .tdb-search-icon-svg {
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 17px !important;
  color: #1c1916 !important;
}

.centralmente-masthead .tdb-search-icon-svg svg,
.centralmente-masthead .tdb-search-icon-svg svg * {
  fill: #1c1916 !important;
}

.centralmente-masthead .tdb-head-search-btn:hover i,
.centralmente-masthead .tdb-head-search-btn:hover svg * {
  color: #2a4a8a !important;
  fill: #2a4a8a !important;
}

.centralmente-masthead .tdi_28 .tdb-logo-a {
  justify-content: center;
}

.centralmente-masthead .tdb-logo-img {
  display: block;
  width: auto;
  max-width: min(520px, 86%);
  max-height: 68px;
  height: auto;
}

body.centralmente-masthead-ready .tdi_29 > .td-block-title-wrap .td-block-title {
  display: none !important;
}

body.centralmente-masthead-ready .tdi_29 {
  margin-top: 6px !important;
}

@keyframes centralmente-masthead-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .centralmente-masthead {
    animation: none;
  }
}

@media (max-width: 767px) {
  .centralmente-masthead .tdi_28 {
    display: none !important;
  }

  .centralmente-masthead {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .td-header-mobile-wrap,
  .tdi_3_rand_style {
    background-color: #f7f4ee !important;
  }
}

/* Bandiera Ucraina accanto al titolo Centralmente */
.tdi_28,
.tdi_28 .tdb-logo-a,
.td-header-mobile-wrap .tdb-logo-a,
.centralmente-masthead {
  overflow: visible;
}

.tdi_28 {
  position: relative;
  z-index: 30;
}

.tdi_29 {
  position: relative;
  z-index: 1;
}

.tdi_28 .tdb-logo-a,
.td-header-mobile-wrap .tdb-logo-a {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px;
}

.centralmente-ua-flag {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 84px;
  height: 56px;
  box-shadow: 0 0 0 1px rgba(28, 25, 22, 0.18);
  line-height: 0;
  cursor: help;
}

.centralmente-ua-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.centralmente-ua-flag::after {
  content: attr(data-note);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, 72vw);
  padding: 10px 12px;
  background: #1c1916;
  color: #f7f4ee;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 20px rgba(28, 25, 22, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.centralmente-ua-flag:hover::after,
.centralmente-ua-flag:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  .tdi_28 .tdb-logo-a,
  .td-header-mobile-wrap .tdb-logo-a {
    gap: 10px;
  }

  .centralmente-ua-flag {
    width: 56px;
    height: 38px;
  }
}

/* Testata desktop vuota: toglie la fascia bianca inutile */
.td-header-desktop-wrap .wpb_wrapper:empty {
  display: none !important;
}

.td-header-desktop-wrap:not(:has(.tdb-logo-a, .sf-menu, .tdb-head-search-btn, img)) {
  display: none !important;
}

/* Widget Bing Translator incollato negli estratti */
#WidgetFloaterPanels,
#WidgetFloater,
#WidgetFloaterCollapsed,
#FloaterEmbed,
#CTFLinksPanel,
#MicrosoftTranslatorWidget,
.LTRStyle,
a[href*="bing.com/translator"],
a[href*="microsofttranslator.com"],
a[href*="bing.com/widget/translator"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Credit plugin e share da template */
a[href*="xyzscripts.com"],
div:has(> a[href*="xyzscripts.com"]),
.addthis_tool,
.at-above-post-homepage,
.at-below-post-homepage,
.at-share-tbx-element {
  display: none !important;
}

/* Filtri All / More in inglese, senza categorie vere */
.tdi_29 .td-subcat-filter {
  display: none !important;
}

/* Contatori social di dimostrazione tagDiv */
.tdi_34,
.td_social_type a[href*="facebook.com/tagdiv"],
.td_social_type a[href*="twitter.com/tagdiv"],
.td_social_type a[href*="youtube.com/tagdiv"] {
  display: none !important;
}

.tdi_33:has(+ .tdi_34) {
  display: none !important;
}

/* Colonna destra: indice del numero */
#centralmente-sidelist-source {
  display: none;
}

.tdi_32 #centralmente-sidelist-source,
.tdi_32 .centralmente-indice {
  display: block;
}

.tdi_32:has(.centralmente-indice) .tdi_35,
.tdi_32:has(.centralmente-indice) .tdi_37 {
  display: none !important;
}

.tdi_38_rand_style {
  background-color: transparent !important;
}

.centralmente-indice {
  color: #1c2430;
  padding: 4px 0 8px;
}

.centralmente-indice-kicker {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1c1916 !important;
}

.centralmente-indice-issue {
  display: none;
}

.centralmente-indice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #1c1916;
}

.centralmente-indice-list li {
  margin: 0;
  padding: 12px 0 13px;
  border-bottom: 1px solid #d5cfc4;
}

.centralmente-indice-rubrica {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a635a !important;
}

.centralmente-indice-list a {
  display: block;
  color: #1c1916 !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-wrap: pretty;
}

.centralmente-indice-list a:hover {
  color: #2a4a8a !important;
}

.centralmente-indice-author {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #4a453e !important;
}

.centralmente-indice-all {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2a4a8a !important;
  text-decoration: none;
}

.centralmente-indice-all:hover {
  text-decoration: underline;
}

/* Icone social footer senza link */
.td-footer-wrap .tdm-social-item[href="#"],
.td-footer-wrap a.tdm-social-item[href="#"] {
  pointer-events: none;
  opacity: 0.55;
}

.td-footer-wrap a.tdm-social-item[title="Twitch"] {
  display: none !important;
}

/* Titoli: meno urlo da tabloid */
.tdi_29 .entry-title a,
.td-module-title a {
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.tdi_29 .td-excerpt {
  font-size: 15px !important;
  line-height: 1.45 !important;
  color: #4a453e;
}

.tdi_29 .td-module-thumb {
  overflow: hidden;
}

.tdi_29 .td-module-thumb .entry-thumb {
  transition: transform 0.45s ease;
}

.tdi_29 .td_module_wrap:hover .td-module-thumb .entry-thumb {
  transform: scale(1.03);
}

.tdi_29 .td-block-title {
  letter-spacing: 0.04em;
}

/* Load more da rivista, non da demo */
.td-load-more-wrap a {
  letter-spacing: 0.08em;
  text-transform: uppercase !important;
  font-size: 12px !important;
}

/* Cookie bar allineata alla testata */
#cookie-notice {
  background-color: #1c1916 !important;
}

#cookie-notice .cn-set-cookie,
#cn-accept-cookie {
  background-color: #f7f4ee !important;
  color: #1c1916 !important;
  border: 0 !important;
}

/* Footer WordPress: stessa larghezza del container pagina (#tdi_23, 1440) */
body .td-footer-template-wrap,
body .td-footer-wrap {
  display: none !important;
}

.centralmente-site-footer {
  background-color: #dce3ea;
  border-top: 1px solid #c5ced8;
  color: #1c2430;
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.centralmente-site-footer-inner {
  width: 100%;
  padding: 36px 40px 32px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 28px 48px;
  align-items: start;
}

.centralmente-site-footer-brand {
  display: block;
  max-width: 260px;
}

.centralmente-site-footer-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.centralmente-site-footer-social {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.centralmente-site-footer-social[hidden] {
  display: none !important;
}

.centralmente-site-footer-social .tdm-social-item,
.centralmente-site-footer-social .tdm-social-item i {
  color: #2a3d55 !important;
}

.centralmente-colophon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
  color: #1c2430 !important;
}

.centralmente-colophon-legal {
  grid-column: 1 / -1;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #c5ced8;
}

.centralmente-colophon-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.centralmente-colophon-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  color: #2a3d55 !important;
}

.centralmente-colophon-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.centralmente-colophon-label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a5d73 !important;
  -webkit-text-fill-color: #4a5d73 !important;
}

.centralmente-colophon-name {
  display: block;
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
  color: #1c2430 !important;
  -webkit-text-fill-color: #1c2430 !important;
}

.centralmente-colophon-legal .centralmente-colophon-name {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 42em;
}

.td-footer-wrap .tdm-social-item i,
.td-footer-wrap .tdm-social-item,
body .tdi_57 .tdm-social-item i {
  color: #2a3d55 !important;
}

body .tdi_57 .tdm-social-item {
  border-color: #2a3d55 !important;
}

body .tdi_57 .tdm-social-item-wrap:hover .tdm-social-item {
  background: #2a3d55 !important;
  border-color: #2a3d55 !important;
}

body .tdi_57 .tdm-social-item-wrap:hover i {
  color: #dce3ea !important;
}

@media (max-width: 767px) {
  .centralmente-site-footer-inner {
    grid-template-columns: 1fr;
    padding: 28px 20px 24px;
    gap: 24px;
  }

  .centralmente-colophon {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Articolo: misura di lettura */
.single .td-post-content,
.single .tdb-block-inner,
.tdb_single_content {
  font-size: 18px;
  line-height: 1.65;
}

.td-post-header .entry-title {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #1c1916;
}

.td-post-content h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a635a;
  margin: 0 0 1.4em;
}

/* Molti pezzi sono stati scritti tutti in H3: li riportiamo a corpo */
.td-post-content h3 {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  margin: 0 0 1.15em;
  color: #2a2622;
}

.td-post-content p:empty,
.td-post-content p:has(> br:only-child) {
  display: none;
}

.td-post-sharing-classic,
.addthis_tool,
.at-above-post,
.at-below-post {
  display: none !important;
}

.td-related-title {
  letter-spacing: 0.04em;
  text-transform: none;
}

.comments .comment-reply-title {
  font-size: 18px;
  letter-spacing: 0.02em;
}

@media (max-width: 767px) {
  .td-post-header .entry-title {
    font-size: 26px;
  }
}

@media (max-width: 767px) {
  .tdi_29 .entry-title a {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }
}
