/* ============================================================
   Blog Article & Archive Styles — Tvorim Sovershenstvo
   Uses design tokens from design-tokens.css
   Matches Tilda visual structure: photo hero, breadcrumbs, content, CTA
   Updated 2026-03-11: photo hero, InterTight-only
   ============================================================ */

/* -- Google Fonts: InterTight -- */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');


/* Teal background behind rounded hero (Tilda signature) */
.tv-hero-wrapper {
  background: var(--tv-bg-hero);
  padding-top: 0;
}

/* ==============================
   HERO SECTION — photo background
   ============================== */

.tv-hero {
  position: relative;
  background-color: var(--tv-bg-hero);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding-top: calc(var(--tv-header-height-full) + 40px);
  overflow: hidden;
}

/* Gradient overlay on top of photo */
.tv-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* Legacy ::before overlay (for archive page which has no .tv-hero__overlay div) */
.tv-hero--archive::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,92,111,0.15) 0%, rgba(0,92,111,0.6) 100%);
  z-index: 1;
}

.tv-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--tv-container-max);
  margin: 0 auto;
  padding: 60px var(--tv-content-padding) 50px;
  padding-left: 96px;
}

/* -- Breadcrumbs -- */
.tv-hero__breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-small-size);
  font-weight: var(--tv-small-weight);
  color: rgba(255,255,255,0.6);
}

.tv-hero__breadcrumbs a {
  color: rgb(255,255,255);
  text-decoration: none;
  transition: color var(--tv-transition-fast);
}

.tv-hero__breadcrumbs a:hover {
  color: rgba(255,255,255,0.8);
}

.tv-hero__breadcrumbs .tv-breadcrumb-sep {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

/* -- Hero title -- */
.tv-hero__title {
  font-family: var(--tv-font-primary);
  font-size: 45px;
  font-weight: 400;
  line-height: 1.0;
  color: var(--tv-text-on-dark);
  margin: 0 0 22px;
  max-width: 960px;
}

.tv-hero__subtitle {
  font-family: var(--tv-font-primary);
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  margin: 0 0 16px;
  max-width: 600px;
}

/* -- Meta (date + reading time) -- */
.tv-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-caption-size);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}

.tv-hero__meta-divider {
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

/* -- Archive hero (shorter, centered) -- */
.tv-hero--archive {
  padding-bottom: 0;
}

.tv-hero--archive .tv-hero__inner {
  padding-bottom: 50px;
  text-align: center;
}

.tv-hero--archive .tv-hero__title {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.tv-hero--archive .tv-hero__subtitle {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,0.7);
}

.tv-hero--archive .tv-hero__breadcrumbs {
  justify-content: center;
}

/* -- Single post hero: taller, with photo bg -- */
.tv-hero--single {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin: 0 24px;
  border-radius: 20px;
  overflow: hidden;
}

.tv-hero--single .tv-hero__inner {
  padding-top: 30px;
  padding-bottom: 65px;
}

/* ==============================
   ARTICLE CONTENT SECTION
   ============================== */

.tv-article-section {
  background: #ffffff;
  padding: 48px var(--tv-content-padding);
}

.tv-article-section__inner {
  max-width: 780px;
  margin: 0 auto;
}

/* Featured image below hero */
.tv-article__featured-img {
  margin: -30px auto 40px;
  max-width: 800px;
  padding: 0 var(--tv-content-padding);
  position: relative;
  z-index: 3;
}

.tv-article__featured-img img {
  width: 100%;
  height: auto;
  border-radius: var(--tv-radius-lg);
  display: block;
  box-shadow: var(--tv-shadow-elevated);
}

/* -- Article Typography (InterTight only) -- */

.tv-article__content h2 {
  font-family: var(--tv-font-primary);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tv-text-heading);
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tv-color-accent);
}

.tv-article__content h3 {
  font-family: var(--tv-font-primary);
  font-size: var(--tv-h3-size);
  font-weight: var(--tv-h3-weight);
  line-height: var(--tv-h3-line-height);
  color: var(--tv-text-heading);
  margin: 36px 0 14px;
}

.tv-article__content h4 {
  font-family: var(--tv-font-primary);
  font-size: var(--tv-h4-size);
  font-weight: var(--tv-h4-weight);
  line-height: var(--tv-h4-line-height);
  color: var(--tv-text-heading);
  margin: 28px 0 12px;
}

.tv-article__content p {
  margin: 0 0 24px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-body-size);
  font-weight: var(--tv-body-weight);
  line-height: 1.75;
  color: var(--tv-text-primary);
}

.tv-article__content strong {
  font-weight: 600;
  color: var(--tv-text-primary);
}

.tv-article__content em {
  font-style: italic;
  color: var(--tv-text-secondary);
}

/* -- Lists with teal bullets -- */
.tv-article__content ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 24px;
}

.tv-article__content ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-body-size);
  line-height: 1.65;
  color: var(--tv-text-primary);
}

.tv-article__content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--tv-color-accent);
  border-radius: 50%;
}

