/* Common */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    overflow: hidden;
}

.main-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #fff;
}

/* Section Titles */
.main-section h2,
.main-section-title,
.main-clients h2,
.main-products-title {
    font-size: 48px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.main-section-desc,
.main-clients-desc,
.main-products-desc {
    font-size: 18px;
    color: #666;
    margin-bottom: 70px;
    text-align: center;
    word-break: keep-all;
    line-height: 1.6;
}

/* Section 1 - Slider */
#main-slider {
    background: #000;
}

.main-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.main-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.main-slide.active {
    opacity: 1;
}

.main-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.main-slide-1 { background: url('/mncos2/images/main/slide1.jpg') center/cover no-repeat; }
.main-slide-2 { background: url('/mncos2/images/main/slide2.jpg') center/cover no-repeat; }
.main-slide-3 { background: url('/mncos2/images/main/slide3.jpg') center/cover no-repeat; }

.main-slide-content {
    position: relative;
    z-index: 1;
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 20%;
}

.main-hero-title {
    font-size: 64px;
    margin-bottom: 20px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
}

.main-hero-subtitle {
    font-size: 24px;
    color: #ffffff;
}

.navigation {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 80px;
    color: white;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

.main-prev, .main-next {
    position: relative;
    cursor: pointer;
    padding: 5px 0;
    pointer-events: all;
}

.main-prev::after, .main-next::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.main-prev:hover::after, .main-next:hover::after {
    width: 100%;
}

/* Section 2 - Products */
#main-products {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

.main-products-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.main-products-grid {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    width: 100%;
}

.main-product-item {
    width: 25%;
    position: relative;
    overflow: hidden;
    height: 450px;
}

.main-product-thumb {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.main-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-product-item:hover .main-product-thumb {
    transform: scale(1.1);
}

.main-product-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    padding: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.3s ease;
}

.main-product-item:hover .main-product-content {
    background: rgba(0,0,0,0.5);
}

.main-product-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 500;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.main-product-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    /*3줄로 맞추기*/
    display: -webkit-box;
   -webkit-line-clamp: 3;     /* 표시할 줄 수 */
   -webkit-box-orient: vertical;
   overflow: hidden;
   text-overflow: ellipsis;

}

.main-product-item:hover .main-product-title,
.main-product-item:hover .main-product-desc {
    transform: translateY(-10px);
}

.main-more-btn {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.main-more-btn img {
    margin-left: 10px;
    height: 18px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-more-btn:hover img {
    transform: translateX(5px);
}

/* Section 3 - Portfolio */
#main-portfolio {
    height: 100vh;
    display: flex;
    align-items: center;
}

.main-portfolio-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.main-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.main-portfolio-item {
    padding: 40px;
    text-align: center;
    height: 260px;
}

.main-portfolio-item img {
    max-width: 100%;
    height: 120px;
    margin-bottom: 20px;
}

.main-portfolio-brand {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.main-portfolio-name {
    position: relative;
    padding-top: 15px;
    color: #666;
    font-size: 12px;
}

.main-portfolio-name:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: #999;
}

/* Section 4 - History */
#main-history {
    background: url('/mncos2/images/main/img1.jpg') center/cover no-repeat;
    position: relative;
}

#main-history::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

.main-history-content {
    position: relative;
    z-index: 1;
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 20%;
}

