/* ==========================================================================
   SERVICES — dark panel with an interactive showcase (left) and a compact
   numbered list (right). Phones: list becomes an accordion.
   Colors: theme.css → "--services-bg", "--service-…"
   Texts:  content/texts.js → services.… and service.<name>.title / text / tags
   Animation: js/sections/services.js
   ========================================================================== */

.services { position: relative; background: var(--about-bg); }   /* cream shows around the panel while it expands */

/* ==================== DARK PANEL ==================== */
.services__panel {
  position: relative; isolation: isolate; overflow: hidden;
  padding: var(--section-space) 0;
  color: var(--text-on-dark);
  background:
    radial-gradient(70% 50% at 85% 0%, color-mix(in srgb, var(--blue) 70%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--services-bg) 0%, var(--navy-dark) 100%);
  will-change: clip-path;
}
.services__panel > .container { position: relative; z-index: 1; }
.services__glow {
  position: absolute; bottom: -30vmax; inset-inline-start: -20vmax; z-index: 0;
  width: 60vmax; height: 60vmax; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--orange) 14%, transparent), transparent 65%);
}

/* ==================== HEADING ==================== */
.services__header {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 24px 64px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.services__header .section-title { max-width: 16ch; }
.services__intro { max-width: 30rem; font-size: 1.06rem; line-height: 1.75; color: var(--text-on-dark-soft); }

/* ==================== LAYOUT: showcase + list ==================== */
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }

/* ==================== SHOWCASE (left) ==================== */
.svc__showcase {
  position: relative; overflow: hidden;
  display: grid; gap: 28px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 28px;
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--orange) 10%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--cream) 7%, transparent), color-mix(in srgb, var(--cream) 2%, transparent));
  border: 1px solid var(--service-card-border);
  box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--navy-dark) 90%, transparent);
}

/* Text part */
.svc__info { display: grid; gap: 12px; justify-items: start; }
.svc__counter { font-family: var(--font-numbers); font-size: .85rem; font-weight: 700; letter-spacing: .1em; color: var(--orange); direction: ltr; }
.svc__total { color: var(--text-on-dark-faint); }
.svc__title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
[dir="rtl"] .svc__title { letter-spacing: 0; line-height: 1.35; }
.svc__text  { max-width: 34rem; line-height: 1.7; color: var(--text-on-dark-soft); min-height: 3.4em; }
.svc__tags  { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.svc__tags li {
  padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  color: var(--text-on-dark); background: color-mix(in srgb, var(--cream) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 12%, transparent);
}

/* Auto-play progress line at the bottom */
.svc__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: color-mix(in srgb, var(--cream) 8%, transparent); }
.svc__progress span { display: block; height: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .svc__progress span { transform-origin: right center; }

/* ==================== LIST (right) ==================== */
.svc__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-on-dark); }
.svc__item { border-bottom: 1px solid color-mix(in srgb, var(--cream) 10%, transparent); }

.svc__row {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 30px 42px 1fr 22px; align-items: center; gap: 16px;
  padding: 16px 14px; text-align: start;
  border-radius: 14px;
  color: var(--text-on-dark);
  opacity: .55;
  transition: opacity var(--hover-speed) var(--ease), background-color var(--hover-speed) var(--ease);
}
.svc__row:hover { opacity: .9; }
/* orange bar on the active row */
.svc__row::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
  background: var(--orange); transform: scaleY(0); transition: transform .6s var(--ease);
}
.svc__item.is-active .svc__row {
  opacity: 1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--orange) 12%, transparent), transparent 80%);
}
[dir="rtl"] .svc__item.is-active .svc__row { background: linear-gradient(-90deg, color-mix(in srgb, var(--orange) 12%, transparent), transparent 80%); }
.svc__item.is-active .svc__row::before { transform: scaleY(1); }

.svc__num { font-family: var(--font-numbers); font-size: .8rem; font-weight: 700; color: var(--text-on-dark-faint); direction: ltr; transition: color var(--hover-speed); }
.svc__item.is-active .svc__num { color: var(--orange); }

.svc__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--service-icon-bg); color: var(--service-icon-color);
  transition: background-color var(--hover-speed) var(--ease), color var(--hover-speed) var(--ease);
}
.svc__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.svc__item.is-active .svc__icon { background: var(--orange); color: var(--navy); }

