/*
 * Case study pages (Darjaah, DentaClinic, MUFAP).
 *
 * Layered on top of style.css: the hero, challenge row and closing CTA reuse
 * the site's own classes, and everything below is scoped under .cs-* so it
 * cannot leak into the 200 other pages that share style.css.
 */

:root {
    --cs-red: #FF2B3C;
    --cs-ink: #191919;
    --cs-muted: #444C53;
    --cs-line: #E6E8EB;
    --cs-soft: #F6F7F8;
    --cs-dark: #121315;
    --cs-dark-2: #1C1E21;
}

/* Images carry width/height attributes to reserve space (no layout shift);
   height:auto keeps the real aspect ratio once CSS sets the width. */
.cs-hero img,
.cs-figure img,
.cs-feature img,
.cs-gallery img,
.cs-card img { height: auto; max-width: 100%; }

.cs-grad {
    background: linear-gradient(to right, #FF2B3C 0, #121212 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Afacad";
}
.cs-grad-light {
    background: linear-gradient(to right, #ffffff 0, #FF2B3C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Afacad";
}

.cs-h2 {
    font-family: "Afacad";
    font-size: 40px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--cs-ink);
    margin: 0 0 16px;
}
.cs-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--cs-muted);
    max-width: 760px;
}
.cs-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cs-red);
    margin-bottom: 14px;
}

/* ---- Hero additions ------------------------------------------------------ */

.cs-hero .top-heading-sec h1 { max-width: 560px; }
.cs-hero .top-heading-sec p.cs-tagline {
    font-family: "Afacad";
    font-size: 24px;
    line-height: 1.3;
    color: var(--cs-ink);
    padding: 10px 40px 0 0;
    margin: 0;
}
.cs-hero .top-img-sec {
    padding: 12px;
    border: 1px solid var(--cs-line);
    background: linear-gradient(160deg, #ffffff 0%, #EEF1F4 100%);
    border-radius: 24px;
    box-shadow: 0 30px 70px -24px rgba(17, 24, 39, .35);
}
.cs-hero .top-img-sec img {
    display: block;
    width: 100%;
    border-radius: 14px;
}

/* ---- Project facts strip -------------------------------------------------- */

.cs-facts { padding: 0 0 60px; background: #fff; }
.cs-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--cs-line);
    border-radius: 14px;
    overflow: hidden;
}
.cs-fact {
    padding: 22px 24px;
    border-right: 1px solid var(--cs-line);
}
.cs-fact:last-child { border-right: 0; }
.cs-fact span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8A9199;
    margin-bottom: 6px;
}
.cs-fact p, .cs-fact a {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--cs-ink);
}
.cs-fact a { text-decoration: underline; text-underline-offset: 3px; }
.cs-fact a:hover { color: var(--cs-red); }

/* ---- Overview + demo video (dark band) ------------------------------------ */

.cs-overview {
    background: var(--cs-dark);
    background-image: radial-gradient(ellipse at 15% 0%, rgba(255, 43, 60, .16), transparent 55%);
    padding: 80px 0;
    color: #fff;
}
.cs-overview .cs-h2 { color: #fff; }
.cs-overview p {
    color: #C9CDD2;
    font-size: 16px;
    line-height: 1.75;
    font-weight: 300;
    margin: 0 0 16px;
}
.cs-video {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .08);
}
.cs-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cs-video-caption {
    margin-top: 14px;
    font-size: 13px;
    color: #8A9199 !important;
}

/* ---- Results at a glance -------------------------------------------------- */

.cs-stats { background: #fff; padding: 80px 0 40px; }
.cs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 34px;
}
.cs-stat {
    background: var(--cs-soft);
    border: 1px solid var(--cs-line);
    border-radius: 14px;
    padding: 26px 24px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cs-stat:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 43, 60, .35);
    box-shadow: 0 14px 30px rgba(17, 24, 39, .08);
}
.cs-stat strong {
    display: block;
    font-family: "Afacad";
    font-size: 44px;
    font-weight: 500;
    line-height: 1;
    color: var(--cs-red);
    margin-bottom: 12px;
}
.cs-stat p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--cs-muted);
}
.cs-note {
    margin-top: 22px;
    font-size: 13px;
    line-height: 1.6;
    color: #8A9199;
}

