/* home.css - 메인 페이지 전용 스타일 */

/* 링크 기본 스타일 */
a {
    text-decoration: none;
    color: inherit;
}

a:hover, a:visited, a:active {
    text-decoration: none;
    color: inherit;
}

.mainBody .skip-link { position:fixed; top:12px; left:12px; z-index:10000; padding:12px 18px; border-radius:8px; background:#fff; color:#111; font-weight:700; transform:translateY(-150%); transition:transform .2s ease; }
.mainBody .skip-link:focus { transform:translateY(0); }

/* 메인 슬라이더 스타일 */
.main-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: clamp(500px, calc(100vh - 92px), 620px);
    max-height: 620px;
    background: #111;
}

#mainSlider {
    width: 100%;
    height: 100%;
}

.mainBody #mainSlider .slick-list,
.mainBody #mainSlider .slick-track,
.mainBody #mainSlider .slick-slide,
.mainBody #mainSlider .slick-slide > div { height:100%; }

/* 슬라이더 아이템 스타일 */
.slider-item {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 100%;
}

.slider-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}
.slider-image-credit{position:absolute;z-index:6;right:22px;bottom:18px;padding:5px 8px;border-radius:4px;background:rgba(0,0,0,.45);color:#fff;font-size:12px;line-height:1.3;text-shadow:0 1px 2px rgba(0,0,0,.4)}

.slider-image-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    max-height: none;
    transform: scale(1);
    transition: transform 8s ease-in-out;
}

/* 그라데이션 오버레이 (텍스트 가독성 향상) */
.slider-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(4,12,18,.76) 0%, rgba(4,12,18,.48) 42%, rgba(4,12,18,.12) 72%, rgba(4,12,18,.25) 100%);
    z-index: 1;
}

.slider-item.slick-active .slider-image-container img {
    transform: scale(1.05);
}

/* 텍스트 오버레이 스타일 */
.slider-text-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: min(720px, 78%);
    max-width: 720px;
    padding: 34px 0;
    color: white;
    text-align: left;
    z-index: 2;
    left: 5%;
}

/* 텍스트 위치에 따른 스타일 */
.slider-text-overlay.left {
    left: 5%;
    text-align: left;
}

.slider-text-overlay.right {
    right: 5%;
    left: auto;
    text-align: right;
}

