/* ==========================================================================
   TÜBA Genç Akademi — Homepage design system
   Brand: ink #0b4660 · teal #008dab · deep #082636
   ========================================================================== */

:root {
  --ya-teal: #008dab;
  --ya-teal-hover: #007a94;
  --ya-teal-soft: #e6f5f8;
  --ya-ink: #0b4660;
  --ya-ink-deep: #082636;
  --ya-ink-mid: #0d1f2d;
  --ya-text: #1a2f3d;
  --ya-muted: #5a6d7a;
  --ya-line: rgba(11, 70, 96, 0.1);
  --ya-surface: #f3f7f9;
  --ya-white: #ffffff;
  --ya-radius: 14px;
  --ya-radius-sm: 10px;
  --ya-shadow: 0 12px 32px rgba(8, 38, 54, 0.08);
  --ya-shadow-hover: 0 18px 40px rgba(8, 38, 54, 0.14);
  --ya-max: 1120px;
  --ya-pad-x: clamp(1.25rem, 4vw, 2rem);
}

body.page-home {
  background: var(--ya-surface);
}

body.page-home .news-backdrop {
  display: none;
}

.site-main-bleed {
  padding: 0;
  margin: 0;
  background: transparent;
}

/* Shared section rhythm */
.ya-section {
  padding: clamp(3.25rem, 7vw, 5rem) var(--ya-pad-x);
}

.ya-section__inner {
  max-width: var(--ya-max);
  margin: 0 auto;
}

.ya-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.75rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.35rem);
}

.ya-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  color: var(--ya-teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ya-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ya-title {
  margin: 0;
  font-family: var(--font-heading, "Marlide Display", serif);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ya-text);
  text-transform: none;
}

.ya-lead {
  margin: 0.45rem 0 0;
  max-width: 34rem;
  color: var(--ya-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.ya-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ya-teal);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease, gap 0.2s ease;
}

.ya-link:hover {
  color: var(--ya-ink);
  gap: 0.55rem;
}

/* ========== HERO ========== */
.home-hero {
  --home-ticker-h: 3.35rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 55% 70% at 92% 40%, rgba(0, 141, 171, 0.28), transparent 58%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(0, 141, 171, 0.1), transparent 55%),
    linear-gradient(155deg, #06131d 0%, var(--ya-ink-deep) 42%, #0a1c2a 100%);
  /* Soft handoff into the light surface — no hard band */
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  box-shadow: none;
}

/* Fade ends above the ticker so the band stays readable on desktop */
.home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--home-ticker-h);
  height: min(28vh, 200px);
  background: linear-gradient(
    180deg,
    rgba(243, 247, 249, 0) 0%,
    rgba(243, 247, 249, 0.08) 28%,
    rgba(243, 247, 249, 0.35) 58%,
    rgba(243, 247, 249, 0.78) 82%,
    var(--ya-surface) 100%
  );
  pointer-events: none;
  z-index: 3;
}

body.page-home header.site-header,
body.page-home .site-header .navbar,
body.page-home nav.navbar.navbar-light {
  border-bottom-color: rgba(11, 70, 96, 0.05);
  box-shadow: 0 3px 12px rgba(8, 38, 54, 0.03);
  background: #f4f6f7;
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--ya-max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--ya-pad-x) clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: center;
}

.home-hero__eyebrow {
  color: #7ed4e4;
}

.home-hero__title {
  margin: 0 0 1.15rem;
  font-family: var(--font-heading, "Marlide Display", serif);
  font-size: clamp(2.05rem, 4.4vw, 3.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: #fff;
  text-transform: none;
}

.home-hero__title em {
  font-style: italic;
  color: #7ed4e4;
  font-weight: 600;
}

.home-hero__lead {
  margin: 0 0 1.85rem;
  max-width: 34rem;
  font-size: clamp(0.96rem, 1.35vw, 1.05rem);
  line-height: 1.7;
  color: rgba(232, 242, 246, 0.78);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.home-btn:hover {
  transform: translateY(-1px);
}

.home-btn--primary {
  background: var(--ya-teal);
  color: #fff;
  border: 1px solid var(--ya-teal);
  box-shadow: 0 8px 22px rgba(0, 141, 171, 0.35);
}

.home-btn--primary:hover {
  background: var(--ya-teal-hover);
  border-color: var(--ya-teal-hover);
  color: #fff;
}

.home-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.home-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}

/* Orbit */
.home-orbit {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  margin: 0 auto;
  container-type: inline-size;
}

.home-orbit__glow {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 141, 171, 0.32), transparent 70%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.home-orbit__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(126, 212, 228, 0.22);
  animation: home-orbit-spin var(--spin, 48s) linear infinite;
}

.home-orbit__ring--outer {
  inset: 1%;
  --spin: 64s;
  --orbit-r: 42cqw;
}

