/* ==========================================
   CASE STUDY PAGES - SHARED STYLES
   Uses same design tokens as main portfolio
   ========================================== */

/* === BREADCRUMB === */
.breadcrumb {
  padding: 6rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--color-gray);
}

.breadcrumb a {
  color: var(--color-gray);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-black);
}

.breadcrumb .separator {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.breadcrumb .current {
  color: var(--color-black);
  font-weight: 600;
}

/* === CASE STUDY HERO === */
.cs-hero {
  padding: 2rem 0 4rem;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  position: relative;
  overflow: hidden;
}

.cs-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cs-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-black);
  color: white;
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
}

.cs-hero-badge .badge-num {
  background: white;
  color: black;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.cs-hero h1 {
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.cs-hero-summary {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-gray);
  max-width: 640px;
}

.cs-hero-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-hero-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-black);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  margin-top: 0.5rem;
}

.cs-hero-metric .metric-value {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.cs-hero-metric .metric-label {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.3;
}

/* === METADATA GRID === */
.cs-meta-section {
  padding: 3rem 0;
  background: var(--color-light-gray);
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cs-meta-card {
  background: white;
  border-radius: 14px;
  padding: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-meta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.cs-meta-card .meta-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.cs-meta-card h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gray);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.cs-meta-card p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.4;
}

/* === CONTENT SECTIONS === */
.cs-content {
  padding: 4rem 0;
  background: white;
}

.cs-content-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.cs-section {
  max-width: 720px;
}

.cs-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--color-gray);
  margin-bottom: 0.75rem;
}

.cs-section h2 {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cs-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
  margin-bottom: 1rem;
}

.cs-section p:last-child {
  margin-bottom: 0;
}

.cs-section ul {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.cs-section ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

.cs-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--color-black);
  border-radius: 50%;
}

/* === IMAGE GALLERY === */
.cs-gallery {
  padding: 3rem 0;
  background: var(--color-light-gray);
}

.cs-gallery-header {
  margin-bottom: 2rem;
}

.cs-gallery-header h2 {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.cs-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cs-gallery-item {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.cs-gallery-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #e0e0e0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--color-gray);
  position: relative;
  overflow: hidden;
}

.cs-gallery-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(0,0,0,0.02) 20px,
    rgba(0,0,0,0.02) 40px
  );
}

.cs-gallery-placeholder .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.5;
  position: relative;
  z-index: 1;
}

.cs-gallery-placeholder .placeholder-text {
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.cs-gallery-caption {
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-gray);
  font-weight: 500;
}

/* === VIDEO SECTION === */
.cs-video {
  padding: 4rem 0;
  background: white;
}

.cs-video-header {
  margin-bottom: 2rem;
}

.cs-video-header h2 {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.cs-video-header p {
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 1.6;
}

.cs-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-black);
}

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

.cs-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #1a1a1a 100%);
}

.cs-video-placeholder .play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.cs-video-placeholder .play-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.cs-video-placeholder .play-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--color-black);
  margin-left: 3px;
}

.cs-video-placeholder span {
  font-size: 0.9rem;
  opacity: 0.6;
  font-weight: 500;
}

/* === RESULTS SECTION === */
.cs-results {
  padding: 4rem 0;
  background: var(--color-black);
  color: white;
}

.cs-results-header {
  margin-bottom: 2.5rem;
}

.cs-results-header h2 {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.cs-results-header p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.cs-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cs-result-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.cs-result-card:hover {
  background: rgba(255,255,255,0.1);
}

.cs-result-card .result-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.cs-result-card .result-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.cs-result-card .result-label {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.4;
}

/* === NEXT PROJECT CTA === */
.cs-next {
  padding: 4rem 0;
  background: var(--color-light-gray);
  text-align: center;
}

.cs-next-inner {
  max-width: 500px;
  margin: 0 auto;
}

.cs-next-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--color-gray);
  margin-bottom: 0.75rem;
}

.cs-next h2 {
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cs-next p {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* === BACK TO PROJECTS LINK === */
.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gray);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1.5rem;
  transition: color 0.2s ease;
}

.cs-back-link:hover {
  color: var(--color-black);
}

.cs-back-link .arrow {
  transition: transform 0.2s ease;
}

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

/* ==========================================
   TABLET BREAKPOINT (min-width: 640px)
   ========================================== */
@media (min-width: 640px) {
  .breadcrumb {
    padding-top: 5.5rem;
  }

  .cs-hero h1 {
    font-size: 2.5rem;
  }

  .cs-meta-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cs-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cs-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-section h2,
  .cs-gallery-header h2,
  .cs-video-header h2,
  .cs-results-header h2 {
    font-size: 1.75rem;
  }

  .cs-next h2 {
    font-size: 2rem;
  }
}

/* ==========================================
   DESKTOP BREAKPOINT (min-width: 968px)
   ========================================== */
@media (min-width: 968px) {
  .breadcrumb {
    padding-top: 5rem;
  }

  .cs-hero {
    padding: 2rem 0 6rem;
  }

  .cs-hero h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  }

  .cs-hero-summary {
    font-size: 1.15rem;
  }

  .cs-meta-section {
    padding: 4rem 0;
  }

  .cs-meta-card {
    padding: 1.75rem;
  }

  .cs-content {
    padding: 6rem 0;
  }

  .cs-content-grid {
    gap: 4rem;
  }

  .cs-section h2,
  .cs-gallery-header h2,
  .cs-video-header h2,
  .cs-results-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
  }

  .cs-gallery {
    padding: 5rem 0;
  }

  .cs-gallery-grid {
    gap: 1.5rem;
  }

  .cs-video {
    padding: 6rem 0;
  }

  .cs-results {
    padding: 6rem 0;
  }

  .cs-results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .cs-result-card {
    padding: 2rem;
  }

  .cs-result-card .result-value {
    font-size: 2.5rem;
  }

  .cs-next {
    padding: 6rem 0;
  }

  .cs-next h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
  }
}

/* ==========================================
   LARGE DESKTOP (min-width: 1200px)
   ========================================== */
@media (min-width: 1200px) {
  .cs-hero h1 {
    font-size: 3.5rem;
  }

  .cs-hero-metric .metric-value {
    font-size: 2.25rem;
  }

  .cs-result-card .result-value {
    font-size: 3rem;
  }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) {
  .cs-gallery-item:hover,
  .cs-meta-card:hover,
  .cs-result-card:hover {
    transform: none;
    box-shadow: none;
  }
}
