/* ══════════════════════════════════════════════
   Case Study (Portfolio) Template Styles
   Shared across all portfolio case study pages.
   Color theming via CSS vars: --cs-primary, --cs-secondary, --cs-bg, --cs-bg2, --cs-accent
   ============================================== */

/* ── Hero ── */
.cs-hero { padding: 140px 0 80px; background: linear-gradient(135deg, var(--cs-bg) 0%, var(--cs-bg2) 100%); position: relative; overflow: hidden; }
.cs-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 65% 45%, color-mix(in srgb, var(--cs-primary) 12%, transparent) 0%, transparent 60%); }
.cs-hero__inner { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
@media(min-width:768px) { .cs-hero__inner { grid-template-columns: 1fr 1fr; } }

.cs-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--cs-primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cs-primary) 30%, transparent);
  color: var(--cs-accent); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 20px;
}

.cs-hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; color: #fff; margin-bottom: 16px; }
.cs-hero p { font-size: 1.05rem; line-height: 1.7; color: rgba(255, 255, 255, 0.7); margin-bottom: 28px; }

.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-tag {
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--cs-primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cs-primary) 25%, transparent);
  color: var(--cs-accent); font-size: 0.75rem; font-weight: 600;
}

.cs-visual {
  border-radius: 20px; overflow: hidden;
  background: color-mix(in srgb, var(--cs-primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--cs-primary) 20%, transparent);
  padding: 28px; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.cs-visual--image {
  background: transparent; border: none; padding: 0; perspective: 1000px;
}
.cs-visual-img {
  width: 100%; max-width: 520px; border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px color-mix(in srgb, var(--cs-primary) 30%, transparent);
  animation: float-cs 6s ease-in-out infinite; display: block; margin: 0 auto;
}
@keyframes float-cs {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); box-shadow: 0 26px 50px rgba(0,0,0,0.6), 0 0 0 1px color-mix(in srgb, var(--cs-primary) 40%, transparent); }
  100% { transform: translateY(0); }
}

/* ── Metrics ── */
.cs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-radius: 16px; overflow: hidden; margin: 60px 0; }
.cs-metric { background: var(--bg-white); padding: 32px 20px; text-align: center; }
.cs-metric strong { display: block; font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--cs-primary); margin-bottom: 6px; }
.cs-metric span { font-size: 0.82rem; color: var(--text-secondary); }

/* ── Sections ── */
.cs-section { padding: 60px 0; }
.cs-section h2 { font-size: 1.6rem; margin-bottom: 16px; }
.cs-section p { font-size: 0.95rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }

/* ── Grid & Cards ── */
.cs-grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media(min-width:768px) { .cs-grid-2 { grid-template-columns: 1fr 1fr; } }

.cs-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: 16px; padding: 28px; margin-bottom: 16px; }
.cs-card:last-child { margin-bottom: 0; }
.cs-card h3 { font-size: 1rem; margin-bottom: 10px; }
.cs-card p { font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); margin: 0; }
.cs-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--cs-primary) 12%, transparent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}

/* ── Steps ── */
.cs-steps { counter-reset: step; display: grid; gap: 0; }
.cs-step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--border); counter-increment: step; }
.cs-step:last-child { border-bottom: none; }
.cs-step__num {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--cs-primary), var(--cs-secondary));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; color: #fff; flex-shrink: 0;
}
.cs-step h3 { font-size: 1rem; margin-bottom: 6px; }
.cs-step p { font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }

/* ── Quote ── */
.cs-quote {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cs-primary) 8%, transparent), color-mix(in srgb, var(--cs-secondary) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--cs-primary) 20%, transparent);
  border-radius: 20px; padding: 40px; margin: 40px 0;
}
.cs-quote p { font-size: 1.1rem; line-height: 1.7; font-style: italic; color: var(--text); margin-bottom: 16px; }
.cs-quote cite { font-size: 0.85rem; color: var(--text-secondary); font-style: normal; }

/* ── Tech Pills ── */
.cs-tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
@media(min-width:480px) { .cs-tech-grid { grid-template-columns: repeat(3, 1fr); } }
.cs-tech-pill { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }

