/* ============================================================
   AstroEnergy — Nasze Projekty Page Styles
   ============================================================ */

/* --- Hero --- */
.projekty-hero {
  position: relative;
  overflow: hidden;
}

.projekty-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/tlo-zmieniamy-planete-astroenergy.jpg') center/cover no-repeat;
  opacity: 0.22;
  z-index: 0;
}

.projekty-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, #fff);
  z-index: 0;
}

.projekty-hero .container {
  position: relative;
  z-index: 1;
}

/* --- Intro text --- */
.projekty-intro {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--gray-600);
  margin-bottom: 4rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.projekty-intro strong {
  color: var(--gray-800);
}

/* --- Orbit Map --- */
.orbit-map {
  position: relative;
  width: 100%;
  margin: 0 auto 4rem;
  aspect-ratio: 16 / 11;
}

.orbit-map svg.orbit-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* --- SVG Lines (static, no animation) --- */
.energy-line {
  stroke: rgba(104, 41, 106, 0.12);
  stroke-width: 1;
  fill: none;
}

/* --- Orbit Node --- */
.orbit-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow 0.3s, border-color 0.3s;
  z-index: 2;
  background: var(--white);
  border: 1px solid rgba(104, 41, 106, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.orbit-node:hover {
  box-shadow: 0 0 40px rgba(104, 41, 106, 0.25);
  border-color: rgba(104, 41, 106, 0.3);
}

.orbit-node img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.orbit-node--dillboard img {
  max-width: 60%;
  max-height: 60%;
}

.orbit-node--wallpark img {
  max-width: 70%;
  max-height: 70%;
}

/* --- Central node (AstroUniverse) --- */
.orbit-node--center {
  width: 260px;
  height: 260px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(104, 41, 106, 0.1);
  box-shadow: 0 8px 40px rgba(104, 41, 106, 0.1);
  animation: levitate-center 5s ease-in-out infinite;
}

.orbit-node--center:hover {
  box-shadow: 0 0 50px rgba(104, 41, 106, 0.3);
  border-color: rgba(104, 41, 106, 0.25);
}

/* --- Satellite nodes --- */
.orbit-node--satellite {
  width: 180px;
  height: 180px;
}

/* --- Positions --- */
.orbit-node--astroenergy {
  left: 50%;
  top: 10%;
  transform: translate(-50%, -50%);
  animation: levitate 4.5s ease-in-out 0.2s infinite;
}

.orbit-node--spoldzielnie {
  left: 15%;
  top: 30%;
  transform: translate(-50%, -50%);
  animation: levitate 5s ease-in-out 0.5s infinite;
}

.orbit-node--astronova {
  left: 15%;
  top: 70%;
  transform: translate(-50%, -50%);
  animation: levitate 4.2s ease-in-out 0.8s infinite;
}

.orbit-node--astromind {
  left: 85%;
  top: 30%;
  transform: translate(-50%, -50%);
  animation: levitate 4.8s ease-in-out 0.3s infinite;
}

.orbit-node--wallpark {
  left: 85%;
  top: 70%;
  transform: translate(-50%, -50%);
  animation: levitate 4.3s ease-in-out 0.6s infinite;
}

.orbit-node--dillboard {
  left: 50%;
  top: 90%;
  transform: translate(-50%, -50%);
  animation: levitate 4.6s ease-in-out 0.4s infinite;
}

/* --- Animations (levitate only) --- */
@keyframes levitate {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-12px); }
}

@keyframes levitate-center {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}

/* --- Glow ring around center (subtle) --- */
.orbit-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(104, 41, 106, 0.06);
  box-shadow: 0 0 30px rgba(104, 41, 106, 0.06);
  z-index: 1;
  pointer-events: none;
}

/* --- Project Popup --- */
.project-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.project-popup-overlay.active {
  display: flex;
}

.project-popup {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupIn 0.3s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.project-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--gray-500);
  transition: all var(--transition);
}

.project-popup__close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.project-popup__logo {
  max-width: 240px;
  max-height: 100px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  display: block;
}

.project-popup__name {
  display: none;
}

.project-popup__desc {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.project-popup__desc p {
  margin-bottom: 1rem;
}

.project-popup__desc p:last-child {
  margin-bottom: 0;
}

.project-popup__desc strong {
  color: var(--gray-800);
}

.project-popup__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.project-popup__btn:hover {
  box-shadow: 0 4px 16px rgba(104, 41, 106, 0.3);
  transform: translateY(-1px);
}

.project-popup__actions {
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .orbit-map {
    aspect-ratio: 3 / 4;
  }

  .orbit-node--satellite {
    width: 120px;
    height: 120px;
  }

  .orbit-node--center {
    width: 180px;
    height: 180px;
  }

  .orbit-glow {
    width: 210px;
    height: 210px;
  }
}

@media (max-width: 600px) {
  .orbit-node--satellite {
    width: 90px;
    height: 90px;
  }

  .orbit-node--center {
    width: 130px;
    height: 130px;
  }
}
