/* Personal Quests Page Specific Styles */

.quests {
  min-height: 100vh;
  padding: var(--spacing-xxl) var(--spacing-lg);
  position: relative;
  overflow-x: hidden;
}

.quests__header {
  text-align: center;
  margin-bottom: var(--spacing-xxxl);
  position: relative;
  z-index: var(--z-base);
}

/* Moon and Stars */
.quests__sky {
  position: absolute;
  top: var(--spacing-xl);
  left: 0;
  right: 0;
  height: 200px;
  z-index: var(--z-base);
  pointer-events: none;
}

.quests__moon {
  position: absolute;
  top: var(--spacing-lg);
  left: var(--spacing-xl);
  width: 60px;
  height: 60px;
  color: var(--color-yellow-warm);
  filter: drop-shadow(0 0 10px rgba(255, 211, 0, 0.5));
  animation: glisten 3s ease-in-out infinite;
}

.quests__stars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}

.quests__star {
  position: absolute;
  color: var(--color-white);
  animation: twinkle 2s ease-in-out infinite;
}

.quests__star:nth-child(1) {
  top: 20%;
  left: 18%;
  width: 5px;
  height: 5px;
  animation-delay: 0s;
}

.quests__star:nth-child(2) {
  top: 15%;
  left: 25%;
  width: 4px;
  height: 4px;
  animation-delay: 0.5s;
}

.quests__star:nth-child(3) {
  top: 25%;
  left: 15%;
  width: 4px;
  height: 4px;
  animation-delay: 1s;
}

.quests__star:nth-child(4) {
  top: 18%;
  left: 22%;
  width: 3px;
  height: 3px;
  animation-delay: 1.5s;
}

.quests__star:nth-child(5) {
  top: 22%;
  left: 20%;
  width: 4px;
  height: 4px;
  animation-delay: 0.75s;
}

@keyframes glisten {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 211, 0, 0.5));
  }
  50% {
    opacity: 0.8;
    filter: drop-shadow(0 0 20px rgba(255, 211, 0, 0.8));
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Palm Tree */
.quests__palm-tree {
  position: absolute;
  right: var(--spacing-xl);
  bottom: 0;
  width: 120px;
  height: 400px;
  z-index: var(--z-base);
  pointer-events: none;
}

.quests__palm-trunk {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 300px;
  background: linear-gradient(to right, #8b7355 0%, #6b5d4f 100%);
  border-radius: 10px;
}

.quests__palm-leaves {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
}

.quests__palm-leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 60px;
  height: 4px;
  background: #2d5016;
  border-radius: 2px;
  transform-origin: left center;
  animation: sway 4s ease-in-out infinite;
  will-change: transform;
}

.quests__palm-leaf:nth-child(1) {
  transform: translateX(-50%) rotate(-45deg);
  animation-delay: 0s;
}

.quests__palm-leaf:nth-child(2) {
  transform: translateX(-50%) rotate(-15deg);
  animation-delay: 0.5s;
}

.quests__palm-leaf:nth-child(3) {
  transform: translateX(-50%) rotate(15deg);
  animation-delay: 1s;
}

.quests__palm-leaf:nth-child(4) {
  transform: translateX(-50%) rotate(45deg);
  animation-delay: 1.5s;
}

.quests__palm-leaf:nth-child(5) {
  transform: translateX(-50%) rotate(-30deg);
  animation-delay: 0.25s;
}

.quests__palm-leaf:nth-child(6) {
  transform: translateX(-50%) rotate(30deg);
  animation-delay: 0.75s;
}

@keyframes sway {
  0%, 100% {
    transform: translateX(-50%) rotate(var(--leaf-rotation, 0deg));
  }
  25% {
    transform: translateX(-50%) rotate(calc(var(--leaf-rotation, 0deg) + 3deg));
  }
  50% {
    transform: translateX(-50%) rotate(calc(var(--leaf-rotation, 0deg) + 5deg));
  }
  75% {
    transform: translateX(-50%) rotate(calc(var(--leaf-rotation, 0deg) + 2deg));
  }
}

/* Waves */
.quests__waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  z-index: var(--z-base);
  pointer-events: none;
  overflow: hidden;
}

.quests__wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  animation: wave-move 8s linear infinite;
  will-change: transform;
}

.quests__wave:nth-child(1) {
  animation-duration: 8s;
  animation-delay: 0s;
  opacity: 0.7;
}

.quests__wave:nth-child(2) {
  animation-duration: 10s;
  animation-delay: -2s;
  opacity: 0.5;
  height: 50px;
}

@keyframes wave-move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Quest Sections */
.quests__sections {
  position: relative;
  z-index: var(--z-base);
  max-width: 900px;
  margin: 0 auto;
  padding-top: 160px;
  padding-bottom: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxl);
}

.quests__section {
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
  transition: opacity var(--transition-base);
  max-height: none;
  opacity: 1;
  cursor: pointer;
}

.quests__section.is-expanded {
  opacity: 1;
}

.quests__section-header {
  margin-bottom: var(--spacing-md);
}

.quests__section-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-white);
}

.quests__section-icon--circle {
  width: 24px;
  height: 24px;
}

.quests__section-icon--sparkle {
  width: 28px;
  height: 28px;
}

.quests__section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.quests__section-content {
  color: var(--color-white);
  line-height: var(--line-height-base);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), opacity var(--transition-base);
  opacity: 0;
}

.quests__section.is-expanded .quests__section-content {
  max-height: 1000px;
  opacity: 1;
  margin-top: var(--spacing-lg);
}

.quests__section--mentorship {
  align-self: flex-start;
  margin-left: var(--spacing-xxxl);
  margin-top: var(--spacing-md);
}

.quests__section--community {
  align-self: flex-start;
  margin-top: var(--spacing-xl);
  margin-left: var(--spacing-xxxl);
}

.quests__section--growth {
  align-self: flex-start;
  margin-top: var(--spacing-xl);
  margin-left: var(--spacing-xxxl);
}

.quests__section-content p {
  margin-bottom: var(--spacing-md);
}

.quests__section-content p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .quests__palm-tree {
    width: 80px;
    height: 300px;
    right: var(--spacing-lg);
  }
  
  .quests__palm-trunk {
    height: 200px;
    width: 15px;
  }
  
  .quests__palm-leaves {
    width: 80px;
    height: 80px;
  }
  
  .quests__moon {
    width: 60px;
    height: 60px;
  }
  
  .quests__sections {
    padding-top: 140px;
    padding-bottom: 150px;
  }

  .quests__section--community {
    margin-left: var(--spacing-xxl);
  }

  .quests__section--growth {
    transform: translateX(-20px);
  }
}

@media (max-width: 480px) {
  .quests {
    padding: var(--spacing-lg);
  }
  
  .quests__palm-tree {
    display: none; /* Hide on very small screens */
  }
  
  .quests__section {
    padding: var(--spacing-lg);
  }
  
  .quests__sections {
    padding-bottom: 120px;
  }

  .quests__section--mentorship,
  .quests__section--community,
  .quests__section--growth {
    margin-left: 0;
    transform: none;
  }
}
