/* Page: Index Blog */

/* =====================
   Hero Section
   ===================== */

/* Default: mobile (375–699) */

.hero {
  padding: 40px 20px 200px;
}

.hero__title {
  margin-bottom: 32px;
}

.hero__description {
  margin-bottom: 32px;
  max-width: 320px;
}

/* Subscribe button */

.hero__subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 68px;
  padding: 6px 40px 0;
  border: 2px solid var(--color-black);
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  color: var(--color-black);
  cursor: pointer;
}

.hero__subscribe-label {
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 20px;
}

.hero__subscribe-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transform: translateY(-2px);
}

/* --- Actions (subscribe + tabs row) --- */

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 192px;
}

.hero__subscribe,
.hero__tabs {
  width: 100%;
}

.hero__dropdown-trigger {
  width: 100%;
  justify-content: center;
}

/* --- Tabs --- */

.hero__tabs {
}

/* Desktop tabs — hidden by default, shown ≥1200px */

.hero__tab,
.hero__tabs-divider {
  display: none;
}

.hero__tab {
  align-items: center;
  justify-content: center;
  height: 68px;
  padding: 6px 32px 0;
  border: none;
  border-radius: 999px;
  background: #EFEFEF;
  color: var(--color-black);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color 0.25s ease;

  /* text-uppercase-18 */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;
  font-feature-settings: 'liga' off, 'calt' off;
}

.hero__tab--active {
  background: var(--color-black);
  color: #fff;
  pointer-events: none;
}

.hero__tab::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-black);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease-in;
  z-index: -1;
}

.hero__tab:hover {
  color: #fff;
  transition: color 0.5s ease;
}

.hero__tab:hover::before {
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.8s ease-out;
}

.hero__tabs-divider {
  width: 1px;
  height: 32px;
  background: var(--color-black);
  opacity: 0.15;
  margin: 0 70px;
  flex-shrink: 0;
}

/* --- Dropdown (≤1199px) --- */

.hero__dropdown {
  position: relative;
}

.hero__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  height: 68px;
  padding: 6px 32px 0;
  border: none;
  border-radius: 999px;
  background: var(--color-black);
  color: #fff;
  cursor: pointer;

  /* text-uppercase-18 */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;
  font-feature-settings: 'liga' off, 'calt' off;
}

.hero__dropdown-label {
  white-space: nowrap;
}

.hero__dropdown-value {
  white-space: nowrap;
}

.hero__dropdown-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.hero__dropdown.is-open .hero__dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown menu */

.hero__dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 100%;
  background: var(--color-black);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 100;
}

.hero__dropdown.is-open .hero__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero__dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: opacity 0.15s ease;

  /* text-uppercase-18 */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;
  font-feature-settings: 'liga' off, 'calt' off;
}

.hero__dropdown-item:first-child {
  padding-top: 0;
}

.hero__dropdown-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hero__dropdown-item:hover {
  opacity: 0.7;
}

/* Active dot indicator */
.hero__dropdown-item--active {
  background: transparent;
  color: #fff;
  pointer-events: none;
}

.hero__dropdown-item--active .hero__dropdown-item-name::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E85A4F;
  margin-right: 12px;
  vertical-align: middle;
}

.hero__dropdown-item--active:hover {
  opacity: 0.7;
}

/* Remove border from item before separator */
.hero__dropdown-item:has(+ .hero__dropdown-separator) {
  border-bottom: none;
}

/* Dropdown separator (before News) */
.hero__dropdown-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 96px 0 0;
}

/* --- Category pages: compensate for missing description + shorter h1 --- */

.hero--category .hero__actions {
  margin-top: 346px; /* 192 + 64(h1-line) + 32(h1-mb) + 58(desc) */
}

/* =====================
   700px: tablet (700–1199)
   ===================== */

@media (min-width: 700px) {
  .hero {
    padding: 64px 60px 200px;
  }

  .hero__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero__subscribe,
  .hero__tabs {
    width: auto;
  }

  .hero__dropdown-trigger {
    width: auto;
  }

  .hero__tabs {
    order: -1;
  }

  .hero__dropdown-menu {
    min-width: 130%;
  }

  .hero--category .hero__actions {
    margin-top: 479px; /* 192 + 140(h1-line) + 32(h1-mb) + 115(desc) */
  }
}

