/* ESF Panels – Frontend Styles */

/* ── PANELS CONTAINER ── */
.esf-panels {
  display: flex;
  width: 100%;
  min-height: 100vh;
  font-family: Helvetica, Arial, sans-serif;
}

/* ── SINGLE PANEL ── */
.esf-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: none;
  text-decoration: none;
  display: block;
}
.esf-panel:hover {
  outline: 3px solid #FCEA19;
  outline-offset: -3px;
  z-index: 4;
}
.esf-panel:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-image: repeating-linear-gradient(
    to bottom,
    #111 0,
    #111 22px,
    transparent 22px,
    transparent 36px
  );
  z-index: 3;
  pointer-events: none;
  transition: background-color 0.3s;
}
.esf-panel:hover:not(:last-child)::after,
.esf-panel:focus-visible:not(:last-child)::after {
  background-image: none;
  background-color: #FCEA19;
}

/* ── PANEL BACKGROUND IMAGE ── */
.esf-panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.55s ease;
  z-index: 0;
}
.esf-panel:hover .esf-panel-bg,
.esf-panel:focus-visible .esf-panel-bg {
  opacity: 1;
}

/* ── GRADIENT OVERLAY (nur unten, für Lesbarkeit) ── */
.esf-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0) 60%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.esf-panel:hover::before,
.esf-panel:focus-visible::before {
  opacity: 1;
}

/* ── PANEL CONTENT ── */
.esf-panel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 40px 120px;
  z-index: 2;
}

/* ── EYEBROW TAG ── */
.esf-panel-tag {
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 5px;
  transition: color 0.3s;
}
.esf-panel:hover .esf-panel-tag,
.esf-panel:focus-visible .esf-panel-tag {
  color: #FCEA19;
  text-decoration-color: #FCEA19;
}

/* ── TITLE ── */
.esf-panel-title {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(46px, 5.2vw, 78px);
  line-height: 0.9;
  color: #111;
  transition: color 0.3s;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.esf-panel:hover .esf-panel-title,
.esf-panel:focus-visible .esf-panel-title {
  color: #fff;
}

/* ── SUBTITLE ── */
.esf-panel-sub {
  font-style: italic;
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.55;
  color: #111;
  transition: color 0.3s;
}
.esf-panel:hover .esf-panel-sub,
.esf-panel:focus-visible .esf-panel-sub {
  color: rgba(255, 255, 255, 0.82);
}

/* ── PLUS BUTTON ── */
.esf-panel-plus {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid #111;
  border-radius: 50%;
  color: #111;
  transition: border-color 0.3s, color 0.3s;
  user-select: none;
}
.esf-panel-plus svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}
.esf-panel:hover .esf-panel-plus,
.esf-panel:focus-visible .esf-panel-plus {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* ── FOCUS STYLES ── */
.esf-panel:focus-visible {
  z-index: 10;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .esf-panel,
  .esf-panel-bg,
  .esf-panel-tag,
  .esf-panel-title,
  .esf-panel-sub,
  .esf-panel-plus {
    transition: none;
  }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .esf-panels {
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
  }

  .esf-panel {
    flex: 1;
    width: 100%;
    height: auto;
    transition: flex 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    cursor: pointer;
  }

  .esf-panel:not(:last-child)::after {
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-image: repeating-linear-gradient(
      to right,
      #111 0,
      #111 22px,
      transparent 22px,
      transparent 36px
    );
  }

  .esf-panels.has-active .esf-panel        { flex: 0.3; }
  .esf-panels.has-active .esf-panel.active { flex: 3; }

  .esf-panel.active .esf-panel-bg  { opacity: 1; }

  .esf-panel.active .esf-panel-tag {
    display: block;
    color: #FCEA19;
    text-decoration-color: #FCEA19;
  }

  .esf-panel.active .esf-panel-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: clamp(40px, 12vw, 60px);
    color: #fff;
    margin-bottom: 8px;
  }

  .esf-panel.active .esf-panel-sub  { display: block; color: rgba(255, 255, 255, 0.82); }
  .esf-panel.active .esf-panel-plus { display: flex; border-color: rgba(255, 255, 255, 0.7); color: #fff; }

  .esf-panel-content {
    padding: 0 18px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .esf-panel-tag  { display: none; font-size: 12px; margin-bottom: 3px; }

  .esf-panel-title {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    font-size: 22px;
    margin-bottom: 0;
    transition: color 0.3s, font-size 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  }

  .esf-panel-sub  { display: none; margin-bottom: 14px; }
  .esf-panel-plus { display: none; }
}
