/* ===================================
   CASE STUDIES PAGE STYLES
   =================================== */

/* Hero Section */
.case-studies-hero {
  padding: 150px 0 80px;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
  position: relative;
  overflow: hidden;
}

.case-studies-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(67, 212, 182, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(83, 224, 231, 0.1) 0%, transparent 50%);
  animation: gradientShift 8s ease infinite;
}

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

.page-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(67, 212, 182, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.stat-badge:hover {
  transform: translateY(-5px);
  border-color: rgba(67, 212, 182, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #43D4B6, #53E0E7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Filter Section */
.case-studies-filter {
  padding: 3rem 0;
  background: #0a0e27;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 80px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(67, 212, 182, 0.3);
  color: #fff;
}

.filter-btn.active {
  background: linear-gradient(135deg, #43D4B6, #53E0E7);
  border-color: transparent;
  color: #0a0e27;
}

/* Projects Grid */
.case-studies-main {
  padding: 5rem 0;
  background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  opacity: 1;
  transform: translateY(0);
}

.project-card.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(67, 212, 182, 0.3);
  box-shadow: 0 20px 60px rgba(67, 212, 182, 0.2);
}

.project-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.placeholder-icon {
  font-size: 5rem;
  opacity: 0.3;
  filter: blur(1px);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 39, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-content {
  padding: 2rem;
}

.project-category {
  margin-bottom: 1rem;
}

.category-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(67, 212, 182, 0.1);
  border: 1px solid rgba(67, 212, 182, 0.3);
  border-radius: 50px;
  color: #43D4B6;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tech-badge:hover {
  background: rgba(67, 212, 182, 0.1);
  border-color: rgba(67, 212, 182, 0.3);
  color: #43D4B6;
}

/* View Details Button */
.view-details-btn {
  margin-top: 1.5rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.view-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 212, 182, 0.3);
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(67, 212, 182, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(67, 212, 182, 0.1);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #43D4B6, #53E0E7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* CTA Section */
.case-studies-cta {
  padding: 6rem 0;
  background: linear-gradient(135deg, #133162 0%, #1a1f3a 100%);
  position: relative;
  overflow: hidden;
}

.case-studies-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 50%, rgba(67, 212, 182, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(83, 224, 231, 0.15) 0%, transparent 50%);
}

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

.cta-title {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
}

/* Active Nav Link */
.nav-link.active {
  color: #43D4B6;
}

.nav-link.active .nav-icon {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 900px) {
  .case-studies-hero {
    padding: 100px 0 60px;
  }

  .page-title {
    font-size: 3rem;
  }

  .page-subtitle {
    font-size: 1.15rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-badge {
    padding: 1.25rem 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

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

  .cta-title {
    font-size: 2.25rem;
  }

  .cta-subtitle {
    font-size: 1.1rem;
  }

  .filter-buttons {
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(67, 212, 182, 0.3) transparent;
  }

  .filter-buttons::-webkit-scrollbar {
    height: 4px;
  }

  .filter-buttons::-webkit-scrollbar-thumb {
    background: rgba(67, 212, 182, 0.3);
    border-radius: 2px;
  }

  .filter-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .case-studies-hero {
    padding: 100px 0 60px;
  }

  .page-title {
    font-size: 2.25rem;
    line-height: 1.2;
  }

  .page-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-badge {
    width: 100%;
    padding: 1rem;
  }

  .case-studies-filter {
    padding: 1.5rem 0;
    top: 70px;
  }

  .filter-buttons {
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .filter-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .case-studies-main {
    padding: 3rem 0;
  }

  .projects-grid {
    gap: 1.5rem;
  }

  .project-image {
    height: 220px;
  }

  .placeholder-icon {
    font-size: 4rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.25rem;
  }

  .project-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .tech-tags {
    gap: 0.5rem;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .project-metrics {
    gap: 1.5rem;
  }

  .metric-label {
    font-size: 0.75rem;
  }

  .metric-value {
    font-size: 1rem;
  }

  .case-studies-cta {
    padding: 4rem 0;
  }

  .cta-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .cta-subtitle {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animation for gradient shift */
@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Extra Small Devices */
@media (max-width: 400px) {
  .page-title {
    font-size: 1.85rem;
  }

  .filter-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .project-content {
    padding: 1.25rem;
  }

  .tech-tags {
    gap: 0.4rem;
  }

  .tech-tag {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }
}