/* ========================================
   CASE STUDIES SECTION - AWWWARDS STYLE
   ======================================== */

.case-studies {
    position: relative;
    background: var(--color-bg-primary);
    padding: 80px 0;
    z-index: 10;
}

.cases-header {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
    z-index: 2;
}

.cases-tagline {
    font-size: 16px;
    color: #a0a0a0;
    letter-spacing: 2px;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   CASE CARD - PREMIUM LAYOUT
   ======================================== */

.case-card {
    margin-bottom: 0;
    opacity: 0;
    animation: caseCardFade 1s ease-out forwards;
}

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

.case-1 { animation-delay: 0.1s; }
.case-2 { animation-delay: 0.2s; }
.case-3 { animation-delay: 0.3s; }
.case-4 { animation-delay: 0.4s; }

.case-content-wrapper {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
    min-height: 70vh;
}

/* Alternancia: Imagen a la derecha por defecto, a la izquierda en pares */
.case-2 .case-content-wrapper,
.case-4 .case-content-wrapper {
    grid-template-columns: 40% 60%;
}

.case-2 .case-image-block,
.case-4 .case-image-block {
    order: -1;
}

/* ========================================
   CASE TEXT BLOCK
   ======================================== */

.case-text-block {
    position: relative;
    z-index: 2;
}

.case-header {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.case-number {
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 0.9;
    font-family: 'Outfit', sans-serif;
    flex-shrink: 0;
}

.case-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
    margin: 0;
    padding-top: 8px;
}

.case-section {
    margin-bottom: 35px;
}

.case-label {
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.case-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-bullets li {
    font-size: 15px;
    color: #d0d0d0;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.case-bullets li::before {
    content: '•';
    color: #6366f1;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 18px;
}

.case-description {
    font-size: 16px;
    color: #d0d0d0;
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   RESULTS SECTION
   ======================================== */

.case-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Outfit', sans-serif;
}

.result-text {
    font-size: 14px;
    color: #a0a0a0;
    font-weight: 400;
    text-transform: capitalize;
}

/* ========================================
   CTA BUTTON
   ======================================== */

.case-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 12px 24px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid #6366f1;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.case-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #6366f1;
    z-index: -1;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-cta:hover {
    color: #0a0a0a;
}

.case-cta:hover::before {
    left: 0;
}

.case-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s ease;
}

.case-cta:hover svg {
    transform: translateX(3px);
}

/* ========================================
   CASE IMAGE BLOCK
   ======================================== */

.case-image-block {
    position: relative;
    z-index: 1;
}

.case-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    max-height: 40vh;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-image-container:hover {
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.3);
    transform: translateY(-8px);
}

.case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.case-image-container:hover .case-image {
    opacity: 1;
    transform: scale(1.03);
}

/* ========================================
   CASE DIVIDER
   ======================================== */

.case-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(99, 102, 241, 0.3),
        transparent
    );
    margin: 0;
}

.case-4 .case-divider {
    display: none;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1024px) {
    .case-content-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 60px 0;
        min-height: auto;
        min-height: auto;
    }

    .case-2 .case-content-wrapper,
    .case-4 .case-content-wrapper {
        grid-template-columns: 1fr;
    }

    .case-2 .case-image-block,
    .case-4 .case-image-block {
        order: initial;
    }

    .case-image-container {
        max-height: 35vh;
    }

    .case-title {
        font-size: 28px;
    }

    .case-number {
        font-size: 56px;
    }

    .case-results {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .case-studies {
        padding: 60px 0;
    }

    .cases-header {
        margin-bottom: 60px;
    }

    .case-content-wrapper {
        gap: 30px;
        padding: 50px 0;
    }

    .case-header {
        gap: 10px;
        margin-bottom: 30px;
        flex-direction: column;
        align-items: flex-start;
    }

    .case-number {
        font-size: 48px;
        line-height: 0.85;
    }

    .case-title {
        font-size: 24px;
        padding-top: 0;
    }

    .case-section {
        margin-bottom: 25px;
    }

    .case-bullets li {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .case-description {
        font-size: 15px;
    }

    .case-image-container {
        aspect-ratio: 16 / 9;
        max-height: 30vh;
    }

    .result-value {
        font-size: 28px;
    }

    .result-text {
        font-size: 13px;
    }

    .case-cta {
        padding: 10px 20px;
        font-size: 12px;
    }

    .case-divider {
        margin: 0;
    }
}
