/* ==========================================
   CLIENTS PAGE STYLE
   (용도: 주요 고객(clients.php) 전용 디자인)
   ========================================== */

/* --- 서브 비주얼 (상단 배경 (메뉴바 포함) 영역) --- */
.sub-visual {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/clients/clients_bg.png');
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    margin-top: -80px; 
    padding-top: 120px; 
    height: 340px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    color: var(--white); 
    position: relative;
}
.sub-visual h1 {
    font-size: 3rem;
    margin-bottom: 10px;    
    text-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.9),   /* 글자 윤곽을 진하게 */
        0 5px 30px rgba(0, 0, 0, 0.8);  /* 배경과 분리되는 깊은 그림자 */
    opacity: 0;
    animation: fadeInDown 0.5s ease-out forwards;    
}
.sub-visual p {
    font-size: 1.2rem;   
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.9), 
        0 4px 15px rgba(0, 0, 0, 0.7);
    opacity: 0;
    animation: fadeInDown 0.5s ease-out forwards;
    animation-delay: 0.15s;    
}

/* --- 본문 배경 이미지 영역 --- */
#clients_main {
    position: relative;
    background: #fcfcfc url('../img/clients/clients_bg.png') center center / cover no-repeat fixed;
}

/* --- 배경 오버레이 (가독성 고려) --- */
#clients_main::before {
    content: '';
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(255, 255, 255, 0.90); 
    z-index: 1;
}

/* --- 컨텐츠를 항상 오버레이 위에 위치 --- */
#clients_main > .container {
    position: relative;
    z-index: 2;
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

/* --- 고객사 로고 그리드 --- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px; /* 박스 사이 간격 */
}
.client-item {
    background: var(--white); 
    border: 1px solid #eee; 
    border-radius: var(--border-radius);
    height: 80px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px;
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden;
}

/* --- 로고 이미지 스타일 맟 효과--- */
.client-item img {
    max-width: 100%; 
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(50%);
    opacity: 0.7;
    transition: 0.3s;
}
.client-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 140, 149, 0.1);
    transform: translateY(-5px);
    z-index: 2;
}
.client-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* --- 고객사 명예의 전당 박스 컨테이너 --- */
.hall-of-fame-box {
    text-align: center;    
    margin-top: 80px; 
    margin-bottom: 0;    
    padding: 30px 20px;
    background: linear-gradient(to bottom, #fff, #fcfcfc);
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.hall-of-fame-box::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #f7ef8a, #d4af37);
}
.fame-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #d4af37, #f7ef8a, #b48a20);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}
.fame-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.8rem;
    color: #333;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 30px;
    word-break: keep-all;
}
.fame-text strong {
    color: #008c95;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 140, 149, 0.3);
}
.fame-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0.6;
}
.fame-decoration span {
    display: block;
    width: 60px;
    height: 1px;
    background: #d4af37;
}
.fame-decoration i {
    color: #d4af37;
    font-size: 0.8rem;
}

/* --- 애니메이션 효과 --- */
.fade-up {
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- 모바일 홈페이지 스타일 --- */
@media (max-width: 1024px) {
    .sub-visual {
        display: flex !important;
        
        /* [핵심 1] 상단 패딩 제거: 이것이 없으면 글자가 아래로 쏠립니다 */
        padding-top: 0 !important; 
        padding-bottom: 0 !important;
        
        /* [핵심 2] Flexbox로 가로/세로 강제 중앙 정렬 */
        align-items: center !important;      /* 세로 중앙 */
        justify-content: center !important;  /* 가로 중앙 */
        
        /* 높이 및 배경 설정 */
        height: 200px !important;          /* 고정 높이 해제 */
        margin-top: 70px !important;      /* 헤더 높이만큼만 살짝 내림 (헤더 겹침 방지) */
        
        background-size: cover !important; /* 가로 꽉 채우기 */
        background-position: center center !important;
    }

    /* 컨테이너도 높이를 꽉 채우지 않고 내용물만큼만 잡히게 하여 중앙 정렬 유도 */
    .sub-visual .container {
        height: auto !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0 !important; /* 컨테이너 자체 패딩도 제거 */
    }

    /* 텍스트 스타일 */
    .sub-visual h1 { 
        font-size: 2rem !important; /* 모바일에서 폰트 크기 조정 */
        line-height: 1.2;
        margin: 0 !important; /* 글자 주변 여백 제거 */
        padding: 0 !important;
        transform: none !important; /* 애니메이션 위치 이동 간섭 제거 */
    }

    /* 불필요한 요소 숨김 */
    #clients_main { background: none; }
    .sub-visual p { display: none !important; }
    .hall-of-fame-box { display: none !important; }
    .client-grid { grid-template-columns: repeat(2, 1fr); }  
    .client-item { height: 100px; }
}

