/* =============================================================
   DEMO SECTIONS — shared styling for Take Away / Delivery /
   Dine-In / KDS / Analytics interactive showcase blocks.
   ============================================================= */

.ds-section {
  position: relative;
  padding: 100px 64px 120px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Soft section background — orbs that hint at the surface */
.ds-section-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ds-bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.ds-bg-orb-1 { width: 520px; height: 520px; left: -200px; top: 10%;  background: radial-gradient(circle, rgba(59,130,246,0.45), transparent 70%); }
.ds-bg-orb-2 { width: 440px; height: 440px; right: -160px; bottom: 8%; background: radial-gradient(circle, rgba(167,139,250,0.5), transparent 70%); }

.ds-section-inner {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 64px; align-items: center;
}

/* LEFT SIDE — copy */
.ds-side { display: flex; flex-direction: column; gap: 22px; }
.ds-kicker {
  display: inline-flex; align-self: flex-start;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.3);
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: #c4b5fd; text-transform: uppercase;
}
.ds-h2 {
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.04; margin: 0;
  color: white;
}
.ds-h2-accent {
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-sub {
  font-size: 17px; line-height: 1.65;
  color: rgba(255,255,255,0.72);
  margin: 0; max-width: 540px;
}

/* Bullet list */
.ds-bullets { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 14px; }
.ds-bullet { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: flex-start; }
.ds-bullet-num {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(167,139,250,0.2));
  border: 1px solid rgba(167,139,250,0.35);
  font-size: 12px; font-weight: 800; color: #c4b5fd;
}
.ds-bullet-t { font-size: 16px; font-weight: 700; color: white; }
.ds-bullet-s { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 2px; line-height: 1.5; }