.slider-text-overlay.center {
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* 슬라이더 텍스트 요소 공통 스타일 */
.slider-title,
.slider-subtitle,
.slider-button {
    opacity: 0;
    transform: translateY(18px);
}

/* 제목 스타일 */
.slider-title {
    font-size: clamp(2.4rem, 4vw, 4.6rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.08;
    text-wrap: balance;
    text-shadow: 0 3px 24px rgba(0,0,0,.5);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 부제목 스타일 */
.slider-subtitle {
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

/* 버튼 스타일 */
.slider-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--main-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    border: 2px solid transparent;
    transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s, background-color 0.3s;
}

.slider-button:hover {
    background-color: transparent;
    border-color: white;
}

/* 활성화된 슬라이드의 요소들 애니메이션 적용 */
.slider-item.is-copy-active .slider-title,
.slider-item.is-copy-active .slider-subtitle,
.slider-item.is-copy-active .slider-button {
    opacity: 1;
    transform: translateY(0);
}

/* 슬라이더 컨트롤 영역 스타일 */
.slider-controls-container {
    position: absolute;
    left: 5%;
    bottom: 24px;
    z-index: 5;
    color: #fff;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(8,16,22,.66);
    backdrop-filter: blur(12px);
}

.slider-counter {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #fff;
    margin: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.slider-nav-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 19px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background-color .2s ease, transform .2s ease;
}

.slider-nav-btn:hover { background:rgba(255,255,255,.16); }
.slider-nav-btn:active { transform:scale(.94); }
.slider-nav-btn:focus-visible, .slider-button:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.slider-progress { width:86px; height:2px; overflow:hidden; border-radius:2px; background:rgba(255,255,255,.28); }
.slider-progress-fill { display:block; width:0; height:100%; border-radius:inherit; background:var(--main-color); transition:width .45s ease; }

/* 도트 네비게이션 스타일 */
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: #D9D9D9;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: var(--main-color);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--sub-color);
}

/* 소식 섹션 스타일 */
.news-section {
    padding: 30px 0;
    background: #fff;
    opacity: 1;
    transform: translateY(0);
}

.news-list {
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 100%;        /* 추가: 명시적 너비 설정 */
    padding: 0;         /* 추가: 패딩 제거 */
    margin: 0;          /* 추가: 마진도 제거 */
    /* 우측 목록 항목 5개의 자연 높이를 공통 기준으로 사용.
       양쪽 컬럼 모두 이 높이에 맞춰 늘어나거나 잘린다. */
    height: 320px;
    box-sizing: border-box;
}

/* 좌측 대표 카드: 우측 목록 높이(= .news-list height)에 맞춰 고정 */
.news-featured {
    flex: 0 0 clamp(360px, 23vw, 430px);
    display: flex;
    align-self: stretch;
    height: 100%;
    position: relative;
}

.news-thumbnail {
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 10px;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.thumbnail-label {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--text-main);
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 10px 0 10px 0;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-sub1);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
    overflow: hidden;
    word-break: keep-all;
    white-space: pre-line;   /* 본문의 줄바꿈(\n)을 화면에도 줄바꿈으로 표시 */
}

.news-date {
    font-size: 12px;
    color: var(--text-sub2);
    text-align: right;
    margin-top: auto;
}

.news-list-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;            /* 공통 높이를 초과하는 항목 숨김 */
    align-self: stretch;
    height: 100%;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.news-item:first-child {
    padding-top: 15px;                /* 상단 보더와 글 사이 여백 */
    border-top: 1px solid #e0e0e0;   /* 좌측 카드 상단 테두리와 정렬 */
}

.news-item:last-child {
    border-bottom: none;
}

/* 카드 전체를 링크로 만들 때 <a>가 기존 레이아웃을 유지하도록 보정 */
a.news-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.news-thumbnail.news-card-link {
    color: inherit;                /* 텍스트 색이 링크 색으로 바뀌지 않도록 */
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* 왼쪽 추천 카드: hover 시 살짝 떠오르는 효과 */
a.news-thumbnail.news-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    border-color: var(--main-color);
}

a.news-thumbnail.news-card-link:hover .news-title {
    color: var(--main-color);
    transition: color 0.25s ease;
}

/* 오른쪽 목록 항목: hover 시 배경 강조 + 제목 색상 전환 */
a.news-item.news-card-link {
    transition: background-color 0.2s ease, padding 0.2s ease;
}

a.news-item.news-card-link:hover {
    background-color: #fff7f2;
}

a.news-item.news-card-link:hover .item-title {
    color: var(--main-color);
    text-decoration: underline;
}

.item-dot {
    width: 5px;
    height: 5px;
    background-color: var(--main-color);
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.item-category {
    min-width: 68px;
    margin-right: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff2e9;
    color: var(--sub-color);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
}

.item-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-date {
    font-size: 12px;
    color: var(--text-sub2);
    margin-left: 15px;
    flex-shrink: 0;
}

/* 갤러리 섹션 스타일 */
.gallery-section {
    padding: 30px 0;
    background-color: #fff9f5;
    background-image: url('/image/background2.jpeg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-section.animate {
    opacity: 1;
    transform: translateX(0);
}

.gallery-section .container {
    max-width: 1300px !important;
}

.gallery-container {
    width: 100%;
    margin-bottom: 30px;
    overflow: visible;
}

.gallery-slider {
    width: 100%;
}

.gallery-slider .slick-slide {
    padding-bottom: 15px;
}

.carousel-bottom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
}

/* 갤러리 내비게이션 화살표 숨김 */
.main-slider .gallery-slider .slick-prev,
.main-slider .gallery-slider .slick-next {
    display: none !important;
}

/* 갤러리 아이템 스타일 */
.gallery-item {
    margin: 0px 10px 10px 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-image-fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #eef2f4, #dce5e9);
    color: #4d606a;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.gallery-image.image-missing img { display:none; }
.gallery-image.image-missing .gallery-image-fallback { display:grid; }

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 15px;
}

.gallery-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-main);
}

