/* Case Study Modal Styles */
.case-study-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.case-study-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: 12px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.case-study-modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 2;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background-color: var(--text-color);
  transform: rotate(90deg);
}

.modal-header {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.modal-header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.modal-header-content {
  color: #fff;
}

.modal-header-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.modal-header-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}

.modal-header-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-body {
  padding: 40px;
}

.case-info-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.case-description h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.case-description p {
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text-color);
}

.case-highlights {
  background-color: rgba(var(--accent-rgb), 0.05);
  border-radius: 12px;
  padding: 25px;
}

.case-highlights h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.highlights-list {
  list-style: none;
  padding: 0;
}

.highlights-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: var(--text-color);
}

.highlights-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.case-gallery {
  margin-top: 40px;
}

.case-gallery h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--heading-color);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  height: 180px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.case-testimonial {
  margin-top: 40px;
  background-color: var(--background-secondary);
  border-radius: 12px;
  padding: 30px;
  position: relative;
}

.case-testimonial::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 5rem;
  color: rgba(var(--accent-rgb), 0.1);
  line-height: 1;
}

.testimonial-content {
  position: relative;
  font-style: italic;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-info h4 {
  margin-bottom: 5px;
  font-size: 1rem;
  color: var(--heading-color);
}

.testimonial-info p {
  font-size: 0.9rem;
  color: var(--text-color-light);
}

.similar-cases {
  margin-top: 40px;
}

.similar-cases h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--heading-color);
}

.similar-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.similar-case-item {
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--background-secondary);
  transition: all 0.3s ease;
}

.similar-case-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.similar-case-image {
  height: 150px;
}

.similar-case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-case-content {
  padding: 15px;
}

.similar-case-content h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.similar-case-content p {
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-bottom: 10px;
}

@media (max-width: 992px) {
  .case-info-container {
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .similar-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .modal-header {
    height: 200px;
  }

  .modal-header-content h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 30px 20px;
  }

  .gallery-grid,
  .similar-cases-grid {
    grid-template-columns: 1fr;
  }
}