/* ---- Challenge row: tighten the inherited spacing ------------------------ */

.cs-challenge { padding: 60px 0 40px; }

/* ---- Full-width figure ---------------------------------------------------- */

.cs-figure { padding: 20px 0 70px; background: #fff; }
.cs-figure figure { margin: 0 auto; max-width: 1100px; }

.cs-figure figcaption,
.cs-feature figcaption,
.cs-gallery figcaption {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #6B737B;
}

/* ---- Solution: alternating feature rows ---------------------------------- */

.cs-solution { background: var(--cs-soft); padding: 80px 0 30px; }
.cs-solution-head { margin-bottom: 50px; }
.cs-feature {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
    padding: 0 0 70px;
}
.cs-feature.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.cs-feature.is-flipped .cs-feature-text { order: 2; }
.cs-feature.is-text-only { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.cs-feature-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--cs-line);
    color: var(--cs-red);
    font-family: "Afacad";
    font-size: 18px;
    margin-bottom: 16px;
}
.cs-feature h3 {
    font-family: "Afacad";
    font-size: 30px;
    font-weight: 400;
    color: var(--cs-ink);
    margin: 0 0 14px;
}
.cs-feature p { margin: 0 0 14px; }
.cs-feature p,
.cs-feature li {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--cs-muted);
}
.cs-feature ul { padding-left: 0; margin: 14px 0 0; }
.cs-feature li {
    list-style: none;
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
}
.cs-feature li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .7em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--cs-red);
}
.cs-feature li strong { color: var(--cs-ink); font-weight: 600; }
.cs-feature figure { margin: 0; }


/* Features without a screenshot sit side by side as cards. */
.cs-feature-duo { padding-bottom: 70px; row-gap: 24px; }
.cs-feature-duo .cs-feature-text {
    height: 100%;
    background: #fff;
    border: 1px solid var(--cs-line);
    border-radius: 14px;
    padding: 32px 30px;
}
.cs-feature-duo h3 {
    font-family: "Afacad";
    font-size: 26px;
    font-weight: 400;
    color: var(--cs-ink);
    margin: 0 0 12px;
}
.cs-feature-duo p {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--cs-muted);
    margin-bottom: 10px;
}

/* ---- Screen gallery ------------------------------------------------------- */

.cs-gallery { background: #fff; padding: 80px 0; }
.cs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 30px;
    margin-top: 40px;
}
.cs-gallery figure { margin: 0; }

/* Every screenshot sits in the same frame: a soft mat with a hairline edge.
   The frame is also the lightbox trigger. */
.cs-zoom {
    position: relative;
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cs-line);
    background: linear-gradient(160deg, #ffffff 0%, #EEF1F4 100%);
    border-radius: 22px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 50px -18px rgba(17, 24, 39, .22);
    cursor: zoom-in;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.cs-zoom img {
    display: block;
    width: 100%;
    border-radius: 12px !important;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .06) !important;
}
.cs-zoom::after {
    /* small "enlarge" hint in the corner */
    content: "\f065";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 22px;
    right: 22px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    background: rgba(17, 24, 39, .55);
    opacity: 0;
    transform: scale(.85);
    transition: opacity .25s ease, transform .25s ease;
}
.cs-zoom:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 43, 60, .3);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 60px -18px rgba(17, 24, 39, .3);
}
.cs-zoom:hover::after { opacity: 1; transform: scale(1); }
.cs-zoom:focus-visible { outline: 3px solid var(--cs-red); outline-offset: 4px; }

.cs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    background: rgba(10, 11, 13, .92);
}
.cs-lightbox.is-open { display: flex; }
.cs-lightbox img {
    max-width: min(1600px, 100%);
    max-height: calc(100vh - 140px);
    border-radius: 10px;
}
.cs-lightbox p {
    color: #C9CDD2;
    font-size: 14px;
    margin: 16px 0 0;
    text-align: center;
    max-width: 900px;
}
.cs-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
.cs-lightbox-close:hover { background: var(--cs-red); }

/* ---- Technology stack ----------------------------------------------------- */