/* =====================
   1250px: desktop — grid layout
   ===================== */

@media (min-width: 1200px) {
  .hero {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: start;
    padding: 64px 60px 200px;
  }

  .hero__title {
    grid-column: 1 / 7;
    margin-bottom: 0;
  }

  .hero__description {
    grid-column: 7 / 10;
    margin-bottom: 0;
    max-width: none;
  }

  .hero__actions {
    display: contents;
  }

  .hero__subscribe {
    grid-column: 10 / 13;
    justify-self: end;
  }

  .hero__tabs {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    margin-top: 192px;
    order: 0;
  }

  .hero--category .hero__tabs {
    margin-top: calc(192px + var(--h1-font-size));
  }

  /* Hide dropdown, show tabs */
  .hero__dropdown {
    display: none;
  }

  .hero__tab {
    display: inline-flex;
  }

  .hero__tabs-divider {
    display: block;
  }
}

/* =====================
   1440px: desktop (1440+) — margin 120px
   ===================== */

@media (min-width: 1440px) {
  .hero {
    padding: 64px 120px 200px;
  }
}

/* =====================
   New Articles — mobile (375–699)
   ===================== */

.hero {
  padding-bottom: 0;
}

.new-articles {
  margin-top: 48px;
  padding: 0 20px;
}

/* --- Progress bar --- */

.new-articles__progress {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
}

.new-articles__progress-bar {
  height: 5px;
  flex: 1;
  background: #D9D9D9;
  position: relative;
  overflow: hidden;
}

.new-articles__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-black);
}

/* --- Slide transition --- */

.new-articles--transitioning .new-articles__author,
.new-articles--transitioning .new-articles__title,
.new-articles--transitioning .new-articles__meta {
  opacity: 0;
  transform: translateY(6px);
}

.new-articles__author,
.new-articles__title,
.new-articles__meta {
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Content (author column + nav, title below) --- */

.new-articles__content {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
}

.new-articles__author {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.new-articles__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #D9D9D9;
  flex-shrink: 0;
}

.new-articles__author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.new-articles__author-name {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
  color: var(--color-black);
  white-space: nowrap;
}

.new-articles__author-role {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 120%;
  color: var(--color-black);
  opacity: 0.6;
  white-space: nowrap;
}

.new-articles__title {
  order: 1;
  width: 100%;
  margin: 24px 0 0;
  min-height: calc(var(--card-title-font-size) * 2.8);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--card-title-font-size);
  font-style: normal;
  font-weight: 500;
  line-height: var(--card-title-line-height);
  color: var(--color-black);
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: 'liga' off, 'calt' off;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-articles__nav {
  display: flex;
  gap: 8px;
}

.new-articles__nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid rgba(21, 21, 21, 0.15);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-black);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  padding: 0;
}

.new-articles__nav-btn:hover {
  border-color: var(--color-black);
}

/* --- Meta (2-col grid, tag full row) --- */

.new-articles__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 20px;
  margin-top: 128px;
}

.new-articles__tag {
  grid-column: 1 / -1;
}

.new-articles__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 32px 0;
  border: 1.5px solid rgba(21, 21, 21, 0.15);
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
  min-height: 60px;
  box-sizing: border-box;
}

.new-articles__reading-time,
.new-articles__date {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--text-meta-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: 100%;
  color: var(--color-black);
  font-feature-settings: 'liga' off, 'calt' off;
}

.new-articles__date {
  text-transform: uppercase;
  text-align: right;
}

/* --- Image placeholder --- */

