/* 디지털 미디어 사업 페이지 전용 CSS */

/* 메가메뉴 z-index 보정 - 메가메뉴가 다른 요소들 위에 표시되도록 */
.mega-dropdown {
    z-index: 10000 !important;
}

.nav-item .mega-dropdown {
    z-index: 10000 !important;
}

/* 히어로 섹션 (400px 높이로 수정) */
.digital-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 400;
    letter-spacing: 8px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 3px;
    margin-bottom: 10px;
    color: #ff6b35;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-description {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.1s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

.scroll-arrow {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-5px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* 메인 콘텐츠 */
.digital-content {
    padding: 80px 0;
    background: white;
}

/* 회사 소개 섹션 - Ethics 페이지 스타일 적용 */
.company-intro-section {
    margin-bottom: 60px;
    text-align: center;
}

.content-intro {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.intro-header {
    position: relative;
    margin-bottom: 20px;
}

.intro-header .intro-subtitle {
    margin: 0 auto;
    width: -moz-fit-content;
    width: fit-content;
}

.intro-subtitle {
    font-size: 1.5rem;
    color: #ff6b35;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.homepage-btn {
    position: absolute;
    right: 5px; /* moved slightly left from the edge */
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1.5px solid #ff6b35;
    color: #ff6b35;
    background: transparent;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: all .2s ease;
}

.homepage-btn i {
    font-size: 1rem;
}

.homepage-btn:hover {
    background: #ff6b35;
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.25);
}

.intro-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #333;
}

.intro-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* 회사명 섹션 */
.company-name-section {
    margin-bottom: 40px;
    text-align: center;
}

.company-name-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.company-name {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.company-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f39c12);
    margin: 0 auto;
    border-radius: 2px;
}

/* 주요 제품 섹션 */
.products-section {
    margin-bottom: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 450;
    color: #333;
    margin-bottom: 20px;
}

.section-line {
    width: 90px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f39c12);
    margin: 0 auto;
    border-radius: 2px;
}

/* 제품 레이아웃 */
.products-layout {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: center;
}

/* 좌측 목차 박스 */
.products-sidebar {
    flex: 0 0 320px;
}

.products-nav {
    background: white;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    z-index: 1;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-title i {
    color: #ff6b35;
    font-size: 1.3rem;
}

.nav-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f39c12);
    margin: 0 auto 25px;
    border-radius: 2px;
}

.products-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0;
}

.products-nav-list li {
    margin-bottom: 15px;
}

.products-nav-list li:last-child {
    margin-bottom: 0;
}

.products-nav .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 10px;
    color: #666;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.1rem;
    border: 2px solid transparent;
}

.products-nav .nav-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.products-nav .nav-item:hover {
    background: #f8f9fa;
    color: #ff6b35;
    transform: translateX(5px);
}

.products-nav .nav-item.active {
    background: linear-gradient(135deg, #ff6b35, #f39c12);
    color: white;
    border-color: #ff6b35;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* 우측 이미지 박스 */
.products-content {
    flex: 1;
}

.product-display-box {
    position: relative;
    width: 100%;
    height: 630px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background: white;
}

.product-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.product-display.active {
    opacity: 1;
    visibility: visible;
}

.product-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
    border-radius: 15px;
    background: #f8f9fa;
}

.product-display .product-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 15px;
}

.product-display .product-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.product-display img[style*="display: none"]+.product-placeholder {
    display: flex;
}

/* 디지털 제품 그리드 (4개 제품) */
.digital-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 디지털 제품 카드 */
.digital-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 380px;
    display: flex;
    flex-direction: column;
}

