@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Lato:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #6b0fa0 0%, #8b1fb8 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.case-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
}

.case-container {
    max-width: 1600px;
    width: 100%;
    animation: fadeInContainer 0.8s ease-out;
}

/* Título Principal */
.case-main-title {
    font-size: 42px;
    font-weight: 900;
    color: white;
    text-align: left;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-family: 'Montserrat', sans-serif;
    animation: slideInFromLeft 0.8s ease-out;
}

/* Grid de Conteúdo */
.case-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr;
    grid-template-rows: auto auto;
    gap: 30px;
    align-items: start;
}

/* Card de Texto - Otimizado para textos longos */
.text-card {
    grid-column: 1;
    grid-row: 1;
    background: rgba(139, 31, 184, 0.4);
    border: 4px solid white;
    border-radius: 30px;
    padding: 40px 38px;
    animation: slideInFromLeft 1s ease-out 0.2s backwards;
    max-height: 550px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

/* Scrollbar estilizada para o card de texto */
.text-card::-webkit-scrollbar {
    width: 10px;
}

.text-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.text-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.text-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.case-text {
    font-size: 32px;
    color: white;
    line-height: 1.75;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    word-wrap: break-word;
    white-space: pre-line;
}

.case-text strong {
    font-weight: 700;
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 36px;
}

.case-text strong:first-child {
    margin-top: 0;
}

/* Imagem Principal */
.case-image {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 100%;
    height: 100%;
    min-height: 580px;
    object-fit: cover;
    object-position: center;
    border-radius: 30px;
    animation: slideInFromRight 1s ease-out 0.4s backwards;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Placeholder para imagem não encontrada */
.image-placeholder {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 100%;
    min-height: 580px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    animation: slideInFromRight 1s ease-out 0.4s backwards;
}

/* Botão de Voltar */
.btn-back {
    grid-column: 1;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #7b1fa2;
    border: none;
    padding: 18px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    animation: fadeInUp 1s ease-out 0.8s backwards;
    align-self: end;
    margin-top: 0;
}

.btn-back:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Animações */
@keyframes fadeInContainer {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 1200px) {
    .case-main-title {
        font-size: 42px;
    }

    .case-image,
    .image-placeholder {
        min-height: 600px;
    }
}

@media (max-width: 968px) {
    .case-section {
        padding: 40px 30px;
    }

    .case-main-title {
        font-size: 36px;
        margin-bottom: 30px;
    }

    .case-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 25px;
    }

    .text-card {
        grid-column: 1;
        grid-row: 1;
        max-height: 450px;
        padding: 35px 30px;
    }

    .case-text {
        font-size: 16px;
        line-height: 1.8;
    }

    .case-image,
    .image-placeholder {
        grid-column: 1;
        grid-row: 2;
        min-height: 400px;
    }

    .btn-back {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        padding: 20px 40px;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .case-section {
        padding: 30px 20px;
    }

    .case-main-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .case-grid {
        gap: 20px;
    }

    .text-card {
        max-height: 400px;
        padding: 30px 25px;
        border-radius: 25px;
        border: 3px solid white;
    }

    .case-text {
        font-size: 15px;
        line-height: 1.7;
    }

    .case-text strong {
        font-size: 16px;
        margin-top: 15px;
    }

    .case-image,
    .image-placeholder {
        min-height: 350px;
        border-radius: 25px;
    }

    .btn-back {
        padding: 18px 35px;
        font-size: 14px;
        border-radius: 25px;
    }
}