/* "Try it / Δοκίμασέ το" — clearly-styled button that opens the demo modal */
.ds-trybadge,
.ds-try-badge {
  display: inline-flex; align-self: flex-start;
  align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  background: linear-gradient(135deg, #3b6dff 0%, #7c3aed 100%);
  border: none;
  color: white;
  font-size: 14.5px; font-weight: 700;
  letter-spacing: -0.005em;
  margin-top: 14px;
  box-shadow:
    0 8px 22px rgba(124, 58, 237, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: ds-tryglow 2.4s ease-in-out infinite;
}
/* Expand-icon at the end visually says "click to enlarge" */
.ds-trybadge::after,
.ds-try-badge::after {
  content: "⤢";
  font-size: 16px; font-weight: 900;
  margin-left: 4px;
  opacity: 0.95;
  transition: transform 0.2s ease;
}
.ds-stage-badge:hover .ds-trybadge::after,
.ds-stage-badge:hover .ds-try-badge::after {
  transform: scale(1.15);
}
/* Hide the now-redundant decorative dot */
.ds-trybadge-dot { display: none; }

@keyframes ds-tryglow {
  0%, 100% {
    box-shadow:
      0 8px 22px rgba(124, 58, 237, 0.45),
      0 1px 0 rgba(255, 255, 255, 0.2) inset;
  }
  50% {
    box-shadow:
      0 12px 34px rgba(124, 58, 237, 0.72),
      0 0 0 4px rgba(167, 139, 250, 0.18),
      0 1px 0 rgba(255, 255, 255, 0.3) inset;
  }
}

/* RIGHT SIDE — interactive stage with browser-style chrome */
/* No perspective here on purpose: it would create a containing block for any
   position: fixed descendant (the modal backdrop/frame), trapping them inside
   .ds-stage instead of letting them anchor to the viewport. */
.ds-stage { position: relative; }
.ds-stage-badge { display: flex; justify-content: center; margin-top: 18px; }
.ds-stage-frame {
  position: relative;
  border-radius: 18px;
  background: #0a0f24;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 40px 100px rgba(0,0,0,0.6),
    0 20px 50px rgba(124,58,237,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform 0.5s ease;
}
.ds-stage-frame:hover { transform: translateY(-4px); }

.ds-stage-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #11163a, #0d1330);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ds-stage-dot { width: 11px; height: 11px; border-radius: 50%; background: #2a3155; }
.ds-stage-dot:nth-child(1) { background: #ef4444; }
.ds-stage-dot:nth-child(2) { background: #f59e0b; }
.ds-stage-dot:nth-child(3) { background: #22c55e; }
.ds-stage-label {
  flex: 1; text-align: center;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.ds-stage-live {
  font-size: 10px; font-weight: 800;
  color: #4ade80; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.35);
  animation: ds-livepulse 2s ease-in-out infinite;
}
@keyframes ds-livepulse { 50% { background: rgba(74,222,128,0.22); } }

.ds-stage-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0d1330;
}
.ds-stage-screen .pos-preview {
  width: 100%; height: 100%;
}

/* Step dots (used by future sections too) */
.ds-stepdots { display: flex; gap: 12px; flex-wrap: wrap; }
.ds-stepdot {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}
.ds-stepdot-num {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.1);
  font-size: 10px; font-weight: 800;
}
.ds-stepdot-on {
  background: rgba(167,139,250,0.18);
  border-color: rgba(167,139,250,0.5);
  color: white;
}
.ds-stepdot-on .ds-stepdot-num { background: linear-gradient(135deg,#3b82f6,#7c3aed); color: white; }
.ds-stepdot-done {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.4);
  color: #86efac;
}
.ds-stepdot-done .ds-stepdot-num { background: #22c55e; color: white; }

/* ─── Phase hint strip (top of every demo screen) ─────────────── */
.ds-hint {
  position: absolute; z-index: 30;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  background: linear-gradient(90deg, rgba(124,58,237,0.22), rgba(96,165,250,0.22));
  border-bottom: 1px solid rgba(167,139,250,0.35);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
  animation: ds-hint-in 0.35s ease-out;
}
.ds-hint-emoji {
  display: inline-block;
  font-size: 14px;
  animation: ds-hint-wave 1.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes ds-hint-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ds-hint-wave {
  0%, 100% { transform: rotate(0deg); }
  20%, 50% { transform: rotate(-14deg); }
  35%, 65% { transform: rotate(14deg); }
}

/* ─── Modal expansion (click "Δοκίμασέ το" to enlarge) ───────── */
/* Lift the entire section above its siblings while the modal is open.
   Without this, the backdrop is stuck inside .ds-section-inner's stacking
   context (z:1) and later sections in document order paint on top. */
.ds-section-modal-open { z-index: 1000; }

.ds-stage-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 8, 22, 0.88);
  backdrop-filter: blur(16px);
  z-index: 9999;
  animation: ds-backdrop-in 0.25s ease-out;
  cursor: pointer;
}
@keyframes ds-backdrop-in {
  from { opacity: 0; } to { opacity: 1; }
}
.ds-stage-frame-expanded {
  position: fixed !important;
  top: 50%; left: 50%;
  /* Both width AND height explicit — flex children need a definite parent
     dimension to grow into. Picks the smaller of (95vw, viewport-aware aspect-ratio width). */
  width: min(95vw, calc((92vh - 50px) * 16 / 10));
  height: min(92vh, calc(95vw * 10 / 16 + 50px));
  max-width: 1500px;
  z-index: 10000;
  display: flex; flex-direction: column;
  transform: translate(-50%, -50%);
  animation: ds-frame-in 0.32s cubic-bezier(0.2, 1, 0.4, 1);
}
/* Kill the .ds-stage-frame:hover translateY rule for the expanded modal —
   otherwise hovering re-applies the hover transform and the modal jumps off-center. */
.ds-stage-frame-expanded:hover { transform: translate(-50%, -50%); }

/* Unlock all the per-section hardcoded heights/aspect-ratios inside the modal,
   so the flex layout actually fills the frame. Each section's CSS pins the
   screen at 580px or aspect-ratio 16/10 — both fight the expanded layout. */
.ds-stage-frame-expanded .ds-stage-screen,
.ds-stage-frame-expanded .ds-stage-screen-dine,
.ds-stage-frame-expanded .ds-stage-screen-delivery {
  flex: 1; min-height: 0;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}
.ds-stage-frame-expanded .pos-preview {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}
@keyframes ds-frame-in {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Close button shown in chrome bar when expanded */
.ds-stage-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
  margin-left: 8px;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.ds-stage-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

/* Make the "Try it" badge feel clickable */
.ds-stage-badge { cursor: pointer; user-select: none; }
.ds-stage-badge:hover .ds-trybadge,
.ds-stage-badge:hover .ds-try-badge {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 16px 40px rgba(124, 58, 237, 0.6),
    0 0 0 6px rgba(167, 139, 250, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.32) inset;
  animation: none; /* pause ambient glow during hover */
}
.ds-stage-badge:active .ds-trybadge,
.ds-stage-badge:active .ds-try-badge {
  transform: translateY(-1px) scale(1.01);
  transition-duration: 0.08s;
}

/* ─── Pulsing CTA — applied to whichever button is the next action ─ */
.ds-pulse-cta {
  position: relative;
  animation: ds-cta-pulse 1.6s ease-in-out infinite;
}
@keyframes ds-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
}

/* Reversed layout — stage on the left, copy on the right (zig-zag pattern) */
@media (min-width: 981px) {
  .ds-section-rev .ds-section-inner {
    grid-template-columns: 1.15fr 1fr;
  }
  .ds-section-rev .ds-side  { grid-column: 2; grid-row: 1; }
  .ds-section-rev .ds-stage { grid-column: 1; grid-row: 1; }
}

/* Responsive */
@media (max-width: 980px) {
  .ds-section { padding: 60px 24px 80px; }
  .ds-section-inner { grid-template-columns: 1fr; gap: 36px; }
  .ds-h2 { font-size: 36px; }
}
