/* case-studies page */
.case-studies-main {
  background: #fff;
}

.hero-section {
  background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 114, 197, 0.08), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(28, 208, 123, 0.08), transparent 28%);
  pointer-events: none;
}

.hero-section .container,
.hero-section .row,
.hero-section .col-lg-8 {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: #1f2a37;
  letter-spacing: -0.03em;
}

.hero-section .lead {
  color: #607084;
}

.case-section-head .section-title,
.case-filter-title,
.section-title {
  font-weight: 700;
  color: #1f2a37;
  letter-spacing: -0.02em;
}

.case-studies-main {
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}

.case-filter-bar,
.customer-testimonials,
.case-cta {
  background: #fff;
  border: 1px solid #e6edf5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border-radius: 26px;
}

.case-count-pill {
  background: rgba(31, 114, 197, 0.08) !important;
  color: #1f72c5 !important;
  border: 1px solid rgba(31, 114, 197, 0.16);
  padding: .7rem 1rem;
}

.filter-select {
  border-radius: 14px;
  border-color: #e6edf5;
  min-height: 46px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
}

.filter-select:focus {
  border-color: #1f72c5;
  box-shadow: 0 0 0 0.2rem rgba(31, 114, 197, 0.12);
}

#tag-buttons-container {
  gap: .6rem;
}

#tag-buttons-container .filter-tag,
.case-detail-actions .btn,
#load-more-btn,
.case-cta .btn {
  border-radius: 999px;
}

#tag-buttons-container .filter-tag {
  padding: .55rem .95rem;
  font-weight: 600;
  border-color: rgba(31, 114, 197, 0.16);
}

.btn-primary {
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%) !important;
  border: none !important;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.btn-outline-primary {
  border: 2px solid #0066CC;
  color: #0066CC;
  background: transparent;
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: #0066CC;
  color: white;
}

.case-card {
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  transition: all .3s ease;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  height: 100%;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.case-image {
  overflow: hidden;
}

.case-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}

.case-card:hover .case-image img {
  transform: scale(1.04);
}

.case-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.case-badge {
  font-weight: 700;
  letter-spacing: .01em;
  padding: .5rem .85rem;
}

.case-title {
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.35;
  color: #142033;
  margin-bottom: .65rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.case-description {
  color: #6b7280;
  font-size: .95rem;
  line-height: 1.65;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.case-detail-actions .btn {
  padding: .72rem .95rem;
  font-weight: 700;
}

.case-detail-actions .btn-primary {
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%) !important;
  border: none !important;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.featured-case-grid > .featured-case-card-wrap,
.featured-case-grid > .col-lg-4,
.featured-case-grid > .col-md-6 {
  flex: 0 0 calc(33.333% - 1rem);
  max-width: calc(33.333% - 1rem);
}

.featured-case-card-wrap,
.featured-case-card-wrap .case-card {
  height: 100%;
}

.featured-case-grid .case-image img {
  height: 200px;
}

.featured-case-grid .case-body {
  padding: 1.1rem;
  gap: .35rem;
}

.featured-case-grid .case-title {
  font-size: 1rem;
  line-height: 1.28;
  margin-bottom: .5rem;
}

.featured-case-grid .case-description {
  font-size: .9rem;
  line-height: 1.55;
}

.featured-case-grid .case-detail-actions {
  margin-top: .75rem;
}

@media (max-width: 991.98px) {
  .featured-case-grid > .featured-case-card-wrap,
  .featured-case-grid > .col-lg-4,
  .featured-case-grid > .col-md-6 {
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 767.98px) {
  .featured-case-grid > .featured-case-card-wrap,
  .featured-case-grid > .col-lg-4,
  .featured-case-grid > .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.case-filter-bar {
  margin-bottom: 1.75rem !important;
}

.case-section-head {
  margin-bottom: 1.5rem !important;
}

.all-case-section {
  margin-top: 1rem;
}

.customer-testimonials {
  padding: 2rem;
}

.customer-testimonials .card {
  border: 0;
}

.testimonial-card {
  position: relative;
  border-radius: 28px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.98) 100%),
    linear-gradient(135deg, rgba(31, 114, 197, 0.06), rgba(28, 208, 123, 0.05));
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1f72c5 0%, #1cd07b 100%);
}

.testimonial-card--featured {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 280px;
}

.testimonial-card__media {
  padding: 1.75rem 1.65rem;
  background:
    radial-gradient(circle at top left, rgba(31, 114, 197, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(248,251,255,0.96) 0%, rgba(240,246,252,0.92) 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  justify-content: center;
  position: relative;
}

.testimonial-card__media::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(31, 114, 197, 0.10), rgba(28, 208, 123, 0.10));
  filter: blur(2px);
  pointer-events: none;
}

.testimonial-card__content {
  position: relative;
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
}

.testimonial-card__quote-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 114, 197, 0.08);
  color: #1f72c5;
  font-size: 1rem;
}

