:root {
  --primary: #0a0e27;
  --secondary: #1a1f3a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
  --light: #f8fafc;
  --muted: #94a3b8;
  --dark: #020617;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--primary);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  width: 100%;
}

section {
  padding: 100px 0;
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

/* HERO SECTION */
.case-studies-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.case-studies-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.2;
  margin-bottom: 25px;
  font-weight: 800;
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.3rem;
  color: var(--muted);
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: var(--accent);
}

/* STATS SECTION */
.stats-section {
  background: var(--primary);
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-item {
  padding: 40px 20px;
  background: var(--secondary);
  border-radius: 16px;
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.stat-item:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.stat-item h3 {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--muted);
  font-size: 1rem;
}

/* FILTER SECTION */
.filter-section {
  background: var(--secondary);
  padding: 60px 0 40px;
  position: sticky;
  top: 134px;
  z-index: 100;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.filter-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 28px;
  background: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  color: var(--light);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.filter-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* CASE STUDIES GRID */
.case-studies-section {
  background: var(--primary);
  padding-top: 60px;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 35px;
}

.case-study-card {
  background: var(--secondary);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid rgba(99, 102, 241, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.case-study-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.case-image {
  width: 100%;
  height: 250px;
  background: var(--gradient-accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
  transition: opacity 0.3s ease;
}

.case-study-card:hover .case-image::before {
  opacity: 0.7;
}

.case-icon {
  font-size: 4rem;
  color: white;
  position: relative;
  z-index: 1;
}

.industry-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.case-content {
  padding: 35px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.case-content h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--light);
}

.client-name {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 15px;
  display: block;
}

.case-description {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 25px;
  font-size: 0.95rem;
  flex: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.tech-tag {
  padding: 6px 14px;
  background: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.metric {
  text-align: center;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.view-case-btn {
  padding: 14px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
}

.view-case-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.view-case-btn i {
  transition: transform 0.3s ease;
}

.view-case-btn:hover i {
  transform: translateX(5px);
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.no-results.show {
  display: block;
}

.no-results i {
  font-size: 5rem;
  color: var(--muted);
  margin-bottom: 20px;
  opacity: 0.3;
}

.no-results h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--light);
}

.no-results p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--secondary);
  max-width: 900px;
  width: 100%;
  border-radius: 24px;
  position: relative;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 40px 50px 30px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--light);
  font-size: 1.2rem;
}

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

.modal-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--light);
}

.modal-header .client-name {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

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

.modal-tag {
  padding: 8px 18px;
  background: var(--gradient-accent);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.modal-body {
  padding: 40px 50px;
}

.modal-section {
  margin-bottom: 40px;
}

.modal-section h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-section h3 i {
  font-size: 1.5rem;
}

.modal-section p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.05rem;
  margin-bottom: 15px;
}

.modal-section ul {
  list-style: none;
  padding-left: 0;
}

.modal-section ul li {
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: start;
  gap: 15px;
  font-size: 1.05rem;
}

.modal-section ul li:last-child {
  border-bottom: none;
}

.modal-section ul li i {
  color: var(--accent);
  margin-top: 4px;
  font-size: 0.9rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 20px;
}

.result-card {
  background: var(--primary);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  text-align: center;
}

.result-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.8rem;
  color: white;
}

.result-card h4 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.result-card p {
  margin: 0;
  font-size: 0.9rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.tech-item {
  background: var(--primary);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.tech-item i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.tech-item p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.testimonial-box {
  background: var(--primary);
  padding: 30px;
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  margin-top: 20px;
}

.testimonial-text {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--light);
  margin-bottom: 20px;
}

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

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.author-info h5 {
  color: var(--light);
  margin-bottom: 3px;
}

.author-info p {
  margin: 0;
  font-size: 0.85rem;
}

/* CTA SECTION */
.cta-section {
  background: var(--secondary);
  padding: 100px 0;
}

.cta-box {
  background: var(--gradient-accent);
  padding: 80px 60px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.cta-box h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.cta-box p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  padding: 16px 40px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: none;
}

.btn-white {
  background: white;
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline-white:hover {
  background: white;
  color: var(--accent);
}

/* FOOTER */
footer {
  background: var(--dark);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-about h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-about p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 25px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--secondary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-social a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--light);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links ul li a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
}

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
  .case-studies-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

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

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

  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

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

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

  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-container {
    gap: 10px;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 10px 20px;
  }

  .modal-header,
  .modal-body {
    padding: 30px 25px;
  }

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

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

  .cta-box {
    padding: 60px 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .case-metrics {
    grid-template-columns: 1fr;
  }
}
