/* projects-modal.css - Premium Modal Styling */

/* Enhanced Project Card Hover Effects */
.project-two__single {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-two__single:hover {
  transform: translateY(-8px);
}

.project-two__img {
  position: relative;
  overflow: hidden;
}

.project-two__img img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-two__single:hover .project-two__img img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.project-two__single:hover .project-overlay {
  opacity: 1;
}

.project-category {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Modal Base Styles */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

/* Modal Container */
.project-modal-container {
  position: relative;
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.project-modal.active .project-modal-container {
  transform: scale(1);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
  background: #ffffff;
  transform: rotate(90deg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.modal-close svg {
  width: 24px;
  height: 24px;
  stroke: #1a1a1a;
}

/* Modal Content Layout */
.project-modal-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  max-height: 90vh;
  overflow-y: scroll;
}

/* Gallery Section */
.modal-gallery {
  background: #f8f9fa;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.modal-gallery-main {
  position: relative;
  aspect-ratio: 16/10;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.modal-main-image {
  width: 100%;
  height: 100%;
}

.modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation Buttons */
.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}

.modal-nav-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.modal-nav-btn svg {
  width: 24px;
  height: 24px;
  stroke: #1a1a1a;
}

/* Thumbnails */
.modal-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.modal-thumb {
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.modal-thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease;
}

.modal-thumb.active::after {
  opacity: 0;
}

.modal-thumb.active {
  border-color: #c19d5b;
  transform: scale(1.05);
}

.modal-thumb:hover {
  transform: scale(1.05);
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Details Section */
.modal-details {
  padding: 50px;
  overflow-y: auto;
  background: #ffffff;
}

.modal-header {
  margin-bottom: 40px;
  flex-direction: column;
}

.modal-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c19d5b;
  background: rgba(193, 157, 91, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.modal-description {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  margin: 0;
}

/* Info Grid */
.modal-info {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Specs Section */
.modal-specs h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 25px 0;
}

.modal-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.spec-item:hover {
  background: #f1f3f5;
  transform: translateX(5px);
}

.spec-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.spec-value {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

/* Scrollbar Styling */
.modal-gallery::-webkit-scrollbar,
.modal-details::-webkit-scrollbar {
  width: 8px;
}

.modal-gallery::-webkit-scrollbar-track,
.modal-details::-webkit-scrollbar-track {
  background: #f1f3f5;
}

.modal-gallery::-webkit-scrollbar-thumb,
.modal-details::-webkit-scrollbar-thumb {
  background: #c19d5b;
  border-radius: 4px;
}

.modal-gallery::-webkit-scrollbar-thumb:hover,
.modal-details::-webkit-scrollbar-thumb:hover {
  background: #a88a4d;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .project-modal-content {
    grid-template-columns: 1fr;
  }

  .modal-gallery {
    max-height: 50vh;
  }

  .modal-details {
    padding: 30px;
  }

  .modal-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .project-modal-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .modal-gallery {
    padding: 20px;
  }

  .modal-details {
    padding: 25px 20px;
  }

  .modal-title {
    font-size: 28px;
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .modal-gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }

  .modal-nav-btn {
    width: 40px;
    height: 40px;
  }

  .modal-nav-prev {
    left: 10px;
  }

  .modal-nav-next {
    right: 10px;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-modal.active .modal-details > * {
  animation: fadeIn 0.5s ease forwards;
}

.project-modal.active .modal-header {
  animation-delay: 0.1s;
}

.project-modal.active .modal-info {
  animation-delay: 0.2s;
}

.project-modal.active .modal-specs {
  animation-delay: 0.3s;
}