.gallery-info p {
    font-size: 12px;
    color: var(--text-sub2);
}

/* 함께하는 기관 섹션 스타일 */
.partners-section {
    padding: 30px 0;
    background-color: #fff;
}

.partners-section .container {
    position: relative;
    max-width: 1290px !important;
    padding: 20px;
}

/* 파트너 슬라이더 설정 */
.partners-container {
    position: relative;
    margin: 0 0 20px 0;
    overflow: hidden;
    padding: 10px 0;             /* 상하 여백 추가 */
}

/* 슬라이더 간격 조정 */
.partners-slider .slick-list {
    margin: 0 -15px;             /* 네거티브 마진으로 컨테이너와 일치시킴 */
}

/* 파트너 아이템 스타일 개선 - 세로 가운데 정렬 */
.partner-item {
    margin: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;          /* 세로 중앙 정렬 */
    justify-content: center;      /* 가로 중앙 정렬 */
    background-color: white;
    transition: all 0.3s;
    height: 100px;                /* 고정 높이 설정 */
    padding: 10px;                /* 내부 여백 추가 */
}


.partner-item:hover {
    cursor: pointer;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

.partner-item img {
    max-width: 90%;              /* 너비 제한 */
    max-height: 60px;            /* 최대 높이 축소 */
    height: auto;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.partner-item:hover img {
    transform: scale(1.08);
}

/* 네비게이션 버튼 스타일 */
.partners-nav {
    position: absolute;
    right: 0;
    top: 60%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 10;
}

.partners-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.partners-nav-btn::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 0 2px 2px 0;
    display: inline-block;
    top: 50%;
    left: 50%;
}

.partners-nav-btn.prev-btn::before {
    transform: translate(-25%, -50%) rotate(135deg);
    border-color: var(--main-color);
}

.partners-nav-btn.next-btn::before {
    transform: translate(-75%, -50%) rotate(-45deg);
    border-color: var(--main-color);
}

.partners-nav-btn:hover {
    background-color: rgba(255, 127, 42, 0.1);
    border-color: var(--main-color);
}

.partners-nav-btn:hover::before {
    border-color: var(--main-color);
}

/* 파트너 슬라이더 화살표 숨김 */
.partners-slider .slick-prev,
.partners-slider .slick-next {
    display: none !important;
}

/* 슬라이더 트랙 정렬 */
.partners-slider .slick-track {
    display: flex;
    align-items: center;
    gap: 10px;                   /* 트랙 내 추가 간격 */
}
.partners-slider .slick-slide {
    height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;              /* 슬라이드 내부 패딩 */
}

/* 갤러리 도트 네비게이션 */
.gallery-dots {
    margin-top: 15px;
}

/* 팝업 관련 스타일 */
.popup-link-wrapper {
    position: relative;
    overflow: auto;
}

.popup-link-wrapper:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.popup-link-wrapper::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.5;
}

.image-content a {
    display: block;
    width: 100%;
    text-align: center;
}

.image-content a img {
    max-width: 100%;
    height: auto;
}

/* 반응형 디자인 */
@media (max-width: 1280px) {
    .gallery-section .container,
    .partners-section .container {
        padding: 0 20px;
    }
}

