/* projects-modal.css - Premium Project Page Styling */

/* ============================================
   Redesigned Projects Page
   ============================================ */

.projects-page--redesign {
  padding: 80px 0 100px;
}

.projects-page--redesign .container {
  max-width: 1400px;
}

.projects-grid {
  --bs-gutter-x: 30px;
  --bs-gutter-y: 40px;
}

/* --- Project Card --- */
.project-card {
  position: relative;
  background: #111310;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--tecture-base);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Image wrapper */
.project-card__img-wrap {
  position: relative;
  overflow: hidden;
}

.project-card__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__img img {
  transform: scale(1.08);
}

/* Overlay on hover */
.project-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.6) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--tecture-base);
  border-radius: 50%;
  color: var(--tecture-white);
  font-size: 18px;
  transform: scale(0) rotate(-45deg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.project-card:hover .project-card__view-btn {
  transform: scale(1) rotate(0deg);
}

.project-card__view-btn:hover {
  background: var(--tecture-white);
  color: var(--tecture-base);
}

/* Category badge */
.project-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: var(--tecture-base);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  z-index: 3;
}

/* Card body */
.project-card__body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.project-card__location {
  font-size: 13px;
  color: var(--tecture-gray);
  font-weight: 500;
}

.project-card__location i {
  color: var(--tecture-base);
  margin-right: 6px;
  font-size: 12px;
}

.project-card__year {
  font-size: 13px;
  color: var(--tecture-base);
  font-weight: 600;
}

.project-card__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.project-card__title a {
  color: var(--tecture-white);
  transition: color 0.3s ease;
}

.project-card__title a:hover {
  color: var(--tecture-base);
}

.project-card__desc {
  font-size: 14px;
  line-height: 1.7;
  color: #8a8c90;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.project-card__area {
  font-size: 13px;
  color: var(--tecture-gray);
  font-weight: 500;
}

.project-card__area i {
  color: var(--tecture-base);
  margin-right: 6px;
  font-size: 12px;
}

.project-card__arrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--tecture-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.project-card__arrow i {
  margin-left: 6px;
  transition: transform 0.3s ease;
  font-size: 11px;
}

.project-card__arrow:hover {
  color: var(--tecture-white);
}

.project-card__arrow:hover i {
  transform: translateX(4px);
}

/* --- Empty State --- */
.projects-empty-state {
  text-align: center;
  padding: 80px 20px;
}

.projects-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin-bottom: 30px;
}

.projects-empty-state__icon i {
  font-size: 40px;
  color: var(--tecture-base);
}

.projects-empty-state__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--tecture-white);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.projects-empty-state__text {
  font-size: 16px;
  color: var(--tecture-gray);
  max-width: 500px;
  margin: 0 auto 35px;
  line-height: 1.7;
}

.projects-empty-state__btn {
  font-size: 15px;
  padding: 15px 35px;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .projects-page--redesign {
    padding: 60px 0 80px;
  }

  .project-card__body {
    padding: 22px 22px 20px;
  }

  .project-card__title {
    font-size: 19px;
  }
}

@media (max-width: 575px) {
  .projects-page--redesign {
    padding: 40px 0 60px;
  }

  .project-card__body {
    padding: 20px 18px 18px;
  }

  .project-card__title {
    font-size: 17px;
  }

  .project-card__desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
}

/* 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;
  }
}

/* Category Tabs */
.projects-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 50px;
  padding: 0 15px;
}

.projects-category-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  background: transparent;
  border: 1px solid var(--tecture-bdr-color);
  color: var(--tecture-white);
  font-family: var(--tecture-font);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.4s ease;
  overflow: hidden;
  z-index: 1;
}

.projects-category-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--tecture-base);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.785, 0.135, 0.15, 0.86);
  z-index: -1;
}

.projects-category-tab:hover::before,
.projects-category-tab.active::before {
  transform: scaleX(1);
}

.projects-category-tab:hover,
.projects-category-tab.active {
  border-color: var(--tecture-base);
  color: var(--tecture-white);
}

@media (max-width: 768px) {
  .projects-category-tabs {
    gap: 8px;
    margin-bottom: 30px;
  }

  .projects-category-tab {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* 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;
}