/* ===================================
   PORTFOLIO ITEM DETAIL PAGE
   /works/[slug]
   =================================== */

.works-item-page {
  padding-top: 40px;
  padding-bottom: 80px;
  min-height: 80vh;
}

/* Breadcrumb */
.works-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.works-breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.works-breadcrumb a:hover {
  color: var(--primary-color);
}

.works-breadcrumb .bc-sep {
  color: var(--text-muted, #666);
  font-size: 0.75rem;
}

/* Hero image */
.works-hero-image {
  width: 100%;
  height: 480px;
  border-radius: 16px;
  background-size: cover;
  background-repeat: no-repeat;
  margin-bottom: 40px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .works-hero-image {
    height: 260px;
  }
}

/* Header block */
.works-header {
  margin-bottom: 40px;
}

.works-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.works-category {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, rgba(255, 59, 59, 0.15) 0%, rgba(255, 0, 85, 0.1) 100%);
  border: 1px solid rgba(255, 59, 59, 0.3);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.works-external-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 18px;
  background: var(--primary-gradient, linear-gradient(135deg, #ff3b3b, #ff0055));
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.works-external-link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.works-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .works-title {
    font-size: 1.7rem;
  }
}

.works-short-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 760px;
}

.works-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.works-tag {
  padding: 4px 12px;
  background: rgba(255, 59, 59, 0.1);
  border: 1px solid rgba(255, 59, 59, 0.2);
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* Long description */
.works-description {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-light);
  max-width: 860px;
  margin-bottom: 50px;
}

.works-description h1,
.works-description h2,
.works-description h3 {
  color: var(--text-main);
  margin: 1.4em 0 0.5em;
}

.works-description ul,
.works-description ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.works-description img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

.works-description a {
  color: var(--primary-color);
}

/* Gallery */
.works-gallery-section {
  margin-bottom: 50px;
}

.works-gallery-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.works-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.works-gallery-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.works-gallery-item:hover {
  border-color: rgba(255, 59, 59, 0.4);
  transform: translateY(-3px);
}

.works-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Back button */
.works-back {
  margin-top: 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 2px solid rgba(255, 59, 59, 0.35);
  border-radius: 30px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-back:hover {
  background: rgba(255, 59, 59, 0.12);
  color: var(--primary-color);
  border-color: rgba(255, 59, 59, 0.5);
}