@media (max-width: 1024px) {
    .news-list {
        flex-direction: column;
        height: auto;            /* 세로 배치에서는 고정 높이 해제 */
    }

    /* 소식 섹션은 탭이 5개+버튼이라 1024px 이하 row 레이아웃에서
       '소식' 타이틀(중앙 절대배치)과 탭 메뉴(우측 정렬)가 겹친다.
       다른 섹션(갤러리/파트너)은 add-btn 하나뿐이라 row 유지해도 안 겹치므로
       소식 섹션의 section-header 만 column 으로 전환한다. */
    .news-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-section .section-title {
        position: static;
        transform: none;
        margin-bottom: 15px;
    }

    .news-section .tab-menu {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .news-featured {
        flex: none;
        width: 100%;
        min-height: 0;
        height: auto;
    }

    .news-list-items {
        overflow: visible;
    }

    .partners-container {
        width: 85%;
    }

    .slider-title {
        font-size: 2.5rem;
    }

    .slider-subtitle {
        font-size: 1.3rem;
    }

    .news-thumbnail{
        width: 100%;
        height: auto;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        position: static;
        transform: none;
        margin-bottom: 15px;
        text-align: center;
        width: 100%;
    }

    .tab-menu,
    .more-link {
        margin-left: 0;
        align-self: flex-end;
    }

    .news-section .tab-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .slider-controls-container {
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);
    }

    .news-item {
        padding: 15px 0;
    }

    .partners-container {
        width: 100%;
    }

    .partners-section .section-title {
        position: static;
        transform: none;
        text-align: center;
        margin-bottom: 15px;
        width: 100%;
    }

    .partners-nav {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 15px;
    }

    .slider-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .slider-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .slider-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .slider-text-overlay.left,
    .slider-text-overlay.right {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
    }

    .main-slider { height:clamp(440px, 68vh, 560px); }
    .slider-image-container::after { background:linear-gradient(0deg, rgba(4,12,18,.78) 0%, rgba(4,12,18,.25) 68%, rgba(4,12,18,.16) 100%); }

    .news-thumbnail{
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mainBody *, .mainBody *::before, .mainBody *::after { scroll-behavior:auto !important; }
    .mainBody .slider-title,
    .mainBody .slider-subtitle,
    .mainBody .slider-button,
    .mainBody .slider-progress-fill { animation:none !important; transition-duration:.01ms !important; }
}

/*
 * 메인 슬라이더 줌(ken burns) 효과
 *
 * 주의:
 *  - nth-child(odd/even)를 쓰면 slick fade 전환 중 두 슬라이드가 동시에
 *    .slick-active를 가져 CSS 재평가 시 애니메이션이 꼬이면서 "뚝뚝 끊기는"
 *    현상이 발생함. 대신 JS가 부여하는 .is-copy-active 클래스를 기준으로
 *    현재 보이는 슬라이드에서만 애니메이션을 실행.
 *  - forwards 대신 infinite alternate를 사용해 애니메이션이 멈추지 않고
 *    부드럽게 반복되도록 함.
 *  - 애니메이션 길이는 autoplaySpeed(5.2s)보다 길게 잡아 전환 타이밍과
 *    충돌하지 않도록 함.
 */
.mainBody #mainSlider.slick-initialized .slider-item .slider-image-container img {
    transform: scale(1.02);
    will-change: transform;
}

.mainBody #mainSlider.slick-initialized .slider-item.is-copy-active .slider-image-container img {
    animation: mainHeroZoom 10s ease-in-out infinite alternate;
    transform-origin: center center;
}

.mainBody #mainSlider.main-slider-single.slick-initialized .slick-active .slider-image-container img {
    animation: mainHeroSingleDrift 12s ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
}

@keyframes mainHeroZoom {
    0%   { transform: scale(1.04) translate3d(-.6%, .2%, 0); }
    100% { transform: scale(1.11) translate3d(.6%, -.2%, 0); }
}

@keyframes mainHeroSingleDrift {
    0% { transform: scale(1.02) translate3d(-1.1%, -.35%, 0); }
    50% { transform: scale(1.075) translate3d(.55%, .45%, 0); }
    100% { transform: scale(1.12) translate3d(1.1%, -.3%, 0); }
}

.gimpoil-legacy-news .gimpoil-news-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
}

.gimpoil-news-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    border-bottom: 1px solid #d8d8d8;
}

