
/* ==========================================================
   Common section heading: badge + title + highlight + lead
   Uses the :root theme variables (--hx-*)

   Base:        .hx-head            (centered)
   Alignment:   .hx-head--left  .hx-head--right
                .hx-head--left-lg   (left on desktop, centered on tablet/phone)
   Size:        .hx-head--sm  .hx-head--lg
   Background:  .hx-head--dark      (for dark sections)
   Spacing:     .hx-head--flush     (no bottom margin)
   ========================================================== */

.hx-head {
    --hx-head-gap: clamp(24px, 4vw, 24px);
    --hx-head-title: clamp(26px, 3.4vw, 36px);
    --hx-head-lead-width: 62ch;

    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--hx-head-gap);
    text-align: center;
}

/* ---------- Badge ---------- */
.hx-head__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hx-bg);
    border: 1px solid rgba(79, 63, 240, 0.18);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--hx-primary);
}

.hx-head__badge i { font-size: 12px; }

.hx-head__badge img {
    flex: none;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* ---------- Title ---------- */
.hx-head__title {
    margin: 0 0 14px;
    font-size: var(--hx-head-title);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--hx-text);
}
.hx-head__title.wrap-title-box{
    max-width: 500px;
}
.long-wrap-title-box{
    max-width: 700px;
}

.hx-head__highlight {
    background: var(--hx-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Lead ---------- */
.hx-head__lead {
    max-width: var(--hx-head-lead-width);
    margin: 0;
    font-size: 15px;
    color: var(--hx-muted);
}

@media (min-width: 1441px) {
    .hx-head__lead { font-size: 17px; }
}
/* ---------- Alignment ---------- */
.hx-head--left {
    align-items: flex-start;
    text-align: left;
}

.hx-head--right {
    align-items: flex-end;
    text-align: right;
}

/* left on desktop, centered on tablet and phone */
.hx-head--left-lg {
    align-items: flex-start;
    text-align: left;
}

@media (max-width: 991px) {
    .hx-head--left-lg {
        align-items: center;
        text-align: center;
    }
}

/* RTL pages (Arabic): left/right flip automatically */
[dir="rtl"] .hx-head--left,
[dir="rtl"] .hx-head--left-lg { align-items: flex-start; text-align: right; }
[dir="rtl"] .hx-head--right { align-items: flex-end; text-align: left; }

@media (max-width: 991px) {
    [dir="rtl"] .hx-head--left-lg { align-items: center; text-align: center; }
}

/* ---------- Sizes ---------- */
.hx-head--sm {
    --hx-head-gap: 24px;
    --hx-head-title: clamp(22px, 2.6vw, 28px);
}

.hx-head--sm .hx-head__badge { margin-bottom: 12px; }
.hx-head--sm .hx-head__lead { font-size: 14px; }

.hx-head--lg {
    --hx-head-title: clamp(32px, 4.6vw, 52px);
}

.hx-head--lg .hx-head__lead { font-size: clamp(15px, 1.4vw, 18px); }

/* ---------- Dark background ---------- */
.hx-head--dark .hx-head__badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--hx-accent);
}

.hx-head--dark .hx-head__title { color: var(--hx-white); }
.hx-head--dark .hx-head__lead { color: rgba(255, 255, 255, 0.7); }

/* ---------- Spacing ---------- */
.hx-head--flush { margin-bottom: 0; }




/* heading css common end */






/* Case study (new layout). Uses the :root theme variables (--hx-*) */

.hx-cs {
    padding: clamp(48px, 6vw, 80px) 0;
    background: var(--hx-white);
    color: var(--hx-text);
}

/* ---------- Photo ---------- */
.hx-cs__media {
    position: relative;
    height: 100%;
    min-height: 340px;
}

/* dot pattern peeking out at the top-left */
.hx-cs__media::before {
    content: "";
    position: absolute;
    top: -22px;
    left: -26px;
    width: 110px;
    height: 110px;
    background-image: radial-gradient(rgba(79, 63, 240, 0.25) 2px, transparent 2px);
    background-size: 14px 14px;
    pointer-events: none;
}

.hx-cs__photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 20px 40px -24px rgba(15, 15, 26, 0.45);
}

