/* Content sections. px units (the theme sets html font-size to 62.5%).
   Dark by default like the site; light when the visitor picks "Light" (body.active-dark-mode in this theme). */
.cs-content {
    --cs-heading: #ffffff;
    --cs-text: #c4c4cc;
    --cs-line: rgba(255, 255, 255, .12);
    --cs-card: #1f1c2a;
    --cs-surface: #17151f;
    --cs-accent: #9b7bff;
    color: var(--cs-text);
}
body.active-dark-mode .cs-content {
    --cs-heading: #0f1222;
    --cs-text: #55595c;
    --cs-line: #e5e7eb;
    --cs-card: #f8f8ff;
    --cs-surface: #ffffff;
    --cs-accent: #805af5;
}

.cs { display: grid; gap: 40px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--cs-line); }
.cs:last-child { border-bottom: 0; }

.cs h2 { color: var(--cs-heading); font-size: clamp(24px, 3vw, 36px); line-height: 1.25; font-weight: 600; margin: 0 0 16px; }
.cs h3 { color: var(--cs-heading); font-size: clamp(19px, 2vw, 22px); line-height: 1.35; font-weight: 600; margin: 24px 0 10px; }
.cs h4 { color: var(--cs-heading); font-size: 18px; font-weight: 600; margin: 20px 0 8px; }
.cs h5 { color: var(--cs-heading); font-size: 17px; font-weight: 600; margin: 18px 0 8px; }
.cs h6 { color: var(--cs-heading); font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 16px 0 8px; }
.cs .cs-title { margin-top: 0; }
.cs p  { color: var(--cs-text); font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.cs ul, .cs ol { color: var(--cs-text); font-size: 16px; padding-left: 22px; margin: 0 0 16px; line-height: 1.75; }
.cs ul { list-style: disc; } .cs ol { list-style: decimal; }
.cs li { margin-bottom: 6px; color: var(--cs-text); }
.cs strong { color: var(--cs-heading); }
.cs a  { color: var(--cs-accent); text-decoration: underline; }
.cs blockquote { border-left: 4px solid var(--cs-accent); margin: 16px 0; padding: 8px 16px; background: var(--cs-card); border-radius: 0 8px 8px 0; }

/* ---------- Tables (header row + zebra rows; phones: each row becomes a card) ---------- */
.cs-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0 24px; border: 1px solid var(--cs-line); border-radius: 12px; }
.cs table { width: 100%; min-width: 480px; border-collapse: separate; border-spacing: 0; margin: 0; font-size: 15px; line-height: 1.55; background: var(--cs-surface); }
.cs-table > table { min-width: 0; }
.cs th, .cs td { position: static; height: auto; border: 0; border-bottom: 1px solid var(--cs-line); border-right: 1px solid var(--cs-line); padding: 12px 16px; text-align: left; vertical-align: top; color: var(--cs-text); }
.cs th:last-child, .cs td:last-child { border-right: 0; }
.cs tbody tr:last-child td { border-bottom: 0; }
.cs thead th, .cs th { background: var(--cs-accent); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; }
.cs thead th:first-child { border-top-left-radius: 11px; }
.cs thead th:last-child { border-top-right-radius: 11px; }
.cs tbody tr:nth-child(even) td { background: var(--cs-card); }
.cs tbody tr:hover td { background: rgba(128, 90, 245, .10); }
.cs td strong { color: var(--cs-heading); }
@media (max-width: 575.98px) {
    .cs-table { border: 0; overflow: visible; }
    .cs table.cs-table--stack, .cs table.cs-table--stack tbody, .cs table.cs-table--stack tr, .cs table.cs-table--stack td { display: block; width: 100%; min-width: 0; }
    .cs table.cs-table--stack { background: transparent; }
    .cs table.cs-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cs table.cs-table--stack tr { margin: 0 0 12px; border: 1px solid var(--cs-line); border-radius: 12px; overflow: hidden; background: var(--cs-surface); }
    .cs table.cs-table--stack td { border-right: 0; padding: 10px 14px; background: transparent !important; }
    .cs table.cs-table--stack td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--cs-accent); margin-bottom: 2px; }
    .cs table.cs-table--stack td:first-child { background: var(--cs-card) !important; color: var(--cs-heading); font-weight: 600; }
    .cs table.cs-table--stack tr:last-child td { border-bottom: 1px solid var(--cs-line); }
    .cs table.cs-table--stack tr td:last-child { border-bottom: 0; }
}

.cs-body { min-width: 0; overflow-x: auto; }

/* Image */
.cs-media { margin: 0; }
.cs-media img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(17, 24, 39, .08); }

/* Positions — HTML order is always text → image; CSS moves the image */
@media (min-width: 992px) {
    .cs--img-left, .cs--img-right { grid-template-columns: 1fr 1fr; gap: 56px; }
    .cs--img-left .cs-media { order: -1; }
}
.cs--img-top .cs-media { order: -1; }
.cs--img-top .cs-media img, .cs--img-bottom .cs-media img { max-height: 520px; object-fit: cover; }
@media (max-width: 991.98px) {
    .cs { gap: 24px; padding: 36px 0; }
    .cs--img-left .cs-media, .cs--img-right .cs-media { order: -1; }
}

