/* =====================================================
   AIMatric Case Studies Page - Namespaced CSS (cs- prefix)
   Avoids conflicts with base styles.css
   ===================================================== */

/* Hero Section */
.cs-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--navy-900) 100%);
    color: var(--white);
    overflow: hidden;
    position: relative;
}

.cs-hero::before {
    content: '';
    position: absolute;
    inset: -200px;
    background: radial-gradient(600px 500px at 20% 40%, rgba(32, 178, 200, 0.15), transparent 60%),
        radial-gradient(500px 400px at 80% 20%, rgba(249, 115, 22, 0.12), transparent 55%);
    pointer-events: none;
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.cs-hero-content {
    max-width: 560px;
}

.cs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-200);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.cs-hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: cs-pulse 2s ease-in-out infinite;
}

@keyframes cs-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.cs-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.cs-hero-subtitle {
    font-size: 18px;
    color: var(--gray-300);
    line-height: 1.7;
    margin-bottom: 28px;
}

.cs-hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.cs-hero .btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cs-hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hero Visual */
.cs-hero-visual {
    position: relative;
    height: 400px;
}

.cs-metrics-display {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-metric-ring {
    position: relative;
    width: 180px;
    height: 180px;
}

.cs-metric-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(18, 146, 164, 0.4);
    animation: cs-hubPulse 2.5s ease-in-out infinite;
    z-index: 10;
}

@keyframes cs-hubPulse {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(18, 146, 164, 0.4);
    }

    50% {
        box-shadow: 0 0 80px rgba(18, 146, 164, 0.6);
    }
}

.cs-metric-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--teal-700);
}

.cs-metric-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cs-floating-stat {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: cs-float 5s ease-in-out infinite;
}

.cs-fs-icon {
    font-size: 24px;
}

.cs-fs-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}

.cs-fs-label {
    font-size: 11px;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-floating-stat.fs1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.cs-floating-stat.fs2 {
    top: 10%;
    right: 10%;
    animation-delay: 0.5s;
}

.cs-floating-stat.fs3 {
    bottom: 20%;
    left: 5%;
    animation-delay: 1s;
}

.cs-floating-stat.fs4 {
    bottom: 20%;
    right: 5%;
    animation-delay: 1.5s;
}

@keyframes cs-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Sections */
.cs-section {
    padding: 90px 0;
}

.cs-section-light {
    background: var(--gray-50);
}

.cs-section-white {
    background: var(--white);
}

.cs-section-dark-teal {
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-800) 100%);
    color: var(--white);
}

.cs-section-navy {
    background: var(--navy-900);
    color: var(--white);
}

.cs-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.cs-section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--teal-600);
    margin-bottom: 16px;
}

.cs-label-light {
    color: var(--teal-200);
}

.cs-dot {
    width: 8px;
    height: 8px;
    background: var(--teal-500);
    border-radius: 50%;
}

.cs-dot-light {
    background: var(--teal-300);
}

.cs-section-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cs-section-subtitle {
    font-size: 18px;
    color: var(--gray-100);
    line-height: 1.7;
}

.cs-subtitle-light {
    color: rgba(255, 255, 255, 0.72);
}

/* Proof Metrics Grid */
.cs-proof-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.cs-proof-metric {
    background: var(--white);
    padding: 24px 16px;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: all 0.3s ease;
    animation: cs-float 8s ease-in-out infinite;
}

.cs-challenge-item:nth-child(1) {
    animation-delay: 0s;
}

.cs-challenge-item:nth-child(2) {
    animation-delay: 0.5s;
}

.cs-challenge-item:nth-child(3) {
    animation-delay: 1s;
}

.cs-challenge-item:nth-child(4) {
    animation-delay: 1.5s;
}

.cs-challenge-item:nth-child(5) {
    animation-delay: 2s;
}

.cs-challenge-item:nth-child(6) {
    animation-delay: 2.5s;
}

.cs-challenge-item:nth-child(7) {
    animation-delay: 3s;
}

.cs-proof-metric:hover {
    border-color: var(--teal-400);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(18, 146, 164, 0.12);
}

.cs-proof-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.cs-proof-metric h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.cs-proof-metric p {
    font-size: 12px;
    color: var(--gray-500);
}

.cs-trust-banner {
    text-align: center;
    padding: 28px 40px;
    background: linear-gradient(135deg, var(--teal-50), var(--white));
    border: 1px solid var(--teal-200);
    border-radius: 16px;
}

.cs-trust-banner p {
    font-size: 16px;
    color: var(--gray-700);
    margin: 0;
}

