/* mobile-bundle-v1 — merged card-box-fix + mobile-center + footer-mobile-center (fewer RTTs). */

/* --- card-box-fix-v1 --- */
.ta-card-badge{
  position:absolute!important;
  left:14px!important;
  bottom:14px!important;
  width:36px!important;
  height:36px!important;
  box-sizing:border-box!important;
  z-index:3!important;
}

.ta-card-title,
.ta-card--secondary .ta-card-title,
.ta-card--horizontal .ta-card-title{
  color:var(--ta-color-text,#12151C)!important;
}
.ta-card-link:hover .ta-card-title{
  color:var(--ta-color-link-hover,var(--ta-ink,#0B0E11))!important;
}
[data-theme="dark"] .ta-card-link:hover .ta-card-title,
.ta-dark .ta-card-link:hover .ta-card-title{
  color:#D6FF3E!important;
}

.ta-topic-split{
  display:grid!important;
  grid-template-columns:minmax(280px,340px) minmax(0,1fr)!important;
  gap:24px!important;
  align-items:start!important;
}
@media (max-width:1023px){
  .ta-topic-split{
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }
}
.ta-topic-split > .ta-card--secondary{
  align-self:start!important;
  height:auto!important;
}
.ta-topic-split > .ta-card--secondary .ta-card-link{
  height:auto!important;
}
.ta-topic-split > .ta-card--secondary .ta-card-body{
  flex:0 0 auto!important;
  padding:14px 16px!important;
  gap:8px!important;
}
.ta-topic-split > .ta-card--secondary .ta-card-meta{
  margin-top:10px!important;
  padding-top:10px!important;
}
.ta-topic-list{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.ta-card--horizontal .ta-card-link{height:auto!important}

/* --- mobile-center-v1 --- */
@media (max-width: 1023px) {
  html,
  body {
    overflow-x: clip;
  }

  .ta-main,
  .ta-homepage,
  .ta-single,
  .ta-site-header,
  .ta-site-footer {
    max-width: 100%;
    overflow-x: clip;
  }

  .ta-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 14px;
    padding-right: 14px;
  }

  .ta-topic-split {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .ta-topic-split > .ta-card--secondary,
  .ta-topic-list,
  .ta-topic,
  .ta-home-rail,
  .ta-home-hero,
  .ta-home-main,
  .ta-secondary-grid,
  .ta-card,
  .ta-card-link {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ta-home-hero,
  .ta-home-rail,
  .ta-article-grid,
  .ta-topic-split {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
  }

  .ta-article-grid {
    gap: 24px !important;
    padding: 16px 14px 48px !important;
    box-sizing: border-box !important;
  }

  .ta-article {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .ta-article-content,
  .ta-article-content > * {
    max-width: 100%;
  }

  .ta-article-content img,
  .ta-article-content figure,
  .ta-article-content .wp-caption,
  .ta-article-content iframe,
  .ta-article-content video,
  .ta-article-content table,
  .ta-featured,
  .ta-featured img {
    max-width: 100% !important;
    height: auto !important;
  }

  .ta-article-content iframe {
    width: 100% !important;
  }

  .ta-article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ta-hero-slider,
  .ta-card-media,
  .ta-card-media img {
    max-width: 100%;
  }

  .ta-card-media img,
  .ta-card-media picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .ta-sidebar,
  .ta-home-sidebar,
  .ta-follow-box,
  .ta-share-box,
  .ta-related {
    max-width: 100%;
    min-width: 0;
  }

  .ta-share-links {
    flex-wrap: wrap;
  }

  /* Seguici stacks under article on mobile — hide (desktop sidebar keeps it). */
  .ta-follow-box,
  .ta-follow-box--v5,
  .ta-follow-box--list,
  .ta-follow-box--compact,
  section[data-ta-follow] {
    display: none !important;
  }

  .ta-ad-wrap,
  .ta-ad-slot {
    max-width: 100%;
    overflow: hidden;
  }

  .ta-ad-slot iframe,
  .ta-ad-slot ins,
  .ta-ad-slot > div {
    max-width: 100% !important;
  }

  .ta-header-top {
    gap: 10px;
  }

  .ta-header-brand {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  .ta-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ta-article-grid {
    padding: 12px 12px 40px !important;
  }

  .ta-homepage {
    padding-top: 14px;
  }

  .ta-secondary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .ta-article-title {
    font-size: clamp(22px, 6.2vw, 28px);
  }
}

/* --- footer-mobile-center-v1 --- */
@media (max-width: 1023px) {
  .ta-site-footer,
  .ta-site-footer * {
    box-sizing: border-box;
  }

  .ta-footer-main-inner,
  .ta-container.ta-footer-main-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ta-footer-brand,
  .ta-footer-social-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ta-footer-brand > a.ta-logo,
  a.ta-logo--footer {
    display: inline-flex !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .ta-footer-brand .ta-logo--dual > img.ta-logo--dark {
    display: none !important;
  }
  html[data-theme="dark"] .ta-footer-brand .ta-logo--dual > img.ta-logo--light {
    display: none !important;
  }
  html[data-theme="dark"] .ta-footer-brand .ta-logo--dual > img.ta-logo--dark {
    display: inline-block !important;
  }

  .ta-footer-desc {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ta-footer-social-label {
    text-align: center !important;
    width: 100%;
  }

  .ta-footer-social,
  .ta-footer-social.ta-social-icons,
  .ta-site-footer .ta-social-icons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ta-footer-legal,
  .ta-footer-legal-inner,
  .ta-container.ta-footer-legal-inner {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .ta-footer-updated,
  .ta-footer-line,
  .ta-footer-line--copy,
  .ta-footer-line--registry,
  .ta-footer-line--affiliate {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .ta-footer-legal-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }
}
