/* Single case study (single-custom-success-story.php). Values follow the
   original Elementor case studies: hero 123px padding, 50/66 bold white title;
   section headings 42/58 semibold; text 18/30 at 80% ink; icon cards, stat
   tiles (#EDEEFF, 54px blue numbers), feature lists, quote card (#FFF0E2).
   Card colours / alignment come from the content (inline --cs-bg). */

/* ---------- Hero ---------- */
.cs-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: 123px; background: var(--gd-ink); color: #fff; }
.cs-hero__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.cs-hero__inner { display: flex; flex-direction: column; align-items: flex-start; }
.cs-hero__title { max-width: 760px; margin: 0; color: #fff; font: 600 46px/60px var(--gd-font); }
.cs-hero__btn { margin-top: 30px; text-transform: uppercase; }
.cs-hero__btn svg { flex: none; }

/* ---------- Layout ---------- */
.cs-body { padding-block: 40px 20px; }
.cs-body--sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.cs-aside { position: sticky; top: 100px; display: grid; gap: 30px; }
.cs-box { padding: 20px; border: 1px solid #adb2ff; border-radius: 15px; background: #edeeff; }
.cs-box__text { margin: 0 0 16px; color: var(--gd-muted); font: 500 16px/26px var(--gd-font); }
.cs-box .gd-btn { min-height: 44px; }

/* ---------- Content blocks ---------- */
.cs-sec { padding-block: 25px; }
.cs-main > .cs-sec:first-child { padding-top: 10px; }
.cs-h { margin: 0 0 20px; color: var(--gd-ink); font: 600 32px/42px var(--gd-font); }
.cs-h--h3 { font-size: 25px; line-height: 35px; }
.cs-h--h4,
.cs-h--h5,
.cs-h--h6 { font-size: 20px; line-height: 32px; font-weight: 700; }
.cs-sub { margin: -6px 0 24px; color: var(--gd-text-80); font: 500 18px/30px var(--gd-font); }
.cs-text { margin: 0 0 20px; color: var(--gd-text-80); font: 500 18px/30px var(--gd-font); }
.cs-text p { margin: 0 0 15px; }
.cs-text > :last-child { margin-bottom: 0; }
.cs-text a,
.cs-list a { color: var(--gd-blue); }
.cs-text strong,
.cs-list strong { color: var(--gd-ink); }
.cs-text ul,
.cs-text ol { margin: 0 0 15px; padding-left: 1.3em; text-align: left; }

/* Grid of columns / cards */
.cs-grid { display: grid; grid-template-columns: var(--cs-cols, repeat(2, minmax(0, 1fr))); gap: 20px; align-items: start; margin: 0 0 20px; }
.cs-grid--cards { align-items: stretch; }
.cs-cell { min-width: 0; }
.cs-grid--cards > .cs-cell > * { height: 100%; }
.cs-cell > :last-child { margin-bottom: 0; }

/* Icon card (tech stack, challenges, outcomes) */
.cs-icard { display: flex; flex-direction: column; gap: 12px; padding: 25px; border-radius: 8px; background: var(--cs-bg, transparent); }
.cs-icard:not(.cs-icard--filled) { padding-inline: 0; }
.cs-icard[style*="center"] { align-items: center; }
.cs-icard--title { justify-content: center; min-height: 110px; }
.cs-icard__icon { width: 44px; height: 44px; object-fit: contain; }
.cs-icard__title { margin: 0; color: var(--gd-ink); font: 700 20px/28px var(--gd-font); }
.cs-icard__text { color: var(--gd-text-80); font: 500 16px/26px var(--gd-font); }
.cs-icard__text p { margin: 0 0 8px; }
.cs-icard__text > :last-child { margin-bottom: 0; }

/* Stat tile */
.cs-stat { padding: 20px 25px 25px; border-radius: 8px; background: var(--cs-bg, #edeeff); }
.cs-stat__num { color: var(--gd-blue); font: 900 54px/72px var(--gd-font); }
.cs-stat__num span { font-size: 22px; font-weight: 700; }
.cs-stat__title { margin: 6px 0 0; color: #101828; font: 700 22px/30px var(--gd-font); }
.cs-stat__text { margin: 10px 0 0; color: var(--gd-text-80); font: 500 18px/28px var(--gd-font); }

/* Feature (icon + title + text) */
.cs-feature { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.cs-feature--side { flex-direction: row; align-items: flex-start; gap: 14px; }
.cs-feature__icon { flex: none; width: 30px; height: 30px; object-fit: contain; }
.cs-feature--side .cs-feature__icon { margin-top: 2px; }
.cs-feature__title { margin: 0 0 6px; color: var(--gd-ink); font: 700 22px/30px var(--gd-font); }
.cs-feature__text { margin: 0; color: var(--gd-text-80); font: 500 18px/28px var(--gd-font); }

/* Checklist */
.cs-list { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.cs-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--gd-ink); font: 500 18px/30px var(--gd-font); }
.cs-list__icon { flex: none; width: 25px; height: 25px; margin-top: 3px; object-fit: contain; } /* 25px as live. */
.cs-list__dot { flex: none; width: 8px; height: 8px; margin: 11px 5px 0; border-radius: 50%; background: var(--gd-blue); }
/* List items without an icon get a dot (no empty markup needed in the editor). */
.cs-list li:not(:has(> img))::before { content: ""; flex: none; width: 8px; height: 8px; margin: 11px 5px 0; border-radius: 50%; background: var(--gd-blue); }

/* Quote card */
.cs-quote { position: relative; margin: 10px 0 20px; padding: 25px 25px 25px 95px; border: 1px solid rgba(16, 23, 32, .1); border-radius: 16px; background: var(--cs-bg, #fff0e2); text-align: center; }
.cs-quote::before { content: "\201C"; position: absolute; top: 40px; left: 22px; color: var(--gd-orange); font: 700 110px/1 Georgia, serif; opacity: .55; }
.cs-quote__title { margin: 0 0 10px; color: var(--gd-ink); font: 600 42px/58px var(--gd-font); }
.cs-quote__text { color: var(--gd-text-80); font: 500 18px/30px var(--gd-font); }
.cs-quote__text strong { color: var(--gd-ink); }

/* Media */
.cs-figure { margin: 0 0 20px; text-align: center; }
.cs-figure__img { display: inline-block; max-width: 100%; height: auto; border-radius: 8px; }
.cs-gallery { display: flex; gap: 16px; margin: 0 0 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.cs-gallery__slide { flex: 0 0 100%; scroll-snap-align: center; }
.cs-gallery__img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* Image slider (gd_cs_slider(); carousel.js + full-size viewer in js/pages/single-custom-success-story.js) */
.cs-slider { position: relative; margin: 0 0 20px; }
.cs-slider__track { gap: 16px; align-items: center; }
.cs-slider__slide { margin: 0; scroll-snap-align: center; }
.cs-slider__zoom { position: relative; display: block; overflow: hidden; border: 1px solid #e3e5f3; border-radius: 8px; background: #f7f8fc; cursor: zoom-in; }
.cs-slider__img { display: block; width: 100%; height: auto; }
.cs-slider__zoom::after { content: ""; position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 18px no-repeat; opacity: 0; transition: opacity .2s; }
.cs-slider__zoom:hover::after, .cs-slider__zoom:focus-visible::after { opacity: 1; }
.cs-slider__caption { margin: 10px 0 0; color: var(--gd-text-80); font: 500 16px/24px var(--gd-font); text-align: center; }
.cs-slider__btn { position: absolute; top: calc(50% - 37px); z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #000; box-shadow: 0 4px 14px rgba(16,24,64,.18); cursor: pointer; transition: background-color .2s, color .2s; }
.cs-slider__btn:hover, .cs-slider__btn:focus-visible { background: var(--gd-blue); color: #fff; }
.cs-slider__btn--prev { left: 12px; }
.cs-slider__btn--next { right: 12px; }
.cs-slider__btn .is-prev { transform: rotate(90deg); }
.cs-slider__btn .is-next { transform: rotate(-90deg); }
@media (max-width: 639px) {
	.cs-slider__btn { width: 36px; height: 36px; }
	.cs-slider__btn--prev { left: 6px; }
	.cs-slider__btn--next { right: 6px; }
}

/* Full-size viewer */
.cs-zoom { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.cs-zoom::backdrop { background: rgba(8,10,25,.9); }
.cs-zoom__stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; padding: 56px 64px 24px; box-sizing: border-box; }
.cs-zoom__img { display: block; max-width: 100%; max-height: calc(100% - 40px); width: auto; height: auto; border-radius: 6px; background: #fff; object-fit: contain; }
.cs-zoom__caption { margin: 0; color: #fff; font: 500 16px/24px var(--gd-font); text-align: center; }
.cs-zoom__btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.cs-zoom__btn:hover, .cs-zoom__btn:focus-visible { background: rgba(255,255,255,.3); }
.cs-zoom__btn svg { width: 22px; height: 22px; }
.cs-zoom__close { top: 10px; right: 10px; }
.cs-zoom__prev { top: calc(50% - 22px); left: 10px; }
.cs-zoom__next { top: calc(50% - 22px); right: 10px; }
.cs-zoom__btn[hidden] { display: none; }
@media (max-width: 639px) {
	.cs-zoom__stage { padding: 56px 8px 16px; }
	.cs-zoom__prev, .cs-zoom__next { top: auto; bottom: 10px; }
}
.cs-video { margin: 0 0 20px; }
.cs-video video { display: block; width: 100%; height: auto; border-radius: 8px; background: #000; }
.cs-html { margin: 0 0 20px; overflow-x: auto; }
.cs-hr { margin: 20px 0; border: 0; border-top: 1px solid #e3e5f3; }
.cs-btnrow { margin: 0 0 20px; }

/* Headings as written (no title-casing). */
.cs-h,
.cs-icard__title,
.cs-stat__title,
.cs-feature__title,
.cs-quote__title,
.cs-hero__title { text-transform: none; letter-spacing: .32px; }
/* "Case Studies" at the end: 32px on case-study pages (live). */
#cs-more-title { font-size: 32px; line-height: 42px; }

/* Match the original Elementor rendering:
   - icon cards without an explicit alignment were centred (ElementsKit default);
   - stat tiles were left-aligned (the Xamin counter ignored its centre setting),
     with more padding;
   - more space between sections. */
.cs-icard:not([style*="text-align"]) { align-items: center; text-align: center; }
.cs-stat { min-height: 118px; padding: 26px 20px; text-align: left !important; }
.cs-stat__num { line-height: 60px; }
.cs-stat__title { margin-top: 10px; font-size: 18px; line-height: 26px; }
.cs-sec { padding-block: 35px; }
.cs-h { margin-bottom: 26px; }
.cs-icard--title { min-height: 80px; }
/* Cards in one row are the same height (ElementsKit "equal height"). */
.cs-grid:has(> .cs-cell > .cs-icard:only-child),
.cs-grid:has(> .cs-cell > .cs-stat:only-child) { align-items: stretch; }
.cs-cell > .cs-icard:only-child,
.cs-cell > .cs-stat:only-child { height: 100%; }

/* Contact form at the end */
.cs-contact .section-heading__title { font-size: 42px; }

@media (max-width: 1024px) {
	.cs-hero { padding-block: 80px; }
	.cs-hero__title { font-size: 40px; line-height: 52px; }
	.cs-body--sidebar { grid-template-columns: minmax(0, 1fr); } /* minmax: wide tables must not widen the page. */
	.cs-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cs-h:not(.cs-h--h3, .cs-h--h4, .cs-h--h5, .cs-h--h6) { font-size: 30px; line-height: 40px; }
	.cs-quote__title { font-size: 34px; line-height: 46px; }
	.cs-grid--n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.cs-hero { padding-block: 50px; text-align: center; }
	.cs-hero__inner { align-items: center; }
	.cs-hero__title { font-size: 30px; line-height: 42px; }
	.cs-aside { grid-template-columns: 1fr; }
	.cs-h:not(.cs-h--h3, .cs-h--h4, .cs-h--h5, .cs-h--h6) { font-size: 26px; line-height: 36px; }
	.cs-quote__title { font-size: 28px; line-height: 38px; }
	.cs-text,
	.cs-list li { font-size: 16px; line-height: 28px; }
	.cs-grid,
	.cs-grid--n4 { grid-template-columns: 1fr; }
	.cs-stat__num { font-size: 42px; line-height: 56px; }
	.cs-quote { padding: 70px 20px 20px; }
	.cs-quote::before { top: 14px; left: 50%; transform: translateX(-50%); font-size: 80px; }
	.cs-contact .section-heading__title { font-size: 28px; }
}
.cs-h:not(.cs-h--h3, .cs-h--h4, .cs-h--h5, .cs-h--h6), .cs-hero__title { text-transform: capitalize; } /* As live. */
.cases__title { font-weight: 600; } /* Case Studies slider on case-study pages: semi-bold, as live. */

/* Phone, as live: hero 36/46, section titles 24/34, text 18/30, lists 20/30,
   quote title 22/32, table cells centred. */
@media (max-width: 767px) {
	.cs-hero__title { font-size: 36px; line-height: 46px; }
	.cs-h:not(.cs-h--h3, .cs-h--h4, .cs-h--h5, .cs-h--h6) { font-size: 24px; line-height: 34px; }
	.cs-text { font-size: 18px; line-height: 30px; }
	.cs-list li { font-size: 20px; line-height: 30px; }
	.cs-quote__title { font-size: 22px; line-height: 32px; }
	.cs-html th, .cs-html td { text-align: center; }
}
/* As live: list items 20px (text after a bold lead-in is regular), table
   header 18 semibold, cells 500, quote author in 80% ink. */
.cs-list li { font-size: 20px; }
.cs-list li span:has(> b, > strong) { font-weight: 400; }
.cs-html th { font-size: 18px; font-weight: 600; }
.cs-html td { font-weight: 500; }
.cs-quote__text strong { color: var(--gd-text-80); }
@media (max-width: 767px) { .cs-list li { font-size: 18px; } }
.cs-html td:first-child { font-weight: 400; } /* Label column regular, as live. */