.testimonial-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, rgba(31, 114, 197, 0.18), rgba(28, 208, 123, 0.18));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
  position: relative;
}

.testimonial-avatar--large {
  width: 96px;
  height: 96px;
}

.testimonial-avatar--large::after {
  content: '★';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%);
  color: #fff;
  font-size: .8rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.testimonial-avatar-image,
.testimonial-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}

.testimonial-avatar-initials {
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.testimonial-card__identity {
  min-width: 0;
}

.testimonial-card__name {
  font-weight: 800;
  color: #0f172a;
  font-size: 1.02rem;
  line-height: 1.25;
}

.testimonial-card__meta,
.testimonial-card__company {
  margin-top: 6px;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.35;
}

.testimonial-card__company {
  font-weight: 700;
  color: #334155;
}

.testimonial-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.testimonial-card__pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .72rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  font-size: .76rem;
  font-weight: 700;
}

.testimonial-card__pill--accent {
  background: rgba(31, 114, 197, 0.10);
  color: #1f72c5;
}

.testimonial-card__rating {
  margin-top: 10px;
  color: #f59e0b;
  font-size: .9rem;
  letter-spacing: .12em;
}

.testimonial-card__quote {
  margin: 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.9;
  position: relative;
  z-index: 1;
}

.testimonial-card__quote::before {
  content: '“';
  position: absolute;
  top: -18px;
  left: -2px;
  font-size: 4rem;
  line-height: 1;
  color: rgba(31, 114, 197, 0.10);
  font-family: Georgia, serif;
  z-index: -1;
}

.testimonial-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: .35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.testimonial-card__source {
  color: #0f172a;
  font-weight: 700;
  font-size: .92rem;
}

.testimonial-card__tag {
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(31, 114, 197, 0.08);
  color: #1f72c5;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.customer-testimonials .testimonial-card,
.customer-testimonials .card {
  height: 100%;
}

@media (max-width: 991.98px) {
  .testimonial-card--featured {
    grid-template-columns: 1fr;
  }

  .testimonial-card__media {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .testimonial-card__content {
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .testimonial-card__content,
  .testimonial-card__media {
    padding: 1.25rem;
  }

  .testimonial-avatar--large {
    width: 86px;
    height: 86px;
  }

  .testimonial-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.case-cta {
  padding: 2rem 1.25rem;
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%);
  color: #fff;
}

.case-cta .btn-light {
  color: #1f72c5;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(255,255,255,0.15);
}

#case-modal .modal-dialog {
  max-width: 1120px;
}

#case-modal .modal-content {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

#case-modal .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(31, 114, 197, 0.08), rgba(28, 208, 123, 0.06));
}

#case-modal .modal-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#case-modal .modal-body {
  padding: 1.5rem;
  background: linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
}

.case-hero {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.case-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.28) 100%);
  pointer-events: none;
}

.case-hero .carousel,
.case-hero .carousel-inner,
.case-hero .carousel-item,
.case-hero img {
  border-radius: 30px;
}

.case-hero img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.case-hero .carousel-control-prev,
.case-hero .carousel-control-next {
  width: 12%;
  opacity: 0.95;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.case-hero .carousel-indicators {
  margin-bottom: 1rem;
}

.case-hero .carousel-indicators [data-bs-target] {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.case-detail-card {
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 1.75rem;
}

.case-detail-card::before {
  content: '';
  display: block;
  height: 4px;
  width: 72px;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%);
}

.case-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.15rem;
}

.case-detail-badges .badge {
  padding: .55rem .85rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .01em;
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #334155 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.case-detail-card h5 {
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: #64748b;
  margin-bottom: .7rem;
}

.case-detail-card .text-muted,
.case-detail-card .text-muted p {
  color: #475569 !important;
  line-height: 1.85;
}

.case-detail-card .alert,
.case-detail-card .card,
.case-detail-card .border {
  border-radius: 20px;
}

.case-detail-card .text-muted {
  font-size: .98rem;
}

.case-detail-actions {
  margin-top: 1.35rem !important;
}

.case-detail-actions .btn {
  border-radius: 999px;
  padding: .86rem 1.25rem;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.case-gallery-carousel {
  border-radius: 30px;
}
