/* ==========================================================================
   1. SKILLS SECTION - BASE LAYOUT
   ========================================================================== */
.section--dark {
  background-color: var(--color-tertiary);
}

.skills-section-content {
  display: grid;
  grid-template-columns: 1fr 20px;
  height: 100vh;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: border-box;
  position: relative;
}

.skills-container-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 0;
}

.skills-container-right {
  align-self: center;
  align-items: center;
  grid-column: 4;
  position: absolute;
  right: 24px;
}

.skills-section-content h2 {
  color: var(--color-txt-primary);
}

/* ==========================================================================
   2. CONTENT BOX & OVERLAY SKILLS
   ========================================================================== */
.blue-box {
  background-color: var(--color-primary);
  width: clamp(280px, 70vw, 600px);
  border-radius: 4px;
  padding: 32px;
}

.blue-box p {
  color: var(--color-txt-primary);
  text-align: justify;
  line-height: 1.5;
}

.overlay-skills {
  background-color: var(--color-bg-hover);
  width: 250px;
  height: 200px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid white;
  position: absolute;
  top: 0;
  left: 250px;
  transform: translateX(clamp(-40px, -4vw, -20px)) translateY(320px);
  pointer-events: none;
  transition: transform 0.3s ease-out;
  z-index: 10;
}

.overlay-skills.visible {
  transform: translateX(clamp(-40px, -4vw, -20px)) translateY(0);
  pointer-events: auto;
}

.overlay-skills p {
  color: var(--color-txt-primary);
  text-align: justify;
}

.overlay-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.overlay-close-btn:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   3. SKILL ICONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.bottom-container-overlay-skills {
  display: flex;
  align-self: flex-end;
  justify-content: space-between;
  padding: 40px 0;
  width: 100%;
  gap: 8px;
}

.skills-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  justify-items: center;
}

.skill-icon-txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.skill-icon-txt span {
  color: var(--color-txt-primary);
}

.icon-skill {
  transition: transform 125ms ease-in-out;
}

.icon-skill:hover {
  transform: scale(1.1);
}

.ovelay-skill-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.overlay-skill-icons {
  height: 40px;
  width: 40px;
}

/* Wheel & Hat */
.wheel-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.orange-wheel {
  width: 100%;
  height: 100%;
  animation: rotateWheel 8s linear infinite;
}

.wheel-wrapper:hover .orange-wheel {
  animation-play-state: paused;
}

.hat {
  width: 36px;
  height: 38px;
  position: absolute;
  top: 35%;
  right: 35%;
}

/* ==========================================================================
   4. MEDIA QUERIES (DESKTOP & LAPTOP)
   ========================================================================== */
@media (min-height: 500px) and (max-height: 800px) and (min-width: 1200px) {
  .header-and-box h2 {
    margin-block-end: 16px;
  }
  .blue-box {
    height: 150px;
  }
  .skills-icons {
    grid-template-columns: repeat(8, 1fr);
  }
  .overlay-skills {
    top: -20px;
  }
}

@media (min-width: 900px) and (max-width: 1280px) and (min-height: 600px) and (max-height: 800px) and (orientation: landscape) {
  .overlay-skills {
    top: -80px;
  }
}

/* ==========================================================================
   5. MEDIA QUERIES (TABLETS)
   ========================================================================== */
@media (max-width: 850px) {
  .skills-container-right {
    display: none;
  }
  .skills-section-content {
    padding: 0 16px;
    grid-template-columns: 1fr;
    height: auto;
    max-width: none;
  }
}

@media (min-width: 768px) and (max-width: 834px) and (min-height: 1024px) and (max-height: 1180px) and (orientation: portrait) {
  .overlay-skills {
    left: 160px;
  }
}

@media (min-width: 835px) and (max-width: 1024px) and (min-height: 1181px) and (max-height: 1366px) and (orientation: portrait) {
  .skills-container-right {
    display: none;
  }
  .blue-box {
    margin-top: 200px;
  }
  .bottom-container-overlay-skills {
    margin-bottom: 200px;
  }
}

/* ==========================================================================
   6. MEDIA QUERIES (MOBILE)
   ========================================================================== */
@media (max-width: 650px) {
  .bottom-container-overlay-skills {
    flex-direction: column-reverse;
    gap: 13px;
  }
  .skills-icons {
    gap: 8px;
  }
  .icon-skill {
    height: 50px;
    width: 50px;
  }
  .blue-box {
    width: 90%;
    padding: 16px;
  }
  .blue-box p {
    margin-block-end: 0;
    margin-block-start: 0;
  }
  .overlay-skills {
    left: 150px;
    top: -120px;
  }
}

@media (max-width: 450px) {
  .overlay-skills {
    left: 20px;
    top: -250px;
  }
}

@media (max-width: 350px) {
  .blue-box {
    padding: 8px;
  }
  .skill-icon-txt span {
    font-size: 14px;
  }
  h2 {
    font-size: 28px;
  }
}

@media (max-height: 800px) and (max-width: 450px) {
  .blue-box {
    height: 200px;
    overflow-y: scroll;
  }
  .bottom-container-overlay-skills {
    padding: 20px 0;
  }
  .wheel-wrapper {
    height: 100px;
    width: 100px;
  }
  .hat {
    top: 32%;
    right: 32%;
  }
}

@media (max-height: 650px) and (max-width: 450px) {
  .skills-container-left {
    padding: 0;
  }
  .skills-icons {
    gap: 2px;
  }
  .wheel-wrapper {
    height: 80px;
    width: 80px;
  }
  .hat {
    top: 30%;
    right: 28%;
  }
}
