/* 반도체 유통사업 페이지 전용 CSS */

/* 히어로 섹션 (400px 높이로 수정) */
.semiconductor-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.7;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    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: clamp(1.8rem, 4.8vw, 2.7rem);
    font-weight: 400;
    letter-spacing: 8px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
    white-space: nowrap;
    line-height: 1.15;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 1.8rem;
    }
}
@media (max-width: 576px) {
    .hero-title { letter-spacing: 4px; }
}
@media (max-width: 768px) {
    .semiconductor-hero .hero-title { font-size: 1.2rem !important; letter-spacing: 1.5px !important; white-space: normal !important; line-height: 1.25 !important; }
}
@media (max-width: 576px) {
    .semiconductor-hero .hero-title { font-size: 1.2rem !important; letter-spacing: 1px !important; white-space: normal !important; line-height: 1.25 !important; }
}
@media (max-width: 520px) {
    .semiconductor-hero .hero-title { font-size: 1.2rem !important; letter-spacing: 0.5px !important; }
}

.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);
    }
}

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

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

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

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

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

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

/* 기술 설명 섹션 */
.technology-section {
    margin-bottom: 80px;
    padding: 0px 0;
    border-bottom: 1px solid #eee;
}

.tech-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 70px;
}

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

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* 제품 카드 */
.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;
}

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

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

.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.2rem;
}

.product-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
}

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

.product-info {
    padding: 30px;
}

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

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

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-item {
    display: inline-block;
    padding: 5px 12px;
    background: #ff6b35;
    color: white;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    .sub-visual {
        height: 300px;
    }

    .sub-visual-content h1 {
        font-size: 2.5rem;
    }

    .company-intro-section {
        padding: 30px 20px;
    }

    .company-description {
        padding-left: 0;
        margin-top: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Hero & intro */
    .semiconductor-hero { height: 300px; }
    .semiconductor-content { padding: 60px 0; }
    .content-intro { padding: 0 0; }
    .intro-title { font-size: 1.2rem; }
    .intro-description { font-size: 0.5rem; }
    .tech-content p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 40px; }
    .section-title { font-size: 2.1rem; margin-bottom: 40px; }

    /* 제품 레이아웃: 2열(좌 이미지, 우 내역) - 태블릿까지 적용 */
    .product-layout {
        display: grid !important;
        grid-template-columns: 140px 1fr;
        align-items: start;
        gap: 14px;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }
    .product-image-section {
        width: 100% !important;
        height: 140px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex-shrink: 1 !important;
        display: flex; 
        align-items: center; 
        justify-content: center;
    }
    .product-image-section img {
        width: auto !important; 
        height: 100% !important; 
        max-width: 100% !important; 
        object-fit: contain !important;
        background: #fff;
    }
    .product-info-section {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 14px 12px;
        box-sizing: border-box;
    }
    .product-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
    .product-header h3 { font-size: 1.2rem; margin: 0; }
    .product-buttons { position: static; display: flex; gap: 6px; flex-wrap: nowrap; margin: 0; }
    .product-btn { padding: 6px 10px; font-size: 0.76rem; border-radius: 14px; }
    .product-details { max-height: none; overflow: visible; }
    .product-details .detail-content { display: none; }
    .product-details .detail-content.active { display: block; }

    /* Product / Applications 버튼을 타이틀 아래로 배치 */
    .product-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .product-buttons { 
        width: 100%; 
        justify-content: flex-start; 
        margin: 4px 0 0; 
        display: flex; 
        flex-wrap: nowrap; 
        align-items: center; 
        gap: 6px; 
    }
    .product-buttons .product-btn {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 0.76rem;
    }

    /* Strong override: keep Product/Applications on one row */
    .product-info-section > .product-buttons {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        column-gap: 8px !important;
        row-gap: 0 !important;
        width: 100% !important;
        max-width: none !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        margin-top: 8px;
    }
    .product-info-section > .product-buttons .product-btn {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        justify-content: center !important;
        white-space: nowrap !important;
        padding: 6px 10px !important;
        font-size: 0.76rem !important;
    }
}

