/*
Theme Name: TRKMTV Roots
Theme URI: https://trkmtv.com
Description: Mobile-first block theme for ТРК «Голос» and the «Шлях до коріння» community.
Author: Ringdom
Template: twentytwentyfive
Version: 1.0.1
Text Domain: trkmtv-roots
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.2
*/

.trkmtv-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #0b2545;
  padding: .6rem 1rem;
  z-index: 200;
}

.trkmtv-skip:focus {
  left: 1rem;
  top: 1rem;
}

.trkmtv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wp--preset--color--canvas, #f8fafc);
  border-bottom: 1px solid var(--wp--preset--color--border, #e2e8f0);
  padding: .55rem 1rem;
  gap: .75rem;
}

body.admin-bar .trkmtv-header {
  top: 32px;
}

.trkmtv-brand {
  gap: .65rem;
}

.trkmtv-brand .wp-block-site-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.trkmtv-brand .wp-block-site-title {
  margin: 0;
  font-family: var(--wp--preset--font-family--display, "Unbounded", sans-serif);
  font-size: 1.05rem;
  line-height: 1.1;
}

.trkmtv-brand .wp-block-site-title a {
  color: var(--wp--preset--color--dnipro-navy, #0b2545);
  text-decoration: none;
}

.trkmtv-header .wp-block-navigation-item__content,
.trkmtv-header .wp-block-navigation__responsive-container-close {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.trkmtv-header-cta {
  margin: 0;
}

.trkmtv-header .wp-block-button__link {
  min-height: 44px;
}

.trkmtv-footer {
  background: var(--wp--preset--color--dnipro-navy, #0b2545);
  color: #e2e8f0;
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 0;
}

.trkmtv-footer a {
  color: #f4c56d;
}

.trkmtv-footer p {
  color: #e2e8f0;
}

.trkmtv-main {
  margin: 0;
}

.trkmtv-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 78vh;
  color: #fff;
  overflow: hidden;
  background: #0b2545;
}

.trkmtv-hero__media,
.trkmtv-hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trkmtv-hero__media {
  object-fit: cover;
}

.trkmtv-hero__veil {
  background: linear-gradient(180deg, rgba(11, 37, 69, .18), rgba(11, 37, 69, .88) 72%);
}

.trkmtv-hero__copy,
.trkmtv-pagehead__inner,
.trkmtv-wrap {
  width: min(1120px, calc(100% - 2.2rem));
  margin-inline: auto;
}

.trkmtv-hero__copy {
  position: relative;
  z-index: 1;
  width: min(46rem, calc(100% - 2.2rem));
  margin: 0;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(2rem, 6vw, 4rem) 1.1rem;
}

.trkmtv-kicker {
  margin: 0 0 .4rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 700;
  color: #f4c56d;
}

.trkmtv-hero h1,
.trkmtv-pagehead h1 {
  margin: .2rem 0 .8rem;
  color: #fff;
  font-family: var(--wp--preset--font-family--display, "Unbounded", sans-serif);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 700;
}

.trkmtv-hero p,
.trkmtv-pagehead p {
  color: #f8fafc;
  font-size: 1.08rem;
}

.trkmtv-pagehead {
  background:
    linear-gradient(120deg, rgba(11, 37, 69, .92), rgba(15, 92, 140, .78)),
    var(--wp--preset--color--dnipro-navy, #0b2545);
  color: #fff;
  padding: clamp(2.2rem, 6vw, 4rem) 0;
}

.trkmtv-pagehead h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.trkmtv-band {
  padding: clamp(1.8rem, 4vw, 3.5rem) 0;
}

.trkmtv-band--warm {
  background: var(--wp--preset--color--surface-warm, #fdf8ee);
}

.trkmtv-band--navy {
  background: var(--wp--preset--color--dnipro-navy, #0b2545);
  color: #f8fafc;
}

.trkmtv-band--navy h2,
.trkmtv-band--navy p {
  color: #f8fafc;
}

.trkmtv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.1rem;
}

.trkmtv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  background: var(--wp--preset--color--broadcast-blue, #0f5c8c);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.trkmtv-btn--ghost {
  background: transparent;
  border-color: #fff;
}

.trkmtv-btn--wheat {
  background: var(--wp--preset--color--steppe-wheat, #e09f3e);
  color: #0b2545 !important;
}

.trkmtv-btn--navy {
  background: var(--wp--preset--color--dnipro-navy, #0b2545);
}

.trkmtv-btn--line {
  background: #fff;
  color: #0b2545 !important;
  border-color: #cbd5e1;
}

.trkmtv-stats,
.trkmtv-grid {
  display: grid;
  gap: .9rem;
}

.trkmtv-stats {
  grid-template-columns: repeat(4, 1fr);
}

.trkmtv-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.trkmtv-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.trkmtv-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.trkmtv-stat,
.trkmtv-card {
  background: #fff;
  border: 1px solid var(--wp--preset--color--border, #e2e8f0);
  border-radius: 18px;
  padding: 1.05rem 1.1rem;
  height: 100%;
}

.trkmtv-stat strong {
  display: block;
  font-family: var(--wp--preset--font-family--display, "Unbounded", sans-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--wp--preset--color--broadcast-blue, #0f5c8c);
  line-height: 1.1;
}

.trkmtv-card h2,
.trkmtv-card h3 {
  margin: .2rem 0 .45rem;
  font-size: 1.2rem;
}

.trkmtv-card p:last-child {
  margin-bottom: 0;
}

.trkmtv-card img,
.trkmtv-split img,
.trkmtv-person img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.trkmtv-person img {
  aspect-ratio: 1;
  object-fit: cover;
}

.trkmtv-person h3,
.trkmtv-person p {
  margin: .45rem 0 0;
}

.trkmtv-split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
  align-items: center;
}

.trkmtv-prose {
  max-width: 46rem;
}

.trkmtv-prose p,
.trkmtv-card p,
.trkmtv-person p {
  font-size: 1.02rem;
  line-height: 1.65;
}

.trkmtv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .5rem 0 1rem;
}

.trkmtv-filters a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 .95rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0b2545;
  text-decoration: none;
  font-weight: 700;
}

.trkmtv-player,
.trkmtv-note {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.trkmtv-player audio {
  width: 100%;
  margin-top: .7rem;
}

.trkmtv-live {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  color: #1f5e3b;
}

.trkmtv-live::before {
  content: "";
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: #1f5e3b;
}

.trkmtv-band .wp-block-post-title {
  margin: .7rem 0 .2rem;
  font-size: 1.2rem;
}

.trkmtv-band .wp-block-post-title a {
  color: #0b2545;
  text-decoration: none;
}

.trkmtv-band .wp-block-post-excerpt__excerpt {
  color: #475569;
}

.entry-content > *:first-child,
.trkmtv-main > *:first-child {
  margin-top: 0;
}

.trkmtv-login-telegram {
  max-width: 28rem;
  margin: 1rem auto 1.25rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.trkmtv-login-telegram .trkmtv-btn {
  width: 100%;
}

.trkmtv-classroom-auth {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 1rem;
  font-weight: 700;
  color: #0b2545;
  text-decoration: none;
}

.trkmtv-radio-dock {
  display: none;
}

@media (max-width: 900px) {
  .trkmtv-grid-4,
  .trkmtv-grid-3,
  .trkmtv-split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 782px) {
  body.admin-bar .trkmtv-header {
    top: 46px;
  }

  .trkmtv-header-cta {
    display: none;
  }

  .trkmtv-brand .wp-block-site-title {
    font-size: .98rem;
  }

  .trkmtv-stats {
    grid-template-columns: 1fr 1fr;
  }

  .trkmtv-grid-4,
  .trkmtv-grid-3,
  .trkmtv-grid-2,
  .trkmtv-split,
  .trkmtv-band .wp-block-post-template.is-layout-grid,
  .trkmtv-band .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .trkmtv-hero {
    min-height: 86vh;
  }

  body:not(.trkmtv-radio-page) {
    padding-bottom: 76px;
  }

  .trkmtv-radio-dock {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background: #0b2545;
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(11, 37, 69, .28);
  }
}