/* ── Navigation ── */
.cs-nav { display: flex; justify-content: space-between; align-items: center; padding: 40px 0; border-top: 1px solid var(--border); gap: 16px; flex-wrap: wrap; }
.cs-nav a { font-size: 0.88rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.cs-nav a:hover { color: var(--cyan); }

/* ═══════════════════════════════════════
   Page-Specific Mockup Visuals
   ═══════════════════════════════════════ */

/* ── NeuroNet NZ: Multi-step Form Visual ── */
.form-visual { width: 100%; max-width: 360px; }
.cs-form-step { background: rgba(255, 255, 255, 0.04); border: 1px solid color-mix(in srgb, var(--cs-primary) 20%, transparent); border-radius: 14px; padding: 20px; margin-bottom: 10px; }
.cs-form-step.active { background: color-mix(in srgb, var(--cs-primary) 10%, transparent); border-color: color-mix(in srgb, var(--cs-primary) 40%, transparent); }
.cs-form-step__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cs-accent); margin-bottom: 10px; }
.form-field { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); margin-bottom: 6px; }
.form-field.filled { background: color-mix(in srgb, var(--cs-primary) 30%, transparent); }
.form-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.form-progress__dot { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.form-progress__dot.done { background: var(--cs-primary); }
.form-progress__dot.active { background: var(--cs-accent); }

/* ── KnockKnock AI: Terminal / Chat UI ── */
.terminal { width: 100%; max-width: 380px; background: #0a0a0a; border-radius: 14px; border: 1px solid rgba(16, 185, 129, 0.3); overflow: hidden; font-family: 'Courier New', monospace; }
.terminal__bar { background: #1a1a1a; padding: 10px 14px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(16, 185, 129, 0.15); }
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal__title { font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); margin-left: 8px; }
.terminal__body { padding: 16px; }
.chat-msg { margin-bottom: 12px; }
.chat-msg__label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.chat-msg__label.user { color: rgba(255, 255, 255, 0.4); }
.chat-msg__label.ai { color: var(--cs-accent); }
.chat-msg__bubble { display: inline-block; padding: 8px 12px; border-radius: 10px; font-size: 0.72rem; line-height: 1.5; max-width: 90%; }
.chat-msg__bubble.user { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.7); }
.chat-msg__bubble.ai { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--cs-accent); }
.chat-cursor { display: inline-block; width: 6px; height: 12px; background: var(--cs-accent); animation: blink 1s infinite; vertical-align: middle; margin-left: 2px; }
.chat-input { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(16, 185, 129, 0.1); }
.chat-input__field { flex: 1; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(16, 185, 129, 0.15); border-radius: 8px; padding: 6px 10px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); }
.chat-input__btn { width: 28px; height: 28px; border-radius: 8px; background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); display: flex; align-items: center; justify-content: center; }

/* ── Azan Guru: LMS Dashboard Visual ── */
.lms-visual { display: flex; gap: 12px; width: 100%; max-width: 400px; align-items: flex-start; }
.lms-sidebar { width: 80px; background: rgba(217, 119, 6, 0.08); border: 1px solid rgba(217, 119, 6, 0.15); border-radius: 12px; padding: 12px 8px; flex-shrink: 0; }
.lms-sidebar__item { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); margin-bottom: 8px; }
.lms-sidebar__item.active { background: rgba(217, 119, 6, 0.4); }
.lms-main { flex: 1; }
.lms-card { background: rgba(217, 119, 6, 0.06); border: 1px solid rgba(217, 119, 6, 0.12); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.lms-card__title { height: 7px; border-radius: 3px; background: rgba(251, 191, 36, 0.3); margin-bottom: 6px; width: 70%; }
.lms-card__bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); margin-bottom: 4px; }
.lms-card__bar.fill { background: rgba(16, 185, 129, 0.3); }
.lms-progress { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.lms-progress__track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); }
.lms-progress__fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #d97706, #10b981); }
.lms-progress__pct { font-size: 0.6rem; color: rgba(255, 255, 255, 0.4); white-space: nowrap; }
.phone-mini { width: 60px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(217, 119, 6, 0.2); border-radius: 10px; padding: 8px 6px; flex-shrink: 0; }
.phone-mini__line { height: 5px; border-radius: 2px; background: rgba(251, 191, 36, 0.2); margin-bottom: 5px; }
.phone-mini__block { height: 28px; border-radius: 6px; background: rgba(217, 119, 6, 0.08); margin-bottom: 5px; }

