.market-section {
    text-align: center;
    padding: 100px 40px 80px;
    background: #fafafa;
}

.market-content h1 {
    font-size: 43px;
    color: #111111;
    font-weight: 700;
    margin-bottom: 20px;
}


.market-content p {
    font-size: 20px;
    color: #2d2d2d;
    font-weight: 500;
}

.widget-header {
    background: #fafafa;
    padding: 0 20px 30px;
}

.widget-header-container {
    max-width: 1500px; /* 카드 컨테이너랑 동일한 max-width */
    width: 100%;
    margin: 0 auto; /* 중앙 정렬 */
    display: flex;
    justify-content: space-between;
     align-items: flex-end;
}

.widget-header-text h2 {
    font-size: 30px;
    margin-bottom: 5px;
    color:#111111;
}

.widget-header-text p {
    font-size: 18px;
    color: #2d2d2d;
}

.widget-header-button a {
    text-decoration-line: none;
    border: 2px solid #c7c7c7;
    border-radius: 20px;
    padding: 5px 15px;
    color: #232323;
    font-size: 14px;
    font-weight: 600;
}

.widget-header-button a:hover {
    border: 2px solid #a0a0a0;
    background: #a0a0a0;
    color: #fff;
}


.widget-img-card-section {
    width: 100%;
    padding: 0 20px 60px;
    background: #fafafa;
    display: flex;
    justify-content: center;
}

.widget-img-card-container {
    max-width: 1500px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center; /* 핵심 */
    gap: 20px;
}

.widget-img-card-box {
    text-align: left;  
}

.widget-img-wrapper {
    width: 350px;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.widget-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease;
    display: block;
}

.widget-img-card-box:hover .widget-img {
    transform: scale(1.08);
}


.widget-img-card-box h3 {
    text-align: left; 
    font-weight: 500;
    margin-top: 15px;
}

.widget-img-card-box p {
    text-align: left; 
    margin-top: 7px;
}

.icon-header {
    background: #fafafa;
    padding: 70px 20px 30px;
}

.icon-header-container {
    max-width: 1500px; /* 카드 컨테이너랑 동일한 max-width */
    width: 100%;
    margin: 0 auto; /* 중앙 정렬 */
    display: flex;
    justify-content: space-between;
     align-items: flex-end;
}

.icon-header-text h2 {
    font-size: 30px;
    margin-bottom: 5px;
    color:#111111;
}

.icon-header-text p {
    font-size: 18px;
    color: #2d2d2d;
}

.icon-header-button a {
    text-decoration-line: none;
    border: 2px solid #c7c7c7;
    border-radius: 20px;
    padding: 5px 15px;
    color: #232323;
    font-size: 14px;
    font-weight: 600;
}

.icon-header-button a:hover {
    border: 2px solid #a0a0a0;
    background: #a0a0a0;
    color: #fff;
}

.icon-img-card-section {
    width: 100%;
    padding: 0 20px 60px;
    background: #fafafa;
    display: flex;
    justify-content: center;
}

.icon-img-card-container {
    max-width: 1500px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center; /* 핵심 */
    gap: 20px;
}

.icon-img-card-box {
    text-align: left;  
    margin-bottom: 20px;
}

.icon-img {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
}

.icon-img-card-box h3 {
    text-align: left; 
    font-weight: 500;
    margin-top: 5px;
}

.icon-img-card-box p {
    text-align: left; 
    margin-top: 7px;
}

/*
support CTA Section
*/

.market-cta-section {
    width: 100%;
    padding: 120px 40px;
    text-align: center;
    background: linear-gradient(135deg, #b70701 0%, #690501 100%);
    transition: all 0.3s ease;
}

.market-cta-content h2 {
    font-size: 43px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 16px;
}

.market-cta-content p {
    font-size: 20px;
    color: #ffffff;
    font-weight: 400;
    margin-bottom: 32px;
    opacity: 0.9;
}

.market-cta-btn {
    padding: 16px 48px;
    background: #ffffff;
    text-decoration-line: none;
    color: #b70701;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.market-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.widget-best-header,
.icon-best-header {
    background: #fafafa;
    padding: 40px 20px 30px;
}

.best-img-card-section {
    width: 100%;
    padding: 0 20px 60px;
    background: #fafafa;
    display: flex;
    justify-content: center;
}

.best-img-card-container {
    max-width: 1500px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center; /* 핵심 */
    gap: 20px;
}

.best-img-card-box {
    text-align: left;  
    margin-bottom: 20px;
}

.best-img {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    border: 1px solid #e1e1e1;
}

.best-img-card-box h3 {
    text-align: left; 
    font-weight: 500;
    margin-top: 5px;
}

.best-img-card-box p {
    text-align: left; 
    margin-top: 7px;
}


@media (max-width: 1200px) {
    .widget-img-card-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .icon-img-card-container, 
    .best-img-card-container {
        grid-template-columns: repeat(4, 1fr); 
    }

    .widget-img-wrapper {
        width: 100%; 
        max-width: 350px;
    }
}

@media (max-width: 1024px) {
    .market-section {
        padding: 60px 20px 40px;
    }

    .market-content h1 {
        font-size: 32px;
    }

    .widget-img-card-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .icon-img-card-container,
    .best-img-card-container {
        grid-template-columns: repeat(3, 1fr); 
    }

    .icon-img, .best-img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 768px) {
    .widget-header-container, 
    .icon-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .widget-header-text h2, 
    .icon-header-text h2 {
        font-size: 24px;
    }

    .widget-img-card-container,
    .icon-img-card-container,
    .best-img-card-container {
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }

    .market-cta-section {
        padding: 80px 20px;
    }

    .market-cta-content h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .widget-img-card-container,
    .icon-img-card-container,
    .best-img-card-container {
        grid-template-columns: repeat(1, 1fr);
    }

    .widget-img-wrapper {
        height: 300px; 
    }
    
    .market-cta-btn {
        width: 100%;
        padding: 14px;
    }
}