/**
 * Projects Page Styles
 * Professional project showcase design
 */

/* ============================================
   PAGE TITLE SECTION
   ============================================ */

.page-title {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 100px 0 60px;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

body.dark-mode .page-title {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.page-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(113, 197, 93, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(113, 197, 93, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.page-title h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #71c55d, #4CAF50);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.page-title .description-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--default-color);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

.breadcrumbs {
  background: rgba(255, 255, 255, 0.5);
  padding: 20px 0;
  margin-top: 40px;
}

body.dark-mode .breadcrumbs {
  background: rgba(30, 41, 59, 0.5);
}

.breadcrumbs ol {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.breadcrumbs ol li {
  font-size: 0.95rem;
}

.breadcrumbs ol li a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.breadcrumbs ol li a:hover {
  color: var(--accent-hover);
}

.breadcrumbs ol li.current {
  color: var(--default-color);
  font-weight: 600;
}

.breadcrumbs ol li + li::before {
  content: '/';
  margin-right: 10px;
  color: var(--default-color);
  opacity: 0.5;
}

/* ============================================
   PROJECT NAVIGATION FILTER
   ============================================ */

.project-nav {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}

.project-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-color);
  padding: 8px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
}

.project-nav .filter-btn {
  padding: 10px 24px;
  border-radius: 50px;
  font-family: var(--accent-font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--default-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-nav .filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50px;
}

.project-nav .filter-btn:hover::before,
.project-nav .filter-btn.active::before {
  opacity: 1;
}

.project-nav .filter-btn:hover,
.project-nav .filter-btn.active {
  color: var(--contrast-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(113, 197, 93, 0.3);
}

.project-nav .filter-btn span {
  position: relative;
  z-index: 1;
}

/* ============================================
   PROJECT CAROUSEL
   ============================================ */

.project-image-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
}

body.dark-mode .project-image-carousel {
  background: #1e293b;
}

.carousel-images {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-images img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(113, 197, 93, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  color: white;
  font-size: 1.2rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--accent-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(113, 197, 93, 0.4);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* ============================================
   PROJECT DETAILS BUTTON
   ============================================ */

.details-btn {
  margin-top: auto;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: var(--contrast-color);
  border: none;
  border-radius: 50px;
  font-family: var(--accent-font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(113, 197, 93, 0.3);
}

.details-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.details-btn:hover::before {
  width: 300px;
  height: 300px;
}

.details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(113, 197, 93, 0.4);
}

.details-btn:active {
  transform: translateY(0);
}

/* ============================================
   PROJECT MODAL
   ============================================ */

.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: modalFadeIn 0.3s ease-out;
}

.project-modal.active {
  display: flex;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface-color);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--default-color);
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(113, 197, 93, 0.1);
  border: 2px solid transparent;
  z-index: 10;
  user-select: none;
}

.modal-close:hover {
  color: #ffffff;
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(113, 197, 93, 0.4);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-title {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.modal-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.modal-image-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.modal-image-grid img:hover {
  transform: scale(1.05);
}

.modal-description {
  margin-bottom: 25px;
  line-height: 1.8;
  color: var(--default-color);
}

.modal-info {
  margin-bottom: 25px;
}

.modal-info p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.modal-info strong {
  color: var(--accent-color);
  font-weight: 600;
}

.modal-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.modal-links a {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: var(--contrast-color);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(113, 197, 93, 0.3);
}

.modal-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(113, 197, 93, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .page-title {
    padding: 80px 0 40px;
  }

  .project-nav ul {
    flex-direction: column;
    border-radius: 12px;
  }

  .project-nav .filter-btn {
    width: 100%;
    text-align: center;
  }

  .carousel-prev,
  .carousel-next {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-image-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .breadcrumbs ol {
    font-size: 0.85rem;
  }

  .details-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* Smooth Scrollbar */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Full-screen image viewer */
.full-image-viewer {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.full-image-viewer.active {
  display: flex;
}

.full-image-viewer .viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.full-image-viewer .viewer-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.full-image-viewer .viewer-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.full-image-viewer .viewer-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: rgba(255,255,255,0.08);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.full-image-viewer .viewer-close:hover {
  background: rgba(255,255,255,0.18);
  transform: scale(1.05);
}