.tv-article__content ol {
  padding-left: 24px;
  margin: 0 0 24px;
  counter-reset: tv-counter;
}

.tv-article__content ol li {
  margin-bottom: 12px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-body-size);
  line-height: 1.65;
  color: var(--tv-text-primary);
  counter-increment: tv-counter;
  list-style: none;
  position: relative;
  padding-left: 32px;
}

.tv-article__content ol li::before {
  content: counter(tv-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--tv-color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tv-font-primary);
}

/* -- Links -- */
.tv-article__content a {
  color: var(--tv-color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(52,170,187,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--tv-transition-fast);
}

.tv-article__content a:hover {
  text-decoration-color: var(--tv-color-accent);
}

/* -- Images -- */
.tv-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--tv-radius-lg);
  margin: 24px 0;
  display: block;
}

/* -- Blockquotes -- */
.tv-article__content blockquote {
  border-left: 4px solid var(--tv-color-accent);
  margin: 28px 0;
  padding: 20px 28px;
  background: #f0f6f7;
  border-radius: 0 var(--tv-radius-lg) var(--tv-radius-lg) 0;
  font-style: italic;
  color: var(--tv-text-secondary);
  font-family: var(--tv-font-primary);
  font-size: var(--tv-body-size);
  line-height: 1.7;
}

.tv-article__content blockquote p:last-child {
  margin-bottom: 0;
}

/* -- Tables -- */
.tv-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--tv-radius-lg);
  overflow: hidden;
  box-shadow: var(--tv-shadow-soft);
}

.tv-article__content th {
  background: var(--tv-color-primary);
  color: var(--tv-text-on-dark);
  padding: 14px 18px;
  text-align: left;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-small-size);
  font-weight: 600;
}

.tv-article__content td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--tv-border-divider);
  font-family: var(--tv-font-primary);
  font-size: 15px;
  color: var(--tv-text-primary);
}

.tv-article__content tr:last-child td {
  border-bottom: none;
}

.tv-article__content tr:hover td {
  background: rgba(52,170,187,0.04);
}

/* ==============================
   CTA SECTION
   ============================== */

.tv-cta-section {
  background: var(--tv-bg-hero);
  padding: var(--tv-section-padding) var(--tv-content-padding);
  text-align: center;
}

.tv-cta-section__inner {
  max-width: var(--tv-container-max);
  margin: 0 auto;
}

.tv-cta-section__title {
  font-family: var(--tv-font-primary);
  font-size: 28px;
  font-weight: 300;
  color: var(--tv-text-on-dark);
  margin: 0 0 12px;
}

.tv-cta-section__text {
  font-family: var(--tv-font-primary);
  font-size: var(--tv-body-size);
  color: rgba(255,255,255,0.7);
  margin: 0 0 32px;
}

.tv-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 42px;
  background: transparent;
  color: var(--tv-text-on-dark);
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 30px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-btn-size);
  font-weight: var(--tv-btn-weight);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--tv-btn-letter-spacing);
  transition: all var(--tv-transition-normal);
  cursor: pointer;
}

.tv-cta-btn:hover {
  background: var(--tv-text-on-dark);
  color: var(--tv-color-primary);
  border-color: var(--tv-text-on-dark);
}

.tv-cta-btn--outline {
  background: transparent;
  border-color: var(--tv-text-on-dark);
}

.tv-cta-btn--outline:hover {
  background: var(--tv-text-on-dark);
  color: var(--tv-color-primary);
}

/* ==============================
   RELATED ARTICLES
   ============================== */

.tv-related-section {
  background: var(--tv-bg-section-light);
  padding: var(--tv-section-padding) var(--tv-content-padding) var(--tv-section-padding-lg);
}

.tv-related-section__inner {
  max-width: var(--tv-container-max);
  margin: 0 auto;
}

.tv-section-heading {
  font-family: var(--tv-font-primary);
  font-size: 22px;
  font-weight: 600;
  color: var(--tv-text-heading);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 36px;
}

.tv-related-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 5px 15px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.tv-related-track::-webkit-scrollbar {
  height: 6px;
}

.tv-related-track::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.04);
  border-radius: 3px;
}

.tv-related-track::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

/* ==============================
   BLOG CARD
   ============================== */

.tv-blog-card {
  flex: 0 0 300px;
  background: var(--tv-bg-card);
  border-radius: var(--tv-radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform var(--tv-transition-normal), box-shadow var(--tv-transition-normal);
  box-shadow: var(--tv-shadow-card);
}

.tv-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--tv-shadow-card-hover);
}

