/* ══════════════════════════════════════════════
   CASE STUDIES — Listing & Detail Pages
   Complements: styles.css, service-detail.css
   ══════════════════════════════════════════════ */

/* ─── Header / Logo Visibility Fix ─── */
.header .header__logo {
    color: #ffffff !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.header--scrolled {
    background: rgba(10, 10, 26, 0.95) !important;
    backdrop-filter: blur(12px) !important;
}

/* ─── Listing Page Background ─── */
body {
    background-color: #0a0a1a;
}

main {
    background-color: #0a0a1a;
}

/* ─── Listing Hero Enhancements ─── */
.cs-listing-hero {
    position: relative;
    overflow: hidden;
}

/* Override the 2-column grid from service-detail.css for listing pages */
.cs-listing-hero .sd-hero__inner {
    grid-template-columns: 1fr !important;
    text-align: center;
    max-width: 900px;
}

.cs-listing-hero .sd-hero__breadcrumb {
    justify-content: center;
}

.cs-listing-hero .sd-hero__title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin-bottom: 1.25rem;
}

.cs-listing-hero .sd-hero__title-gradient {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-listing-hero .sd-hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.cs-listing-hero .sd-hero__stats {
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.cs-listing-hero .sd-hero__stat {
    text-align: center;
}

.cs-listing-hero .sd-hero__stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.cs-listing-hero .sd-hero__stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
    display: block;
}

.cs-hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.cs-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 8s ease-in-out infinite;
}

.cs-hero-orb--1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4), transparent);
    top: -100px;
    right: 10%;
    animation-delay: 0s;
}

.cs-hero-orb--2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35), transparent);
    bottom: -50px;
    left: 5%;
    animation-delay: -3s;
    animation-duration: 10s;
}

.cs-hero-orb--3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    top: 40%;
    right: 30%;
    animation-delay: -6s;
    animation-duration: 12s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.1); }
    50% { transform: translate(-15px, 20px) scale(0.95); }
    75% { transform: translate(25px, 15px) scale(1.05); }
}

.cs-hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.cs-hero-particles span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 3px;
    height: 3px;
    background: rgba(96, 165, 250, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
    animation: particleFloat var(--d) ease-in-out infinite;
    animation-delay: var(--s);
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-20px) scale(1.3); opacity: 1; }
}

/* ─── Listing: Filter Bar ─── */
.cs-filters {
    padding: 3rem 0 1rem;
    position: relative;
}

.cs-filters__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* ─── Hero Text Visibility Fixes ─── */
.cs-listing-hero .sd-hero__badge {
    display: inline-flex;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: #60a5fa;
    margin: 0 auto 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.sd-hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 30px;
}

.cs-filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.cs-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.cs-filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ─── Listing: Card Grid ─── */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0 5rem;
}

.cs-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cs-card.sd-visible {
    opacity: 1;
    transform: translateY(0);
}

.cs-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(37, 99, 235, 0.08);
    transform: translateY(-4px);
}

