/**
 * Texto + Imagem Component Styles
 * 
 * Componente que exibe texto e imagem lado a lado no desktop,
 * com imagem sempre em cima no mobile.
 */

/* ===== BASE STYLES ===== */
.texto-imagem {
    width: 100%;
    padding: 80px 0;
    position: relative;
}

/* ===== BACKGROUND COLORS ===== */
.texto-imagem--bg-branco {
    background-color: var(--neutral-1000);
}

.texto-imagem--bg-cinza-claro {
    background-color: var(--neutral-800);
}

.texto-imagem--bg-cinza-escuro {
    background-color: var(--neutral-300);
}

.texto-imagem--bg-verde {
    background-color: var(--climate-scanner-verde);
}
.texto-imagem--bg-verde-claro {
    background-color: #DBE6D6;
}


.texto-imagem--bg-roxo {
    background-color: var(--climate-scanner-roxo);
}

.texto-imagem--bg-transparente {
    background-color: transparent;
}

/* ===== CONTENT LAYOUT ===== */
.texto-imagem__content {
    display: flex;
    align-items: stretch;
    gap: 32px;
    width: 100%;
}

/* ===== TEXT CONTENT ===== */
.texto-imagem__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0; /* Prevents flex item from overflowing */
    margin-top: 20px;
}

.texto-imagem__title {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--heading-2-large);
    line-height: var(--heading-2-line-height-large);
    color: var(--neutral-300);
    margin: 0;
}

.texto-imagem__title-link {
    text-decoration: none;
    color: inherit;
}
body.page-template-template-brasil .texto-imagem__title {
    color: #005223;
}

body.page-template-template-brasil .texto-imagem__title-link {
    color: #005223;
    text-decoration: none;
}

body.non-home .texto-imagem__title {
    font-size: var(--heading-3-large);
}

.texto-imagem__subtitle {
    font-weight: var(--font-weight-semibold);
    font-size: var(--heading-4-small);
    line-height: var(--heading-3-line-height-large);
    color: var(--neutral-300);
    margin-top: 34px;
    margin-bottom: 15px;
}

/* Title color adjustments for different backgrounds */
.texto-imagem--bg-verde .texto-imagem__title,
.texto-imagem--bg-roxo .texto-imagem__title {
    color: var(--neutral-90);
}

.texto-imagem--bg-verde .texto-imagem__title-link,
.texto-imagem--bg-roxo .texto-imagem__title-link {
    color: var(--neutral-90);
    text-decoration: none;
}

.texto-imagem--bg-cinza-escuro .texto-imagem__title {
    color: var(--neutral-1000);
}

.texto-imagem--bg-cinza-escuro .texto-imagem__title-link {
    color: var(--neutral-1000);
    text-decoration: none;
}

.texto-imagem__description {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-regular);
    font-size: var(--body-large);
    line-height: var(--body-line-height-large);
    color: var(--neutral-100);
}

/* Description color adjustments for different backgrounds */
.texto-imagem--bg-verde .texto-imagem__description,
.texto-imagem--bg-roxo .texto-imagem__description,
.texto-imagem--bg-verde .texto-imagem__description p,
.texto-imagem--bg-roxo .texto-imagem__description p {
    color: var(--neutral-90);
}

.texto-imagem--bg-cinza-escuro .texto-imagem__description {
    color: var(--neutral-1000);
}


/* ===== IMAGE CONTENT ===== */
.texto-imagem__image-container {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-width: 0; /* Prevents flex item from overflowing */
}

.texto-imagem__image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-medium);
    overflow: hidden;
    position: relative;
}

.texto-imagem__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ===== IMAGE POSITION VARIATIONS ===== */
.texto-imagem__content {
    flex-direction: row;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens (1200px and below) */
@media (max-width: 1200px) {
    .texto-imagem {
        padding: 64px 0;
    }
    
    .texto-imagem__title {
        font-size: var(--heading-3-large);
        line-height: var(--heading-3-line-height-large);
    }
    
    /* .texto-imagem__image-wrapper {
        height: 350px;
    } */
}

/* Medium screens (910px and below) */
@media (max-width: 910px) {
    .texto-imagem {
        padding: 48px 0;
    }
    
    .texto-imagem__title {
        font-size: var(--heading-4-large);
        line-height: var(--heading-4-line-height-large);
    }
    
    /* .texto-imagem__image-wrapper {
        height: 300px;
    } */
}

@media (min-width: 769px) {
    .texto-imagem--img-esquerda .texto-imagem__text {
        order: 2;
    }
    
    .texto-imagem--img-esquerda .texto-imagem__image-container {
        order: 1;
    }
    
    .texto-imagem--img-direita .texto-imagem__text {
        order: 1;
    }
    .texto-imagem--img-direita .texto-imagem__image-container {
        order: 2;
    }

    .texto-imagem--img-media > .container {
        max-width: 1200px;
    }
    .texto-imagem--img-media .texto-imagem__image-container {
        flex: 46;
    }
    .texto-imagem--img-media .texto-imagem__text {
        flex: 54;
    }

    .texto-imagem--img-menor .texto-imagem__image-container {
        flex: 31;
    }
    .texto-imagem--img-menor .texto-imagem__text {
        flex: 69;
    }
}
/* Mobile screens (768px and below) */
@media (max-width: 768px) {
    .texto-imagem {
        padding: 32px 0;
    }
    
    /* Mobile: always stack vertically with image on top */
    .texto-imagem__content {
        flex-direction: column;
        gap: 16px;
    }
    body.non-home .texto-imagem__content {
        gap: 24px;
    }
    
    .texto-imagem__text {
        order: 2;
        gap: 6px;
        margin-top: 0;
    }
    
    .texto-imagem__image-container {
        order: 1;
    }
    .texto-imagem--img-base .texto-imagem__image-container {
        order: 3;
    }

    .texto-imagem--img-omitida .texto-imagem__image-container {
        display: none;
    }
    
    .texto-imagem__title {
        font-size: 28px;
        line-height: 1.45;
    }
    body.non-home .texto-imagem__title {
        font-size: 24px;
    }

    .texto-imagem__subtitle {
        font-size: 16px;
        margin-top: 6px;
        margin-bottom: 19px;
    }

    .texto-imagem--text-centralizado {
        text-align: center;
    }
    .texto-imagem--text-direita {
        text-align: right;
    }
    
    .texto-imagem__description,
    .texto-imagem__description p,
    .texto-imagem__description ul,
    .texto-imagem__description ol {
        font-size: 12px;
        line-height: 1.8;
    }
    
    .texto-imagem__button {
        margin-bottom: 6px;
    }

    .texto-imagem__image-wrapper {
        height: 350px;
    }

}

/* Small mobile screens (480px and below) */
@media (max-width: 480px) {
    .texto-imagem {
        padding: 32px 0;
    }
    
    .texto-imagem__text {
        gap: 12px;
    }
    
    .texto-imagem__title {
        font-size: var(--heading-5-small);
        line-height: var(--heading-5-line-height-small);
    }
    
    .texto-imagem__description {
        font-size: var(--body-tiny);
        line-height: var(--body-line-height-tiny);
    }
    
    .texto-imagem__image-wrapper {
        height: 280px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .texto-imagem {
        padding: 20px 0;
        break-inside: avoid;
    }
    
    .texto-imagem__content {
        flex-direction: column;
        gap: 20px;
    }
}