@media (max-width: 768px) {
    .sub-visual {
        height: 300px;
    }
    .semiconductor-hero {
        height: 28vh;
        margin-bottom: 40px;
        margin-top: -12px;
    }

    .sub-visual-content h1 {
        font-size: 2rem;
    }

    .sub-visual-content p {
        font-size: 1rem;
    }

    .semiconductor-content {
        padding: 10px 0;
    }

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

    .product-info {
        padding: 20px;
    }

    /* Intro text sizing */
    .intro-title { font-size: 1.15rem; line-height: 1.45; }
    .intro-description { font-size: 0.95rem; }
    .product-image { height: 200px; }

    /* Unified scroll indicator */
    .scroll-indicator { bottom: 10px; }
    .scroll-arrow { width: 35px; height: 35px; border-width: 1.5px; font-size: 1rem; }

    /* Unified hero text sizes */
    .hero-title { font-size: 1.2rem; letter-spacing: 3px; white-space: normal !important; }
    .hero-description { font-size: 0.9rem; }

    /* 히어로 텍스트를 살짝 위로 이동 (우선순위 강제) */
    .semiconductor-hero .hero-content { transform: translateY(-14px) !important; }
}

@media (max-width: 480px) {
    .intro-subtitle { font-size: 1.2rem; }
    .intro-title { font-size: 1.05rem; line-height: 1.5; }
    .intro-description { font-size: 0.9rem; }
    .section-title { font-size: 1.6rem; }

    /* 제품 레이아웃: 2열 유지하되 더 컴팩트하게 */
    .product-layout { grid-template-columns: 100px 1fr; gap: 10px; }
    .product-image-section { height: 100px !important; }
    .product-image-section img { height: 100% !important; width: auto !important; max-width: 100% !important; }
    .product-header h3 { font-size: 1.15rem; }
    .product-btn { font-size: 0.75rem; padding: 6px 10px; }
    .product-buttons { gap: 6px; flex-wrap: nowrap; }
    .product-buttons .product-btn { flex: 0 0 auto; white-space: nowrap; }
    .product-buttons { 
        width: 100%; 
        justify-content: flex-start; 
        margin: 4px 0 0; 
        display: flex; 
        flex-wrap: nowrap; 
        align-items: center; 
        gap: 6px; 
    }
    .product-buttons .product-btn {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 0.76rem;
    }

    /* Keep 2-col single row on smaller screens */
    .product-info-section > .product-buttons {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        column-gap: 8px !important;
    }
    .product-info-section > .product-buttons .product-btn {
        width: 100% !important;
        padding: 6px 10px !important;
    }

    /* 초소형에서는 텍스트를 조금 더 위로 */
    .semiconductor-hero .hero-content { transform: translateY(-16px) !important; }
}

/* 제품 카테고리 탭 스타일 */
.product-category-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.category-tab {
    padding: 0 40px;
    height: 54px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-sizing: border-box;
    background: transparent;
    border: 3px solid #ddd;
    color: #666;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    letter-spacing: 2px;
}

.category-tab:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
}

