/* Custom Case Studies Styling matching current dark theme */

.case-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.case-card-detail {
  background: #1f1f1f !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 1.5rem !important;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.case-card-detail:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 111, 50, 0.3) !important;
}

.case-card-detail__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 2rem;
  border-left: 4px solid var(--orange);
  padding-left: 1.2rem;
}

.case-card-detail__body {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-bottom: 2.5rem;
}

.case-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.case-section h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin: 0;
}

.case-section p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.case-section ul {
  margin: 0;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-section li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

/* Metrics Section */
.case-metrics-header {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  margin-bottom: 1rem;
}

.case-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .case-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .case-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.case-metric-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background var(--ease), border-color var(--ease);
}

.case-card-detail:hover .case-metric-box {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.case-metric-number {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #fff;
  line-height: 1;
}

.case-metric-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

.case-studies-grid-section {
  background: #f5f5f5 !important;
}

/* Card CTA Section */
.case-cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.case-cta-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
}

.download-case-cta {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
  background: transparent;
  border: 2px solid var(--orange);
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
}

.download-case-cta:hover {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 25px rgba(255, 111, 50, 0.25);
  transform: translateY(-2px);
}

.case-cta-sub {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Modal Implementation */
.case-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 1.5rem;
}

.case-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.case-modal-container {
  background: #0f1014;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 520px;
  padding: 2.8rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.case-modal-overlay.active .case-modal-container {
  transform: translateY(0);
}

.case-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--ease);
}

.case-modal-close:hover {
  color: #fff;
}

.case-modal-header {
  margin-bottom: 2rem;
}

.case-modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.case-modal-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.case-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.case-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-form-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.case-form-input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
  color: #fff;
  transition: all var(--ease);
}

.case-form-input:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 111, 50, 0.15);
}

.case-form-input.readonly-input {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.case-form-input.readonly-input:focus {
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .case-card-detail {
    padding: 2rem;
  }

  .case-modal-container {
    padding: 2rem;
  }
}