.main-history-title {
    font-size: 64px;
    margin-bottom: 20px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.main-history-subtitle {
    font-size: 24px;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.main-history-nav {
    position: absolute;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    padding: 0 80px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.main-history-prev,
.main-history-next {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-history-prev:hover,
.main-history-next:hover {
    opacity: 0.7;
}

/* Section 5 - News */
#main-news {
    height: calc(100vh - 200px) !important;
    display: flex;
    align-items: center;
    padding-bottom: 200px;  /* 푸터 높이만큼 패딩 추가 */
}

.main-news-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.main-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 800px;
}

.main-news-title {
    font-size: 48px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.main-news-more {
    display: flex;
    align-items: center;
    color: #111;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.main-news-more:hover {
    opacity: 0.7;
}

.main-news-more img {
    margin-left: 10px;
    height: 18px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-news-more:hover img {
    transform: translateX(5px);
}

.main-news-list {
    border-top: 1px solid #eee;
    width: 100%;
}

.main-news-item {
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.main-news-item a {
    color: #111;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.main-news-item a:hover {
    opacity: 0.7;
}

.main-news-date {
    color: #999;
    font-size: 14px;
}

/* FullPage.js Controls */
.fp-controlArrow,
#fp-nav {
    display: none !important;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .main-hero-title {
        font-size: 40px;
    }
    .main-hero-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto !important;
    }

    #main-news {
        min-height: 50vh !important;
        height: auto !important;
        padding: 0 !important;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    footer {
        position: relative;
        height: auto;
        padding: 40px 20px;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 50px;
    }

    #main-fullpage {
        height: auto !important;
        transform: none !important;
    }
    
    .main-section {
        height: auto !important;
        min-height: 100vh;
        padding: 0 !important;
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
    }

    .fp-overflow {
        height: auto !important;
        overflow: visible !important;
    }

    .fp-section {
        height: auto !important;
    }

    .fp-slides, .fp-tableCell {
        height: auto !important;
        position: relative !important;
        transform: none !important;
    }

    .main-hero-title {
        font-size: 32px;
    }
    .main-hero-subtitle {
        font-size: 16px;
    }
    .main-product-item {
        width: 100%;
        height: auto;
    }
    .main-product-title {
        font-size: 15px;
        margin-bottom: 0;
    }
    .main-product-desc {
        font-size: 9px;
        margin-bottom: 0;
    }
    .main-more-btn {
        font-size: 9px;
    }
    .main-product-content {
        top: 30px;
    }
    .main-history-content {
        top: 300px;
    }
    .main-history-title {
        font-size: 25px;
    }
    .main-history-subtitle {
        font-size: 11px;
    }
    .main-history-prev,
    .main-history-next {
        font-size: 11px;
    }
    .main-news-more {
        font-size: 14px;
    }
    .navigation {
        top: 65%;
    }

    .main-portfolio-grid {
        display: block;  /* 그리드를 블록으로 변경 */
        padding: 0 20px;
    }

    .main-portfolio-item {
        width: 100%;
        margin-bottom: 30px;
        padding: 20px;
        height: auto;
    }

    /* 3개 이후의 아이템 숨기기 */
    .main-portfolio-item:nth-child(n+4) {
        display: none;
    }

    .main-portfolio-item img {
        height: 200px;
        object-fit: contain;
    }

    .main-portfolio-brand {
        font-size: 18px;
        margin-top: 15px;
    }

    .main-portfolio-name {
        font-size: 14px;
        margin-top: 10px;
    }

    .main-news-inner {
        padding: 40px 20px;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .main-news-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 30px;
    }

    .main-news-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .main-news-more {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-portfolio-grid {
        padding: 0 15px;
    }

    .main-portfolio-item {
        margin-bottom: 20px;
        padding: 15px;
    }

    .main-portfolio-item img {
        height: 150px;
    }

    .main-portfolio-brand {
        font-size: 16px;
    }

    .main-portfolio-name {
        font-size: 13px;
    }

    #main-news {
        min-height: 50vh !important;
    }

    .main-news-inner {
        padding: 30px 15px;
    }

    .main-news-title {
        font-size: 28px;
    }

    .main-news-more {
        font-size: 13px;
    }

    .main-news-item {
        padding: 15px 0;
    }

    .main-news-item a {
        font-size: 13px;
    }

    .main-news-date {
        font-size: 11px;
    }

}

/* fullPage.js 관련 스타일 수정 */
.fp-enabled body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.fp-section {
    position: relative;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.fp-slide {
    float: left;
}

.fp-slide, .fp-slidesContainer {
    height: 100%;
    display: block;
}

.fp-slides {
    z-index: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    -webkit-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
}

/* fullPage.js 관련 스타일 수정 */
.fp-overflow {
    overflow: hidden !important;
    height: 100% !important;
}

/* 스크롤바 숨기기 추가 */
.fp-overflow::-webkit-scrollbar {
    display: none;
}

.fp-overflow {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* news 섹션 높이 조정 */
#main-news {
    height: 100vh !important;
    overflow: hidden;
}

.main-news-inner {
    height: 100%;
    padding: 100px 40px;
    box-sizing: border-box;
}

/* 섹션 내부 컨텐츠 스타일 */
.main-products-inner,
#main-portfolio .main-portfolio-inner,
#main-history .main-history-content,
#main-news .main-news-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Products 슬라이더 스타일 */
.main-products-slider {
    width: 100%;
    margin: 0 auto;
}

.main-products-slider .slick-slide {
    padding: 0 15px;
}

.main-products-slider .slick-dots {
    bottom: -40px;
}

.main-products-slider .slick-prev,
.main-products-slider .slick-next {
    z-index: 1;
}

.main-products-slider .slick-prev {
    left: -50px;
}

.main-products-slider .slick-next {
    right: -50px;
}



/****/
::selection {
    background-color:#B32018 ;
    color: #fff;
}
::-moz-selection {
    background-color: #B32018;
    color: #fff;
}