.home-orbit__ring--mid {
  inset: 18%;
  --spin: 48s;
  --orbit-r: 30cqw;
  animation-direction: reverse;
  border-color: rgba(255, 255, 255, 0.12);
}

.home-orbit__ring--inner {
  inset: 34%;
  --spin: 38s;
  --orbit-r: 18cqw;
  border-color: rgba(0, 141, 171, 0.28);
}

.home-orbit__node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--node-size, 64px);
  height: var(--node-size, 64px);
  margin: calc(var(--node-size, 64px) / -2) 0 0 calc(var(--node-size, 64px) / -2);
  transform: rotate(var(--a)) translateX(var(--orbit-r, 160px));
  transform-origin: center center;
}

/* Photos stay upright while the ring orbits */
.home-orbit__node-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(126, 212, 228, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  background: #132536;
  animation: home-orbit-keep-upright var(--spin, 48s) linear infinite;
  transition: opacity 1.15s cubic-bezier(0.4, 0, 0.2, 1), filter 1.15s ease;
}

.home-orbit__node-inner.is-fading {
  opacity: 0;
  filter: blur(2.5px) brightness(1.15);
}

.home-orbit__ring--outer .home-orbit__node { --node-size: clamp(58px, 7.5vw, 74px); }
.home-orbit__ring--outer .home-orbit__node-inner { animation-duration: 64s; }

.home-orbit__ring--mid .home-orbit__node { --node-size: clamp(48px, 6vw, 60px); }
.home-orbit__ring--mid .home-orbit__node-inner {
  animation-name: home-orbit-keep-upright-rev;
  animation-duration: 48s;
}

.home-orbit__ring--inner .home-orbit__node { --node-size: clamp(40px, 5vw, 50px); }
.home-orbit__ring--inner .home-orbit__node-inner { animation-duration: 38s; }

.home-orbit__node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-orbit__core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0%, #f4fafc 55%, #e8f4f8 100%);
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 6px rgba(0, 141, 171, 0.28),
    0 0 0 14px rgba(8, 38, 54, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12%;
}

.home-orbit__core img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(8, 38, 54, 0.08));
}

@keyframes home-orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes home-orbit-keep-upright {
  from { transform: rotate(calc(var(--a) * -1)); }
  to { transform: rotate(calc(var(--a) * -1 - 360deg)); }
}

@keyframes home-orbit-keep-upright-rev {
  from { transform: rotate(calc(var(--a) * -1)); }
  to { transform: rotate(calc(var(--a) * -1 + 360deg)); }
}

/* ---- News ticker band ---- */
.home-ticker {
  position: relative;
  z-index: 5;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 18, 28, 0.88);
  overflow: hidden;
}

.home-ticker__track {
  display: flex;
  width: max-content;
  gap: 0;
  padding: 0.95rem 0;
  /* Half-track loop; long duration keeps titles readable */
  animation: home-ticker-marquee 110s linear infinite;
}

.home-ticker__track:hover {
  animation-play-state: paused;
}

.home-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1.75rem;
  white-space: nowrap;
  color: rgba(232, 238, 246, 0.86);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.home-ticker__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ed4e4;
  flex-shrink: 0;
}

.home-ticker__item:hover {
  color: #fff;
}

.home-ticker__date {
  color: rgba(232, 238, 246, 0.55);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.home-ticker__sep {
  color: rgba(232, 238, 246, 0.4);
}

.home-ticker__title {
  max-width: 42rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes home-ticker-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* ========== NEWS ========== */
.home-news {
  position: relative;
  z-index: 1;
  background: var(--ya-surface);
  /* Do not pull over the ticker — soft blend is handled by hero::after */
  margin-top: 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: none;
}

.home-news__layout {
  display: grid;
  gap: 1.25rem;
}

.home-news__spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.home-news__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
  min-height: 100%;
}

.home-news__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--ya-white);
  border-radius: var(--ya-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  box-shadow: 0 8px 28px rgba(8, 38, 54, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(8, 38, 54, 0.12);
  color: inherit;
}

.home-news-card--featured {
  display: grid;
  grid-template-rows: minmax(220px, 1.15fr) auto;
  min-height: 100%;
}

.home-news-card--featured .home-news-card__media {
  aspect-ratio: auto;
  min-height: 240px;
  height: 100%;
}

.home-news-card--featured .home-news-card__body {
  padding: 1.35rem 1.4rem 1.55rem;
  gap: 0.65rem;
}

.home-news-card--featured .home-news-card__title {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  -webkit-line-clamp: 3;
}

.home-news-card--featured .home-news-card__excerpt {
  font-size: 0.95rem;
  -webkit-line-clamp: 3;
}

.home-news-card--compact {
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

.home-news-card--compact .home-news-card__media {
  flex: 0 0 42%;
  aspect-ratio: auto;
  align-self: stretch;
  min-height: 100%;
}

.home-news-card--compact .home-news-card__body {
  padding: 1rem 1.1rem;
  justify-content: center;
  gap: 0.4rem;
}

.home-news-card--compact .home-news-card__title {
  font-size: 1rem;
  -webkit-line-clamp: 3;
}

.home-news-card--compact .home-news-card__excerpt {
  display: none;
}

.home-news-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d5e4ea, #c3d5de);
  overflow: hidden;
}

.home-news-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(8, 38, 54, 0.18));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.home-news-card:hover .home-news-card__media::after {
  opacity: 1;
}

