/**
 * Casos de Éxito - Single Premium Style
 * Mode: Light
 * Palette: Violet, Blue, Soft Tech Gradients
 */

:root {
    --ce-violet: #8b5cf6;
    --ce-blue: #3b82f6;
    --ce-grad: linear-gradient(135deg, var(--ce-violet) 0%, var(--ce-blue) 100%);
    --ce-bg: #ffffff;
    --ce-surface: #f8f9fc;
    --ce-text: #0b0f19;
    --ce-muted: #64748b;
    --ce-border: rgba(0, 0, 0, 0.06);
    --ce-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

.ce-single {
    background: var(--ce-bg);
    color: var(--ce-text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.ce-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.ce-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ce-violet);
    margin-bottom: 1.5rem;
    display: block;
}

.ce-section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════
   1️⃣ HERO SECTION
   ═══════════════════════════════════════════════════ */
.ce-hero {
    padding: 8rem 0 6rem;
    position: relative;
    background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

.ce-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.ce-hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.ce-hero-sub {
    font-size: 1.25rem;
    color: var(--ce-muted);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 3.5rem;
}

.ce-hero-meta {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ce-border);
}

.ce-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ce-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ce-muted);
    font-weight: 600;
}

.ce-meta-val {
    font-size: 1rem;
    font-weight: 700;
}

.ce-hero-visual {
    position: relative;
}

.ce-mockup-wrapper {
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
}

.ce-mockup-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
}

.ce-mockup-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.ce-hero-bg-tech {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ce-dot-pattern {
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ═══════════════════════════════════════════════════
   2️⃣ EL DESAFÍO
   ═══════════════════════════════════════════════════ */
.ce-challenge {
    padding: 10rem 0;
    background: var(--ce-surface);
}

.ce-challenge-grid {
    display: grid;
    grid-template-columns: 0.5fr 1fr;
    gap: 6rem;
}

.ce-challenge-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
    column-count: 1;
    /* Keeping it simple for reading flow initially */
}

.ce-lead {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ce-text);
    margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════
   3️⃣ LA ESTRATEGIA
   ═══════════════════════════════════════════════════ */
.ce-strategy {
    padding: 10rem 0;
}

.ce-strategy-header {
    text-align: center;
    margin-bottom: 8rem;
}

.ce-strategy-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 80px;
}

.ce-strategy-line-wrap {
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.ce-strategy-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ce-grad);
    transform-origin: top;
    transform: scaleY(0);
    /* Animated via GSAP */
}

.ce-strategy-step {
    position: relative;
    padding-bottom: 6rem;
}

.ce-strategy-step:last-child {
    padding-bottom: 0;
}

.ce-step-bg-num {
    position: absolute;
    left: -120px;
    top: -20px;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(139, 92, 246, 0.05);
    z-index: -1;
    font-family: 'Space Mono', monospace;
}

.ce-step-node {
    position: absolute;
    left: -46px;
    /* Centered on line */
    top: 10px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 3px solid var(--ce-violet);
    border-radius: 50%;
    z-index: 2;
}

.ce-step-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.ce-step-desc {
    font-size: 1.1rem;
    color: var(--ce-muted);
    max-width: 600px;
}

/* ═══════════════════════════════════════════════════
   4️⃣ MÉTRICAS DE IMPACTO
   ═══════════════════════════════════════════════════ */
.ce-metrics {
    padding: 10rem 0;
    background: var(--ce-text);
    color: #ffffff;
    text-align: center;
}

.ce-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.ce-metric-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ce-metric-val {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    background: var(--ce-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(139, 92, 246, 0.2));
}

.ce-metric-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════
   5️⃣ GALERÍA / VISUALES
   ═══════════════════════════════════════════════════ */
.ce-gallery {
    padding: 10rem 0;
}

.ce-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.ce-item-large {
    grid-column: span 2;
}

.ce-gallery-img-wrap {
    background: var(--ce-surface);
    border-radius: 24px;
    overflow: hidden;
}

.ce-gallery-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* ═══════════════════════════════════════════════════
   6️⃣ TESTIMONIO
   ═══════════════════════════════════════════════════ */
.ce-testimony {
    padding: 10rem 0;
    background: var(--ce-surface);
}

.ce-testimony-card {
    background: #ffffff;
    padding: 6rem 8rem;
    border-radius: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.03);
}

.ce-quote-mark {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10rem;
    line-height: 1;
    color: rgba(139, 92, 246, 0.05);
    font-family: serif;
}

.ce-quote {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.ce-author {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.ce-author-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.ce-author-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.ce-author-role {
    font-size: 0.9rem;
    color: var(--ce-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════
   7️⃣ CTA FINAL
   ═══════════════════════════════════════════════════ */
.ce-cta {
    padding: 10rem 0;
}

.ce-cta-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, #ffffff 100%);
    padding: 8rem 4rem;
    border-radius: 40px;
    text-align: center;
    border: 1px solid var(--ce-border);
    position: relative;
    overflow: hidden;
}

.ce-cta-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.ce-cta-desc {
    font-size: 1.25rem;
    color: var(--ce-muted);
    margin-bottom: 3.5rem;
}

.ce-cta-btn {
    display: inline-block;
    padding: 1.5rem 3.5rem;
    background: var(--ce-text);
    color: #ffffff;
    font-weight: 700;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.4s var(--ce-ease);
}

.ce-cta-btn:hover {
    background: var(--ce-violet);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.ce-cta-glow {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    z-index: 0;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .ce-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ce-hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .ce-hero-meta {
        justify-content: center;
    }

    .ce-challenge-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ce-metrics-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ce-testimony-card {
        padding: 4rem 2rem;
    }
}