.tv-blog-card__img {
  height: 190px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.tv-blog-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-blog-card__img--placeholder svg {
  opacity: 0.25;
}

.tv-blog-card__body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tv-blog-card__date {
  font-family: var(--tv-font-primary);
  font-size: var(--tv-caption-size);
  color: var(--tv-text-light);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.tv-blog-card__title {
  font-family: var(--tv-font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tv-text-heading);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tv-blog-card__excerpt {
  font-family: var(--tv-font-primary);
  font-size: var(--tv-small-size);
  line-height: 1.6;
  color: var(--tv-text-secondary);
  margin: 0 0 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tv-blog-card__more {
  font-family: var(--tv-font-primary);
  font-size: 13px;
  color: var(--tv-color-accent);
  font-weight: 500;
  transition: color var(--tv-transition-fast);
}

.tv-blog-card:hover .tv-blog-card__more {
  color: var(--tv-color-accent-hover);
}

/* ==============================
   ARCHIVE GRID
   ============================== */

.tv-archive-section {
  background: var(--tv-bg-section-light);
  padding: var(--tv-section-padding) var(--tv-content-padding) var(--tv-section-padding-lg);
  min-height: 50vh;
}

.tv-archive-section__inner {
  max-width: var(--tv-container-max);
  margin: 0 auto;
}

.tv-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.tv-archive-grid .tv-blog-card {
  flex: none;
}

/* -- Pagination -- */
.tv-pagination {
  text-align: center;
  margin-top: 50px;
}

.tv-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tv-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--tv-radius-round);
  font-family: var(--tv-font-primary);
  font-size: var(--tv-small-size);
  font-weight: 500;
  color: var(--tv-text-heading);
  text-decoration: none;
  transition: all var(--tv-transition-fast);
  background: var(--tv-bg-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tv-pagination .page-numbers:hover {
  background: var(--tv-color-primary);
  color: var(--tv-text-on-dark);
  box-shadow: var(--tv-shadow-btn);
}

.tv-pagination .page-numbers.current {
  background: var(--tv-color-primary);
  color: var(--tv-text-on-dark);
  box-shadow: var(--tv-shadow-btn);
}

/* ==============================
   BACK-TO-BLOG LINK
   ============================== */

.tv-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tv-font-primary);
  font-size: var(--tv-small-size);
  font-weight: 500;
  color: var(--tv-color-accent);
  text-decoration: none;
  transition: color var(--tv-transition-fast);
  padding: 8px 0;
}

.tv-back-link:hover {
  color: var(--tv-color-accent-hover);
}

.tv-back-link svg {
  transition: transform var(--tv-transition-fast);
}

.tv-back-link:hover svg {
  transform: translateX(-3px);
}

/* ==============================
   ALL-ARTICLES BUTTON
   ============================== */

.tv-all-articles-btn {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid var(--tv-color-primary);
  border-radius: 30px;
  color: var(--tv-color-primary);
  font-family: var(--tv-font-primary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--tv-transition-normal);
}

.tv-all-articles-btn:hover {
  background: var(--tv-color-primary);
  color: var(--tv-text-on-dark);
}

/* ==============================
   EMPTY STATE
   ============================== */

.tv-empty-state {
  text-align: center;
  padding: 80px var(--tv-content-padding);
  font-family: var(--tv-font-primary);
  color: var(--tv-text-muted);
  font-size: var(--tv-body-size);
}

/* ==============================
   RESPONSIVE
   ============================== */

@media screen and (max-width: 1199px) {
  .tv-hero__title {
    font-size: 36px;
  }
}

@media screen and (max-width: 959px) {
  .tv-hero__title {
    font-size: 30px;
  }

  .tv-hero__inner {
    padding: 40px var(--tv-content-padding) 40px;
  }

  .tv-hero--single {
    min-height: 360px;
  }

  .tv-article__content h2 {
    font-size: 24px;
    margin-top: 36px;
  }

  .tv-article__content h3 {
    font-size: 20px;
  }

  .tv-archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .tv-blog-card {
    flex: 0 0 260px;
  }
}

@media screen and (max-width: 639px) {
  .tv-hero {
    padding-top: calc(var(--tv-header-height) + 20px);
  }

  .tv-hero--single {
    min-height: 320px;
  }

  .tv-hero--single .tv-hero__inner {
    padding-bottom: 35px;
  }

  .tv-hero__title {
    font-size: 26px;
    line-height: 1.2;
    max-width: 100%;
  }

  .tv-hero__inner {
    padding: 30px 16px 30px;
  }

  .tv-hero__breadcrumbs {
    font-size: 12px;
    gap: 6px;
    margin-bottom: 20px;
  }

  .tv-article-section {
    padding: 40px 16px;
  }

  .tv-article-section__inner {
    max-width: 100%;
  }

  .tv-article__content p {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .tv-article__content h2 {
    font-size: 22px;
  }

  .tv-archive-grid {
    grid-template-columns: 1fr;
  }

  .tv-blog-card__img {
    height: 160px;
  }

  .tv-cta-section {
    padding: 40px 16px;
  }

  .tv-cta-section__title {
    font-size: 22px;
  }

  .tv-cta-btn {
    padding: 14px 32px;
    font-size: 13px;
  }

  .tv-related-section {
    padding: 40px 16px 50px;
  }

  .tv-section-heading {
    font-size: 18px;
  }
}
