/* Home — News row + horizontal accordion (#news). Shell: styles.css #news. */

body.page-home #news {
  --news-rail-inset: max(
    var(--section-pad-left),
    calc((100vw - min(1600px, 100vw)) / 2 + var(--section-pad-left))
  );
}

body.page-home #news > .wrap {
  max-width: min(1600px, 100%);
}

body.page-home #news .news-sec-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
}

body.page-home #news .news-sec-bar .section-head {
  margin-bottom: 0;
}

body.page-home #news .news-carousel__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

body.page-home #news .news-carousel__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition:
    color 0.25s ease,
    box-shadow 0.25s ease;
}

body.page-home #news .news-carousel__icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

body.page-home #news .news-carousel__btn:hover,
body.page-home #news .news-carousel__btn:focus-visible {
  color: var(--cyan-primary);
  box-shadow: 0 0 0 3px var(--ion-dim);
  outline: none;
}

/* Full-bleed single-row viewport (scroll via buttons) */
body.page-home #news .news-accordion {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 480px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--news-rail-inset);
  scrollbar-width: none;
}

body.page-home #news .news-accordion::-webkit-scrollbar {
  display: none;
}

body.page-home #news .news-accordion__track {
  display: flex;
  width: max-content;
  height: 100%;
}

body.page-home #news .news-accordion__group {
  display: flex;
  flex-shrink: 0;
  height: 100%;
  padding-left: var(--news-rail-inset);
  box-sizing: border-box;
}

body.page-home #news .news-card {
  position: relative;
  flex: 0 0 clamp(240px, 22vw, 320px);
  min-width: 0;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--black-void);
  border: 1px solid color-mix(in srgb, var(--black-void) 12%, transparent);
  transition: flex-basis 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-home #news .news-card:hover {
  flex-basis: clamp(380px, 38vw, 520px);
}

body.page-home #news .news-card-inner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.page-home #news .news-image {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  transition: flex-basis 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-home #news .news-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%) contrast(1.1) brightness(0.35) blur(3px);
  transform: scale(1.06);
  transition:
    filter 0.7s ease,
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home #news .news-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--black-void) 35%, transparent);
  pointer-events: none;
  transition: background 0.7s ease;
}

body.page-home #news .news-card:hover .news-image {
  flex-basis: 58%;
}

body.page-home #news .news-card:hover .news-image img {
  filter: grayscale(0%) contrast(1.1) brightness(1) blur(0);
  transform: scale(1);
}

body.page-home #news .news-card:hover .news-image::after {
  background: transparent;
}

body.page-home #news .news-panel {
  position: relative;
  display: flex;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--black-void);
  color: var(--footer-heading);
  opacity: 0;
  transition:
    flex-basis 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

body.page-home #news .news-card:hover .news-panel {
  flex-basis: 42%;
  opacity: 1;
}

body.page-home #news .news-card:not(:hover) .news-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex: none;
  width: 100%;
  height: 100%;
  background: transparent;
  opacity: 1;
  pointer-events: none;
}

body.page-home #news .news-panel-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 28px 24px;
}

body.page-home #news .news-card:not(:hover) .news-panel-content {
  padding: 24px;
}

body.page-home #news .news-category {
  display: block;
  margin-bottom: 20px;
  color: var(--blue-navy);
  text-shadow: 0 0 10px color-mix(in srgb, var(--blue-navy) 35%, transparent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.6;
}

body.page-home #news .news-card:not(:hover) .news-category {
  margin-bottom: 12px;
  font-size: 9px;
}

body.page-home #news .news-panel h3 {
  margin: 0 0 24px;
  color: var(--footer-heading);
  font-size: clamp(17px, 1.4vw, 25px);
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

body.page-home #news .news-card:not(:hover) .news-panel h3 {
  margin-bottom: 18px;
  font-size: clamp(15px, 1.15vw, 20px);
  line-height: 1.25;
}

body.page-home #news .news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--white) 22%, transparent);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

body.page-home #news .news-card:not(:hover) .news-meta {
  padding-top: 12px;
}

body.page-home #news .news-meta time {
  color: var(--cyan-primary);
  text-shadow: 0 0 8px color-mix(in srgb, var(--cyan-primary) 28%, transparent);
}

body.page-home #news .news-arrow {
  flex-shrink: 0;
  color: var(--footer-heading);
  font-size: 22px;
  transition: transform 0.3s ease;
}

body.page-home #news .news-card:hover .news-arrow {
  transform: translate(3px, -3px);
}

@media (max-width: 1024px) {
  body.page-home #news .news-accordion {
    height: 420px;
  }

  body.page-home #news .news-card {
    flex-basis: clamp(220px, 40vw, 280px);
  }

  body.page-home #news .news-card:hover {
    flex-basis: clamp(320px, 72vw, 420px);
  }

  body.page-home #news .news-panel-content,
  body.page-home #news .news-card:not(:hover) .news-panel-content {
    padding: 20px 16px;
  }

  body.page-home #news .news-panel h3 {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  body.page-home #news .news-accordion {
    height: 360px;
  }

  body.page-home #news .news-card {
    flex-basis: min(78vw, 300px);
  }

  body.page-home #news .news-card:hover {
    flex-basis: min(92vw, 340px);
  }

  body.page-home #news .news-panel-content,
  body.page-home #news .news-card:not(:hover) .news-panel-content {
    padding: 16px 12px;
  }

  body.page-home #news .news-panel h3,
  body.page-home #news .news-card:not(:hover) .news-panel h3 {
    font-size: 15px;
  }

  body.page-home #news .news-category {
    font-size: 9px;
  }

  body.page-home #news .news-meta {
    font-size: 8px;
  }

  body.page-home #news .news-sec-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-home #news .news-carousel__nav {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home #news .news-accordion {
    scroll-behavior: auto;
  }

  body.page-home #news .news-card,
  body.page-home #news .news-image,
  body.page-home #news .news-image img,
  body.page-home #news .news-image::after,
  body.page-home #news .news-panel,
  body.page-home #news .news-arrow {
    transition: none;
  }
}