.new-articles__image {
  margin-top: 32px;
  background: #ECECEC;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-articles__image-text {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 100%;
  color: rgba(21, 21, 21, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =====================
   700px: New Articles Section (tablet)
   ===================== */

@media (min-width: 700px) {

  .new-articles {
    padding: 0 60px;
  }

  /* Content: 6-col grid */
  .new-articles__content {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px 20px;
    align-items: start;
  }

  .new-articles__author {
    grid-column: 1 / 3;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
  }

  .new-articles__nav {
    grid-column: 5 / 7;
    grid-row: 1;
    justify-self: end;
  }

  /* Title: 4 cols, fixed 2-line height, ellipsis */
  .new-articles__title {
    grid-column: 1 / 5;
    grid-row: 2;
    order: 0;
    width: auto;
    margin-top: 0;
    min-height: calc(var(--card-title-font-size) * 2.2);
  }

  /* Meta: switch to 6-col grid */
  .new-articles__meta {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: center;
  }

  .new-articles__tag {
    grid-column: 1 / 3;
  }

  .new-articles__reading-time {
    grid-column: 3 / 5;
  }

  .new-articles__date {
    grid-column: 5 / 7;
    text-align: right;
  }
}

/* =====================
   1200px: New Articles Section (desktop)
   ===================== */

@media (min-width: 1200px) {

  .new-articles__content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: start;
  }

  .new-articles__author {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .new-articles__title {
    grid-column: 5 / 9;
    grid-row: auto;
    order: 0;
    width: auto;
    margin-top: 0;
    min-height: auto;
  }

  .new-articles__nav {
    grid-column: 11 / 13;
    grid-row: auto;
    justify-self: auto;
    justify-content: flex-end;
  }

  .new-articles__meta {
    grid-template-columns: repeat(12, 1fr);
  }

  .new-articles__tag {
    grid-column: 5 / 7;
  }

  .new-articles__reading-time {
    grid-column: 7 / 9;
  }

  .new-articles__date {
    grid-column: 11 / 13;
  }
}

/* =====================
   1440px: New Articles Section
   ===================== */

@media (min-width: 1440px) {

  /* Reduce hero bottom padding — 48px gap now lives between sections */
  .hero {
    padding-bottom: 0;
  }

  /* --- Section --- */

  .new-articles {
    margin-top: 48px;
    padding: 0 120px;
  }

  /* --- Progress bar --- */

  .new-articles__progress {
    display: flex;
    gap: 8px;
    margin-bottom: 48px;
  }

  /* --- Content row (author + title + nav) --- */

  .new-articles__content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: start;
  }

  /* Author */

  .new-articles__author {
    grid-column: 1 / 3;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .new-articles__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #D9D9D9;
    flex-shrink: 0;
  }

  .new-articles__author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .new-articles__author-name {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    color: var(--color-black);
    white-space: nowrap;
  }

  .new-articles__author-role {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    color: var(--color-black);
    opacity: 0.6;
    white-space: nowrap;
  }

  /* Title */

  .new-articles__title {
    grid-column: 5 / 9;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: var(--card-title-font-size);
    font-style: normal;
    font-weight: 500;
    line-height: var(--card-title-line-height);
    color: var(--color-black);
    font-variant-numeric: lining-nums proportional-nums;
    font-feature-settings: 'liga' off, 'calt' off;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Navigation arrows */

  .new-articles__nav {
    grid-column: 11 / 13;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  .new-articles__nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid rgba(21, 21, 21, 0.15);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    padding: 0;
  }

  .new-articles__nav-btn:hover {
    border-color: var(--color-black);
  }

  /* --- Meta row --- */

  .new-articles__meta {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: center;
    margin-top: 128px;
  }

  .new-articles__reading-time,
  .new-articles__date {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: var(--text-meta-font-size);
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    color: var(--color-black);
    font-feature-settings: 'liga' off, 'calt' off;
  }

  .new-articles__date {
    text-transform: uppercase;
  }

  .new-articles__tag {
    grid-column: 5 / 7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 32px 0;
    border: 1.5px solid rgba(21, 21, 21, 0.15);
    border-radius: 999px;
    white-space: nowrap;
    width: fit-content;
    min-height: 60px;
    box-sizing: border-box;
  }

  .new-articles__reading-time {
    grid-column: 7 / 9;
  }

  .new-articles__date {
    grid-column: 11 / 13;
    text-align: right;
  }

  /* --- Image placeholder --- */

  .new-articles__image {
    margin-top: 32px;
    background: #ECECEC;
    height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .new-articles__image-text {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    color: rgba(21, 21, 21, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

}

/* =====================
   Author Links (fixed corner buttons)
   ===================== */

.author-links {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.author-links__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px 0;
  min-height: 44px;
  background: #EEEEEE;
  border: 1px solid #C7C7C7;
  border-radius: 12px;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 100%;
  color: var(--color-black);
  text-decoration: none;
  white-space: nowrap;
}

.author-links__icon {
  flex-shrink: 0;
  margin-top: -6px;
}

.author-links__btn:hover {
  background: #8FD4F4;
}

@media (max-width: 699px) {
  .author-links {
    flex-direction: column;
  }
}