/* ── RealHomes: Property Listing Visual ── */
.prop-visual { width: 100%; max-width: 380px; }
.prop-header { background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.15); border-radius: 12px 12px 0 0; padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.prop-header__logo { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.75rem; color: var(--cs-accent); }
.prop-search { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(212, 175, 55, 0.1); border-radius: 0; padding: 10px 14px; display: flex; gap: 6px; }
.prop-search__field { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.prop-search__btn { width: 32px; height: 8px; border-radius: 4px; background: rgba(212, 175, 55, 0.3); }
.prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(212, 175, 55, 0.08); border-radius: 0 0 12px 12px; }
.prop-card { background: rgba(212, 175, 55, 0.05); border: 1px solid rgba(212, 175, 55, 0.1); border-radius: 8px; overflow: hidden; }
.prop-card__img { height: 36px; background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(37, 99, 235, 0.08)); }
.prop-card__body { padding: 8px; }
.prop-card__price { height: 6px; border-radius: 3px; background: rgba(212, 175, 55, 0.3); width: 60%; margin-bottom: 4px; }
.prop-card__line { height: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); width: 80%; }
.prop-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 8px; padding: 6px 12px; margin-bottom: 8px; }
.prop-badge__star { color: var(--cs-accent); font-size: 0.8rem; }
.prop-badge__text { font-size: 0.7rem; font-weight: 700; color: var(--cs-accent); }
.award-banner { background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(37, 99, 235, 0.08)); border: 1px solid rgba(212, 175, 55, 0.25); border-radius: 20px; padding: 40px; margin: 40px 0; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.award-icon { width: 64px; height: 64px; border-radius: 16px; background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.award-text h3 { font-size: 1.1rem; margin-bottom: 6px; }
.award-text p { font-size: 0.88rem; color: var(--text-secondary); margin: 0; }

/* ── Fine Luxury Property: Pipeline Visual ── */
.pipeline { width: 100%; max-width: 380px; }
.pipeline__step { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pipeline__icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pipeline__content { flex: 1; }
.pipeline__title { font-size: 0.7rem; font-weight: 700; color: rgba(255, 255, 255, 0.7); margin-bottom: 4px; }
.pipeline__bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pipeline__bar__fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.3)); }
.pipeline__arrow { display: flex; justify-content: center; margin: 2px 0 2px 18px; }
.pipeline__status { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 12px; background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 8px; }
.pipeline__status__dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 6px #10b981; flex-shrink: 0; }
.pipeline__status__text { font-size: 0.68rem; color: rgba(255, 255, 255, 0.6); }
.pipeline__status__val { font-size: 0.68rem; font-weight: 700; color: #10b981; margin-left: auto; }

/* ── Fine Luxury Property: Performance Bars ── */
.perf-bar { margin-bottom: 16px; }
.perf-bar__label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 6px; }
.perf-bar__label span:first-child { color: var(--text-secondary); }
.perf-bar__label span:last-child { font-weight: 700; color: var(--cs-primary); }
.perf-bar__track { height: 8px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.perf-bar__fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cs-primary), #e8c84a); }

/* ── MedicalPress: Medical Dashboard Visual ── */
.med-dashboard { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; border: 1px solid rgba(37, 99, 235, 0.15); overflow: hidden; box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1); }
.med-header { background: #2563eb; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.med-header__cross { width: 20px; height: 20px; position: relative; }
.med-header__cross::before, .med-header__cross::after { content: ''; position: absolute; background: #fff; border-radius: 2px; }
.med-header__cross::before { width: 4px; height: 14px; top: 3px; left: 8px; }
.med-header__cross::after { width: 14px; height: 4px; top: 8px; left: 3px; }
.med-header__title { font-size: 0.75rem; font-weight: 700; color: #fff; }
.med-nav { display: flex; gap: 0; border-bottom: 1px solid rgba(37, 99, 235, 0.1); }
.med-nav__item { flex: 1; padding: 8px 4px; text-align: center; font-size: 0.6rem; font-weight: 600; color: rgba(37, 99, 235, 0.5); border-bottom: 2px solid transparent; }
.med-nav__item.active { color: #2563eb; border-bottom-color: #2563eb; }
.med-body { padding: 14px; }
.med-stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.med-stat { background: rgba(37, 99, 235, 0.04); border: 1px solid rgba(37, 99, 235, 0.08); border-radius: 8px; padding: 8px 6px; text-align: center; }
.med-stat__val { font-size: 0.75rem; font-weight: 700; color: #2563eb; display: block; }
.med-stat__label { font-size: 0.55rem; color: rgba(0, 0, 0, 0.4); }
.med-list-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(37, 99, 235, 0.06); }
.med-list-item:last-child { border-bottom: none; }
.med-list-item__avatar { width: 22px; height: 22px; border-radius: 50%; background: rgba(37, 99, 235, 0.1); flex-shrink: 0; }
.med-list-item__line { flex: 1; height: 5px; border-radius: 2px; background: rgba(0, 0, 0, 0.06); }
.med-list-item__badge { width: 28px; height: 14px; border-radius: 4px; background: rgba(16, 185, 129, 0.15); flex-shrink: 0; }

/* ── MedicalPress: Design Variation Swatches ── */
.variation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 24px; }
.variation-swatch { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.variation-swatch__color { height: 40px; }
.variation-swatch__label { padding: 6px 8px; font-size: 0.65rem; font-weight: 600; color: var(--text-secondary); text-align: center; background: var(--bg-white); }