.category-tab.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* 제품 콘텐츠 컨테이너 */
.product-content-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 제품 카테고리 */
.product-category {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-category.active {
    display: block;
    opacity: 1;
}

/* 제품 레이아웃 */
.product-layout {
    display: flex;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 1000px;
    /* 600 + 400 = 1000px 고정 */
    height: 450px;
    /* 높이 450px 고정 */
    margin: 0 auto;
    /* 중앙 정렬 */
}

/* 제품 이미지 섹션 (정확히 600x450) */
.product-image-section {
    width: 600px;
    height: 450px;
    min-width: 600px;
    /* 최소 너비 보장 */
    max-width: 600px;
    /* 최대 너비 제한 */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image-section img {
    width: 600px;
    height: 450px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image-placeholder {
    display: none;
    width: 600px;
    height: 450px;
    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;
}

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

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

/* 제품 정보 섹션 (정확히 400x450) */
.product-info-section {
    width: 400px;
    height: 450px;
    min-width: 400px;
    /* 최소 너비 보장 */
    max-width: 400px;
    /* 최대 너비 제한 */
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
    box-sizing: border-box;
    /* 패딩 포함한 전체 크기 */
}

/* 제품 헤더 */
.product-header {
    margin-bottom: 30px;
}

.product-header h3 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* 제품 버튼들 (우측 하단 배치) */
.product-buttons {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    gap: 15px;
}

.product-btn {
    padding: 12px 20px;
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.product-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
}

.product-btn.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

/* Applications 버튼 호버 효과 */
.product-btn[data-type="applications"].hover-effect {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    border-color: #ff6b35;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

/* 제품 상세 정보 */
.product-details {
    flex: 1;
    overflow-y: auto;
}

.detail-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-content.active {
    display: block;
    opacity: 1;
}

/* 제품 리스트 스타일 */
.product-list,
.application-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-list li,
.application-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    color: #333;
    position: relative;
    padding-left: 20px;
}

.product-list li:before,
.application-list li:before {
    content: "•";
    color: #ff6b35;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.product-list li:last-child,
.application-list li:last-child {
    border-bottom: none;
}

.product-list li:hover,
.application-list li:hover {
    color: #ff6b35;
    padding-left: 25px;
    transition: all 0.3s ease;
}

/* CIS 해상도 탭 */
.product-category[data-category="cis"] .cis-resolution-tabs {
    display: flex;
    flex-wrap: nowrap;       /* 줄바꿈 금지 */
    gap: 6px;                /* 간격 최소화 */
    position: absolute;
    left: 30px;              /* CIS 패널 패딩에 맞춤 */
    right: 30px;
    bottom: 50px;            /* 버튼행을 조금 더 아래로 */
    z-index: 3;
}

.product-category[data-category="cis"] .cis-res-tab {
    flex: 1 1 0;             /* 5개 탭이 동일한 너비로 줄어듦 */
    min-width: 0;            /* 내용 폭보다 더 작게 줄어들 수 있도록 */
    white-space: nowrap;     /* 버튼 내부 줄바꿈 방지 */
    text-align: center;
    padding: clamp(4px, 0.7vw, 8px) clamp(6px, 1.1vw, 14px); /* 화면이 줄면 패딩 축소 */
    font-size: clamp(10px, 1.2vw, 14px);                     /* 화면이 줄면 글자 축소 */
    letter-spacing: 0.3px;
}

/* 매우 작은 화면에서 간격 추가 축소 */
@media (max-width: 480px) {
    .product-category[data-category="cis"] .cis-resolution-tabs { gap: 4px; }
    .product-category[data-category="cis"] .cis-res-tab {
        padding: 2px 1px;
        font-size: 10px;
    }
}

/* CIS 모델 카드 */
.cis-details {
    padding-right: 0;
    padding-bottom: 72px; /* 하단 탭 공간 */
    overflow: visible;    /* 스크롤 제거 */
}

.cis-model-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 18px 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* 기존 max-height/overflow를 무효화 */
.cis-details .cis-model-card {
    max-height: none;
    overflow: visible;
}

.cis-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cis-card-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
}

.cis-model-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cis-model-list li {
    padding: 8px 0 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    color: #333;
}

.cis-model-list li:last-child {
    border-bottom: none;
}

/* 좌측 컬러 보더 (해상도별) */
.cis-model-card {
    position: relative;
}
.cis-model-card:before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 6px;
    border-radius: 6px;
}

.border-5mp:before { background: #e74c3c; }   /* red */
.border-8mp:before { background: #8e44ad; }   /* purple */
.border-13mp:before { background: #27ae60; }  /* green */
.border-16mp:before { background: #f1c40f; }  /* yellow */
.border-hir:before { background: #e67e22; }   /* orange */

/* 반응형 - 세로 레이아웃 전환 시 하단 고정 해제 */
@media (max-width: 1200px) {
    .cis-details .cis-model-card { max-height: none; }
    .cis-resolution-tabs {
        position: static;
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .cis-res-tab {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 모바일 대응 */
@media (max-width: 1200px) {
    .cis-details .cis-model-card { max-height: none; }
}

@media (max-width: 768px) {
    .cis-res-tab {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .product-layout {
        flex-direction: column;
        min-height: auto;
    }

    .product-image-section {
        width: 100%;
        height: 300px;
    }

    .product-info-section {
        width: 100%;
        height: auto;
        min-height: 350px;
    }

    .product-buttons {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .category-tab {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .product-category-tabs {
        gap: 15px;
    }

    .product-info-section {
        padding: 30px 20px;
    }

    .product-header h3 {
        font-size: 2rem;
    }

    .product-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .product-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .category-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .product-image-section {
        height: 250px;
    }

    .product-info-section {
        padding: 20px 15px;
        min-height: 300px;
    }

    .product-header h3 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
}

/* CIS 해상도별 탭 */
.product-category[data-category="cis"] .product-header {
    margin-bottom: 12px;
}
.product-category[data-category="cis"] .product-header h3 {
    margin-bottom: 8px; /* 기존 20px -> 8px */
}

/* CIS 레이아웃 여백 축소: 우측 패널 패딩 줄여 가시영역 확보 */
.product-category[data-category="cis"] .product-info-section {
    padding: 30px; /* 기본 40px -> 30px */
}

/* 하단 버튼 위치도 패딩에 맞춰 조정 */
.product-category[data-category="cis"] .cis-resolution-tabs {
    left: 30px;
    right: 30px;
    bottom: 40px;
}

/* CIS 텍스트(타이틀) 하단 마진 축소 */
.product-category[data-category="cis"] .product-header {
    margin-bottom: 8px; /* 더 축소 */
}
.product-category[data-category="cis"] .product-header h3 {
    margin-bottom: 6px; /* 더 축소 */
}

/* 5Mp 전용: 카드와 목록 간격 추가 축소 */
.cis-detail[data-res="5mp"] .cis-model-card {
    padding: 12px 16px; /* 한 단계 더 축소 */
}
.cis-detail[data-res="5mp"] .cis-card-title {
    margin-bottom: 4px;
    font-size: 1.05rem; /* 약간 더 작게 */
}
.cis-detail[data-res="5mp"] .cis-model-list li {
    padding: 5px 0;      /* 더 촘촘하게 */
    font-size: 0.93rem;
}

/* CIS 해상도 탭 - 1행 고정, 가변 폭/폰트 (CIS 섹션 한정) */
.product-category[data-category="cis"] .cis-resolution-tabs {
    display: flex;
    flex-wrap: nowrap;        /* 줄바꿈 방지 */
    gap: 6px;                 /* 기본 간격 */
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 40px;
    z-index: 3;
}

.product-category[data-category="cis"] .cis-res-tab {
    flex: 1 1 0;              /* 동일 너비 분배 */
    min-width: 0;             /* 내용보다 더 작게 줄어들 수 있도록 */
    white-space: nowrap;      /* 버튼 내부 줄바꿈 방지 */
    text-align: center;
    padding: clamp(4px, 0.7vw, 8px) clamp(6px, 1.1vw, 14px);
    font-size: clamp(9px, 1.1vw, 14px);
    letter-spacing: 0.2px;
    background: #fff;
    border: 2px solid #e5e5e5;
    color: #555;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 16px;
}

.product-category[data-category="cis"] .cis-res-tab:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.product-category[data-category="cis"] .cis-res-tab.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 107, 53, 0.25);
}

/* 화면이 좁아질수록 더 촘촘하게 조정 */
@media (max-width: 992px) {
    .product-category[data-category="cis"] .cis-resolution-tabs { gap: 5px; }
    .product-category[data-category="cis"] .cis-res-tab {
        padding: clamp(3px, 1.0vw, 6px) clamp(5px, 1.6vw, 12px);
        font-size: clamp(9px, 1.5vw, 13px);
        border-width: 1.5px;
        border-radius: 14px;
    }
}

@media (max-width: 768px) {
    .product-category[data-category="cis"] .cis-resolution-tabs { gap: 4px; left: 20px; right: 20px; bottom: 40px; }
    .product-category[data-category="cis"] .cis-res-tab {
        padding: clamp(2px, 1.6vw, 5px) clamp(4px, 2.2vw, 10px);
        font-size: clamp(8px, 2.4vw, 12px);
        border-width: 1px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .product-category[data-category="cis"] .cis-resolution-tabs { gap: 3px; left: 16px; right: 16px; bottom: 40px; }
    .product-category[data-category="cis"] .cis-res-tab {
        padding: 2px 6px;
        font-size: 10px;
        border-width: 1px;
        border-radius: 10px;
    }
}

/* --- CIS 하단 버튼 위치 최종 오버라이드 (겹치는 규칙 무시) --- */
.product-category[data-category="cis"] .product-info-section .cis-resolution-tabs {
    bottom: 10px !important;
}

/* 모바일에서는 주요제품 이미지 숨김 */
@media (max-width: 768px) {
    .product-layout { display: block !important; grid-template-columns: none !important; }
    .product-image-section { display: none !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; }
    .product-image-section img, .product-image-placeholder { display: none !important; }
    .product-info-section { width: 100% !important; height: auto !important; min-height: unset !important; }
}

@media (max-width: 768px) {
    .product-layout { grid-template-columns: 120px 1fr; gap: 12px; }
    .product-image-section { height: 120px !important; }
    .product-image-section img { height: 100% !important; width: auto !important; max-width: 100% !important; }
    /* 기존: .product-buttons { flex-direction: column; gap: 10px; } -> 2열 1행로 변경 */
    .product-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    /* 기존: .product-btn { padding: 10px 16px; font-size: 0.8rem; } -> 축소 */
    .product-btn { padding: 6px 9px; font-size: 0.78rem; border-radius: 12px; }
}

@media (max-width: 480px) {
    /* 초소형 화면에서 더 축소 */
    .product-category-tabs { gap: 8px; margin-bottom: 30px; }
    .category-tab {
        height: 40px;                 /* 더 낮게 */
        padding: 4px 12px;            /* 더 작게 */
        font-size: 0.8rem;            /* 더 작게 */
        border-width: 1px;
    }
}

/* 모바일에서 DRAM/FLASH/CIS 카테고리 탭의 가로 너비를 고정/축소합니다. flex 컨테이너 정렬도 조정하고, 너비 충돌을 피하기 위해 !important를 사용합니다. */
@media (max-width: 768px) {
    /* 카테고리 탭(주요제품: DRAM/FLASH/CIS) 사이즈 축소 + 고정 너비 적용 */
    .product-category-tabs { gap: 8px; margin-bottom: 30px; justify-content: center; flex-wrap: nowrap; }
    .category-tab {
        box-sizing: border-box;
        height: 40px;
        padding: 3px 8px;
        font-size: 0.9rem;
        border-width: 1.5px;
        width: 90px !important;        /* 가로 너비 고정 */
        min-width: 90px !important;
        max-width: 90px !important;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* 초소형 화면에서는 더 좁게 */
    .product-category-tabs { gap: 6px; }
    .category-tab {
        width: 82px !important;
        min-width: 82px !important;
        max-width: 82px !important;
        height: 40px;
        padding: 2px 6px;
        font-size: 0.82rem;
    }
}

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

/* 인트로 헤드라인(홈캐스트는 IT산업에...) 글자 크기 축소 */
@media (max-width: 768px) {
    .intro-title { font-size: 1.15rem; line-height: 1.45; }
}

@media (max-width: 480px) {
    .intro-title { font-size: 1.05rem; line-height: 1.5; }
}

/* 모바일에서 인트로 서브타이틀만 중앙정렬 */
@media (max-width: 768px) {
    .content-intro .intro-subtitle { text-align: center !important; margin-left: auto; margin-right: auto; }
}

/* 반도체 전용: 공통(sub-page.css)보다 우선 적용될 강제 오버라이드 */
@media (max-width: 768px) {
  body.sub-page .semiconductor-hero .hero-content .hero-title {
    font-size: 1.3rem !important;
    letter-spacing: 1.5px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
}
@media (max-width: 576px) {
  body.sub-page .semiconductor-hero .hero-content .hero-title {
    font-size: 1.3rem  !important;
    letter-spacing: 1px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
}
@media (max-width: 520px) {
  body.sub-page .semiconductor-hero .hero-content .hero-title {
    font-size: 1.3rem !important;
    letter-spacing: 0.5px !important;
  }
}