.gimpoil-news-heading h2 {
    align-self: stretch;
    margin: 0;
    padding-top: 6px;
    border-bottom: 2px solid #777;
    color: #707070;
    font-size: 22px;
}

.gimpoil-news-heading a { color: #777; font-size: 16px; }
.gimpoil-notice-list { padding-top: 12px; }
.gimpoil-notice-row {
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    color: #666;
}
.gimpoil-notice-row strong {
    overflow: hidden;
    font-size: 17px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gimpoil-notice-row time { color: #aaa; font-size: 15px; }
.gimpoil-activity-notice-list { display: grid; gap: 14px; padding-top: 18px; }
.gimpoil-activity-notice-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 78px;
    color: #666;
}
.gimpoil-activity-thumb {
    display: grid;
    width: 120px;
    height: 78px;
    place-items: center;
    overflow: hidden;
    color: #999;
    background: #f0f1f2;
    font-size: 14px;
}
.gimpoil-activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gimpoil-activity-copy { min-width: 0; }
.gimpoil-activity-copy strong,
.gimpoil-activity-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gimpoil-activity-copy strong { color: #666; font-size: 18px; }
.gimpoil-activity-copy small { margin-top: 8px; color: #aaa; font-size: 15px; }
.gimpoil-news-empty { margin: 24px 0; color: #999; }

@media (max-width: 767px) {
    .gimpoil-legacy-news .gimpoil-news-columns { grid-template-columns: 1fr; gap: 34px; }
    .gimpoil-news-heading { gap: 8px; }
    .gimpoil-news-heading h2 { min-width: 0; font-size: 19px; white-space: nowrap; }
    .gimpoil-news-heading a { flex: 0 0 auto; font-size: 14px; white-space: nowrap; }
    .gimpoil-notice-row { gap: 9px; }
    .gimpoil-notice-row strong { font-size: 15px; }
    .gimpoil-notice-row time { font-size: 13px; }
    .gimpoil-activity-notice-row { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
    .gimpoil-activity-thumb { width: 92px; height: 64px; }
    .gimpoil-activity-copy strong { font-size: 16px; }
    .gimpoil-activity-copy small { font-size: 13px; }
}

/* 사이트별 설정으로 노출되는 공통 SNS 피드 */
.home-sns-feeds {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-height: 720px;
    min-width: 0;
    padding: 16px 6px 16px 10px;
    overflow-y: auto;
    border: 1px solid #dfe5ea;
    border-top: 3px solid var(--main-color);
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 30px rgba(20,39,55,.08);
    scrollbar-gutter: stable;
}

.home-sns-feeds > h2 {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #dfe5ea;
    color: var(--text-main);
    font-size: 17px;
    letter-spacing: -.02em;
}

.home-sns-feed {
    min-width: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e9ed;
}

.home-sns-feed header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px 10px;
}

.home-sns-feed header strong { font-size: 14px; }
.home-sns-feed-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 7px; }
.home-sns-feed header a { color: #65717a; font-size: 11px; font-weight: 700; }
.home-sns-feed header .home-sns-share { color: var(--main-color); }
.home-sns-feed iframe { display: block; width: 100%; border: 0; background: #f4f6f8; }
.home-sns-feed--facebook iframe { height: 640px; }
.home-sns-feed--youtube iframe { aspect-ratio: 16 / 9; height: auto; }

.home-sns-feed-fallback {
    display: flex;
    min-height: 150px;
    padding: 24px;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: #222;
}

.home-sns-feed-fallback strong { line-height: 1.55; word-break: keep-all; }
.home-sns-feed-fallback span { color: #ddd; font-size: 13px; }

@media (min-width: 1281px) {
    .home-content-with-sns.has-sns-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 270px;
        grid-template-areas:
            "news sns"
            "gallery sns";
        column-gap: 70px;
        width: calc(100% - 80px);
        max-width: 1680px;
        margin-inline: auto;
        align-items: start;
    }

    .home-content-with-sns.has-sns-sidebar > .news-section { grid-area: news; width: 100%; }
    .home-content-with-sns.has-sns-sidebar > .gallery-section { grid-area: gallery; width: 100%; }
    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot {
        grid-area: sns;
        grid-row: 1 / span 2;
        height: auto;
        min-height: 0;
        align-self: start;
        position: static;
        margin-top: 30px;
        width: 270px;
    }

    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot > .home-sns-feeds {
        width: 270px;
        max-height: min(820px, calc(100vh - 80px));
    }

    .home-content-with-sns.has-sns-sidebar .news-section > .container,
    .home-content-with-sns.has-sns-sidebar .gallery-section > .container {
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .home-content-with-sns.has-sns-sidebar { display: block; }
    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot {
        height: auto;
        min-height: 0;
        position: static;
        width: calc(100% - 40px);
        max-width: 500px;
        margin: 30px auto;
    }

    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot > .home-sns-feeds {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot {
        max-width: none;
    }

    .home-content-with-sns.has-sns-sidebar > .home-sns-sidebar-slot > .home-sns-feeds {
        max-height: 620px;
        padding: 18px 10px 18px 16px;
    }
}

@media (min-width: 1920px) {
    .impact-contact-news.has-sns-feed,
    .portal-split-carousel.has-sns-feed { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
    .impact-contact-news.has-sns-feed,
    .portal-split-carousel.has-sns-feed { position: relative; }
    .impact-contact-news.has-sns-feed { overflow: visible; }
    .impact-contact-news.has-sns-feed > .impact-contact-panel { border-radius: 26px 0 0 26px; }
    .impact-contact-news.has-sns-feed > .impact-news-panel { border-radius: 0 26px 26px 0; }
    .impact-contact-news.has-sns-feed > .home-sns-feeds,
    .portal-split-carousel.has-sns-feed > .home-sns-feeds {
        position: absolute;
        top: 0;
        left: calc(100% + 20px);
        z-index: 5;
        width: 270px;
    }
}

@media (max-width: 1919px) {
    .impact-contact-news.has-sns-feed,
    .portal-split-carousel.has-sns-feed { grid-template-columns: 1fr 1.45fr; }
    .impact-contact-news.has-sns-feed > .home-sns-feeds,
    .portal-split-carousel.has-sns-feed > .home-sns-feeds { grid-column: 1 / -1; }
}

@media (min-width: 768px) and (max-width: 1280px) {
    .impact-contact-news.has-sns-feed > .home-sns-feeds,
    .portal-split-carousel.has-sns-feed > .home-sns-feeds {
        flex: 0 1 500px;
        width: 100%;
        max-width: 500px;
        margin: 30px auto 0;
    }
}

@media (min-width: 1281px) and (max-width: 1919px) {
    .impact-contact-news.has-sns-feed > .home-sns-feeds,
    .portal-split-carousel.has-sns-feed > .home-sns-feeds {
        width: 100%;
        max-width: 500px;
        margin: 30px auto 0;
    }
}

@media (max-width: 767px) {
    .impact-contact-news.has-sns-feed > .home-sns-feeds,
    .portal-split-carousel.has-sns-feed > .home-sns-feeds { display: flex; max-height: 620px; padding: 18px 10px 18px 16px; }
    .impact-contact-news.has-sns-feed,
    .portal-split-carousel.has-sns-feed { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .mainBody #mainSlider.slick-initialized .slider-item.is-copy-active .slider-image-container img,
    .mainBody #mainSlider.main-slider-single.slick-initialized .slick-active .slider-image-container img {
        animation: none;
        transform: none;
        will-change: auto;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .slick-dots {
        display: none !important;
    }

    .slick-dotted.slick-slider {
        margin-bottom: 5px !important;
    }

    .slider-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .slider-subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .slider-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .slider-text-overlay {
        padding: 15px;
        max-width: 90%;
    }

    .news-thumbnail{
        width: 100%;
    }
}