.svc__name { font-family: var(--font-headings); font-size: clamp(1.1rem, 1.6vw, 1.45rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
[dir="rtl"] .svc__name { letter-spacing: 0; }

.svc__arrow {
  width: 20px; height: 20px; color: var(--orange); opacity: 0;
  transform: scaleX(var(--dir)) translateX(-8px);
  transition: opacity var(--hover-speed) var(--ease), transform var(--hover-speed) var(--ease);
}
.svc__row:hover .svc__arrow, .svc__item.is-active .svc__arrow { opacity: 1; transform: scaleX(var(--dir)) translateX(0); }

/* Details (only used on phones — accordion) */
.svc__details { display: none; }
.svc__details a { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .88rem; font-weight: 700; color: var(--orange); }
.svc__mini-arrow { width: 16px; height: 16px; transform: scaleX(var(--dir)); }

/* ==================== ICON MICRO-ANIMATIONS ====================
   Play when a row is hovered, or in the showcase when a service becomes active (.is-playing) */
.svc__icon .icon-move, .svc__icon .icon-needle, .svc__icon .icon-chip,
.svc__icon .icon-check, .svc__icon .icon-band, .svc__icon .icon-pillow { transform-box: fill-box; transform-origin: center; }

.svc__row:hover .svc-icon--flight .icon-move,     .svc-icon--flight.is-playing .icon-move     { animation: icon-fly 1s var(--ease) both; }
.svc__row:hover .svc-icon--transfer .icon-move,   .svc-icon--transfer.is-playing .icon-move   { animation: icon-drive 1s var(--ease) both; }
.svc__row:hover .svc-icon--hotel .icon-pillow,    .svc-icon--hotel.is-playing .icon-pillow    { animation: icon-bounce .7s var(--ease) both; }
.svc__row:hover .svc-icon--visa .icon-move,       .svc-icon--visa.is-playing .icon-move       { animation: icon-stamp .7s var(--ease) both; }
.svc__row:hover .svc-icon--insurance .icon-check, .svc-icon--insurance.is-playing .icon-check { animation: icon-draw .8s var(--ease) both; }
.svc__row:hover .svc-icon--tours .icon-needle,    .svc-icon--tours.is-playing .icon-needle    { animation: icon-spin 1.1s var(--ease) both; }
.svc__row:hover .svc-icon--esim .icon-chip,       .svc-icon--esim.is-playing .icon-chip       { animation: icon-pop .8s var(--ease) both; }
.svc-icon--insurance .icon-check { stroke-dasharray: 12; }

@keyframes icon-fly {
  0% { transform: translate(0, 0); } 45% { transform: translate(calc(var(--dir) * 18px), -18px); opacity: 0; }
  46% { transform: translate(calc(var(--dir) * -18px), 18px); opacity: 0; } 100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes icon-drive {
  0% { transform: translateX(0); } 45% { transform: translateX(calc(var(--dir) * 22px)); opacity: 0; }
  46% { transform: translateX(calc(var(--dir) * -22px)); opacity: 0; } 100% { transform: translateX(0); opacity: 1; }
}
@keyframes icon-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-3px) scaleX(1.2); } }
@keyframes icon-stamp  { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-4px); } 60% { transform: translateY(1.5px) scaleY(.94); } }
@keyframes icon-pop    { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } }
@keyframes icon-shine  { 0% { opacity: 1; } 40% { opacity: .2; } 100% { opacity: 1; } }
@keyframes icon-draw   { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }
@keyframes icon-spin   { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ==================== BOTTOM CALL-TO-ACTION ==================== */
.services__cta {
  margin-top: clamp(40px, 6vw, 64px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 4vw, 48px);
  border-radius: var(--corner-radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--orange) 16%, transparent), color-mix(in srgb, var(--cream) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--orange) 28%, transparent);
}
.services__cta h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; color: var(--text-on-dark); }
.services__cta p  { margin-top: 6px; color: var(--text-on-dark-soft); }

/* ==================== SMALLER SCREENS ==================== */
@media (max-width: 960px) {
  .services__header { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .svc__showcase { display: none; }              /* phones & tablets: accordion instead */

  .svc__row { opacity: .8; padding: 14px 10px; grid-template-columns: 26px 40px 1fr 20px; gap: 12px; }
  .svc__arrow { opacity: .6; transform: scaleX(var(--dir)) rotate(90deg); }
  .svc__item.is-active .svc__arrow { transform: scaleX(var(--dir)) rotate(-90deg); }

  /* accordion: details slide open on the active row */
  .svc__details {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .6s var(--ease);
    padding-inline: calc(10px + 26px + 12px);      /* line up with the title */
  }
  .svc__details-inner { overflow: hidden; min-height: 0; }
  .svc__details p     { color: var(--text-on-dark-soft); line-height: 1.65; font-size: .95rem; }
  .svc__item.is-active .svc__details { grid-template-rows: 1fr; }
  .svc__item.is-active .svc__details-inner { padding-bottom: 18px; }
}
@media (max-width: 560px) {
  .services__cta .btn { width: 100%; }
}
