/**
 * Market Insights Section
 * Styles for market insights section with carousel
 *
 * @package SeedDigital
 * @since 1.0.0
 */

/* ============================================
   Section
   ============================================ */
.section-market-insights {
    position: relative;
    width: 100%;
}

/* ============================================
   Top Section (Gray Background)
   ============================================ */
.market-insights__top-section {
    width: 100%;
    background: #F2F4F7;
    padding-top: 290px;
    z-index: 2;
    overflow: hidden; /* Esconde o bloco azul que vai sair */
}

.market-insights__header {
    text-align: center;
    margin-bottom: 56px;
}

.market-insights__title {
    font-family: 'Be Vietnam', sans-serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 64px;
    color: #000000;
    margin: 0 0 16px 0;
    font-feature-settings: 'pnum' on, 'lnum' on;
}

.market-insights__subtitle {
    font-family: 'Be Vietnam', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 29px;
    color: #667085;
    margin: 0;
}

/* ============================================
   Cards Grid/Carousel
   ============================================ */
.market-insights__cards {
    position: relative;
    width: 100%;
    max-width: 1266px;
    margin: 56px auto 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 411px 411px 411px;
    grid-auto-rows: min-content;
    gap: 16px;
}

/* First card (left) - spans 2 rows, larger */
.market-insights__cards .market-insight-card:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
}

.market-insights__cards .market-insight-card:first-child .market-insight-card__image {
    height: 816px;
}

/* 2nd card (top middle) */
.market-insights__cards .market-insight-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.market-insights__cards .market-insight-card:nth-child(2) .market-insight-card__image {
    height: 400px;
}

/* 3rd card (top right) */
.market-insights__cards .market-insight-card:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.market-insights__cards .market-insight-card:nth-child(3) .market-insight-card__image {
    height: 400px;
}

/* 4th card spans columns 2 and 3 (below cards 2 and 3) */
.market-insights__cards .market-insight-card:nth-child(4) {
    grid-column: 2 / 4;
    grid-row: 2;
}

.market-insights__cards .market-insight-card:nth-child(4) .market-insight-card__image {
    height: 400px;
}

/* ============================================
   Insight Card
   ============================================ */
.market-insight-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.market-insight-card__image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
}

.market-insight-card__tag {
    align-self: flex-end;
    background: #FFFFFF;
    border-radius: 40px;
    padding: 7.5px 15px;
    font-family: 'Suzano Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #065986;
    text-align: center;
    font-feature-settings: 'pnum' on, 'lnum' on;
}

.market-insight-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 34px;
    background: linear-gradient(180deg, rgba(0, 23, 33, 0) 0%, #001721 100%);
    border-radius: 0 0 32px 32px;
}

.market-insight-card__title {
    font-family: 'Be Vietnam', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 120%;
    color: #FFFFFF;
    margin: 0 0 24px 0;
    font-feature-settings: 'pnum' on, 'lnum' on;
}

.market-insight-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Suzano Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.market-insight-card__link:hover {
    opacity: 0.8;
}

.market-insight-card__link i {
    font-size: 16px;
    margin-left: 8px;
    display: inline-block;
    color: #FFFFFF;
}

/* ============================================
   Bottom Section (Blue Background - Floating)
   ============================================ */
.market-insights__bottom-section {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    min-height: 1200px;
    background: #36BFFA;
    z-index: 1;
    /* Calcula onde os cards começam a entrar no azul */
    /* Header: 100px + título/subtítulo ~80px = ~180px */
    /* Cards começam: ~180px + 56px margin = ~236px */
    /* Cards têm ~816px de altura, então terminam em ~1052px */
    /* Bloco azul começa antes, em ~700px para criar sobreposição */
    top: 700px;
    padding-top: 400px; /* Espaço para os cards entrarem */
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1920px) {
    .market-insights__bottom-section {
        width: 100%;
        left: 0;
        transform: none;
    }
}

@media (max-width: 1024px) {
    .market-insights__top-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .market-insights__title {
        font-size: 36px;
        line-height: 48px;
    }

    .market-insights__subtitle {
        font-size: 20px;
        line-height: 24px;
    }

    .market-insight-card__image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .market-insights__top-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .market-insights__title {
        font-size: 32px;
        line-height: 40px;
    }

    .market-insights__subtitle {
        font-size: 18px;
        line-height: 22px;
    }

    .market-insight-card__image {
        height: 250px;
        padding: 20px;
    }

    .market-insight-card__content {
        padding: 20px;
    }

    .market-insight-card__title {
        font-size: 20px;
    }

}

