/* ==========================================================================
   Yayıncılık ve Matbaa — Animated Studio Service Covers & Editorial Upgrades
   Scoped exclusively to .sector-page[data-sector="yayincilik-ve-matbaa"]
   ========================================================================== */

/* 1. Sector navigation below the 3D scene */
.sector-page[data-sector="yayincilik-ve-matbaa"] .sector-page-heading--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.2rem;
  padding-block-start: calc(var(--printpress-overhang) + 3.1rem);
}

@media (max-width: 720px) {
  .sector-page[data-sector="yayincilik-ve-matbaa"] .sector-page-heading--compact {
    padding-block-start: calc(var(--printpress-overhang) + 1.15rem);
  }
}

.matbaa-cmyk-pips {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
}

.matbaa-cmyk-pips i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: matbaa-pip-pulse 3.2s ease-in-out infinite;
}

.matbaa-cmyk-pips i:nth-child(1) { background: #0098cc; animation-delay: 0s; }
.matbaa-cmyk-pips i:nth-child(2) { background: #c4185a; animation-delay: .45s; }
.matbaa-cmyk-pips i:nth-child(3) { background: #e6b200; animation-delay: .9s; }
.matbaa-cmyk-pips i:nth-child(4) { background: #1b202b; animation-delay: 1.35s; }

@keyframes matbaa-pip-pulse {
  0%, 100% { transform: scale(1); opacity: .78; }
  50% { transform: scale(1.28); opacity: 1; }
}

/* 2. Upgraded Editorial Service Card Grid & 5-Color Press Palette */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-grid {
  gap: clamp(1.1rem, 2.2vw, 1.55rem);
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  border-radius: .95rem;
  border-color: #d6deeb;
  transition:
    transform .36s cubic-bezier(.22, 1, .36, 1),
    border-color .28s ease,
    box-shadow .32s ease,
    opacity .55s cubic-bezier(.22, 1, .36, 1);
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:nth-child(1) {
  --service-color: #b82952;
  --service-glow: #b82952;
}
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:nth-child(2) {
  --service-color: #0088b8;
  --service-glow: #0088b8;
}
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:nth-child(3) {
  --service-color: #7a42e8;
  --service-glow: #7a42e8;
}
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:nth-child(4) {
  --service-color: #b5760c;
  --service-glow: #b5760c;
}
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:nth-child(6) {
  --service-color: #0d8a6a;
  --service-glow: #0d8a6a;
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service--ambalaj {
  --service-color: #a02c52;
  --service-glow: #a02c52;
}

.matbaa-service-nav {
  margin-block: .9rem clamp(1.2rem, 2vw, 1.6rem);
}

.matbaa-service-nav ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.matbaa-service-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .55rem .78rem;
  border: 1px solid #d6deeb;
  border-radius: .55rem;
  background: #fdfdfe;
  color: #293346;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.matbaa-service-nav a span[aria-hidden] {
  flex: none;
  color: #a02c52;
}

.matbaa-service-nav a:is(:hover, :focus-visible) {
  border-color: #a02c52;
  background-color: #fff6f8;
}

.matbaa-service-grid-anchor {
  scroll-margin-top: 1rem;
}

@media (max-width: 660px) {
  .matbaa-service-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service::before {
  height: 3.5px;
  background: linear-gradient(
    90deg,
    var(--service-color) 0 36%,
    color-mix(in srgb, var(--service-color) 42%, #ffffff) 62%,
    transparent 96%
  );
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service:is(:hover, :focus-within) {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--service-color) 56%, #c8d2e3);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 22px 44px rgba(20, 30, 52, 0.12),
    0 0 0 1px color-mix(in srgb, var(--service-color) 20%, transparent);
}

/* Smooth progressive scroll-reveal when JS is ready */
.matbaa-reveal-ready .visual-service {
  opacity: 0;
  transform: translateY(22px);
}

.matbaa-reveal-ready .visual-service.is-revealed {
  opacity: 1;
  transform: none;
}

.matbaa-reveal-ready .visual-service.is-revealed:is(:hover, :focus-within) {
  transform: translateY(-4px);
}

/* Service heading alignment */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-head {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: .75rem;
}

/* Upgraded display frame + crisp Play Reel trigger */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display {
  padding: .72rem;
  border-color: #dce3ef;
  background-color: #edf2f9;
  box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 0 5px #dde4f0;
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-reel {
  place-self: end start;
  z-index: 9;
  margin: .62rem;
  min-height: 2.05rem;
  padding: .34rem .86rem .34rem .64rem;
  border: 1px solid color-mix(in srgb, var(--service-color) 65%, rgba(255, 255, 255, 0.45));
  background: linear-gradient(145deg, rgba(16, 22, 36, 0.9), rgba(10, 14, 24, 0.86));
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: .76rem;
  letter-spacing: .01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(10, 16, 30, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-reel svg {
  color: color-mix(in srgb, var(--service-color) 55%, #ffffff);
  fill: currentColor;
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-reel:is(:hover, :focus-visible) {
  transform: translateY(-1px) scale(1.04);
  border-color: #ffffff;
  background: var(--service-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 22px color-mix(in srgb, var(--service-color) 42%, rgba(0, 0, 0, 0.35));
}

.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-reel:is(:hover, :focus-visible) svg {
  color: #ffffff;
}

/* ==========================================================================
   3. MULTI-LAYERED ANIMATED COVER STAGE (Shared Foundation)
   ========================================================================== */
.matbaa-cover {
  --mx: 0;
  --my: 0;
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: .62rem;
  overflow: hidden;
  border: 1px solid #cfd8e8;
  background: #e9eff8;
  box-shadow:
    0 10px 24px rgba(20, 32, 56, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  perspective: 900px;
  isolation: isolate;
  cursor: pointer;
  transition: border-color .28s ease, box-shadow .28s ease;
}

.visual-service:is(:hover, :focus-within) .matbaa-cover {
  border-color: color-mix(in srgb, var(--service-color) 65%, #ffffff);
  box-shadow:
    0 14px 30px color-mix(in srgb, var(--service-color) 20%, rgba(16, 24, 44, 0.16)),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Base studio backdrop image (also clickable target for script.js video modal!) */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display img.matbaa-cover-bg {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  transform:
    translate3d(calc(var(--mx) * -7px), calc(var(--my) * -5px), 0)
    scale(1.03);
  transition: transform .22s ease-out;
  will-change: transform;
  z-index: 1;
}

/* Keep the packaging portfolio cover at its original proportions. */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-cover--ambalaj img.matbaa-cover-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
}

/* All decorative foreground & kinetic overlays let clicks pass cleanly to base image */
.matbaa-layer,
.matbaa-hud-pill,
.matbaa-crop-marks,
.matbaa-cover-glint {
  pointer-events: none;
  user-select: none;
}

/* Override visual-services.css img defaults for floating 3D foreground WebP cutouts! */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-layer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Subtle diagonal studio light reflection responding to pointer */
.matbaa-cover-glint {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: radial-gradient(
    circle 210px at calc(50% + var(--mx) * 35%) calc(50% + var(--my) * 35%),
    rgba(255, 255, 255, 0.24),
    transparent 70%
  );
  opacity: 0;
  transition: opacity .3s ease;
}

.visual-service:hover .matbaa-cover-glint {
  opacity: 1;
}

/* Fine press registration crop marks on cover corners */
.matbaa-crop-marks {
  position: absolute;
  inset: 7px;
  z-index: 6;
  opacity: .55;
  transition: opacity .25s ease;
}

.visual-service:hover .matbaa-crop-marks {
  opacity: .92;
}

.matbaa-crop-marks i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: color-mix(in srgb, var(--service-color) 78%, #1b202b);
  border-style: solid;
  border-width: 0;
}

.matbaa-crop-marks i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.matbaa-crop-marks i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.matbaa-crop-marks i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.matbaa-crop-marks i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Crisp translucent studio micro-status pills */
.matbaa-hud-pill {
  position: absolute;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .2rem .54rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  color: #1c2434;
  font-family: 'Manrope', 'DM Sans', Arial, sans-serif;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  box-shadow: 0 5px 14px rgba(18, 28, 48, 0.14);
}

.matbaa-hud-pill--dark {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(18, 24, 38, 0.82);
  color: #f4f8ff;
}

.matbaa-hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--service-color);
  box-shadow: 0 0 8px var(--service-color);
  animation: matbaa-dot-blink 2s ease-in-out infinite;
}

@keyframes matbaa-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

/* Pause offscreen cover animations cleanly */
.matbaa-cover.is-paused *,
.matbaa-cover.is-paused *::before,
.matbaa-cover.is-paused *::after {
  animation-play-state: paused !important;
}

/* ==========================================================================
   COVER 1: DİZGİ, KAPAK VE BASKI TASARIMI
   ========================================================================== */
.matbaa-cover--dizgi .matbaa-cover-bg {
  animation: dizgi-desk-breathe 12s ease-in-out infinite alternate;
}

@keyframes dizgi-desk-breathe {
  0% { scale: 1.01; }
  100% { scale: 1.065; }
}

/* CMYK prismatic proof scanner sweeping across the editorial spread */
.dizgi-scan-bar {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -18%;
  width: 24%;
  z-index: 3;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 152, 204, 0.06) 35%,
    rgba(196, 24, 90, 0.16) 72%,
    rgba(255, 255, 255, 0.55) 95%,
    rgba(0, 168, 224, 0.72) 100%
  );
  border-right: 1.5px solid rgba(184, 41, 82, 0.62);
  transform: skewX(-10deg);
  animation: dizgi-scan-pass 5.6s cubic-bezier(.45, .05, .55, .95) infinite;
}

@keyframes dizgi-scan-pass {
  0%, 12% { transform: translateX(-110%) skewX(-10deg); opacity: 0; }
  20% { opacity: 1; }
  72% { opacity: 1; }
  84%, 100% { transform: translateX(520%) skewX(-10deg); opacity: 0; }
}

/* 3D Floating Luxury Hardcover Book */
.dizgi-book-wrap {
  position: absolute;
  right: 2.5%;
  bottom: 3%;
  width: 39%;
  z-index: 5;
  transform: translate3d(calc(var(--mx) * 11px), calc(var(--my) * 8px), 0);
  transition: transform .22s ease-out;
}

.dizgi-book-motion {
  position: relative;
  animation: dizgi-book-float 5.4s ease-in-out infinite;
  filter: drop-shadow(0 16px 18px rgba(18, 24, 42, 0.34));
  transform-origin: 50% 60%;
}

/* Diagonal foil specular sheen sweeping across the book cover */
.dizgi-book-motion::after {
  content: "";
  position: absolute;
  inset: 8% 12%;
  border-radius: 4px;
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(255, 244, 210, 0.42) 48%,
    rgba(255, 255, 255, 0.12) 56%,
    transparent 68%
  );
  background-size: 260% 100%;
  mix-blend-mode: screen;
  animation: dizgi-foil-sheen 5.4s ease-in-out infinite;
}

@keyframes dizgi-book-float {
  0%, 100% { transform: translateY(0px) rotate(-1.5deg) scale(1); }
  50% { transform: translateY(-8px) rotate(1.6deg) scale(1.025); }
}

@keyframes dizgi-foil-sheen {
  0%, 20% { background-position: 140% 0; opacity: 0; }
  48% { opacity: .9; }
  80%, 100% { background-position: -60% 0; opacity: 0; }
}

/* 3D Pivoting Pantone/CMYK Swatch Fan top-left (well clear of bottom-left Play button!) */
.dizgi-swatch-wrap {
  position: absolute;
  left: 1.5%;
  top: 2.5%;
  width: 24%;
  z-index: 4;
  transform: translate3d(calc(var(--mx) * 7px), calc(var(--my) * 5px), 0);
  transition: transform .22s ease-out;
}

.dizgi-swatch-motion {
  transform-origin: 52% 72%;
  filter: drop-shadow(0 10px 14px rgba(18, 26, 44, 0.24));
  animation: dizgi-swatch-fan 6.2s ease-in-out infinite;
}

@keyframes dizgi-swatch-fan {
  0%, 100% { transform: rotate(-6deg) translateY(0px); }
  50% { transform: rotate(7deg) translateY(-4px); }
}

.dizgi-pill {
  top: .55rem;
  right: .55rem;
}

/* ==========================================================================
   COVER 2: AKILLI TAHTA OTOMASYONU
   ========================================================================== */
.matbaa-cover--tahta .matbaa-cover-bg {
  animation: tahta-bg-breathe 13s ease-in-out infinite alternate;
}

@keyframes tahta-bg-breathe {
  0% { scale: 1.01; }
  100% { scale: 1.055; }
}

/* Glowing fiber-optic data sync stream + live smartboard annotation SVG */
.tahta-sync-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}

.tahta-beam-track {
  fill: none;
  stroke: rgba(0, 136, 184, 0.28);
  stroke-width: 2.2;
  stroke-dasharray: 5 5;
}

.tahta-beam-pulse {
  fill: none;
  stroke: #00b8f0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 34 190;
  filter: drop-shadow(0 0 6px rgba(0, 184, 240, 0.85));
  animation: tahta-beam-flow 2.8s linear infinite;
}

@keyframes tahta-beam-flow {
  from { stroke-dashoffset: 224; }
  to { stroke-dashoffset: 0; }
}

.tahta-draw-ring {
  fill: rgba(0, 184, 240, 0.1);
  stroke: #00a8e0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  filter: drop-shadow(0 0 6px rgba(0, 168, 224, 0.65));
  animation: tahta-ring-draw 5s ease-in-out infinite;
}

.tahta-draw-check {
  fill: none;
  stroke: #0d8a6a;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: tahta-check-draw 5s ease-in-out infinite;
}

@keyframes tahta-ring-draw {
  0%, 14% { stroke-dashoffset: 220; opacity: 0; }
  20% { opacity: 1; }
  58% { stroke-dashoffset: 0; opacity: 1; }
  84% { stroke-dashoffset: 0; opacity: 1; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes tahta-check-draw {
  0%, 54% { stroke-dashoffset: 48; opacity: 0; }
  62% { opacity: 1; }
  76% { stroke-dashoffset: 0; opacity: 1; }
  88% { opacity: 1; }
  98%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* 3D Floating Open Digital Textbook on left */
.tahta-book-wrap {
  position: absolute;
  left: 2%;
  top: 22%;
  width: 37%;
  z-index: 5;
  transform: translate3d(calc(var(--mx) * 10px), calc(var(--my) * 7px), 0);
  transition: transform .22s ease-out;
}

.tahta-book-motion {
  filter: drop-shadow(0 14px 16px rgba(10, 32, 54, 0.28));
  animation: tahta-book-float 4.8s ease-in-out infinite;
}

@keyframes tahta-book-float {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1.4deg); }
}

/* 3D Smartboard Stylus tracing the live highlight circle */
.tahta-stylus-wrap {
  position: absolute;
  right: 17%;
  top: 25%;
  width: 19%;
  z-index: 6;
  transform: translate3d(calc(var(--mx) * 14px), calc(var(--my) * 10px), 0);
  transition: transform .22s ease-out;
}

.tahta-stylus-motion {
  transform-origin: 18% 85%;
  filter: drop-shadow(0 10px 12px rgba(10, 26, 46, 0.3));
  animation: tahta-stylus-trace 5s ease-in-out infinite;
}

@keyframes tahta-stylus-trace {
  0%, 100% { transform: translate(6px, -10px) rotate(4deg); }
  25% { transform: translate(-12px, -4px) rotate(-6deg); }
  50% { transform: translate(-4px, 12px) rotate(-2deg); }
  75% { transform: translate(12px, 4px) rotate(7deg); }
}

.tahta-pill {
  top: .55rem;
  left: .55rem;
}

/* ==========================================================================
   COVER 3: KİTAP EĞİTİM VE SORU ÇÖZÜMÜ VİDEOLARI
   ========================================================================== */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-cover--video img.matbaa-cover-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
}

/* ==========================================================================
   COVER 4: YAYINCILIK MOBİL UYGULAMASI
   ========================================================================== */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-cover--mobil img.matbaa-cover-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
}

/* ==========================================================================
   COVER 5: KİTAP KONTROLÜ VE HATA TESPİTİ
   ========================================================================== */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-cover--kontrol img.matbaa-cover-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
}

/* Publishing workflow in a two-page typesetting spread. */
.matbaa-workflow-board {
  --workflow-ruler: 1rem;
  --workflow-board-gap: clamp(.55rem, 1.9vw, 1.45rem);
  --workflow-purple: #802c80;
  --workflow-teal: #08715e;
  --workflow-frame: #638be1;
  --service-color: var(--workflow-purple);
  --service-glow: var(--workflow-teal);
  position: relative;
  overflow: hidden;
  padding: calc(var(--workflow-ruler) + var(--workflow-board-gap)) var(--workflow-board-gap) var(--workflow-board-gap)
    calc(var(--workflow-ruler) + var(--workflow-board-gap));
  border: 1px solid #36373d;
  border-radius: .6rem;
  background: #42434a;
}

.matbaa-workflow-board::before,
.matbaa-workflow-board::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-color: #26272d;
}

.matbaa-workflow-board::before {
  inset: 0 0 auto var(--workflow-ruler);
  height: var(--workflow-ruler);
  border-bottom: 1px solid #636671;
  background-image:
    repeating-linear-gradient(90deg, #cad0da 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, #808795 0 1px, transparent 1px 8px);
  background-position: left bottom;
  background-size: 100% .66rem, 100% .31rem;
  background-repeat: no-repeat;
}

.matbaa-workflow-board::after {
  inset: var(--workflow-ruler) auto 0 0;
  width: var(--workflow-ruler);
  border-right: 1px solid #636671;
  background-image:
    repeating-linear-gradient(#cad0da 0 1px, transparent 1px 32px),
    repeating-linear-gradient(#808795 0 1px, transparent 1px 8px);
  background-position: right top;
  background-size: .66rem 100%, .31rem 100%;
  background-repeat: no-repeat;
}

.matbaa-workflow-page {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 2.5rem);
  background: linear-gradient(90deg, #fff 0 48.75%, #eeeeee 50%, #fff 51.25%);
  box-shadow: 0 2px 10px #13151a80;
}

.matbaa-workflow-page::before,
.matbaa-workflow-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.matbaa-workflow-page::before {
  inset: .55rem;
  border: 1px solid #b85cb999;
}

.matbaa-workflow-page::after {
  inset: 0 auto 0 50%;
  border-left: 1px solid #35323882;
}

.matbaa-workflow-page h2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: .8rem clamp(2rem, 12%, 8rem);
  background: var(--workflow-teal);
  color: #fff;
  text-align: center;
  font: 800 clamp(1.3rem, 3vw, 2.08rem)/1.1 'DM Sans', system-ui, sans-serif;
  letter-spacing: -.02em;
}

.matbaa-workflow-page h2::before,
.matbaa-workflow-page h2::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  width: clamp(1.85rem, 14%, 8rem);
  background: linear-gradient(180deg, #fff 0 38%, #188e75 38% 54%, var(--workflow-purple) 54%);
  pointer-events: none;
}

.matbaa-workflow-page h2::before {
  left: -.7rem;
  border-right: .7rem solid var(--workflow-purple);
  transform: skewX(-20deg);
}

.matbaa-workflow-page h2::after {
  right: -.7rem;
  border-left: .7rem solid var(--workflow-purple);
  transform: skewX(20deg);
}

.matbaa-workflow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: .8rem clamp(1.2rem, 4vw, 2.6rem);
  margin: clamp(.9rem, 2.5vw, 1.75rem) 0 1.2rem;
  padding: 0;
  list-style: none;
}

.matbaa-workflow-steps li {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border: 1px solid var(--workflow-frame);
  background: #fff;
}

.matbaa-workflow-steps li::before,
.matbaa-workflow-steps li::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid var(--workflow-frame);
  background: #fff;
  pointer-events: none;
}

.matbaa-workflow-steps li::before {
  inset: -3px auto auto -3px;
}

.matbaa-workflow-steps li::after {
  inset: auto -3px -3px auto;
}

.matbaa-workflow-steps h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.55rem;
  margin: 0;
  padding: .42rem .55rem;
  border-bottom: 1px solid var(--workflow-frame);
  background: #f2edfa;
  color: #271b35;
  font: 750 clamp(.96rem, 1.45vw, 1.07rem)/1.2 'DM Sans', system-ui, sans-serif;
}

.matbaa-workflow-step-number {
  display: grid;
  flex: 0 0 1.5rem;
  min-height: 1.5rem;
  place-items: center;
  background: var(--workflow-purple);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.matbaa-workflow-steps p {
  margin: 0;
  padding: .7rem .65rem 1.4rem;
  background-image:
    repeating-linear-gradient(90deg, #add6f190 0 1px, transparent 1px 9px),
    repeating-linear-gradient(#add6f190 0 1px, transparent 1px 9px);
  background-position: left bottom;
  background-size: 100% .6rem;
  background-repeat: no-repeat;
  color: #2d3444;
  font: 400 1rem/1.45 'DM Sans', system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.matbaa-workflow-page .visual-service-cta {
  min-height: 2.75rem;
}

@media (max-width: 620px) {
  .matbaa-workflow-board {
    --workflow-ruler: .66rem;
  }

  .matbaa-workflow-page {
    padding: .95rem;
    background: #fff;
  }

  .matbaa-workflow-page::after {
    content: none;
  }

  .matbaa-workflow-steps {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .matbaa-workflow-steps h3 {
    min-height: 2.35rem;
  }
}

@media (forced-colors: active) {
  .matbaa-workflow-board::before,
  .matbaa-workflow-board::after,
  .matbaa-workflow-page::before,
  .matbaa-workflow-page::after,
  .matbaa-workflow-page h2::before,
  .matbaa-workflow-page h2::after,
  .matbaa-workflow-steps li::before,
  .matbaa-workflow-steps li::after {
    display: none;
  }
}

/* ==========================================================================
   5. RESPONSIVE & REDUCED MOTION
   ========================================================================== */
@media (max-width: 58rem) {
  .sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .sector-page[data-sector="yayincilik-ve-matbaa"] .sector-page-heading--compact {
    justify-content: center;
  }

  .matbaa-hud-pill {
    font-size: .56rem;
    padding: .16rem .46rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .matbaa-reveal-ready .visual-service {
    opacity: 1;
    transform: none;
  }

  .matbaa-cover *,
  .matbaa-cover *::before,
  .matbaa-cover *::after,
  .matbaa-cmyk-pips i {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep the smartboard screen at its original proportions. */
.sector-page[data-sector="yayincilik-ve-matbaa"] .visual-service-display .matbaa-cover--akilli-tahta img.matbaa-cover-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
}
.reel-modal-heading {
  min-width: 0;
}

.reel-modal.reel-has-project-link {
  --reel-head-space: 5.35rem;
}

.reel-project-link {
  font-size: .75rem;
  line-height: 1.32;
  font-weight: 700;
  color: #bedff2;
  text-underline-offset: .18em;
}

.reel-project-link:focus-visible {
  outline: 2px solid #bedff2;
  outline-offset: 2px;
}


/* Silent, looping service previews keep the original art as their fallback. */
.matbaa-card-teaser {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111928;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.matbaa-cover.has-teaser-frame .matbaa-card-teaser {
  opacity: 1;
}

.matbaa-teaser-toggle {
  display: block;
  margin: -.45rem 0 .7rem auto;
  padding: .35rem .15rem;
  border: 0;
  background: none;
  color: #425470;
  font: 700 .77rem/1.3 'Manrope', 'DM Sans', Arial, sans-serif;
  text-underline-offset: .18em;
  cursor: pointer;
}

.matbaa-teaser-toggle:is(:hover, :focus-visible) {
  color: #842548;
  text-decoration: underline;
}

.matbaa-teaser-toggle[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .matbaa-card-teaser,
  .matbaa-teaser-toggle {
    display: none;
  }
}

/* Publishing contact actions */
.matbaa-footer-contact {
  --service-color: var(--sector-accent);
}

/* Photographs in the publishing page's other-sector cards. */
.sector-page[data-sector="yayincilik-ve-matbaa"] .sector-rail .visual-sector-photo {
  object-fit: cover;
  border-radius: .26rem;
  background: #eef2f7;
  box-shadow: none;
}
