/* ==================================================
📁 design.css – Style chính cho Design
Theme: NgTheVinh
================================================== */


/* ================================================
📌 1. ARCHIVE – Danh sách Design
================================================ */
/* -----------------------------------------------
📄 Pagination trong danh sách thiết kế (ARCHIVE)
------------------------------------------------ */
.design-pagination {
  margin-top: 1.25rem;
  text-align: center;
}

.design-pagination .page-numbers {
  display: inline-block;
  padding: 0.4em 0.9em;
  margin: 0 0.25rem;
  border: 1px solid var(--primary-color, #222);
  border-radius: var(--border-radius-3);
  color: var(--primary-color, #222);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.design-pagination .page-numbers:hover,
.design-pagination .page-numbers:focus {
  background-color: var(--primary-color, #222);
  color: #fff;
}

.design-pagination .page-numbers.current {
  background-color: var(--primary-color, #222);
  color: #fff;
  pointer-events: none;
}

/* 🔽 Dành cho taxonomy-design_category.php */
.design-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.875rem;
  margin-top: 2rem;
}

.design-archive-grid .design-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.design-archive-grid .design-caption {
  color: var(--text-color-1);
  text-align: center;
}
.design-archive-grid .design-caption a {
  text-decoration: none;
  color: inherit;
}

.design-title {
  margin-top: 5px;
  text-align: center;
}

/* ✅ Section Subtitle cho trang taxonomy Design Category */
body.tax-design_category .section-subtitle,
body.taxonomy-design_category .section-subtitle {
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
  color: #999;
}


/* ================================================
📌 2. ITEM – Một Design trong danh sách
================================================ */
.design-item {
  /* Bỏ trống để bạn tuỳ chỉnh nếu cần */
}

.design-item:hover {
  /* Bỏ trống để bạn tuỳ chỉnh nếu cần */
}

.design-thumb img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.design-excerpt {
  color: #555;
  margin-top: 0.5rem;
}

/* ✅ NEW: Cho phép <a> bao cả ảnh và text */
.design-thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.design-thumb-link:hover .design-title {
  color: var(--primary-color);
}


/* ================================================
📌 3. SINGLE – Chi tiết Design (2 Cột)
================================================ */
.design-two-column {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.column-primary {
  width: 75%;
}

.column-secondary {
  width: 25%;
  position: sticky;
  top: 8rem;
  align-self: flex-start;
}

/* ✅ Project Meta - cột bên phải Media */
.project-meta-col {
  width: 25%;
  align-self: center;
}

/* ✅ Image + Video upload */
.image-wrapper img,
.image-wrapper video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ✅ Video upload từ Media */
.video-uploaded {
  margin-bottom: 1.5rem;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.video-uploaded video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ✅ Video YouTube/Vimeo */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1rem;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-icon-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.video-icon-svg svg {
  width: 64px;
  height: 64px;
}


/* ================================================
📌 Chi tiết thông tin bên phải (Project, Tags, Category)
================================================ */
.design-details {
  color: var(--text-color-1);
  line-height: 1.7;
}

.design-details h2 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.project-meta {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.project-meta li {
/*  margin-bottom: 0.5rem;*/
  line-height: 1.5;
  border-bottom: 1px dashed var(--color-2);
  padding: 1rem 0;
}

.project-meta li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-meta li strong {
  font-weight: 600;
  margin-right: 4px;
  color: var(--text-color-1);
}

.design-category {
  border-top: 1px dashed var(--color-2);
  margin-top: 20px;
  padding-top: 20px;
  font-size: 1rem;
}

.design-category a {
  text-decoration: none;
  color: var(--primary-color);
}

.design-category a:hover {
  text-decoration: underline;
}

.design-tags {
  padding-top: 10px;
  font-size: 1rem;
}

.design-tags a,
.tag-separator {
  text-decoration: none;
  color: var(--text-color-3);
}

.design-tags a:hover {
  color: var(--primary-color);
}

/* ================================================
📌 Ghi chú liên hệ ở cuối single design
================================================ */
.portfolio-cta {
	margin: 0;
}

.design-contact-note {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  border: 1px dashed var(--color-2);
  background-color: var(--color-1);
  font-style: italic;
  border-radius: var(--border-radius-5);
  font-size: 1rem;
}

.highlight-phone {
  color: var(--primary-color);
}

/* ================================================
📌 4. RELATED – Các thiết kế khác
================================================ */
.related-design {
  margin-top: 4rem;
}

.related-design .related-title {
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-2);
  padding-bottom: 0.375rem;
  margin-bottom: 1rem;
}

.carousel-wrapper {
  position: relative;
  overflow: visible;
}

.carousel-track {
  display: flex;
  gap: 30px;
  scroll-behavior: smooth;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 calc(33.33% - 20px);
  max-width: calc(33.33% - 20px);
  background: #fff;
  text-align: center;
}

.related-thumb img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.carousel-item a {
  text-decoration: none;
  color: inherit;
}

.carousel-item a:hover .related-caption {
  color: var(--primary-color);
}

.carousel-item .related-title {
  margin-top: 0.5rem;
}

.carousel-btn {
  position: absolute;
  top: -45px;
  bottom: 0;
  margin: auto;
  height: 40px;
  width: 40px;
  background: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.carousel-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.carousel-btn.prev-btn {
  left: -60px;
}

.carousel-btn.next-btn {
  right: -60px;
}

/* ================================================
📱 5. RESPONSIVE – Tablet (≤ 1024px)
================================================ */
@media (max-width: 1024px) {
  .design-two-column {
    flex-direction: column;
  }

  .column-primary,
  .column-secondary,
  .project-meta-col {
    width: 100%;
  }

  .column-secondary {
    position: relative;
    top: auto;
    margin-top: 2rem;
  }

  /* ✅ Carousel – 2 item trên tablet */
  .carousel-item {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }

  /* ✅ Grid – ARCHIVE 2 cột */
  .design-archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* ✅ Video upload từ Media */
  .video-uploaded video {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-5);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  /* ✅ Video embed từ YouTube/Vimeo */
  .video-embed {
    padding-bottom: 56.25%;
    height: 0;
  }

  .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}


/* ================================================
📱 6. RESPONSIVE – Mobile (≤ 768px)
================================================ */
@media (max-width: 768px) {
	
  .design-archive-grid {
    gap: 2.5rem;
  }
	
  /* ✅ Carousel – 1 item toàn chiều ngang */
  .carousel-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .carousel-btn.prev-btn {
    left: -30px;
  }

  .carousel-btn.next-btn {
    right: -30px;
  }

  /* ✅ Grid – ARCHIVE 1 cột */
  .design-archive-grid {
    grid-template-columns: 1fr;
  }

  /* ✅ Video upload từ Media */
  .video-uploaded {
    margin-bottom: 1.25rem;
  }

  .video-uploaded video {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-5);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  }

  /* ✅ Video embed từ YouTube/Vimeo */
  .video-embed {
    padding-bottom: 56.25%;
    height: 0;
    position: relative;
    margin-bottom: 1rem;
  }

  .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

  /* ✅ Video icon play */
  .video-icon-svg svg {
    width: 48px;
    height: 48px;
  }
}
