/* Cases Filter */
.cases-filter-section {
  background:
    linear-gradient(180deg, #f6f9ff 0%, var(--white) 42%),
    var(--white);
}

.cases-filter {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.filter-btn {
  min-width: 112px;
  padding: 11px 28px;
  border: 1px solid rgba(26, 95, 199, 0.35);
  background: var(--white);
  color: var(--primary);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  box-shadow: 0 8px 24px rgba(26, 95, 199, 0.08);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(26, 95, 199, 0.2);
}

/* Case Detail Cards */
.cases-grid {
  align-items: stretch;
}

.case-detail-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(26, 95, 199, 0.12);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(18, 45, 84, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.case-detail-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.case-detail-card:hover {
  transform: translateY(-8px);
  border-color: rgba(26, 95, 199, 0.34);
  box-shadow: 0 24px 58px rgba(18, 45, 84, 0.14);
}

.case-detail-card:hover::after {
  border-color: rgba(255, 255, 255, 0.5);
}

.case-detail-image {
  height: 230px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center;
}

.case-detail-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(9, 23, 45, 0.14) 0%, rgba(9, 23, 45, 0.68) 100%),
    linear-gradient(90deg, rgba(26, 95, 199, 0.16), rgba(255, 107, 53, 0.08));
  transition: opacity 0.3s ease;
}

.case-detail-card:hover .case-detail-image::before {
  opacity: 0.92;
}

.case-detail-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.case-detail-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: transform 0.3s ease;
}

.case-detail-card:hover .case-detail-overlay {
  transform: translateY(-4px);
}

.case-detail-label {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  padding: 12px 30px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: rgba(8, 20, 40, 0.28);
  backdrop-filter: blur(4px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.26);
}

.case-detail-content {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 30px 30px;
}

.case-detail-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 52px;
  height: 3px;
  background: var(--accent);
  border-radius: 99px;
}

.case-detail-content h3 {
  font-size: 22px;
  color: var(--text);
  margin-bottom: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.case-detail-content p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 22px;
}

.case-detail-content .case-tags {
  margin-top: auto;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.case-tags span,
.case-tags .tag-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  background: #eef5ff;
  color: var(--primary);
  padding: 6px 14px;
  border: 1px solid rgba(26, 95, 199, 0.12);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.case-tags-section .case-tags {
  gap: 8px;
}

.case-tags-section .case-tags .tag-item {
  min-height: 26px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 5px;
  font-weight: 600;
}

.no-cases p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Case Single Page */
.case-single {
  background: linear-gradient(180deg, #f6f9ff 0%, var(--white) 58%);
}

.case-hero {
  position: relative;
  padding: 50px 0 40px;
  background:
    linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%),
    var(--white);
  overflow: hidden;
}

.case-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(26, 95, 199, 0), rgba(26, 95, 199, 0.22), rgba(26, 95, 199, 0));
}

.case-hero-content {
  position: relative;
  z-index: 1;
  color: var(--text);
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.case-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  background: #edf5ff;
  color: var(--primary);
  padding: 5px 14px;
  border: 1px solid rgba(26, 95, 199, 0.14);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.case-hero .case-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.24;
  color: var(--text);
}

.case-hero .case-intro {
  font-size: 17px;
  line-height: 1.75;
  opacity: 0.88;
  max-width: 880px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.case-hero-image {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 34px auto 0;
  overflow: hidden;
  border: 1px solid rgba(26, 95, 199, 0.12);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 20px 55px rgba(18, 45, 84, 0.12);
}

.case-hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

.case-content-section {
  padding: 34px 0 96px;
}

.case-content-wrapper {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 42px 52px;
  background: var(--white);
  border: 1px solid rgba(26, 95, 199, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(18, 45, 84, 0.08);
}

.case-detail-text {
  margin-bottom: 34px;
}

.case-detail-text > h2:first-child,
.case-detail-text > h3:first-child,
.case-detail-text > p:first-child {
  margin-top: 0;
}

.case-detail-text p {
  margin-bottom: 24px;
  line-height: 2.15;
  color: var(--text);
  font-size: 17px;
}

.case-detail-text h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin: 46px 0 22px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

.case-detail-text h3 {
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  margin: 38px 0 18px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
}

.case-detail-text h4 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin: 28px 0 14px;
}

.case-detail-text strong {
  color: var(--primary-dark);
  font-weight: 800;
}

.case-detail-text ul,
.case-detail-text ol {
  margin: 22px 0;
  padding-left: 26px;
}

.case-detail-text li {
  margin-bottom: 12px;
  line-height: 2;
  color: var(--text);
  font-size: 16px;
}

.case-detail-text ul li::marker {
  color: var(--primary);
}

.case-detail-text img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 28px 0;
  box-shadow: 0 18px 45px rgba(18, 45, 84, 0.16);
}

.case-tags-section {
  margin: 32px 0 0;
  padding: 20px 22px;
  background: #f8fbff;
  border: 1px solid rgba(26, 95, 199, 0.13);
  border-radius: 8px;
}

.tags-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tags-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.case-demo-section {
  margin: 36px 0 0;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(26, 95, 199, 0.96) 0%, rgba(13, 71, 161, 0.96) 100%),
    var(--primary);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(26, 95, 199, 0.22);
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  background: var(--white);
  color: var(--primary);
  padding: 14px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
}

.btn-demo:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.btn-demo svg,
.btn-back svg {
  flex: 0 0 auto;
}

.case-back-section {
  text-align: center;
  padding-top: 34px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
  padding: 12px 26px;
  border-radius: 6px;
  border: 1px solid rgba(26, 95, 199, 0.35);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(26, 95, 199, 0.08);
}

.btn-back:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(26, 95, 199, 0.18);
}

@media (max-width: 1024px) {
  .case-detail-image {
    height: 210px;
  }

  .case-hero .case-title {
    font-size: 38px;
  }
}

@media (max-width: 768px) {
  .cases-filter-section {
    padding-top: 56px;
  }

  .cases-filter {
    justify-content: flex-start;
    margin-bottom: 34px;
  }

  .filter-btn {
    min-width: auto;
    padding: 9px 18px;
    font-size: 14px;
  }

  .case-detail-image {
    height: 178px;
  }

  .case-detail-label {
    font-size: 18px;
    padding: 10px 22px;
  }

  .case-detail-content {
    padding: 24px 22px;
  }

  .case-detail-content::before {
    left: 22px;
  }

  .case-detail-content h3 {
    font-size: 19px;
  }

  .case-hero {
    padding: 76px 0 28px;
  }

  .case-hero .case-title {
    font-size: 30px;
  }

  .case-hero .case-intro {
    font-size: 16px;
  }

  .case-content-section {
    padding-top: 28px;
    padding-bottom: 70px;
  }

  .case-content-wrapper {
    padding: 30px 22px;
  }

  .case-detail-text p {
    font-size: 16px;
    line-height: 2;
  }

  .case-detail-text h2 {
    font-size: 24px;
  }

  .case-detail-text h3 {
    font-size: 20px;
  }

  .case-tags-section,
  .case-demo-section {
    padding: 24px 20px;
  }

  .case-tags-section {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .case-detail-card,
  .case-detail-card::after,
  .case-content-wrapper,
  .case-tags-section,
  .case-demo-section {
    border-radius: 8px;
  }

  .case-detail-image {
    height: 166px;
  }

  .case-tags span,
  .case-tags .tag-item {
    min-height: 30px;
    padding: 5px 11px;
    font-size: 12px;
  }

  .btn-demo,
  .btn-back {
    width: 100%;
  }
}