.digital-product-card:hover,
.digital-product-card.hover-effect {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.digital-product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.product-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.product-image img[style*="display: none"]+.product-placeholder {
    display: flex;
}

.product-info {
    padding: 25px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.product-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
    flex: 1;
}

/* 데스크톱/모바일 전환용 라벨 기본값 */
.label-desktop { display: inline; }
.label-mobile { display: none; }

@media (max-width: 768px) {
  /* 모바일에서는 'MAIN'만 표시 */
  .label-desktop { display: none !important; }
  .label-mobile { display: inline !important; }
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    /* Hero */
    .digital-hero { height: 400px; }
    .hero-title { font-size: 1.8rem; letter-spacing: 4px; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-description { font-size: 0.95rem; }

    /* Main paddings & intro */
    .digital-content { padding: 50px 0; }
    .content-intro { padding: 0 16px; }
    .intro-title { font-size: 1.6rem; }
    .intro-description { font-size: 1rem; }

    /* Products layout spacing */
    .products-layout { gap: 24px; padding: 0 16px; }

    /* Display box size between 1200 and 768 */
    .product-display-box { height: 440px; }
}

@media (max-width: 768px) {
    .digital-hero { height: 28vh; margin-bottom: 16px; margin-top: -12px; }
    .scroll-indicator { bottom: 10px; }
    .scroll-arrow {
        width: 35px; height: 35px; border-width: 1.5px; font-size: 1rem;
    }
    /* 히어로 텍스트를 살짝 위로 이동 (우선순위 강제) */
    .digital-hero .hero-content { transform: translateY(-14px) !important; }
    .hero-title { font-size: 2rem; letter-spacing: 4px; }
    .hero-subtitle { font-size: 1.2rem; }
    .hero-description { font-size: 0.9rem; }
    .digital-content {
        padding: 40px 0;
    }

    .company-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    /* 본문 텍스트 중앙정렬 해제: 모바일에서는 좌측 정렬 */
    .company-intro-section,
    .content-intro,
    .content-intro p { text-align: left !important; }

    /* 인트로 헤드라인 글자 크기 축소 */
    .intro-title { font-size: 1.15rem !important; line-height: 1.45 !important; }

    /* products 네비게이션의 nav-item만 특별 처리 - style.css 충돌 방지 */
    .products-sidebar .products-nav .products-nav-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px 4px !important;
        overflow: visible !important;
        white-space: normal !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
    .products-sidebar .products-nav .products-nav-list li { 
        margin: 0 !important; 
        flex: unset !important; 
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .products-sidebar .products-nav .nav-item {
        width: 100% !important; 
        margin-left: 0 !important; /* style.css의 margin-left: 3.5rem 무력화 */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
        gap: 6px !important;
        border-radius: 20px !important;
        border: 1px solid #efefef !important;
        line-height: 1.2 !important;
        min-height: 38px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        transform: none !important; /* hover시 translateX 무력화 */
    }
    .products-sidebar .products-nav .nav-item i { 
        font-size: 0.9rem !important; 
        width: auto !important; 
    }

    .products-sidebar .products-nav .nav-item:hover {
        transform: none !important; /* hover시 이동 효과 제거 */
        background: #f8f9fa !important;
        color: #ff6b35 !important;
    }

    .products-sidebar .products-nav .nav-item.active {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
        min-height: 38px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important; /* 활성 상태에서도 margin 제거 */
        transform: none !important;
    }

    /* HOMECAST MEDIA 섹션 상단 여백 축소 */
    .intro-header { margin-bottom: 16px; }
    .intro-subtitle { margin-bottom: 12px; }

    /* 모바일에서 주요제품 표(목차) -> 이미지 순으로 스택 */
    .products-layout { 
        flex-direction: column !important; 
        gap: 16px !important; 
        padding: 0 4px !important; 
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .products-sidebar { 
        flex: 0 0 auto !important; 
        width: 100% !important; 
        margin: 0 !important; 
        padding: 0 !important; 
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .products-nav { 
        position: static !important; 
        top: auto !important; 
        padding: 4px 0px !important; 
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .products-nav .nav-title, .products-nav .nav-line { display: none; }

    .product-display-box { height: 360px; }

    .digital-products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .digital-product-card {
        height: 350px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 25px 20px;
    }

    .product-info h3 {
        font-size: 1.3rem;
    }

    .product-info p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .intro-subtitle {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .intro-title {
        font-size: 1.4rem;
    }

    .intro-description {
        font-size: 0.9rem;
    }

    /* 모바일 초소형 화면에서 여백 추가 축소 */
    .digital-content { padding: 32px 0; }

    .company-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .products-sidebar .products-nav .products-nav-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px 4px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .products-sidebar .products-nav .products-nav-list li { 
        margin: 0 !important; 
        padding: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .products-sidebar .products-nav .nav-item {
        width: 100% !important;
        margin-left: 0 !important; /* style.css 충돌 방지 */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px 6px !important;
        font-size: 0.7rem !important;
        gap: 4px !important;
        border-radius: 16px !important;
        border: 1px solid #efefef !important;
        line-height: 1.1 !important;
        min-height: 34px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        transform: none !important;
    }
    
    .products-sidebar .products-nav .nav-item:hover {
        transform: none !important;
        background: #f8f9fa !important;
        color: #ff6b35 !important;
    }

    .products-sidebar .products-nav .nav-item.active {
        padding: 8px 6px !important;
        font-size: 0.7rem !important;
        min-height: 34px !important;
        font-weight: 600 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        transform: none !important;
    }
    
    .products-sidebar .products-nav .nav-item i { 
        font-size: 0.8rem !important; 
        width: auto !important; 
        margin-right: 0 !important;
    }

    /* 이미지 박스 더 컴팩트 */
    .product-display-box { height: 320px; }

    /* 네비게이션 컨테이너 패딩 조정 */
    .products-layout { 
        padding: 0 8px !important; 
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .products-sidebar {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .products-nav { 
        padding: 8px 4px !important;
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 히어로 텍스트를 조금 더 위로 */
    .digital-hero .hero-content { transform: translateY(-16px) !important; }

    /* 인트로 헤드라인을 한 단계 더 축소 */
    .intro-title { font-size: 1.05rem !important; line-height: 1.5 !important; }
}