.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  background: transparent;
  display: none;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
  opacity: 0;
  flex-direction: column;
}

.modal-overlay.no-blur {
  backdrop-filter: none;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-info {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.open-modal-btn {
  padding: 16px 24px;
  background: #007aff;
  color: var(--dark-blue);
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.ios-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  color: var(--dark-blue);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.4s, opacity 0.4s ease;
}

.ios-modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ios-modal.active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  left: 0;
  width: 100%;
  height: 100svh;
  background: var(--white);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
  color: var(--dark-blue);
  padding: var(--padding-base);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  will-change: transform;
  touch-action: none;
}

.modal-content.has-gift-background {
    background: var(--gift-image, none) center/contain no-repeat;
}

.modal-content.auto {
  height: 150svh;
}

.modal-line {
  width: 25%;
  height: 4px;
  border-radius: 100px;
  background-color: var(--dark-blue);
  transform: translateY(-100%);
}

.modal-viewed {
  position: relative;
  width: 100%;
  height: 100%;
}

.modal-content.active {
  transform: translateY(20%);
}

.modal-header {
  background: transparent;
  position: relative;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.modal-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.modal-title {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
}

.modal-close-button {
  position: absolute;
  right: 0px;
  top: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--dark-blue);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.modal-close-button:active {
  background: rgba(255, 255, 255, 0.3);
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
  /* background-color: var(--white); */
  /* overflow: hidden; */
  /* position: fixed; */
  /* width: 100%; */
}

.modal-overlay[data-scroll] {
  touch-action: pan-y;
}

.modal-open .modal-overlay {
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

body.modal-open .modal-overlay {
  display: flex;
  animation: fadeOverlayIn 0.3s ease forwards;
}

body.modal-closing .modal-overlay {
  animation: fadeOverlayOut 0.3s ease forwards;
}

@keyframes fadeOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.3);
}

.modal-title-text {
  padding-top: var(--padding-xl);
  font-size: 14px;
  color: var(--dark-blue);
  text-align: center;
  width: 100%;
}

.modal-subtitle {
  font-size: 20px;
  color: var(--dark-blue);
  text-align: center;
  margin: var(--padding-base) 0;
  width: 100%;
}

.modal-close {
  position: absolute;
  right: 0px;
  top: 10%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark-blue);
  padding: 4px 8px;
}

.modal-body {
  overflow-y: auto;
  height: calc(85svh - 80px);
  padding: 0 var(--padding-sm) var(--padding-base) 0;
}

.masonry-container {
  column-count: 2;
  column-gap: 12px;
  width: 100%;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(230, 230, 230, 0.397);
  border: 1px solid rgba(0, 0, 0, 0.164);
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.masonry-image {
  width: 100%;
  height: auto;
  display: block;
}

.masonry-content {
  padding: 12px;
  color: var(--dark-blue);
}

.masonry-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.masonry-description {
  font-size: 12px;
  color: var(--dark-blue);
  line-height: 1.4;
  font-family: "Diodrum Extralight", Arial, sans-serif;
  font-weight: 250;
}

.brand-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--dark-blue);
  z-index: 2;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-radio-group {
  display: flex;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  overflow: hidden;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 20px;
}

.glass-radio-group input {
  display: none;
}

.glass-radio-group label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--dark-blue);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  font-size: 14px;
}

.glass-glider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border-radius: 14px;
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  background: rgba(255, 255, 255, 0.2);
}

#glass-documents:checked~.glass-glider {
  transform: translateX(0%);
}

#glass-awards:checked~.glass-glider {
  transform: translateX(100%);
}

@media (max-width: 480px) {
  .masonry-container {
    column-count: 2;
    column-gap: 8px;
  }

  .masonry-item {
    margin-bottom: 8px;
  }

  .masonry-content {
    padding: 8px;
  }

  .masonry-title {
    font-size: 12px;
  }
}

@media (min-width: 768px) {
  .masonry-container {
    column-count: 2;
    column-gap: 16px;
  }

  .masonry-item {
    margin-bottom: 16px;
  }
}

@media (min-width: 1024px) {
  .masonry-container {
    column-count: 2;
    column-gap: 20px;
  }
}

@media (max-width: 360px) {
  .masonry-container {
    column-count: 2;
    column-gap: 6px;
  }

  .masonry-item {
    margin-bottom: 6px;
  }
}

.animated-card {
  position: fixed;
  background: var(--white);
  z-index: 20;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
}

.animated-card.expanded {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  opacity: 1;
}

.animated-card .back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--dark-blue);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 50px;
  border: 0px;
  cursor: pointer;
  font-size: 14px;
  z-index: 21;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s;
}

.animated-card.expanded .back-button {
  opacity: 1;
}

.animated-content {
  width: 100%;
  height: 100%;
  padding: 70px 20px 20px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}

.animated-card.expanded .animated-content {
  opacity: 1;
}

.modal-body.expanded::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(0, 0, 0, 0.8); */
  background: transparent;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal-body.expanded::before {
  opacity: 1;
}

.modal-body.expanded .masonry-container {
  opacity: 0;
  pointer-events: none;
}

.expanded-image {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
}

.expanded-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark-blue);
}

.expanded-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-blue);
  margin-bottom: 20px;
}

.expanded-details {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}