.projects-section {
  background: #111;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  --project-line: rgba(255,255,255,0.05);
  --project-red: #df3440;
}

.proj-desktop {
  display: flex;
  width: 100%;
  min-height: 620px;
}

.proj-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: #111;
  border-left: 1px solid var(--project-line);
  transition: flex 0.5s cubic-bezier(0.4,0,0.2,1);
}

.proj-panel:first-child {
  border-left: 0;
}

.proj-panel.active {
  flex: 2.35 1 0;
}

.proj-hit {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
  padding: 0;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}

.proj-bg {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.78) saturate(0.92);
  transition: height 0.5s cubic-bezier(0.4,0,0.2,1), filter 0.3s;
}

.proj-panel.active .proj-bg {
  height: 100%;
  filter: brightness(0.95) saturate(1);
}

.proj-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0, transparent 38%, rgba(17,17,17,0.98) 72%),
    rgba(0,0,0,0.2);
  transition: background 0.35s;
}

.proj-panel.active .proj-shade {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.12) 0, rgba(17,17,17,0.68) 44%, #111 100%),
    rgba(0,0,0,0.16);
}

.proj-card-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  padding: 300px 24px 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proj-logo {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 64px;
  transition: opacity 0.25s, transform 0.35s;
}

.proj-logo-wide {
  width: 132px;
}

.proj-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.proj-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(24px, 1.7vw, 32px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  max-width: 220px;
  margin: 0 auto;
  transition: opacity 0.25s;
}

.proj-toggle {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.75);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: opacity 0.25s, background 0.2s;
}

.proj-toggle::before,
.proj-toggle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.proj-toggle::after {
  width: 1.5px;
  height: 12px;
}

.proj-panel.active .proj-logo,
.proj-panel.active .proj-name,
.proj-panel.active .proj-toggle {
  opacity: 0;
  pointer-events: none;
}

.proj-details {
  position: absolute;
  inset: 230px 0 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 28px 42px 42px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.35s, transform 0.35s;
}

.proj-panel.active .proj-details {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.proj-details-inner {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.proj-details-logo {
  width: min(78%, 360px);
  max-height: 108px;
  object-fit: contain;
  display: block;
  margin-bottom: 22px;
}

.proj-details-logo-wide {
  width: min(86%, 430px);
}

.proj-desc {
  font-family: 'Barlow', sans-serif;
  font-size: clamp(15px, 1vw, 18px);
  font-weight: 400;
  line-height: 1.32;
  color: rgba(255,255,255,0.9);
  max-width: 520px;
  margin: 0 0 22px;
}

.proj-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 236px;
  min-height: 50px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--project-red);
  color: #fff;
  text-decoration: none;
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.proj-cta::before {
  content: '/';
  font-weight: 300;
  opacity: 0.9;
}

.proj-cta:hover {
  background: #f0444e;
  transform: translateY(-2px);
}

.proj-cta-disabled,
.proj-cta-unknown {
  cursor: not-allowed;
  pointer-events: none;
  color: rgba(255,255,255,0.62);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 8px, transparent 8px 16px),
    rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}

.proj-cta-disabled:hover,
.proj-cta-unknown:hover {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 8px, transparent 8px 16px),
    rgba(255,255,255,0.12);
  transform: none;
}

.proj-mobile {
  display: none;
}

@media (max-width: 1100px) {
  .proj-panel.active {
    flex: 2.8 1 0;
  }

  .proj-card-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .proj-logo {
    width: 64px;
    height: 64px;
  }

  .proj-name {
    font-size: 22px;
  }
}

@media (max-width: 700px) {
  .proj-desktop {
    display: none;
  }

  .proj-mobile {
    display: block;
    background: #111;
  }

  .proj-row {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
  }

  .proj-row-head {
    position: relative;
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 82px 22px 24px;
    border: 0;
    color: #fff;
    background: #111;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
  }

  .proj-row-bg,
  .proj-row-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .proj-row-bg {
    object-fit: cover;
    object-position: center;
    filter: brightness(0.64) saturate(0.95);
  }

  .proj-row-shade {
    background: linear-gradient(90deg, rgba(17,17,17,0.76) 0, rgba(17,17,17,0.35) 58%, rgba(17,17,17,0.08) 100%);
  }

  .proj-row-head-logo,
  .proj-row-head-name,
  .proj-row-head-btn {
    position: relative;
    z-index: 2;
  }

  .proj-row-head-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .proj-row-head-logo-wide {
    width: 64px;
  }

  .proj-row-head-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
  }

  .proj-row-head-name {
    flex: 1;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .proj-row-head-btn {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 24px;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(255,255,255,0.82);
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 0;
    transform: translateY(-50%);
  }

  .proj-row-head-btn::before,
  .proj-row-head-btn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 1.5px;
    background: #fff;
    transform: translate(-50%, -50%);
  }

  .proj-row-head-btn::after {
    width: 1.5px;
    height: 13px;
  }

  .proj-row.active .proj-row-head-btn::after {
    opacity: 0;
  }

  .proj-row.active .proj-row-head {
    min-height: clamp(240px, 54vw, 380px);
    align-items: flex-start;
    padding-top: 30px;
  }

  .proj-row.active .proj-row-head-btn {
    top: 30px;
    transform: none;
  }

  .proj-row-body {
    max-height: 0;
    overflow: hidden;
    background: #111;
    transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1);
  }

  .proj-row.active .proj-row-body {
    max-height: 420px;
  }

  .proj-row-img {
    display: none;
  }

  .proj-row-body-inner {
    padding: 42px 28px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .proj-row-body-logo {
    width: min(58vw, 190px);
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin-bottom: 24px;
  }

  .proj-row-body-logo-wide {
    width: min(72vw, 280px);
  }

  .proj-row-body-desc {
    font-family: 'Barlow', sans-serif;
    font-size: clamp(18px, 4.6vw, 22px);
    font-weight: 400;
    line-height: 1.18;
    color: #fff;
    max-width: 520px;
    margin: 0 0 28px;
  }

  .proj-row-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 236px;
    min-height: 54px;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--project-red);
    color: #fff;
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 500;
  }

  .proj-row-cta::before {
    content: '/';
    font-weight: 300;
    opacity: 0.9;
  }
}

.proj-cta.proj-cta-disabled,
.proj-cta.proj-cta-unknown,
.proj-row-cta.proj-cta-disabled,
.proj-row-cta.proj-cta-unknown {
  cursor: not-allowed;
  pointer-events: none;
  color: rgba(255,255,255,0.62);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 8px, transparent 8px 16px),
    rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}
