/* ABOUTME: Styles for the Csatlakozás (Join/Membership) page.
   ABOUTME: Dark theme, Rólunk layout: hero with centered text + full-width image, tag-intro grids, hover-interactive list. */

/* ===========================
   Dark theme toggle (scroll-driven)
   =========================== */

body {
  transition: background-color 0.8s ease, color 0.8s ease;
}

body.is-dark {
  background-color: var(--color-black);
  color: var(--color-bg);
}

body.is-dark .bg-lines__line {
  border-right-color: rgba(255, 255, 255, 0.08);
}

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

.csatlakozas-hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.csatlakozas-hero__topbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.8em 1em;
  flex-shrink: 0;
}

.csatlakozas-hero__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.csatlakozas-hero__menu {
  font-family: var(--font-primary);
  font-size: 2.1rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Title — fills remaining space, vertically centered */
.csatlakozas-hero__text {
  flex: 1 0 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.csatlakozas-hero__line {
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
  will-change: transform;
}

/* Single full-width hero image — pinned to bottom */
.csatlakozas-hero__image {
  width: 100%;
  height: 40vh;
  flex-shrink: 0;
  padding: 1rem;
  overflow: hidden;
}

.csatlakozas-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   Section Tag
   =========================== */

.csatlakozas-tag {
  display: inline-block;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  background: var(--color-bg);
  color: var(--color-black);
  padding: 0.25em 0.7em;
  margin-bottom: var(--space-lg);
}

/* ===========================
   About Section (2fr | 4fr grid)
   =========================== */

.csatlakozas-about {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 4fr;
}

.csatlakozas-about__tag {
  padding: 1rem;
}

.csatlakozas-about__intro {
  padding: 1rem;
}

.csatlakozas-about__intro p {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

/* ===========================
   Full-width Image
   =========================== */

.csatlakozas-image {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.csatlakozas-image img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ===========================
   Membership Types (hover-interactive list)
   =========================== */

.csatlakozas-types {
  position: relative;
  z-index: 1;
  padding-bottom: 6rem;
}

.csatlakozas-types__heading {
  font-family: var(--font-primary);
  font-size: clamp(3.5rem, 8vw, 8.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  padding: 1rem;
}

.csatlakozas-types__body {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr;
}

/* Left: description text, switches on hover */
.csatlakozas-types__desc {
  padding: 1rem;
  position: relative;
  grid-column: 1;
}

.csatlakozas-types__desc > div {
  position: absolute;
  left: 1rem;
  right: 1rem;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: clip-path 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.csatlakozas-types__desc > div.is-active {
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateY(0);
}

.csatlakozas-types__desc p {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;
  margin: 0 0 1rem;
}

/* Benefits list inside desc panels */
.csatlakozas-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.csatlakozas-benefits li {
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1vw, 1rem);
  font-weight: 400;
  line-height: 1.6;
  padding-left: 1.2em;
  position: relative;
}

.csatlakozas-benefits li::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: 0.4;
}

/* Download link inside desc panels */
.csatlakozas-download {
  display: inline-block;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.1em 1.2em;
  border: 1px solid currentColor;
  border-radius: 100px;
  transition: background 0.3s ease, color 0.3s ease;
}

.csatlakozas-download:hover {
  background: var(--color-bg);
  color: var(--color-black);
}

/* Right: type titles */
.csatlakozas-types__list {
  padding: 1rem;
  grid-column: 3;
}

.csatlakozas-types__item {
  padding: 0.6rem 0;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  transition: opacity 0.3s ease;
  position: relative;
}

/* Animated top border line */
.csatlakozas-types__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              left 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Bottom border on last item */
.csatlakozas-types__item:last-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              left 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Stagger line animations */
.csatlakozas-types__item:nth-child(1)::before { transition-delay: 0s; }
.csatlakozas-types__item:nth-child(2)::before { transition-delay: 0.15s; }
.csatlakozas-types__item:last-child::after    { transition-delay: 0.3s; }

/* Lines appear when parent reveal is visible */
.reveal-up.is-visible .csatlakozas-types__item::before,
.reveal-up.is-visible .csatlakozas-types__item:last-child::after {
  transform: scaleX(1);
}

/* On hover, extend lines left */
.csatlakozas-types__item:hover::before {
  left: calc(var(--extend-left, 0) + 1rem);
}

/* Inactive items are faded */
.csatlakozas-types__list:hover .csatlakozas-types__item {
  opacity: 0.25;
}

.csatlakozas-types__list:hover .csatlakozas-types__item:hover {
  opacity: 1;
}

.csatlakozas-types__list:not(:hover) .csatlakozas-types__item {
  opacity: 1;
}

.csatlakozas-types__title {
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

/* ===========================
   Steps Section
   =========================== */

.csatlakozas-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.csatlakozas-step {
  background: #2A2A2A;
  color: var(--color-bg);
  padding: 2rem 1.5rem;
  margin: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.csatlakozas-step__number {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1;
  opacity: 0.3;
}

.csatlakozas-step__title {
  font-family: var(--font-primary);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.csatlakozas-step__desc {
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1vw, 1rem);
  font-weight: 400;
  line-height: 1.7;
  margin: 0;
  opacity: 0.8;
}

/* ===========================
   Contact Section
   =========================== */

.csatlakozas-contact {
  position: relative;
  z-index: 1;
  padding: 1rem;
  text-align: center;
}

.csatlakozas-contact__heading {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 1.5rem;
}

.csatlakozas-contact__info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.csatlakozas-contact__info a,
.csatlakozas-contact__info span {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.csatlakozas-contact__info a:hover {
  opacity: 0.6;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .csatlakozas-about {
    grid-template-columns: 1fr;
  }

  .csatlakozas-types__body {
    grid-template-columns: 1fr;
  }

  .csatlakozas-types__desc {
    position: static;
  }

  .csatlakozas-types__desc > div {
    position: static;
    clip-path: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-bottom: 2rem;
  }

  /* Show only the first type description by default on mobile */
  .csatlakozas-types__desc > div:not(:first-child) {
    display: none;
  }

  .csatlakozas-types__list {
    grid-column: 1;
  }

  /* Disable hover fade on mobile */
  .csatlakozas-types__list:hover .csatlakozas-types__item {
    opacity: 1;
  }

  .csatlakozas-steps {
    grid-template-columns: 1fr;
  }

  .csatlakozas-step {
    margin: 0.5rem 0;
  }

  .csatlakozas-contact__info {
    flex-direction: column;
    gap: 0.75rem;
  }

  .csatlakozas-hero__image {
    height: 30vh;
  }
}

@media (max-width: 480px) {
  .csatlakozas-hero__line {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
}