/* Case Study Header */
.cs-case-header {
    text-align: center;
    margin-bottom: 60px;
}

.cs-industry-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    color: var(--teal-200);
    margin-bottom: 24px;
}

.cs-industry-badge.dark {
    background: rgba(10, 74, 84, 0.08);
    border-color: var(--teal-200);
    color: var(--teal-700);
}

.cs-industry-icon {
    font-size: 22px;
}

/* Case Content */
.cs-case-content {
    max-width: 1000px;
    margin: 0 auto;
}

.cs-case-challenge,
.cs-case-solution {
    margin-bottom: 48px;
}

.cs-case-challenge h3,
.cs-case-solution h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--white);
}

.cs-section-white .cs-case-challenge h3,
.cs-section-white .cs-case-solution h3 {
    color: var(--gray-900);
}

.cs-case-challenge p {
    font-size: 16px;
    color: var(--gray-300);
    margin-bottom: 24px;
}

.cs-section-white .cs-case-challenge p {
    color: var(--gray-600);
}

/* Challenge List */
.cs-challenge-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cs-challenge-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--gray-300);
    transition: all 0.3s ease;
    animation: cs-float 8s ease-in-out infinite;
}

.cs-challenge-list.dark .cs-challenge-item {
    background: rgba(10, 74, 84, 0.05);
    border-color: var(--gray-200);
    color: var(--gray-700);
}

.cs-challenge-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--teal-400);
    transform: translateX(4px);
}

.cs-challenge-list.dark .cs-challenge-item:hover {
    background: rgba(10, 74, 84, 0.1);
}

.cs-challenge-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Agents & Workflows */
.cs-agents-deployed,
.cs-workflows-automated {
    margin-bottom: 28px;
}

.cs-agents-deployed h4,
.cs-workflows-automated h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--teal-300);
    margin-bottom: 16px;
}

.cs-agents-deployed.dark h4,
.cs-workflows-automated.dark h4 {
    color: var(--teal-600);
}

.cs-agent-tags,
.cs-workflow-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cs-agent-tag,
.cs-workflow-tag {
    animation: cs-float 8s ease-in-out infinite;
}

.cs-agent-tag:nth-child(1) {
    animation-delay: 0s;
}

.cs-agent-tag:nth-child(2) {
    animation-delay: 0.5s;
}

.cs-agent-tag:nth-child(3) {
    animation-delay: 1s;
}

.cs-agent-tag:nth-child(4) {
    animation-delay: 1.5s;
}

.cs-agent-tag:nth-child(5) {
    animation-delay: 2s;
}

.cs-agent-tag:nth-child(6) {
    animation-delay: 2.5s;
}

.cs-agent-tag:nth-child(7) {
    animation-delay: 3s;
}

.cs-workflow-tag:nth-child(1) {
    animation-delay: 0s;
}

.cs-workflow-tag:nth-child(2) {
    animation-delay: 0.5s;
}

.cs-workflow-tag:nth-child(3) {
    animation-delay: 1s;
}

.cs-workflow-tag:nth-child(4) {
    animation-delay: 1.5s;
}

.cs-workflow-tag:nth-child(5) {
    animation-delay: 2s;
}

.cs-workflow-tag:nth-child(6) {
    animation-delay: 2.5s;
}

.cs-workflow-tag:nth-child(7) {
    animation-delay: 3s;
}

.cs-workflow-tag:nth-child(8) {
    animation-delay: 3.5s;
}

.cs-workflow-tag:nth-child(9) {
    animation-delay: 8s;
}

.cs-workflow-tag:nth-child(10) {
    animation-delay: 4.5s;
}

.cs-workflow-tag:nth-child(11) {
    animation-delay: 5s;
}

.cs-workflow-tag:nth-child(12) {
    animation-delay: 5.5s;
}

.cs-agent-tag {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.cs-agent-tag.rekon {
    background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
}

.cs-agent-tag.sally {
    background: linear-gradient(135deg, var(--orange-400), var(--orange-500));
}

.cs-agent-tag.mark {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.cs-agent-tag.vali {
    background: linear-gradient(135deg, #EC4899, #DB2777);
}

.cs-agent-tag.idp {
    background: linear-gradient(135deg, var(--success), #059669);
}

.cs-workflow-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-200);
}

.cs-workflows-automated.dark .cs-workflow-tag {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-700);
}

/* Comparison Section */
.cs-case-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 48px;
    padding: 36px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-comparison-before,
.cs-comparison-after {
    padding: 24px;
}

.cs-comparison-before h4,
.cs-comparison-after h4 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.cs-comparison-before h4 {
    color: #EF4444;
}

.cs-comparison-after h4 {
    color: var(--success);
}

.cs-comparison-before ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-comparison-before li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-300);
}

