/* =========================================
   WORK DETAIL — SUBPAGE STYLES
   Shared across /work/macmillan, /work/plan-estrategico, /work/freelance
   ========================================= */

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-rose-brown);
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
  margin-bottom: 1.5rem;
  min-height: 44px;
  padding: 0.5rem 0;
  line-height: 1;
}

.back-link:hover {
  color: var(--color-amber);
  gap: 0.75rem;
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* Detail hero header */
.detail-hero {
  padding-top: 120px;
  padding-bottom: 1rem;
  background-color: var(--color-cream);
  position: relative;
  overflow: hidden;
}

/* Film grain for detail pages */
.grain-detail {
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* Subtle paper texture */
.detail-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23402916' fill-opacity='1'%3E%3Cpath d='M0 0h1v1H0zM20 0h1v1h-1zM0 20h1v1H0zM20 20h1v1h-1z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.detail-hero .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 3;
}

.detail-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-espresso);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.detail-role {
  color: var(--color-amber);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
}

.detail-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0; /* Removed bottom margin since it's the last child */
  max-width: 700px;
}

.detail-meta li {
  font-size: 0.95rem;
  color: var(--color-espresso);
  line-height: 1.6;
}

.detail-meta strong {
  color: var(--color-espresso);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  display: block;
  color: var(--color-rose-brown);
  margin-bottom: 0.15rem;
}

/* Category reel embed */
.detail-reel {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.reel-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-espresso);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  overflow: hidden;
  position: relative;
}

.reel-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* Video grid */
.video-grid-section {
  background-color: var(--color-cream);
  padding-top: 0.5rem;
  padding-bottom: 6rem;
}

.video-grid-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid-heading {
  font-size: 1.5rem;
  color: var(--color-espresso);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.grid-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-amber);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.video-item {
  background-color: rgba(64, 41, 22, 0.03);
  border: 1px solid rgba(191, 146, 120, 0.15);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(64, 41, 22, 0.08);
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rose-brown);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
}

.video-embed.is-vertical {
  aspect-ratio: 9 / 16;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Freelance Subpage Custom Grids */
.vertical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.horizontal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

@media (max-width: 1024px) {
  .vertical-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .vertical-grid,
  .horizontal-grid {
    grid-template-columns: 1fr;
  }
}

.video-info {
  padding: 1.25rem 1.5rem;
}

.video-title {
  font-size: 1.1rem;
  color: var(--color-espresso);
  margin-bottom: 0.3rem;
}

.video-role {
  font-size: 0.8rem;
  color: var(--color-rose-brown);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding-top: 100px;
    padding-bottom: 2.5rem;
  }

  .detail-title {
    font-size: 2rem;
  }
}
