/* ============================================
   Modal – Case Studies & News Articles
   ============================================ */

/* Backdrop & Container */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.detail-modal.active {
  pointer-events: all;
  opacity: 1;
  visibility: visible;
}

.detail-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detail-modal__container {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 88vh;
  background: #fff;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-modal.active .detail-modal__container {
  transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.detail-modal__container::-webkit-scrollbar {
  width: 6px;
}
.detail-modal__container::-webkit-scrollbar-track {
  background: transparent;
}
.detail-modal__container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* Close button */
.detail-modal__close {
  position: sticky;
  top: 16px;
  float: right;
  margin-right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.detail-modal__close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* ---- Case Study Modal ---- */
.modal-case__hero {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.modal-case__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-case__body {
  padding: 2.5rem;
}

.modal-case__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #b8860b;
  display: block;
  margin-bottom: 0.5rem;
}

.modal-case__title {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.modal-case__desc {
  font-size: 1.05rem;
  color: #666;
  margin: 0 0 1.25rem;
}

.modal-case__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.modal-case__tag {
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid #e0e0e0;
  color: #555;
  background: #fafafa;
}

.modal-case__section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.modal-case__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.modal-case__section h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
}

.modal-case__section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
}

.modal-case__section--result {
  background: #fafaf5;
  border: 1px solid #e8e4d4;
  border-radius: 12px;
  padding: 1.5rem;
}
.modal-case__section--result h3 {
  color: #b8860b;
}
.modal-case__section--result p {
  font-weight: 500;
  color: #333;
}

/* ---- News Article Modal ---- */
.modal-news__hero {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.modal-news__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-news__body {
  padding: 2.5rem;
}

.modal-news__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 1rem;
}
.modal-news__category {
  background: #1a1a1a;
  color: #fff;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-news__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.modal-news__content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
}
.modal-news__content p {
  margin: 0 0 1.25rem;
}
.modal-news__content .modal-news__list {
  padding-left: 0.5rem;
  border-left: 3px solid #e8e4d4;
  color: #555;
}

.modal-news__back {
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-news__back:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .detail-modal__container {
    width: 95%;
    max-height: 92vh;
    border-radius: 12px;
  }
  .modal-case__hero,
  .modal-news__hero {
    height: 200px;
  }
  .modal-case__body,
  .modal-news__body {
    padding: 1.5rem;
  }
  .modal-case__title {
    font-size: 1.5rem;
  }
  .modal-news__title {
    font-size: 1.35rem;
  }
}
