.navbar {
  display: flex;
  padding: 0px 100px;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

.logo img {
  width: 93px;
  height: 45px;
}

.menu {
  display: flex;
  width: 263px;
  height: 48px;
  justify-content: space-between;
}

.work-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 60px;
  height: 476px;
  align-self: stretch;
  margin-top: 190px;
}

.description-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px;
}

.name-pronunciation {
  width: 504px;
  height: 152px;
}

.name {
  color: #ffe4e4;
  font-size: 60px;
  font-weight: 500;
  line-height: 120px; 
}

.attributes {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.attribute-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
}

.scroll-button-container {
  display: flex;
  justify-content: center;
}

.scroll-button {
  display: flex;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: var(--neon, #0093e6);
  border: none;
  outline: none;
  transition: transform 0.8s ease-in;
}

/* Hover State */
.scroll-button:hover {
  background: var(--background, #002940);
  border: 2px solid var(--neon, #0093e6);
}

.scroll-button:hover .arrow-down path {
  fill: var(--neon, #0093e6); 
}

.arrow-down {
  width: 20px;
  height: 24px;
  flex-shrink: 0;
  stroke-width: 2.5px;
}


/* Case grid styles */
.case-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  align-self: stretch;
  /* opacity: 0; */
  padding-top: 145px;
}

.case-grid.visible {
  opacity: 1; 
}

/* Grid 1 */
.grid-1,
.grid-2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px;
  align-self: stretch;
}

.grid-2 {
  padding-top: 60px;
}

/* Define smooth jiggle animations */
@keyframes smoothJiggleRight {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(1.5deg);
  }
  40% {
    transform: rotate(-1.5deg);
  }
  80% {
    transform: rotate(1.5deg);
  }
  100% {
    transform: rotate(2deg);
  }
}

@keyframes smoothJiggleLeft {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-1.5deg);
  }
  40% {
    transform: rotate(1.5deg);
  }
  80% {
    transform: rotate(-1.5deg);
  }
  100% {
    transform: rotate(-2deg);
  }
}

/* Reverse jiggle animations */
@keyframes reverseJiggleRight {
  0% {
    transform: rotate(2deg);
  }
  50% {
    transform: rotate(4deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes reverseJiggleLeft {
  0% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(-4deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Apply the jiggle animations on hover */
.grid-1 .case:hover {
  animation: smoothJiggleRight 0.8s ease forwards;
}

.grid-2 .case:hover {
  animation: smoothJiggleLeft 0.8s ease forwards;
}

/* Apply transitions for smooth exiting */
.grid-1 .case,
.grid-2 .case {
  transition: transform 0.5s ease; /* For smooth transition back */
}

/* Use keyframes for reverse jiggle on hover end */
.grid-1 .case:not(:hover) {
  animation: reverseJiggleRight 0.3s ease forwards;
}

.grid-2 .case:not(:hover) {
  animation: reverseJiggleLeft 0.3s ease forwards;
}

/* Case styling */
.case {
  display: flex;
  min-width: 200px;
  padding: 20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  border-radius: 30px;
  border: 1px solid var(--Blue-Gray, #1D5E82);
  background: var(--Bg-Menu, #003553);
  text-decoration: none;
}


/* Photo rectangle */
.photo1, .photo2, .photo3, .photo4 {
  position: relative; 
  height: 104px;
  align-self: stretch;
  border-radius: 20px; 
  overflow: hidden; 
}

/* Content before */
.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

/* Tags */
.tags {
  display: flex;
  align-items: center;
  gap: 5px;
  align-self: stretch;
}

.tag.work {
  display: flex;
  padding: 5px 10px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  background: var(--Neon, #0093E6);
  color: var(--Bg-Menu, #003553);
  font-family: "Spot Mono";
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.tag.category {
  display: flex;
  padding: 5px 10px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  border: 1px solid var(--Neon, #0093E6);
  color: var(--Neon, #0093E6);
  font-family: "Spot Mono";
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

/* Title and subtitle */
.title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 2px;
}

.title h2 {
  align-self: stretch;
  color: var(--Text-color, #FFE4E4);
  font-family: "Spot Mono";
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  width: 100%;
  height: auto;
}

.subtitle span {
  color: var(--Blue-Gray, #1D5E82);
  font-family: "Spot Mono";
  font-size: 14px;
  font-weight: 700;
}

.line {
  width: 19px;
  transform: rotate(-90deg);
  border-radius: 1px;
  border: 1px solid var(--Blue-Gray, #1D5E82);
  align-self: center;
} 
@media (max-width: 1440px) {
  .case-grid {
    padding-top: 50px;
  }
}
@media (max-width: 1068px) {
  /* Case grid styles */
  .case-grid {
    padding-top: 50px;
  }

  /* Case styling */
  .case {
    padding: 15px;
  }
  
  .tag.work {
    font-size: 10px;
  }
  
  .tag.category {
    font-size: 10px;
  }
}
@media (max-width: 734px) {
  .work-container {
    gap: 60px;
    height: auto;
    margin-top: 215px;
  }
  
  .description-container {
    gap: 0;
  }
  
  .name-pronunciation {
    width: 100%;
    height: auto;
    margin-bottom: 40px;
  }
  
  .name {
    font-size: 30px;
    line-height: 39.69px; 
  }
  
  .attributes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .attribute-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
  }
  .inactive {
    font-weight: 700;
    font-size: 20px;
  }
  
  .scroll-button {
    width: 40px;
    height: 40px;
  }
  
  .arrow-down {
    width: 16px;
    height: 20px;
  }
  
  /* Case grid styles */
  .case-grid {
    padding-top: 0;
    flex-direction: column;
    align-items: center;
    align-self: center;
    gap: 60px;
  }
  
  .grid-2 {
    padding-top: 0;
  }

  /* Case styling */
  .case {
    padding: 15px;
  }
  
  .tag.work {
    font-size: 12px;
  }
  
  .tag.category {
    font-size: 12px;
  }
}