.cs-comparison-before li::before {
    content: '✗';
    color: #EF4444;
    font-weight: 900;
}

.cs-comparison-before.dark li {
    color: var(--gray-600);
}

.cs-comparison-arrow {
    font-size: 48px;
    color: var(--teal-400);
    font-weight: 300;
}

.cs-comparison-arrow.dark {
    color: var(--teal-600);
}

.cs-result-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-result-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.cs-comparison-after.dark .cs-result-highlight {
    color: var(--gray-800);
}

.cs-result-check {
    width: 26px;
    height: 26px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--white);
    flex-shrink: 0;
}

/* Testimonial */
.cs-case-testimonial {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-case-testimonial.dark {
    background: rgba(10, 74, 84, 0.05);
    border-color: var(--gray-200);
}

.cs-case-testimonial blockquote {
    font-size: 20px;
    font-style: italic;
    color: var(--white);
    line-height: 1.7;
    margin-bottom: 16px;
}

.cs-case-testimonial.dark blockquote {
    color: var(--gray-800);
}

.cs-case-testimonial cite {
    font-size: 14px;
    color: var(--teal-300);
    font-style: normal;
    font-weight: 700;
}

.cs-case-testimonial.dark cite {
    color: var(--teal-600);
}

/* Summary Grid */
.cs-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cs-summary-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    animation: cs-float 5s ease-in-out infinite;
}

.cs-summary-card:nth-child(1) {
    animation-delay: 0s;
}

.cs-summary-card:nth-child(2) {
    animation-delay: 0.5s;
}

.cs-summary-card:nth-child(3) {
    animation-delay: 1s;
}

.cs-summary-card:nth-child(4) {
    animation-delay: 1.5s;
}

.cs-summary-card:nth-child(5) {
    animation-delay: 2s;
}

.cs-summary-card:nth-child(6) {
    animation-delay: 2.5s;
}

.cs-summary-card:nth-child(7) {
    animation-delay: 3s;
}

.cs-summary-card:nth-child(8) {
    animation-delay: 3.5s;
}

.cs-summary-card:nth-child(9) {
    animation-delay: 8s;
}

.cs-summary-card:nth-child(10) {
    animation-delay: 4.5s;
}

.cs-summary-card:nth-child(11) {
    animation-delay: 5s;
}

.cs-summary-card:nth-child(12) {
    animation-delay: 5.5s;
}

.cs-summary-card:hover {
    transform: translateY(-6px);
    border-color: var(--teal-400);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cs-summary-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.cs-summary-card h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cs-summary-stat {
    font-size: 28px;
    font-weight: 900;
    color: var(--teal-300);
    margin-bottom: 8px;
}

.cs-summary-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Final CTA */
.cs-final-cta {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--teal-900) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cs-final-cta::before {
    content: '';
    position: absolute;
    inset: -200px;
    background: radial-gradient(500px 400px at 20% 30%, rgba(32, 178, 200, 0.18), transparent 60%),
        radial-gradient(600px 450px at 80% 10%, rgba(249, 115, 22, 0.18), transparent 55%);
    pointer-events: none;
}

.cs-final-inner {
    position: relative;
}

.cs-final-cta h2 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cs-final-cta p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cs-urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 100px;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: var(--orange-400);
    font-weight: 800;
    margin: 24px 0 32px;
    animation: cs-pulse 2.2s ease-in-out infinite;
}

.cs-final-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cs-btn-light {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--white) !important;
}

.cs-btn-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .cs-proof-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

@media (max-width: 1024px) {
    .cs-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cs-hero-content {
        max-width: 100%;
        margin: 0 auto;
    }



    .cs-hero-buttons {
        justify-content: center;
    }

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

    .cs-case-comparison {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cs-comparison-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }
}

@media (max-width: 768px) {
    .cs-hero h1 {
        font-size: 36px;
    }

    .cs-section-title {
        font-size: 32px;
    }

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

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

    .cs-case-testimonial blockquote {
        font-size: 16px;
    }

    .cs-final-cta h2 {
        font-size: 32px;
    }

    .cs-final-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cs-final-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .cs-proof-grid {
        grid-template-columns: 1fr;
    }

    .cs-agent-tags,
    .cs-workflow-tags {
        justify-content: center;
    }
}