.cs-card__header {
    padding: 2rem 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cs-card__category {
    display: inline-flex;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--cat-bg, rgba(37, 99, 235, 0.12));
    color: var(--cat-color, #60a5fa);
}

.cs-card__industry {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.cs-card__body {
    padding: 1.2rem 2rem 1.5rem;
    flex: 1;
}

.cs-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.cs-card__client {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.cs-card__stat {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-top: auto;
}

.cs-card__stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-card__stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.cs-card__tags {
    padding: 0 2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cs-card__tag {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cs-card__footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cs-card__cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.cs-card:hover .cs-card__cta svg {
    transform: translateX(4px);
}


/* ═══════════════════════════════════════
   DETAIL PAGE — Redesigned Layout
   Alternating section colors:
   Hero (dark) → Challenge (white) →
   Solution (blue) → Results (white) →
   Tech (dark) → CTA (blue gradient)
   ═══════════════════════════════════════ */

/* ─── Section Color Themes ─── */
.cs-section--light {
    background: #ffffff;
    color: #1a1a2e;
}

.cs-section--blue {
    background: linear-gradient(180deg, #f0f7ff 0%, #e8f2ff 100%);
    color: #1a1a2e;
}

.cs-section--dark {
    background: #0c0c20;
    color: #ffffff;
}

/* ─── Detail: Hero ─── */
.cs-detail-hero {
    padding: 10rem 0 5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(170deg, #0a0a1a 0%, #0f1635 50%, #0a0a1a 100%);
}

.cs-detail-hero__bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.15), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.08), transparent 50%);
    pointer-events: none;
}

.cs-detail-hero__inner {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.cs-detail-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: color 0.3s;
    letter-spacing: 0.02em;
}

.cs-detail-hero__back:hover {
    color: #60a5fa;
}

.cs-detail-hero__back svg {
    width: 16px;
    height: 16px;
}

.cs-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cs-detail-hero__category {
    display: inline-flex;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cs-detail-hero__divider {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.6rem;
}

.cs-detail-hero__industry {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.cs-detail-hero__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.cs-detail-hero__client {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.cs-detail-hero__stat-row {
    display: flex;
}

.cs-detail-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(10px);
}

.cs-detail-hero__stat-value {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.cs-detail-hero__stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 200px;
    line-height: 1.4;
    font-weight: 500;
}

/* ─── Detail: Section Headings ─── */
.cs-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cs-section-heading--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cs-section-heading__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.cs-section-heading__icon svg {
    width: 22px;
    height: 22px;
}

.cs-section-heading__icon--red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.cs-section-heading__icon--red svg { stroke: #ef4444; }

.cs-section-heading__icon--purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}
.cs-section-heading__icon--purple svg { stroke: #8b5cf6; }

.cs-section-heading__icon--green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.cs-section-heading__icon--green svg { stroke: #10b981; }

.cs-section-heading__icon--blue {
    background: rgba(37, 99, 235, 0.15);
    color: #3b82f6;
}
.cs-section-heading__icon--blue svg { stroke: #60a5fa; }

/* Light-section icon overrides */
.cs-section--light .cs-section-heading__icon--red {
    background: rgba(239, 68, 68, 0.08);
}
.cs-section--light .cs-section-heading__icon--green {
    background: rgba(16, 185, 129, 0.08);
}

.cs-section-heading__eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.3rem;
}

.cs-section--light .cs-section-heading__eyebrow {
    color: #6b7280;
}

.cs-section--blue .cs-section-heading__eyebrow {
    color: #2563eb;
}

.cs-section--dark .cs-section-heading__eyebrow {
    color: rgba(255, 255, 255, 0.4);
}

.cs-section-heading__title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cs-section--light .cs-section-heading__title {
    color: #111827;
}

.cs-section--blue .cs-section-heading__title {
    color: #0f172a;
}

.cs-section--dark .cs-section-heading__title {
    color: #ffffff;
}

/* ─── Detail: Content Sections ─── */
.cs-detail-section {
    padding: 5rem 0;
}

.cs-detail-section__inner {
    max-width: 900px;
    margin: 0 auto;
}

.cs-section-content {
    padding-left: 60px;
}

.cs-detail-section__text {
    font-size: 1.1rem;
    line-height: 1.9;
}

.cs-section--light .cs-detail-section__text {
    color: #374151;
}

.cs-section--blue .cs-detail-section__text {
    color: #1e3a5f;
}

.cs-section--dark .cs-detail-section__text {
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Rich Content inside Challenge/Solution ─── */
.cs-section-content img,
.cs-detail-section__text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cs-section-content img[width],
.cs-detail-section__text img[width] {
    max-width: 100%;
}

.cs-section-content iframe,
.cs-section-content .ql-video,
.cs-detail-section__text iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 1.5rem auto;
    border: 1px solid rgba(0,0,0,0.08);
    background: #000;
}

.cs-section-content blockquote,
.cs-detail-section__text blockquote {
    border-left: 3px solid #0ea5e9;
    padding: 0.75rem 1.25rem;
    margin: 1.25rem 0;
    background: rgba(14, 165, 233, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}


/* ─── Detail: Results Grid ─── */
.cs-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.cs-result-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: var(--delay, 0s);
}

.cs-section--light .cs-result-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.cs-section--light .cs-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.cs-result-card__value {
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
    line-height: 1;
}

.cs-result-card__divider {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 2px;
    margin: 0.8rem auto;
}

.cs-result-card__label {
    font-size: 0.85rem;
    line-height: 1.5;
}

.cs-section--light .cs-result-card__label {
    color: #4b5563;
}

.cs-section--dark .cs-result-card__label {
    color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Detail: Tech Stack & Meta ─── */
.cs-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.cs-detail-meta-card {
    padding: 1.5rem;
    border-radius: 14px;
    text-align: center;
}

.cs-section--dark .cs-detail-meta-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-section--light .cs-detail-meta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.cs-detail-meta-card__icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 0.8rem;
    display: block;
}

.cs-section--dark .cs-detail-meta-card__icon {
    stroke: #3b82f6;
}

.cs-section--light .cs-detail-meta-card__icon {
    stroke: #2563eb;
}

.cs-detail-meta-card__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.cs-section--dark .cs-detail-meta-card__label {
    color: rgba(255, 255, 255, 0.4);
}

.cs-section--light .cs-detail-meta-card__label {
    color: #6b7280;
}

.cs-detail-meta-card__value {
    font-size: 1.05rem;
    font-weight: 700;
}

.cs-section--dark .cs-detail-meta-card__value {
    color: #fff;
}

.cs-section--light .cs-detail-meta-card__value {
    color: #111827;
}

.cs-tech-section {
    margin-top: 2.5rem;
    text-align: center;
}

.cs-tech-section__title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.cs-section--dark .cs-tech-section__title {
    color: rgba(255, 255, 255, 0.35);
}

.cs-tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.cs-tech-badge {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-section--dark .cs-tech-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.cs-section--dark .cs-tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.18);
}

.cs-section--light .cs-tech-badge {
    background: #f0f7ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}


/* ─── Detail: Testimonial ─── */
.cs-testimonial {
    padding: 3rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.cs-section--light .cs-testimonial {
    background: linear-gradient(135deg, #f0f7ff, #eff6ff);
    border: 1px solid #dbeafe;
}

.cs-testimonial__quote-icon {
    width: 36px;
    height: 36px;
    color: #2563eb;
    opacity: 0.2;
    margin-bottom: 1rem;
}

.cs-testimonial__quote {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 0;
    position: relative;
}

.cs-section--light .cs-testimonial__quote {
    color: #1e293b;
}

.cs-testimonial__footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.cs-testimonial__author {
    font-weight: 700;
    font-size: 0.95rem;
}

.cs-section--light .cs-testimonial__author {
    color: #111827;
}

.cs-testimonial__role {
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.cs-section--light .cs-testimonial__role {
    color: #6b7280;
}


/* ─── Detail: CTA Section ─── */
.cs-detail-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1e40af, #2563eb, #0891b2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cs-detail-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.08), transparent 70%);
    pointer-events: none;
}

.cs-detail-cta__inner {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cs-detail-cta__title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cs-detail-cta__desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cs-detail-cta__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cs-detail-cta__btn {
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cs-detail-cta__btn--primary {
    background: #ffffff;
    color: #1e40af;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cs-detail-cta__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cs-detail-cta__btn--outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cs-detail-cta__btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}


/* ─── Detail: Related Studies ─── */
.cs-related {
    padding: 5rem 0;
    background: #0a0a1a;
}

.cs-related__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    text-align: center;
}

.cs-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}


/* ─── No Results ─── */
.cs-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
    .cs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-listing-hero .sd-hero__stats {
        gap: 2rem;
    }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Listing Hero */
    .cs-listing-hero .sd-container {
        padding: 0 1rem;
    }

    .cs-listing-hero .sd-hero__title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }

    .cs-listing-hero .sd-hero__subtitle {
        font-size: 1rem;
        margin: 0 auto 1.5rem;
        padding: 0 0.5rem;
    }

    .cs-listing-hero .sd-hero__stats {
        gap: 1.5rem;
        flex-direction: row;
        justify-content: center;
    }

    .cs-listing-hero .sd-hero__stat-value {
        font-size: 1.6rem;
    }

    .cs-listing-hero .sd-hero__stat-label {
        font-size: 0.65rem;
    }

    /* Grid */
    .cs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cs-results-grid {
        grid-template-columns: 1fr;
    }

    .cs-detail-meta {
        grid-template-columns: 1fr 1fr;
    }

    .cs-related__grid {
        grid-template-columns: 1fr;
    }

    /* Detail hero */
    .cs-detail-hero {
        padding: 8rem 0 3rem;
    }

    .cs-detail-hero__stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cs-detail-hero__stat-value {
        font-size: 2rem;
    }

    .cs-detail-hero__title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* Detail sections */
    .cs-detail-section {
        padding: 3.5rem 0;
    }

    .cs-section-content {
        padding-left: 0;
    }

    .cs-section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cs-section-heading--center {
        align-items: center;
    }

    .cs-testimonial {
        padding: 2rem 1.5rem;
    }

    /* Filters: horizontal scroll on mobile */
    .cs-filters {
        padding: 2rem 0 0.5rem;
    }

    .cs-filters__inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cs-filters__inner::-webkit-scrollbar {
        display: none;
    }

    .cs-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.5rem 1.1rem;
        font-size: 0.8rem;
    }

    /* Cards */
    .cs-card__body {
        padding: 1rem 1.5rem 1.25rem;
    }

    .cs-card__header {
        padding: 1.5rem 1.5rem 0;
    }

    .cs-card__tags {
        padding: 0 1.5rem 1.25rem;
    }

    .cs-card__footer {
        padding: 0.75rem 1.5rem;
    }

    /* Detail CTA */
    .cs-detail-cta__title {
        font-size: 1.5rem;
    }

    .cs-detail-cta__actions {
        flex-direction: column;
        align-items: center;
    }

    .cs-detail-cta__btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Orbs: scale down on mobile */
    .cs-hero-orb--1 {
        width: 200px;
        height: 200px;
    }

    .cs-hero-orb--2 {
        width: 140px;
        height: 140px;
    }

    .cs-hero-orb--3 {
        width: 100px;
        height: 100px;
    }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
    .cs-listing-hero .sd-hero__inner {
        padding: 0 1rem;
    }

    .cs-listing-hero .sd-hero__title {
        font-size: 1.75rem;
    }

    .cs-listing-hero .sd-hero__subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .cs-listing-hero .sd-hero__badge {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    .cs-listing-hero .sd-hero__stats {
        gap: 1rem;
    }

    .cs-listing-hero .sd-hero__stat-value {
        font-size: 1.4rem;
    }

    .cs-card__title {
        font-size: 1rem;
    }

    .cs-card__stat-value {
        font-size: 1.6rem;
    }

    .cs-detail-hero__inner {
        padding: 0 1rem;
    }

    .cs-detail-hero__title {
        font-size: 1.4rem;
    }

    .cs-detail-hero__stat-value {
        font-size: 2rem;
    }

    .cs-section-heading__title {
        font-size: 1.4rem;
    }

    .cs-detail-section__text {
        font-size: 0.95rem;
    }

    .cs-detail-meta {
        grid-template-columns: 1fr;
    }

    .cs-result-card {
        padding: 1.5rem 1rem;
    }

    .cs-result-card__value {
        font-size: 1.8rem;
    }
}

/* ── Extra-Small (≤360px) ── */
@media (max-width: 360px) {
    .cs-listing-hero .sd-hero__title {
        font-size: 1.5rem;
    }

    .cs-listing-hero .sd-hero__stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cs-card__header {
        padding: 1rem 1rem 0;
    }

    .cs-card__body {
        padding: 0.75rem 1rem 1rem;
    }

    .cs-card__tags {
        padding: 0 1rem 1rem;
    }

    .cs-card__footer {
        padding: 0.75rem 1rem;
    }
}