.hx-cs__badge-stat {
    position: absolute;
    right: 20px;
    top: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(160deg, #4f3ff0 0%, #2a1f8f 100%);
    color: var(--hx-white);
    text-align: center;
    box-shadow: 0 14px 30px -12px rgba(42, 31, 143, 0.75);
}

.hx-cs__badge-stat img { width: 32px; height: auto; margin-bottom: 4px; }
.hx-cs__badge-stat strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.hx-cs__badge-stat span { font-size: 11px; opacity: 0.85; }

/* ---------- Heading ---------- */
.hx-cs__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hx-bg);
    border: 1px solid rgba(79, 63, 240, 0.18);
    font-size: 13px;
    font-weight: 600;
    color: var(--hx-primary);
}

.hx-cs__eyebrow i { font-size: 12px; }

.hx-cs__title {
    margin: 0 0 22px;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 700px;
    color: var(--hx-text);
}

.hx-cs__highlight {
    background: var(--hx-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Before / After cards ---------- */
.hx-cs-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--hx-white);
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hx-cs-card:hover {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: var(--hx-card-shadow);
}

.hx-cs-card__tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hx-cs-card--before .hx-cs-card__tag {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.hx-cs-card--after .hx-cs-card__tag {
    background: linear-gradient(135deg, #1700ff 0%, #8b3dff 100%);
    color: var(--hx-white);
}

.hx-cs-card__title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--hx-text);
}

.hx-cs-card__text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--hx-muted);
}

.hx-cs-card--after .hx-cs-card__text { color: var(--hx-text); }

.hx-cs-card__points {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
}

.hx-cs-card__points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hx-white);
    font-size: 13px;
    font-weight: 600;
    color: var(--hx-text);
    transition: transform 0.3s ease;
}

.hx-cs-card__points li:hover { transform: translateX(4px); }

.hx-cs-card--before .hx-cs-card__points li { border: 1px solid var(--hx-border); }
.hx-cs-card--before .hx-cs-card__points i { color: #ef4444; }

.hx-cs-card--after .hx-cs-card__points li { border: 1.5px solid var(--hx-accent); }
.hx-cs-card--after .hx-cs-card__points i { color: var(--hx-green); }

/* ---------- Results ---------- */
.hx-cs__results { margin-top: clamp(56px, 7vw, 88px); }

.hx-cs__results-title {
    margin: 0 0 12px;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--hx-text);
}

.hx-cs__results-lead {
    max-width: 62ch;
    margin: 0 auto clamp(28px, 4vw, 44px);
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
    color: var(--hx-muted);
}

.hx-cs-stat {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4px 24px;
}

/* thin dividers between stats */
@media (min-width: 992px) {
    .hx-cs__stats > [class*="col-"]:not(:first-child) .hx-cs-stat {
        border-left: 1px solid var(--hx-border);
    }
    .hx-cs__stats > [class*="col-"]:first-child .hx-cs-stat { padding-left: 0; }
}

.hx-cs-stat__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: var(--hx-radius-sm);
    background: rgba(79, 63, 240, 0.12);
    color: var(--hx-primary);
    font-size: 17px;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.hx-cs-stat__icon::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--hx-gradient);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.hx-cs-stat__icon img { width: 20px; height: 20px; object-fit: contain; }

.hx-cs-stat:hover .hx-cs-stat__icon {
    /* color: var(--hx-white); */
    box-shadow: 0 8px 18px -6px rgba(79, 63, 240, 0.55);
}

.hx-cs-stat:hover .hx-cs-stat__icon::before { opacity: 0; }
/* .hx-cs-stat:hover .hx-cs-stat__icon img { filter: brightness(0) invert(1); } */

.hx-cs-stat__value {
    margin-bottom: 4px;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--hx-text);
}

.hx-cs-stat__label {
    font-size: 13px;
    line-height: 1.5;
    color: var(--hx-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hx-cs__media,
    .hx-cs__photo { min-height: 300px; max-height: 380px; }
    .hx-cs__media::before { display: none; }
    .hx-cs__stats { row-gap: 28px; }
    .hx-cs-stat { padding: 0 12px; }
}

@media (max-width: 575px) {
    .hx-cs-card { padding: 18px; }
    .hx-cs__badge-stat { top: auto; bottom: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .hx-cs-card, .hx-cs-card__points li,
    .hx-cs-stat__icon, .hx-cs-stat__icon::before { transition: none; }
}