.home-news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.home-news-card:hover .home-news-card__media img {
  transform: scale(1.045);
}

.home-news-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.2rem 1.3rem;
  flex: 1;
}

.home-news-card__date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ya-teal);
  text-transform: uppercase;
}

.home-news-card__title {
  margin: 0;
  font-family: var(--font-heading, "Marlide Display", serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ya-text);
  text-transform: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ya-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-empty {
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: var(--ya-muted);
  background: var(--ya-white);
  border: 1px dashed var(--ya-line);
  border-radius: var(--ya-radius);
}

/* ========== PARTNERS ========== */
.home-partners {
  position: relative;
  z-index: 1;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--ya-white);
  border-block: 1px solid var(--ya-line);
  padding: clamp(2.75rem, 5.5vw, 3.75rem) 0;
  overflow: hidden;
}

.home-partners__shell {
  max-width: var(--ya-max);
  margin: 0 auto;
  padding: 0 var(--ya-pad-x);
  display: grid;
  gap: 2rem;
}

.home-partners__intro {
  margin: 0;
  padding: 0;
}

.home-partners__inner {
  display: grid;
  gap: 2rem;
  min-width: 0;
}

.logos-block {
  display: grid;
  gap: 14px;
  padding: 0;
  min-width: 0;
}

.logos-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ya-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body, "Open Sans", sans-serif);
  line-height: 1.3;
}

.logos-heading::before {
  content: "";
  flex-shrink: 0;
  width: 3px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--ya-teal);
}

.logos-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 141, 171, 0.35), transparent);
}

.logos-row {
  overflow: hidden;
  width: 100%;
  margin: 0;
  transform: translateZ(0);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logos-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: logos-marquee 32s linear infinite;
  --marquee-distance: 0px;
}

.logos-row.reverse .logos-track {
  animation-direction: reverse;
}

.logos-group {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logos-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 176px;
  height: 74px;
  margin: 0 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: var(--ya-radius-sm);
  background: var(--ya-surface);
  border: 1px solid var(--ya-line);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.logos-group a:hover {
  background: var(--ya-white);
  border-color: rgba(0, 141, 171, 0.28);
  box-shadow: 0 8px 20px rgba(8, 38, 54, 0.08);
  transform: translateY(-1px);
}

.logos-group img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.92;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.logos-group a:hover img {
  opacity: 1;
  transform: scale(1.03);
}

@keyframes logos-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
}

/* ========== EXPLORE CARDS ========== */
.home-explore {
  background: var(--ya-surface);
  padding-bottom: clamp(3.5rem, 7vw, 5rem);
}

.home-explore__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-explore-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--ya-white);
  border-radius: var(--ya-radius);
  overflow: hidden;
  border: 1px solid var(--ya-line);
  box-shadow: var(--ya-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-explore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ya-shadow-hover);
}

.home-explore-card__media {
  aspect-ratio: 16 / 10;
  background: #d7e4ea;
  overflow: hidden;
}

.home-explore-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.home-explore-card:hover .home-explore-card__media img {
  transform: scale(1.04);
}

.home-explore-card__body {
  padding: 1.25rem 1.3rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.home-explore-card__title {
  margin: 0;
  font-family: var(--font-heading, "Marlide Display", serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ya-text);
  text-transform: none;
}

.home-explore-card__title a {
  color: inherit;
  text-decoration: none;
}

.home-explore-card__title a:hover {
  color: var(--ya-teal);
}

.home-explore-card__text {
  margin: 0;
  color: var(--ya-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 991.98px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    text-align: left;
  }

  .home-orbit {
    width: min(100%, 360px);
  }

  .home-news__spotlight {
    grid-template-columns: 1fr;
  }

  .home-news__stack {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
  }

  .home-news-card--compact {
    flex-direction: column;
  }

  .home-news-card--compact .home-news-card__media {
    flex: none;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .home-news-card--compact .home-news-card__excerpt {
    display: -webkit-box;
  }

  .home-news__row,
  .home-explore__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  .logos-group a {
    width: 148px;
    height: 62px;
    margin: 0 6px;
  }

  .home-news__stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .home-news__row,
  .home-explore__grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    --home-ticker-h: 3.5rem;
  }

  .home-hero::after {
    height: min(16vh, 120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-orbit__ring,
  .home-orbit__node-inner,
  .logos-track,
  .home-ticker__track {
    animation: none !important;
  }
}