.cs-stack { background: var(--cs-soft); padding: 80px 0; }
.cs-stack-table {
    margin-top: 34px;
    border: 1px solid var(--cs-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.cs-stack-row {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    border-bottom: 1px solid var(--cs-line);
}
.cs-stack-row:last-child { border-bottom: 0; }
.cs-stack-row dt,
.cs-stack-row dd {
    margin: 0;
    padding: 18px 24px;
    font-size: 15px;
    line-height: 1.6;
}
.cs-stack-row dt {
    font-weight: 600;
    color: var(--cs-ink);
    background: #FBFBFC;
    border-right: 1px solid var(--cs-line);
}
.cs-stack-row dd { color: var(--cs-muted); }

/* ---- Key takeaways (dark band) ------------------------------------------- */

.cs-takeaways {
    background: var(--cs-dark);
    background-image: radial-gradient(ellipse at 85% 100%, rgba(255, 43, 60, .18), transparent 55%);
    padding: 80px 0;
}
.cs-takeaways .cs-h2 { color: #fff; text-align: center; }
.cs-takeaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 40px;
}
.cs-takeaway {
    background: var(--cs-dark-2);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    padding: 26px 24px;
}
.cs-takeaway span {
    display: block;
    font-family: "Afacad";
    font-size: 15px;
    color: var(--cs-red);
    margin-bottom: 10px;
}
.cs-takeaway p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #C9CDD2;
    font-weight: 300;
}

/* ---- Listing page cards --------------------------------------------------- */

.cs-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--cs-line);
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
    color: inherit;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cs-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 43, 60, .35);
    box-shadow: 0 22px 50px rgba(17, 24, 39, .12);
    color: inherit;
}
.cs-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cs-soft); }
.cs-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.cs-card:hover .cs-card-img img { transform: scale(1.04); }
.cs-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 26px;
}
.cs-card-body .cs-eyebrow { font-size: 11px; margin-bottom: 10px; }
.cs-card-body h4 {
    font-family: "Afacad";
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--cs-ink);
    margin: 0 0 10px;
}
.cs-card-body p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--cs-muted);
    margin: 0 0 18px;
}
.cs-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.cs-card-tags span {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--cs-soft);
    border: 1px solid var(--cs-line);
    color: var(--cs-muted);
}
.cs-card-link {
    margin-top: auto;
    font-size: 15px;
    font-weight: 600;
    color: var(--cs-red);
}
.cs-card-link i { margin-left: 6px; transition: transform .25s ease; }
.cs-card:hover .cs-card-link i { transform: translateX(4px); }

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 991px) {
    .cs-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-fact:nth-child(2) { border-right: 0; }
    .cs-fact:nth-child(-n+2) { border-bottom: 1px solid var(--cs-line); }
    .cs-feature,
    .cs-feature.is-flipped { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .cs-feature.is-flipped .cs-feature-text { order: 0; }
    .cs-overview .cs-video { margin-top: 30px; }
}

@media (max-width: 767px) {
    .cs-h2 { font-size: 30px; }
    .cs-hero .top-heading-sec p.cs-tagline { font-size: 20px; padding-right: 0; }
    .cs-hero .top-img-sec { margin-top: 30px; }
    .cs-facts-grid { grid-template-columns: minmax(0, 1fr); }
    .cs-fact { border-right: 0; border-bottom: 1px solid var(--cs-line); }
    .cs-fact:last-child { border-bottom: 0; }
    .cs-overview,
    .cs-solution,
    .cs-gallery,
    .cs-stack,
    .cs-takeaways { padding: 56px 0; }
    .cs-stats { padding: 56px 0 24px; }
    .cs-feature { padding-bottom: 50px; }
    .cs-feature h3 { font-size: 25px; }
    .cs-gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .cs-stack-row { grid-template-columns: minmax(0, 1fr); }
    .cs-stack-row dt { border-right: 0; border-bottom: 1px solid var(--cs-line); padding-bottom: 10px; }
    .cs-stack-row dd { padding-top: 12px; }
    .cs-stat strong { font-size: 38px; }
    .cs-zoom, .cs-hero .top-img-sec { padding: 8px; border-radius: 16px; }
    .cs-zoom img, .cs-hero .top-img-sec img { border-radius: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .cs-stat, .cs-card, .cs-card-img img, .cs-zoom, .cs-zoom::after, .cs-card-link i { transition: none; }
    .cs-zoom:hover { transform: none; }
}
