/* ========================================================================
   CASE PAGE – Premium Case Studies (2026)
   ======================================================================== */

/* --- Hero (light, elegant) --- */
.case-hero {
  background-color: var(--gray-color);
  color: var(--text-color);
  padding: 200px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.case-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 118, 179, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.case-hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(10, 34, 64, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.case-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.case-hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--primary-color);
}

.case-hero-content p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-color);
}

.case-hero-content .section-subtitle {
  color: var(--accent-color);
}

.case-hero-content .section-subtitle:before {
  background-color: var(--accent-color);
}

/* --- Case Sections (shared) --- */
.case-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.case-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.case-section-grid.reverse {
  grid-template-columns: 1.2fr 1fr;
}

.case-section-grid.reverse .case-section-content {
  order: 2;
}

.case-section-grid.reverse .case-section-mockups {
  order: 1;
}

/* --- Dark variant --- */
.case-dark {
  background-color: var(--primary-color);
  color: var(--light-color);
  position: relative;
}

/* Subtle pattern overlay for dark sections */
.case-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 50%, rgba(56, 118, 179, 0.08) 0%, transparent 50%),
                     radial-gradient(circle at 80% 20%, rgba(56, 118, 179, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.case-dark > .container {
  position: relative;
  z-index: 1;
}

.case-dark .case-section-tags .case-section-tag {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.case-dark h2 {
  color: var(--light-color);
}

.case-dark .case-section-category {
  color: rgba(255, 255, 255, 0.6);
}

.case-dark .case-section-description {
  color: rgba(255, 255, 255, 0.8);
}

.case-dark .case-section-link {
  color: var(--light-color);
  border-color: rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.case-dark .case-section-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.case-dark .case-section-link:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--light-color);
}

.case-dark .case-section-link:hover::before {
  height: 100%;
}

/* --- Light variant --- */
.case-light {
  background-color: var(--light-color);
  color: var(--text-color);
  position: relative;
}

.case-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 80% 50%, rgba(56, 118, 179, 0.03) 0%, transparent 50%),
                     radial-gradient(circle at 20% 80%, rgba(10, 34, 64, 0.02) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.case-light > .container {
  position: relative;
  z-index: 1;
}

.case-light h2 {
  color: var(--primary-color);
}

.case-light .case-section-category {
  color: var(--accent-color);
}

.case-light .case-section-description {
  color: var(--text-color);
}

.case-light .case-section-link {
  color: var(--primary-color);
  border-color: var(--primary-color);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.case-light .case-section-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--primary-color);
  transition: height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.case-light .case-section-link:hover {
  color: var(--light-color);
}

.case-light .case-section-link:hover::before {
  height: 100%;
}

.case-light .case-section-tags .case-section-tag {
  background-color: rgba(56, 118, 179, 0.08);
  color: var(--accent-color);
  border-color: rgba(56, 118, 179, 0.15);
}

/* --- Content --- */
.case-section-content h2 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.case-section-category {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  display: block;
}

.case-section-description {
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.case-section-description:last-of-type {
  margin-bottom: 32px;
}

/* --- Tags --- */
.case-section-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.case-section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-section-tag:hover {
  transform: translateY(-2px);
}

/* --- Link/Button --- */
.case-section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid;
  transition: all 0.3s ease;
  text-decoration: none;
}

.case-section-link i {
  transition: transform 0.3s ease;
}

.case-section-link:hover i {
  transform: translateX(5px);
}

/* --- Mockups Container --- */
.case-section-mockups {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mockup-desktop {
  width: 78%;
  height: auto;
  border-radius: 8px;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.25));
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mockup-phone {
  width: 22%;
  height: auto;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.3));
  position: absolute;
  right: -5%;
  bottom: -10%;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-section:hover .mockup-desktop {
  transform: translateY(-10px) rotate(-0.5deg);
}

.case-section:hover .mockup-phone {
  transform: translateY(-6px) scale(1.03) rotate(0.5deg);
}

/* Dark sections: deeper shadows */
.case-dark .mockup-desktop {
  filter: drop-shadow(0 25px 60px rgba(0, 0, 0, 0.45));
}

.case-dark .mockup-phone {
  filter: drop-shadow(0 18px 45px rgba(0, 0, 0, 0.55));
}

/* --- Inline links in descriptions --- */
.case-dark .case-inline-link {
  color: var(--light-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.case-dark .case-inline-link:hover {
  opacity: 0.8;
  color: var(--light-color);
}

.case-light .case-inline-link {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.case-light .case-inline-link:hover {
  color: var(--primary-color);
}

/* --- Divider between sections --- */
.case-light + .case-dark,
.case-dark + .case-light {
  border-top: none;
}

/* --- CTA for case page --- */
.case-cta {
  margin-top: 0 !important;
  padding: 100px 0 !important;
  overflow: hidden !important;
  background-color: var(--gray-color) !important;
  color: var(--text-color) !important;
}

.case-cta:before {
  display: none !important;
}

.case-cta h2 {
  color: var(--primary-color) !important;
}

.case-cta p {
  color: var(--text-color) !important;
}

.case-cta .btn {
  background-color: var(--primary-color) !important;
  color: var(--light-color) !important;
  border: none !important;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.case-cta .btn:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--accent-color);
  transition: height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.case-cta .btn:hover {
  color: var(--light-color) !important;
  box-shadow: 0 6px 20px rgba(56, 118, 179, 0.3);
}

.case-cta .btn:hover:before {
  height: 100%;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 1200px) {
  .case-section-content h2 {
    font-size: 2.4rem;
  }

  .case-section-grid {
    gap: 60px;
  }
}

@media (max-width: 992px) {
  .case-hero {
    padding: 160px 0 80px;
  }

  .case-hero-content h1 {
    font-size: 2.5rem;
  }

  .case-section {
    padding: 80px 0;
  }

  .case-section-grid,
  .case-section-grid.reverse {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }

  .case-section-grid.reverse .case-section-content {
    order: 1;
  }

  .case-section-grid.reverse .case-section-mockups {
    order: 2;
  }

  .case-section-tags {
    justify-content: center;
  }

  .case-section-content h2 {
    font-size: 2.2rem;
  }

  .mockup-wrapper {
    max-width: 550px;
    margin: 0 auto;
  }

  .mockup-phone {
    right: -3%;
    bottom: -8%;
  }

  .case-cta {
    padding: 80px 0 !important;
  }
}

@media (max-width: 768px) {
  .case-hero {
    padding: 140px 0 60px;
  }

  .case-hero-content h1 {
    font-size: 2rem;
  }

  .case-hero-content p {
    font-size: 1rem;
  }

  .case-section {
    padding: 60px 0;
  }

  .case-section-content h2 {
    font-size: 1.9rem;
  }

  .case-section-description {
    font-size: 1rem;
  }

  .mockup-wrapper {
    max-width: 420px;
  }

  .case-section-link {
    padding: 12px 26px;
    font-size: 0.88rem;
  }

  .case-cta {
    padding: 70px 0 !important;
  }
}

@media (max-width: 576px) {
  .case-hero {
    padding: 120px 0 50px;
  }

  .case-hero-content h1 {
    font-size: 1.8rem;
  }

  .case-section {
    padding: 50px 0;
  }

  .case-section-content h2 {
    font-size: 1.6rem;
  }

  .case-section-category {
    font-size: 0.85rem;
  }

  .case-section-description {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .mockup-wrapper {
    max-width: 340px;
  }

  .mockup-phone {
    width: 24%;
    right: -2%;
    bottom: -6%;
  }

  .case-section-tag {
    font-size: 0.72rem;
    padding: 5px 12px;
  }

  .case-section-link {
    padding: 11px 22px;
    font-size: 0.82rem;
  }

  .case-cta {
    padding: 60px 0 !important;
  }
}
