/* AINext Services. Builds on directory.css (shared tokens, dark-mode variables, panels, buttons, chips). */

/* ===== Colour themes (each service category has its own accent pair) ===== */
.ainext-services { --c1: #6366f1; --c2: #a855f7; --c1-rgb: 99, 102, 241; --c2-rgb: 168, 85, 247; padding-bottom: 0; }
.ainext-theme-writing       { --c1: #7c3aed; --c2: #ec4899; --c1-rgb: 124, 58, 237; --c2-rgb: 236, 72, 153; }
.ainext-theme-development   { --c1: #2563eb; --c2: #06b6d4; --c1-rgb: 37, 99, 235;  --c2-rgb: 6, 182, 212; }
.ainext-theme-pr-media      { --c1: #f97316; --c2: #ec4899; --c1-rgb: 249, 115, 22; --c2-rgb: 236, 72, 153; }
.ainext-theme-software      { --c1: #059669; --c2: #0ea5e9; --c1-rgb: 5, 150, 105;  --c2-rgb: 14, 165, 233; }
.ainext-theme-ai-automation { --c1: #6366f1; --c2: #a855f7; --c1-rgb: 99, 102, 241; --c2-rgb: 168, 85, 247; }

/* ===== Hero: default colours + illustration. A Featured / chosen image replaces both. ===== */
.ainext-dir.ainext-services .ainext-svc-hero {
  position: relative; overflow: hidden; padding: 56px 0 120px; text-align: left; color: #fff;
  background:
    radial-gradient(60% 90% at 88% 8%, rgba(var(--c2-rgb), .55), transparent 62%),
    radial-gradient(55% 80% at 4% 100%, rgba(var(--c1-rgb), .5), transparent 60%),
    linear-gradient(135deg, #17104f 0%, #2c2194 52%, #5b34d6 100%);
}
.ainext-dir.ainext-services .ainext-svc-hero.has-image {
  background:
    linear-gradient(115deg, rgba(23, 16, 79, .92) 0%, rgba(44, 33, 148, .8) 50%, rgba(var(--c2-rgb), .5) 100%),
    var(--hero-image) center / cover no-repeat,
    #17104f;
}
.ainext-svc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.ainext-svc-hero::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -1px; height: 64px; background: var(--ad-bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.ainext-svc-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.ainext-svc-hero.has-image .ainext-svc-hero__grid { grid-template-columns: minmax(0, 840px); }
.ainext-svc-hero .ainext-crumbs { position: relative; z-index: 1; justify-content: flex-start; margin-bottom: 26px; }
.ainext-svc-hero__art { display: flex; justify-content: center; filter: drop-shadow(0 26px 40px rgba(10, 6, 60, .38)); }
.ainext-art { width: 100%; max-width: 440px; height: auto; animation: ainext-float 7s ease-in-out infinite; }
@keyframes ainext-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.ainext-dir.ainext-services .ainext-svc-hero .ainext-hero__title { margin: 0 0 16px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; text-transform: none; letter-spacing: -.015em; text-align: left; }
.ainext-svc-hero .ainext-hero__sub { max-width: 560px; margin: 0; text-align: left; font-size: 1.05rem; }
.ainext-svc-hero .ainext-hero__actions { justify-content: flex-start; }
.ainext-svc-hero .ainext-eyebrow { margin-bottom: 14px; }
.ainext-svc-hero-icon { display: inline-grid; place-items: center; width: 62px; height: 62px; margin-bottom: 16px; border-radius: 18px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 14px 30px rgba(10, 6, 60, .35); }
.ainext-svc-hero-icon svg { width: 30px; height: 30px; }
.ainext-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ainext-svc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.ainext-svc-stats span { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); font-size: .84rem; font-weight: 600; }
.ainext-svc-hero-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; color: rgba(255, 255, 255, .78); font-size: .9rem; }
.ainext-services .ainext-tool-lead { margin-top: 0; }

/* Illustration parts */
.ainext-art .il-glow { fill: rgba(255, 255, 255, .09); }
.ainext-art .il-soft { fill: rgba(255, 255, 255, .2); }
.ainext-art .il-card { fill: #fff; }
.ainext-art .il-line { fill: #dbe1ee; }
.ainext-art .il-line2 { fill: #e8ecf6; }
.ainext-art .il-dark { fill: #1b1647; }
.ainext-art .il-a { fill: var(--c1); }
.ainext-art .il-b { fill: var(--c2); }
.ainext-art .il-stroke { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ainext-art .il-stroke-a { fill: none; stroke: var(--c1); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.ainext-art .il-stroke-b { fill: none; stroke: var(--c2); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Section bands (alternating backgrounds so the page never feels flat) ===== */
.ainext-svc-band { position: relative; padding: 56px 0 60px; }
.ainext-svc-band--dots { background-image: radial-gradient(rgba(var(--c1-rgb), .17) 1.2px, transparent 1.2px); background-size: 24px 24px; }
.ainext-svc-band--tint { background: linear-gradient(180deg, rgba(var(--c1-rgb), .1), rgba(var(--c2-rgb), .04)); }
.ainext-svc-band .ainext-section__title::before { content: ""; display: inline-block; width: 9px; height: 26px; margin-right: 12px; border-radius: 5px; vertical-align: -5px; background: linear-gradient(var(--c1), var(--c2)); }
.ainext-svc-band .ainext-section__head { margin-bottom: 24px; }
.ainext-services .ainext-section { padding-top: 0; }

/* ===== Category overview cards (/services/) ===== */
.ainext-svc-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ainext-svc-cat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 28px 26px 24px; background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: 22px; box-shadow: var(--ad-shadow); color: var(--ad-text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ainext-svc-cat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.ainext-svc-cat::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c2-rgb), .25), transparent 70%); pointer-events: none; }
.ainext-svc-cat:hover { transform: translateY(-5px); border-color: rgba(var(--c1-rgb), .5); box-shadow: 0 22px 44px rgba(var(--c1-rgb), .22); }
.ainext-dir .ainext-svc-cat h3 { position: relative; margin: 6px 0 0; font-size: 1.18rem; font-weight: 800; color: var(--ad-text); }
.ainext-svc-cat p { position: relative; margin: 0; color: var(--ad-muted); font-size: .92rem; }
.ainext-svc-cat ul { position: relative; margin: 6px 0 0; padding: 0; list-style: none; flex: 1; }
.ainext-svc-cat li { margin: 0; padding: 6px 0 6px 20px; position: relative; font-size: .88rem; border-top: 1px solid var(--ad-border); }
.ainext-svc-cat li::before { content: "›"; position: absolute; left: 4px; color: var(--c1); font-weight: 900; }
.ainext-svc-cat__more { position: relative; margin-top: 8px; color: var(--ad-accent); font-weight: 800; font-size: .9rem; }

.ainext-svc-card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 10px 22px rgba(var(--c1-rgb), .32); }
.ainext-svc-card__icon svg { width: 26px; height: 26px; }

/* ===== Service cards ===== */
.ainext-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ainext-svc-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 24px; background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: 20px; box-shadow: var(--ad-shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ainext-svc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); opacity: .9; }
.ainext-svc-card:hover { transform: translateY(-4px); border-color: rgba(var(--c1-rgb), .5); box-shadow: 0 20px 40px rgba(var(--c1-rgb), .2); }
.ainext-dir .ainext-svc-card__title { margin: 6px 0 0; font-size: 1.08rem; font-weight: 800; line-height: 1.3; }
.ainext-svc-card__title a { color: var(--ad-text); }
.ainext-svc-card__title a:hover { color: var(--ad-accent); }
.ainext-svc-card__desc { flex: 1; margin: 0; color: var(--ad-muted); font-size: .92rem; }
.ainext-svc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ad-border); }
.ainext-svc-langs { padding: 3px 10px; border-radius: 999px; background: rgba(var(--c1-rgb), .12); color: var(--ad-text); font-size: .74rem; font-weight: 700; }
.ainext-svc-card__more { color: var(--ad-accent); font-weight: 800; font-size: .88rem; white-space: nowrap; }

/* ===== Ecosystem band (dark) ===== */
.ainext-eco-band { position: relative; overflow: hidden; padding: 64px 0; color: #fff; background: radial-gradient(50% 120% at 90% 0%, rgba(168, 85, 247, .35), transparent 60%), linear-gradient(135deg, #0f0b3a 0%, #1e1670 55%, #35269f 100%); }
.ainext-eco-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px); background-size: 28px 28px; }
.ainext-eco-band .ainext-container { position: relative; }
.ainext-dir .ainext-eco-band .ainext-section__title { color: #fff; margin-bottom: 22px; }
.ainext-eco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ainext-eco__item { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; color: #fff; backdrop-filter: blur(4px); transition: transform .18s, background .18s; }
a.ainext-eco__item:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .13); }
.ainext-eco__item strong { font-size: 1.08rem; }
.ainext-eco__item span { color: rgba(255, 255, 255, .78); font-size: .92rem; }
.ainext-eco__item.is-current { background: linear-gradient(135deg, rgba(99, 102, 241, .6), rgba(168, 85, 247, .5)); border-color: rgba(255, 255, 255, .35); }

/* ===== CTA band ===== */
.ainext-services .ainext-cta { position: relative; overflow: hidden; padding: 52px 28px; text-align: center; border-radius: 26px; color: #fff; background: radial-gradient(60% 90% at 10% 0%, rgba(var(--c2-rgb), .6), transparent 60%), linear-gradient(135deg, #17104f 0%, #3a2aa8 60%, #6d3df0 100%); }
.ainext-services .ainext-cta::before, .ainext-services .ainext-cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.ainext-services .ainext-cta::before { width: 220px; height: 220px; right: -60px; top: -80px; }
.ainext-services .ainext-cta::after { width: 160px; height: 160px; left: -50px; bottom: -70px; }
.ainext-dir .ainext-cta h2 { position: relative; margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.1rem); color: #fff; }
.ainext-cta p { position: relative; max-width: 520px; margin: 0 auto 24px; color: rgba(255, 255, 255, .82); }
.ainext-cta .ainext-btn { position: relative; }
.ainext-services .ainext-cta-wrap { padding: 44px 0 72px; }

/* ===== Single service ===== */
.ainext-services .ainext-tool-body { padding-top: 8px; }
.ainext-services .ainext-panel { border-radius: 20px; }
.ainext-services .ainext-sprompt { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ainext-services .ainext-block h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 1.22rem; font-weight: 800; color: var(--ad-text); }
.ainext-services .ainext-block h2::before { content: ""; flex: none; width: 8px; height: 22px; border-radius: 4px; background: linear-gradient(var(--c1), var(--c2)); }
.ainext-services .ainext-facts-card { position: sticky; overflow: hidden; padding-top: 30px; }
.ainext-services .ainext-facts-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.ainext-services .ainext-facts-card .ainext-btn--primary { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 10px 22px rgba(var(--c1-rgb), .3); }
.ainext-services .ainext-aside-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ad-border); }
.ainext-dir.ainext-services .ainext-aside-block h3 { margin: 0 0 10px; font-size: .85rem; font-weight: 700; color: var(--ad-muted); text-transform: uppercase; letter-spacing: .06em; }
.ainext-svc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ainext-svc-list li { position: relative; margin: 0; padding-left: 30px; line-height: 1.65; }
.ainext-svc-list li::before { content: "•"; position: absolute; left: 8px; color: var(--c1); font-weight: 900; }
.ainext-svc-list--check li::before { content: "✓"; left: 0; top: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-size: .72rem; line-height: 1; }
.ainext-svc-pills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.ainext-svc-pills li { margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(var(--c1-rgb), .1); border: 1px solid rgba(var(--c1-rgb), .3); color: var(--ad-text); font-size: .9rem; font-weight: 600; }
.ainext-steps--rich { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.ainext-steps--rich li { position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0 0 22px 52px; counter-increment: step; line-height: 1.6; }
.ainext-steps--rich li:last-child { padding-bottom: 0; }
.ainext-steps--rich li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-size: .9rem; font-weight: 800; box-shadow: 0 8px 16px rgba(var(--c1-rgb), .3); }
.ainext-steps--rich li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: linear-gradient(rgba(var(--c1-rgb), .5), rgba(var(--c2-rgb), .1)); }
.ainext-steps--rich li:last-child::after { display: none; }
.ainext-steps--rich strong { font-size: 1.02rem; }
.ainext-steps--rich span { color: var(--ad-muted); }
.ainext-faq { display: grid; gap: 10px; }
.ainext-faq__item { border: 1px solid var(--ad-border); border-radius: 14px; background: var(--ad-surface); transition: border-color .15s, box-shadow .15s; }
.ainext-faq__item[open] { border-color: rgba(var(--c1-rgb), .5); box-shadow: 0 8px 22px rgba(var(--c1-rgb), .12); }
.ainext-faq__item summary { padding: 15px 18px; cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ainext-faq__item summary::-webkit-details-marker { display: none; }
.ainext-faq__item summary::after { content: "+"; flex: none; color: var(--c1); font-size: 1.5rem; line-height: 1; }
.ainext-faq__item[open] summary::after { content: "–"; }
.ainext-faq__answer { padding: 0 18px 16px; color: var(--ad-muted); line-height: 1.7; }
.ainext-faq__answer p { margin: 0 0 8px; }
.ainext-svc-articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ainext-svc-article { display: flex; flex-direction: column; gap: 6px; color: var(--ad-text); }
.ainext-svc-article img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.ainext-svc-article span { font-weight: 700; line-height: 1.35; }
.ainext-svc-article:hover span { color: var(--ad-accent); }
.ainext-svc-article time { color: var(--ad-muted); font-size: .8rem; }
.ainext-svc-pricing { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--c1-rgb), .1); font-weight: 600; }
.ainext-svc-aside-langs { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: .92rem; }
.ainext-svc-aside-langs span { color: var(--ad-muted); }
.ainext-svc-links { margin: 0; padding: 0; list-style: none; }
.ainext-svc-links li { margin: 0; }
.ainext-svc-links a { display: block; padding: 8px 0; color: var(--ad-text); font-size: .92rem; border-bottom: 1px solid var(--ad-border); }
.ainext-svc-links a:hover, .ainext-svc-links a.is-current { color: var(--ad-accent); font-weight: 700; }
.ainext-services .ainext-related { padding-top: 40px; }
.ainext-services .ainext-related .ainext-section__title::before { content: ""; display: inline-block; width: 9px; height: 26px; margin-right: 12px; border-radius: 5px; vertical-align: -5px; background: linear-gradient(var(--c1), var(--c2)); }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .ainext-svc-cats, .ainext-svc-grid, .ainext-svc-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ainext-eco { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ainext-svc-hero__grid { grid-template-columns: 1fr; }
  .ainext-svc-hero__art { display: none; }
  .ainext-dir.ainext-services .ainext-svc-hero { padding: 40px 0 96px; }
}
@media (max-width: 640px) {
  .ainext-svc-cats, .ainext-svc-grid, .ainext-svc-articles { grid-template-columns: 1fr; }
  .ainext-hero__actions .ainext-btn { width: 100%; }
  .ainext-dir .ainext-btn { min-height: 44px; }
  .ainext-svc-band { padding: 40px 0 44px; }
  .ainext-svc-hero::after { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .ainext-services *, .ainext-art { transition: none !important; animation: none !important; }
}
