/* ========================================
   Section2: AI 아파트 분석 섹션
   ======================================== */
.ai-analysis-section {
    width: 100%;
    max-width: 1440px;
    height: clamp(550px, 55.83vw, 804px);
    margin: 0 auto;
    padding: 0;
    background: white;
    position: relative;
}

.ai-analysis-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.08) 40%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.08) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
}

.ai-cards-grid {
    position: relative;
    width: 100%;
    height: 100%;
}

.ai-card {
    position: absolute;
    border-radius: clamp(16px, 1.67vw, 24px);
    overflow: hidden;
    cursor: pointer;
}

.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 0;
}

.ai-card:hover::before {
    transform: scale(1.1);
}

.ai-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.ai-card:hover::after {
    opacity: 1;
}

/* 왼쪽 큰 카드 */
/* 1440px: left=190px, width=410px */
/* 768px: left=101px, width=219px */
.ai-card-large {
    left: clamp(101px, 13.19vw, 190px);
    top: clamp(60px, 6.67vw, 96px);
    width: clamp(219px, 28.47vw, 410px);
    height: clamp(327px, 42.5vw, 612px);
}

.ai-card-large::before {
    background-image: url('../../images/section2-reconstruction.jpg');
}

/* 오른쪽 상단 긴 카드 */
/* 1440px: left=626px (190+410+16gap=616), width=634px */
/* 768px: left=336px, width=338px */
.ai-card-wide {
    left: clamp(336px, 43.47vw, 626px);
    top: clamp(60px, 6.67vw, 96px);
    width: clamp(338px, 44.03vw, 634px);
    height: clamp(149px, 19.44vw, 280px);
}

.ai-card-wide::before {
    background-image: url('../../images/section2-investment.jpg');
}

/* 오른쪽 하단 왼쪽 카드 */
/* 1440px: left=626px, width=309px */
/* 768px: left=336px, width=165px */
.ai-card-small:nth-of-type(3) {
    left: clamp(336px, 43.47vw, 626px);
    top: clamp(225px, 27.22vw, 392px);
    width: clamp(165px, 21.46vw, 309px);
    height: clamp(168px, 21.94vw, 316px);
}

.ai-card-small:nth-of-type(3)::before {
    background-image: url('../../images/section2-hierarchy.jpg');
}

/* 오른쪽 하단 오른쪽 카드 */
/* 1440px: left=951px (626+309+16gap=951), width=309px */
/* 768px: left=517px, width=165px */
.ai-card-small:nth-of-type(4) {
    left: clamp(517px, 66.04vw, 951px);
    top: clamp(225px, 27.22vw, 392px);
    width: clamp(165px, 21.46vw, 309px);
    height: clamp(168px, 21.94vw, 316px);
}

.ai-card-small:nth-of-type(4)::before {
    background-image: url('../../images/section2-analysis.jpg');
}

.ai-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
}

.ai-card-content {
    position: absolute;
    bottom: clamp(20px, 2.22vw, 32px);
    left: clamp(20px, 2.22vw, 32px);
    z-index: 3;
    color: white;
}

.ai-card-title {
    font-size: clamp(20px, 1.94vw, 28px);
    font-weight: 700;
    line-height: 1.36;
    margin-bottom: clamp(8px, 0.83vw, 12px);
    color: white;
}

.ai-card-description {
    font-size: clamp(14px, 1.11vw, 16px);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   AI Analysis Mobile Styles
   ======================================== */
@media (max-width: 767px) {
    /* vw 반응형 (375px 기준) */
    .ai-analysis-section {
        display: block !important;
        width: 89.33vw !important;
        margin: 0 auto !important;
        padding: 15.2vw 0 24.27vw 0 !important;
        background: white !important;
        position: relative !important;
        height: auto !important;
    }

    .ai-cards-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 6.4vw !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }

    .ai-card {
        position: relative !important;
        width: 89.33vw !important;
        height: 57.07vw !important;
        border-radius: 5.33vw !important;
        overflow: hidden !important;
    }

    .ai-card-large,
    .ai-card-wide,
    .ai-card-small {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 89.33vw !important;
        height: 57.07vw !important;
    }

    .ai-card img,
    .ai-card-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .ai-card img {
        object-fit: cover !important;
    }

    .ai-card-overlay {
        background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%) !important;
    }

    .ai-card-content {
        position: absolute !important;
        left: 7.47vw !important;
        top: 17.07vw !important;
        width: 74.4vw !important;
        z-index: 2 !important;
    }

    .ai-card-title {
        font-size: 5.87vw !important;
        font-weight: 700 !important;
        line-height: 1.36 !important;
        color: #FFFFFF !important;
        margin: 0 0 2.67vw 0 !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    }

    .ai-card-description {
        font-size: 3.73vw !important;
        font-weight: 400 !important;
        line-height: 1.71 !important;
        color: #FFFFFF !important;
        margin: 0 !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    }

    .ai-card-small .ai-card-content {
        left: 6.4vw !important;
        top: 25.07vw !important;
        width: 74.4vw !important;
    }

    .ai-card-small .ai-card-title {
        margin: 0 0 2.67vw 0 !important;
    }

    .ai-card-small .ai-card-description {
        margin-top: 2.67vw !important;
    }

    .ai-card-fourth .ai-card-content {
        left: 7.47vw !important;
        top: 17.07vw !important;
    }
}