/* Feature list */
.cs-features { list-style: none !important; padding: 0 !important; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 8px 0 16px; text-align: left; }
.cs-features li { border: 1px solid var(--cs-line); border-radius: 14px; padding: 20px; background: var(--cs-surface); margin: 0; box-shadow: 0 4px 16px rgba(17, 24, 39, .04); }
.cs-features h3 { margin: 0 0 6px; font-size: 18px; }
.cs-features p { margin: 0; font-size: 15px; }

/* FAQ */
.cs-faq details { border: 1px solid var(--cs-line); border-radius: 12px; padding: 4px 18px; margin-bottom: 12px; background: var(--cs-surface); }
.cs-faq details[open] { background: var(--cs-card); }
.cs-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cs-faq summary::-webkit-details-marker { display: none; }
.cs-faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--cs-accent); flex-shrink: 0; }
.cs-faq details[open] summary::after { content: "−"; }
.cs-faq summary h3 { margin: 14px 0; font-size: 17px; }
.cs-faq details p { margin: 0 0 14px; font-size: 15px; }

/* Video */
.cs-video { position: relative; width: 100%; max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0f1222; box-shadow: 0 14px 40px rgba(17, 24, 39, .14); }
.cs-video iframe, .cs-video video, .cs-video__play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-video video { object-fit: cover; background: #000; }
.cs-video__play { padding: 0; cursor: pointer; background: #0f1222; display: block; }
.cs-video__play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s, filter .3s; }
.cs-video__play:hover img { transform: scale(1.03); filter: brightness(.85); }
.cs-video__icon { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 14px; background: #ff0033; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .2s; }
.cs-video__icon::after { content: ""; position: absolute; left: 31px; top: 16px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.cs-video__play:hover .cs-video__icon, .cs-video__play:focus-visible .cs-video__icon { transform: scale(1.08); }
.cs-video__play:focus-visible { outline: 3px solid #805af5; outline-offset: 3px; }
@media (max-width: 575.98px) { .cs-video { border-radius: 10px; } .cs-video__icon { transform: scale(.8); } }

/* ---------- Logo / Image gallery ---------- */
.cs-gallery { list-style: none !important; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; align-items: stretch; }
.cs-gallery__item { margin: 0 !important; display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 16px; border: 1px solid var(--cs-line); border-radius: 14px; background: var(--cs-card); transition: transform .2s, border-color .2s; }
.cs-gallery__item:hover { transform: translateY(-3px); border-color: var(--cs-accent); }
.cs-gallery__item img { display: block; max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 575.98px) {
    .cs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cs-gallery__item { min-height: 80px; padding: 12px; }
    .cs-gallery__item img { max-height: 48px; }
}

/* =====================================================================
   Layout & position (admin → ⚙ Layout) — works for every section type
   ===================================================================== */
.cs-head { grid-column: 1 / -1; order: -2; }
.cs-head .cs-title { margin-bottom: 0; }
.cs-body > :last-child { margin-bottom: 0; }

/* alignment (tables, cards and lists inside stay readable) */
.cs--align-center .cs-head, .cs--align-center .cs-body { text-align: center; }
.cs--align-right .cs-head, .cs--align-right .cs-body { text-align: right; }
.cs--align-center .cs-body > ul:not(.cs-grid), .cs--align-center .cs-body > ol:not(.cs-grid),
.cs--align-right .cs-body > ul:not(.cs-grid), .cs--align-right .cs-body > ol:not(.cs-grid) { display: inline-block; text-align: left; }
.cs--align-center .cs-table, .cs--align-right .cs-table, .cs--align-center .cs-faq, .cs--align-right .cs-faq { text-align: left; }
.cs--align-center .cs-buttons { justify-content: center; }
.cs--align-right .cs-buttons { justify-content: flex-end; }
.cs--align-center .cs-media img, .cs--align-center .cs-media .cs-video { margin-left: auto; margin-right: auto; }

/* width */
.cs--w-narrow { max-width: 880px; margin-left: auto; margin-right: auto; }
.cs--w-wide { width: min(1600px, calc(100vw - 32px)); margin-left: calc(50% - min(800px, calc(50vw - 16px))); }

/* background boxes */
.cs--bg-soft, .cs--bg-bordered, .cs--bg-accent { border-radius: 24px; padding-left: clamp(18px, 4vw, 56px); padding-right: clamp(18px, 4vw, 56px); margin-top: 24px; margin-bottom: 24px; border-bottom: 0; }
.cs--bg-soft { background: var(--cs-card); }
.cs--bg-bordered { border: 1px solid var(--cs-line); }
.cs--bg-accent {
    background: linear-gradient(135deg, #805af5 0%, #5b3fd1 100%);
    --cs-heading: #ffffff; --cs-text: rgba(255, 255, 255, .92); --cs-accent: #ffffff;
    --cs-line: rgba(255, 255, 255, .28); --cs-card: rgba(255, 255, 255, .10); --cs-surface: rgba(255, 255, 255, .07);
}
.cs--bg-accent th, .cs--bg-accent thead th { background: rgba(255, 255, 255, .18) !important; }
.cs--bg-accent .cs-step__num { background: #fff; color: #5b3fd1; }

/* spacing */
.cs--space-compact { padding-top: 24px; padding-bottom: 24px; }
.cs--space-large { padding-top: 88px; padding-bottom: 88px; }

/* image / video size */
@media (min-width: 992px) {
    .cs--img-right.cs--imgsize-small { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .cs--img-right.cs--imgsize-large { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
    .cs--img-left.cs--imgsize-small  { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
    .cs--img-left.cs--imgsize-large  { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.cs--img-top .cs-media, .cs--img-bottom .cs-media { width: 100%; }
.cs--img-top.cs--imgsize-small .cs-media img, .cs--img-bottom.cs--imgsize-small .cs-media img,
.cs--imgsize-small .cs-video { max-width: 480px; }
.cs--img-top.cs--imgsize-medium .cs-media img, .cs--img-bottom.cs--imgsize-medium .cs-media img { max-width: 820px; }
.cs--imgsize-large .cs-video { max-width: none; }
.cs--media-video, .cs-media--video { min-width: 0; }

/* buttons */
.cs-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cs .cs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: 10px; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; border: 2px solid var(--cs-accent); transition: transform .15s, background .15s, color .15s; }
.cs .cs-btn:hover { transform: translateY(-2px); text-decoration: none; }
.cs .cs-btn--primary { background: var(--cs-accent); color: #fff; }
.cs .cs-btn--ghost { background: transparent; color: var(--cs-heading); }
.cs--bg-accent .cs-btn--primary { background: #fff; color: #5b3fd1; border-color: #fff; }
.cs--bg-accent .cs-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .75); }

/* columns for every grid (features, stats, steps, testimonials, gallery) */
.cs-grid { display: grid; gap: 16px; }
.cs--cols-1 .cs-grid { grid-template-columns: minmax(0, 1fr); }
.cs--cols-2 .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs--cols-3 .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs--cols-4 .cs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991.98px) {
    .cs--cols-3 .cs-grid, .cs--cols-4 .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .cs--cols-2 .cs-grid, .cs--cols-3 .cs-grid, .cs--cols-4 .cs-grid, .cs-grid { grid-template-columns: minmax(0, 1fr); }
    .cs-gallery.cs-grid, .cs-stats.cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs--cols-1 .cs-gallery.cs-grid, .cs--cols-1 .cs-stats.cs-grid { grid-template-columns: minmax(0, 1fr); }
    .cs--bg-soft, .cs--bg-bordered, .cs--bg-accent { border-radius: 16px; margin-left: 0; margin-right: 0; }
}

/* ---------- Numbers / Stats ---------- */
.cs-stats { list-style: none !important; padding: 0 !important; margin: 8px 0 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cs-stat { margin: 0 !important; padding: 22px 16px; border-radius: 16px; background: var(--cs-surface); border: 1px solid var(--cs-line); display: flex; flex-direction: column; gap: 4px; }
.cs-stat__num { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.1; font-weight: 700; color: var(--cs-accent); }
.cs-stat__label { font-size: 15px; color: var(--cs-heading); font-weight: 600; }
.cs-stat__note { font-size: 13px; color: var(--cs-text); }

/* ---------- Steps / Process ---------- */
.cs-steps { list-style: none !important; padding: 0 !important; margin: 8px 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); text-align: left; }
.cs-step { margin: 0 !important; display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--cs-surface); border: 1px solid var(--cs-line); }
.cs-step__num { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--cs-accent); color: #fff; font-weight: 700; font-size: 17px; }
.cs-step h2, .cs-step h3, .cs-step h4, .cs-step h5, .cs-step h6 { margin: 6px 0 6px; font-size: 18px; }
.cs-step p { margin: 0; font-size: 15px; }

/* ---------- Testimonials ---------- */
.cs-testimonials { margin: 8px 0 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cs-quote { margin: 0; padding: 24px; border-radius: 16px; background: var(--cs-surface); border: 1px solid var(--cs-line); text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.cs-quote blockquote { margin: 0; padding: 0; border: 0; background: none; position: relative; }
.cs-quote blockquote::before { content: "\201C"; display: block; font-size: 52px; line-height: .8; color: var(--cs-accent); font-family: Georgia, serif; }
.cs-quote blockquote p { font-size: 16px; font-style: italic; margin: 0; }
.cs-quote figcaption strong { display: block; color: var(--cs-heading); font-size: 16px; }
.cs-quote figcaption span { display: block; font-size: 14px; color: var(--cs-text); }

/* ---------- Gallery styles ---------- */
.cs--gallery-photos.cs--cols-auto .cs-gallery { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cs--gallery-photos .cs-gallery__item { padding: 0; min-height: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.cs--gallery-photos .cs-gallery__item img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.cs--gallery-logos .cs-gallery { margin-top: 8px; }
