/* ===========================
   PROJECTS PAGE — Additional styling for projects page
   =========================== */

/* Projects Page Layout */
.projects-page {
  position: relative;
  padding: 8rem 0;
  background: linear-gradient(135deg, #0a0d16 0%, #0e1222 100%);
  overflow: hidden;
}

.projects-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(122, 162, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(187, 154, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.projects-page__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-page__header {
  text-align: center;
  margin-bottom: 4rem;
}

.projects-page__title {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7aa2ff 0%, #bb9af7 50%, #7aa2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.projects-page__subtitle {
  font-size: 1.4rem;
  color: #a9b1d6;
  max-width: 600px;
  margin: 0 auto;
}

/* Filter Controls */
.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  color: #a9b1d6;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: #4d7cff;
  color: #0a0d16;
  border-color: #4d7cff;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

/* Project Card */
.project-card {
  background: #15151c;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(122, 162, 255, 0.3);
}

/* Project Card Media Area */
.project-card__media {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a24;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* For projects with actual images */
.project-card__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ===== IMPROVED PLACEHOLDER STYLES ===== */

/* Icon-based Placeholders */
.project-card__icon-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: white;
  text-align: center;
  z-index: 2;
  position: relative;
}

.project-icon {
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.project-icon-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.project-card:hover .project-icon {
  transform: scale(1.1);
}

/* Gradient Background Placeholders */
.project-media--dating {
  background: linear-gradient(135deg, #ff6b9d, #c44569);
}

.project-media--environment {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.project-media--business {
  background: linear-gradient(135deg, #fd746c, #ff9068);
}

.project-media--clones {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
}

.project-media--management {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
}

.project-media--games {
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

/* Add subtle patterns to gradients */
.project-media--dating::before,
.project-media--environment::before,
.project-media--business::before,
.project-media--clones::before,
.project-media--management::before,
.project-media--games::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
  background-size: 30px 30px;
  opacity: 0.3;
}

/* Image Overlay Link */
.project-card__view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(77, 124, 255, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  opacity: 0;
  z-index: 3;
}

.project-card__view-overlay:hover {
  background: rgba(77, 124, 255, 0.9);
  opacity: 1;
}

.project-card__view-text {
  font-weight: 600;
  font-size: 1.1rem;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.project-card__view-overlay:hover .project-card__view-text {
  transform: translateY(0);
}

.project-card__media:hover .project-card__view-overlay {
  opacity: 1;
}

/* Project Content */
.project-card__content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-card__title {
  font-size: 1.4rem;
  margin: 0 0 12px;
  color: #eaeaea;
}

.project-card__description {
  color: #a9b1d6;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-card__tech-item {
  background: rgba(122, 162, 255, 0.1);
  color: #7aa2ff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-card__link-container {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.project-card__link {
  color: #4d7cff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.project-card__link:hover {
  color: #7aa2ff;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal--visible {
  opacity: 1;
}

.modal__content {
  background: linear-gradient(145deg, #15151c 0%, #1a1a24 100%);
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(122, 162, 255, 0.1);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(122, 162, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal--visible .modal__content {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 25px;
  right: 25px;
  background: linear-gradient(145deg, rgba(77, 124, 255, 0.2), rgba(122, 162, 255, 0.1));
  border: 1px solid rgba(122, 162, 255, 0.2);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal__close:hover {
  background: linear-gradient(145deg, rgba(77, 124, 255, 0.4), rgba(122, 162, 255, 0.3));
  border-color: #4d7cff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(77, 124, 255, 0.3);
}

.modal__header {
  padding: 50px 50px 30px;
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.05) 0%, transparent 100%);
  position: relative;
}

.modal__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50px;
  right: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.3), transparent);
}

.modal__title {
  font-size: 2.5rem;
  margin: 0 0 15px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, #7aa2ff 0%, #bb9af7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal__subtitle {
  color: #a9b1d6;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 400;
}

.modal__body {
  padding: 0 50px 50px;
}

/* === EPIC MODAL CAROUSEL === */
.modal__carousel {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, #0f0f15, #1a1a24);
  margin-bottom: 40px;
  border: 1px solid rgba(122, 162, 255, 0.1);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal__carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal__carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.modal__carousel-slide.active {
  opacity: 1;
}

.modal__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* EPIC Navigation Buttons */
.modal__carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

.modal__carousel-nav-btn {
  pointer-events: all;
  background: linear-gradient(145deg, rgba(77, 124, 255, 0.2), rgba(122, 162, 255, 0.1));
  border: 1px solid rgba(122, 162, 255, 0.3);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.modal__carousel-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #7aa2ff, #bb9af7);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.modal__carousel-nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
  border-color: #7aa2ff;
  box-shadow: 
    0 0 30px rgba(122, 162, 255, 0.4),
    0 0 60px rgba(122, 162, 255, 0.2);
}

.modal__carousel-nav-btn:hover::before {
  opacity: 1;
}

.modal__carousel-nav-btn:hover .modal__carousel-nav-icon {
  transform: scale(1.2);
}

.modal__carousel-nav-btn:hover .modal__carousel-nav-text {
  opacity: 1;
  transform: translateX(0);
}

.modal__carousel-nav-icon {
  width: 24px;
  height: 24px;
  fill: white;
  transition: transform 0.3s ease;
}

.modal__carousel-nav-text {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  opacity: 0;
  transition: all 0.3s ease;
}

.modal__carousel-prev .modal__carousel-nav-text {
  right: calc(100% + 10px);
  transform: translateX(-10px);
}

.modal__carousel-next .modal__carousel-nav-text {
  left: calc(100% + 10px);
  transform: translateX(10px);
}

/* EPIC Dots Indicator */
.modal__carousel-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  padding: 10px 20px;
  background: rgba(15, 15, 21, 0.7);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(122, 162, 255, 0.1);
}

.modal__carousel-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(122, 162, 255, 0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.modal__carousel-dot:hover {
  border-color: #7aa2ff;
  transform: scale(1.2);
}

.modal__carousel-dot.active {
  border-color: #7aa2ff;
  background: rgba(122, 162, 255, 0.2);
}

.modal__carousel-dot-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #7aa2ff, #bb9af7);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.modal__carousel-dot.active .modal__carousel-dot-progress {
  transform: scale(0.7);
}

/* EPIC Slide Counter */
.modal__carousel-counter {
  position: absolute;
  bottom: 25px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 8px 16px;
  background: rgba(15, 15, 21, 0.7);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(122, 162, 255, 0.1);
  z-index: 10;
}

.modal__carousel-current {
  color: #7aa2ff;
  font-size: 1.3rem;
}

.modal__carousel-divider {
  color: rgba(255, 255, 255, 0.3);
}

.modal__carousel-total {
  color: rgba(255, 255, 255, 0.7);
}

/* Simple Image Container for Single Images */
.modal__image-container {
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0f0f15, #1a1a24);
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid rgba(122, 162, 255, 0.1);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal__image-single {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modal Icon Display for projects without images */
.modal__icon-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  color: #7aa2ff;
  text-align: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(122, 162, 255, 0.05), rgba(187, 154, 247, 0.05));
  border-radius: 12px;
  padding: 40px;
}

.modal-icon {
  font-size: 5rem;
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(122, 162, 255, 0.3));
}

/* Modal Sections */
.modal__section {
  margin-bottom: 35px;
}

.modal__section-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: white;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(122, 162, 255, 0.2);
  position: relative;
}

.modal__section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #7aa2ff, #bb9af7);
}

.modal__features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.modal__feature {
  background: linear-gradient(145deg, rgba(122, 162, 255, 0.05), rgba(187, 154, 247, 0.05));
  padding: 20px;
  border-radius: 12px;
  border-left: 3px solid #7aa2ff;
  transition: all 0.3s ease;
  border: 1px solid rgba(122, 162, 255, 0.1);
}

.modal__feature:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 162, 255, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.modal__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal__tech-item {
  background: linear-gradient(145deg, rgba(122, 162, 255, 0.1), rgba(187, 154, 247, 0.1));
  color: #7aa2ff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(122, 162, 255, 0.2);
  transition: all 0.3s ease;
}

.modal__tech-item:hover {
  background: linear-gradient(145deg, rgba(122, 162, 255, 0.2), rgba(187, 154, 247, 0.2));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(122, 162, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .modal__content {
    max-width: 90%;
  }
  
  .modal__carousel {
    height: 400px;
  }
  
  .modal__image-container {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .modal__header, .modal__body {
    padding: 30px;
  }
  
  .modal__title {
    font-size: 2rem;
  }
  
  .projects-page__title {
    font-size: 2.5rem;
  }
  
  .modal__carousel {
    height: 300px;
  }
  
  .modal__image-container {
    height: 300px;
  }
  
  .modal__carousel-nav-btn {
    width: 50px;
    height: 50px;
  }
  
  .modal__carousel-nav-text {
    display: none;
  }
  
  .modal__carousel-counter {
    right: 20px;
    bottom: 20px;
    font-size: 1rem;
  }
  
  .modal__carousel-dots {
    bottom: 20px;
    padding: 8px 15px;
  }
  
  .modal__carousel-dot {
    width: 12px;
    height: 12px;
  }
  
  .modal__features {
    grid-template-columns: 1fr;
  }
  
  .project-icon {
    font-size: 2.5rem;
  }
  
  .project-icon-label {
    font-size: 1rem;
  }
  
  .modal__carousel-nav {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .modal__carousel {
    height: 250px;
  }
  
  .modal__image-container {
    height: 250px;
  }
  
  .modal__carousel-nav-btn {
    width: 40px;
    height: 40px;
  }
  
  .modal__carousel-nav-icon {
    width: 18px;
    height: 18px;
  }
  
  .modal__carousel-dots {
    gap: 8px;
  }
  
  .modal__carousel-dot {
    width: 10px;
    height: 10px;
  }
}

/* Hide carousel navigation for single slides */
.modal__carousel[data-slides="1"] .modal__carousel-nav,
.modal__carousel[data-slides="1"] .modal__carousel-dots,
.modal__carousel[data-slides="1"] .modal__carousel-counter {
  display: none;
}


.modal__demo-link {
  margin: 1.5rem 0;
}

.modal__demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal__demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.modal__demo-icon {
  font-size: 1.25rem;
}

.modal__demo-arrow {
  margin-left: 0.25rem;
  transition: transform 0.3s ease;
}

.modal__demo-btn:hover .modal__demo-arrow {
  transform: translateX(4px);
}