/* ==========================================================================
   1. PROJECTS SECTION - BASE LAYOUT
   ========================================================================== */
.projects-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;
}

.left-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.header-txt {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(32px, 2vw, 80px);
  margin-bottom: 40px;
}

.header-txt h2 {
  color: var(--color-txt-secondary);
  white-space: nowrap;
}

.header-txt p {
  color: var(--color-txt-secondary);
}

.projects-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(16px, 2vw, 40px);
}

/* ==========================================================================
   2. PROJECT IMAGE & VISUALS
   ========================================================================== */
.project-img-container {
  background-color: var(--color-bg-card);
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px solid black;
  border-radius: 4px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  padding: 0 32px;
}

.project-img {
  min-width: 300px;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 440 / 300;
  height: auto;
  z-index: 4;
  border-radius: 4px;
}

.orange-wheel-my-work {
  width: 180px;
  height: 180px;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
}

/* ==========================================================================
   3. PROJECT DESCRIPTION & OVERLAY
   ========================================================================== */
.project-description {
  flex-grow: 3;
  min-width: 0;
}

.black-box {
  background-color: var(--color-tertiary);
  padding: 30px;
  text-align: justify;
  border-radius: 4px;
  min-width: 0;
}

.black-box h3,
.black-box p,
.black-box button {
  color: var(--color-txt-primary);
}

.overlay {
  background-color: var(--color-primary);
  padding: 32px;
  border-radius: 4px;
  border: 2px solid var(--color-secondary);
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.header-icon-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-top: 32px;
}

.project-icon {
  height: 32px;
  width: 32px;
  animation: bounceImg 1s ease-in-out infinite;
}

.project-icon:hover {
  animation-play-state: paused;
}

.technologies span {
  color: var(--color-txt-tertiary);
  font-weight: var(--fw-bold);
}

/* ==========================================================================
   4. BUTTONS & NAVIGATION
   ========================================================================== */
.btns-container {
  display: flex;
  align-items: center;
  gap: 32px;
}

.btn {
  border: 1px solid var(--color-txt-primary);
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-txt-primary);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn img {
  transition: transform 0.2s ease;
}

.btn:hover {
  background-color: var(--color-bg-hover);
}

.btn:hover img {
  transform: translateY(-4px) rotate(-45deg);
}

.lower-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lower-btns p,
.lower-btns span {
  color: var(--color-txt-secondary);
  font-weight: var(--fw-bold);
}

.lower-btns span {
  cursor: pointer;
}

.lower-btns span:hover {
  color: var(--color-txt-quinary);
}

/* ==========================================================================
   5. MEDIA QUERIES (DESKTOP & LAPTOP)
   ========================================================================== */
@media (max-width: 1200px) {
  .overlay {
    right: 50px;
    max-width: 250px;
    height: 280px;
    top: 0;
  }
  .header-txt {
    margin-bottom: 0;
  }
  .project-img-container {
    height: 400px;
  }
}

@media (min-height: 500px) and (max-height: 800px) and (min-width: 1200px) {
  .project-img-container {
    height: 400px;
    margin-bottom: 32px;
  }
  .header-txt {
    margin-bottom: 0;
  }
}

@media (max-width: 950px) {
  .project-description {
    width: 800px;
    height: 400px;
  }
  .overlay {
    max-width: 200px;
    min-height: 330px;
    right: 40px;
  }
  .project-img {
    min-width: 250px;
  }
  .btns-container {
    gap: 14px;
  }
  .btns-container a {
    font-size: 16px;
  }
}

/* ==========================================================================
   6. MEDIA QUERIES (TABLETS & MOBILE)
   ========================================================================== */
@media (max-width: 850px) {
  .projects-section-content {
    padding: 0 16px;
    grid-template-columns: 1fr;
    height: auto;
    max-width: none;
  }
  .header-txt {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .header-txt h2 {
    margin-block-start: 0;
    margin-block-end: 0;
  }
}

@media (max-width: 750px) {
  .header-txt h2 {
    padding-top: 20px;
  }
  .projects-container {
    flex-direction: column;
  }
  .project-img-container {
    height: 300px;
  }
  .project-img {
    height: 250px;
  }
  .orange-wheel-my-work {
    width: 150px;
    height: 150px;
  }
  .overlay {
    max-width: 350px;
    min-height: 80px;
    height: 150px;
    top: -100px;
  }
  .project-description {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    height: auto;
    padding-bottom: 16px;
  }
}

@media (max-width: 600px) {
  .black-box {
    padding: 16px;
  }
  .btns-container {
    gap: 40px;
  }
  .project-img-container {
    width: 80%;
  }
}

@media (max-width: 550px) {
  .overlay {
    max-width: 210px;
    min-height: 200px;
    height: 300px;
    top: -290px;
    right: 32px;
    padding: 20px;
  }
  .overlay p {
    font-size: 15px;
  }
  .projects-container {
    gap: 0;
  }
}

@media (max-width: 400px) {
  .header-txt p {
    margin-block-start: 0;
  }
  .btns-container {
    gap: 16px;
  }
  .btns-container a {
    font-size: 14px;
  }
  .btn {
    padding: 12px;
  }
  .lower-btns span,
  .lower-btns p {
    font-size: 14px;
  }
  .projects-container {
    width: 100%;
  }
}

/* ==========================================================================
   7. SPECIAL QUERIES (HEIGHT & LANDSCAPE)
   ========================================================================== */

@media (min-height: 900px) and (max-height: 1000px) and (max-width: 450px) {
  .left-container {
    padding-bottom: 32px;
  }
}

@media (max-height: 800px) and (max-width: 450px) {
  .project-img-container {
    height: 220px;
  }
  .orange-wheel-my-work {
    height: 80px;
    width: 80px;
  }
  .header-icon-overlay {
    padding-top: 8px;
  }
  .overlay {
    top: -280px;
  }
  .black-box {
    padding: 8px;
  }
  .btn {
    padding: 8px;
  }
}

@media (max-height: 640px) and (max-width: 450px) {
  .project-img-container {
    height: 180px;
  }
  .black-box p {
    font-size: 14px;
  }
  .header-icon-overlay {
    padding: 0;
    height: 32px;
  }
}

@media (min-width: 480px) and (max-width: 950px) and (max-height: 450px) and (orientation: landscape) {
  .projects-section-content {
    padding: 50px 16px;
  }
}

@media (min-width: 835px) and (max-width: 1024px) and (min-height: 1181px) and (max-height: 1366px) and (orientation: portrait) {
  .projects-section-content {
    display: flex;
    flex-direction: column;
  }
  .header-txt {
    margin: 60px 0;
  }
  .projects-container {
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
  }
  .project-img-container {
    max-width: 740px;
    height: 500px;
  }
  .project-img {
    max-width: 600px;
  }
}
