/* home.css - 메인 페이지 전용 스타일 */

/* 링크 기본 스타일 */
a {
    text-decoration: none;
    color: inherit;
}

a:hover, a:visited, a:active {
    text-decoration: none;
    color: inherit;
}

/* 메인 슬라이더 스타일 */
.main-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 720px;
}

#mainSlider {
    width: 100%;
}

/* 슬라이더 아이템 스타일 */
.slider-item {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 720px;
    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(rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    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: 100%;
    max-width: 80%;
    padding: 30px;
    color: white;
    text-align: center;
    z-index: 2;
}

/* 텍스트 위치에 따른 스타일 */
.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(30px);
}

/* 제목 스타일 */
.slider-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 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.slick-active .slider-title,
.slider-item.slick-active .slider-subtitle,
.slider-item.slick-active .slider-button {
    opacity: 1;
    transform: translateY(0);
}

/* 슬라이더 컨트롤 영역 스타일 */
.slider-controls-container {
    position: relative;
    max-width: 200px;
    margin: -25px auto 0;
    text-align: center;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 100;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.slider-counter {
    font-size: 14px;
    color: var(--text-sub2);
    margin: 0 15px;
}

.slider-nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-sub2);
    cursor: pointer;
    padding: 0 10px;
}

/* 도트 네비게이션 스타일 */
.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: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.news-section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 공통 홈 스타일 뒤에 로드되는 전권협 원본 레이아웃 복원 */
@media (min-width: 769px) {
    .main-slider,
    #mainSlider,
    #mainSlider .slick-list,
    #mainSlider .slick-track,
    #mainSlider .slider-item,
    #mainSlider .slider-image-container {
        height: min(720px, 56.25vw) !important;
        max-height: 720px;
    }
    #mainSlider .slider-image-container img {
        height: 100% !important;
        max-height: none;
        object-fit: cover;
    }
}

.slider-controls {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    gap: 10px;
}

.slider-controls-container { left: auto; bottom: auto; }
.slider-nav-btn { width: auto; height: auto; background-color: transparent; }
.news-section { opacity: 1; transform: none; }
.news-list { height: auto; align-items: initial; }
.news-featured { flex: 0 0 250px; display: block; align-self: auto; height: auto; }
.news-thumbnail { width: 250px; height: 250px; }
.news-list-items { overflow: visible; align-self: auto; height: auto; }
.item-category { display: none; }

.news-list {
    display: flex;
    gap: 30px;
    width: 100%;        /* 추가: 명시적 너비 설정 */
    padding: 0;         /* 추가: 패딩 제거 */
    margin: 0;          /* 추가: 마진도 제거 */
}

.news-featured {
    /*flex: 0 0 300px;*/
    position: relative;
}

.news-thumbnail {
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 10px;
    height: 250px;
    display: flex;
    flex-direction: column;
    width: 250px;
    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;
}

.news-date {
    font-size: 12px;
    color: var(--text-sub2);
    text-align: right;
}

.news-list-items {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item {
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.news-item:first-child {
    padding-top: 0;
    border-top: none;
}

.news-item:last-child {
    border-bottom: 1px solid #e0e0e0;
}

.item-dot {
    width: 5px;
    height: 5px;
    background-color: var(--main-color);
    border-radius: 50%;
    margin-right: 10px;
    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('/sites/arpjd/images/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;
}

/* 갤러리 내비게이션 화살표 숨김 */
.main-slider .gallery-slider .slick-prev,
.main-slider .gallery-slider .slick-next {
    display: none !important;
}

/* 첫 슬라이드가 로드되기 전 기본 숨김 */
/* 첫 슬라이드에만 텍스트 display: none 적용 */
.main-slider .slider-item:first-child .slider-title,
.main-slider .slider-item:first-child .slider-subtitle,
.main-slider .slider-item:first-child .slider-button {
    display: none;
}

/* 갤러리 아이템 스타일 */
.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 {
    height: 200px;
    overflow: hidden;
}

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

/* 교육 의뢰 배너 */
.edu-cta-section {
    padding: 0;
    background: linear-gradient(135deg, #1a3a5c 0%, #238E96 100%);
}

.edu-cta-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.edu-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px 0;
    gap: 40px;
}

.edu-cta-text h2 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.edu-cta-text p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.edu-cta-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    background: #fff;
    color: #1a3a5c;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.edu-cta-btn:hover {
    background: #FF7F2A;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .edu-cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        gap: 24px;
    }

    .edu-cta-text h2 {
        font-size: 22px;
    }

    .edu-cta-text p {
        font-size: 15px;
    }

    .edu-cta-section .container {
        padding: 0 24px;
    }
}

@media (max-width: 480px) {
    .edu-cta-inner {
        padding: 32px 0;
        gap: 20px;
    }

    .edu-cta-text h2 {
        font-size: 20px;
    }

    .edu-cta-text p {
        font-size: 14px;
    }

    .edu-cta-btn {
        padding: 12px 30px;
        font-size: 15px;
    }
}

/* 함께하는 기관 섹션 스타일 */
.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;
}

.partner-item img {
    max-width: 90%;              /* 너비 제한 */
    max-height: 60px;            /* 최대 높이 축소 */
    height: auto;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* 네비게이션 버튼 스타일 */
.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;
    }

    .news-featured {
        flex: none;
    }

    .partners-container {
        width: 85%;
    }

    .slider-title {
        font-size: 2.5rem;
    }

    .slider-subtitle {
        font-size: 1.3rem;
    }

    .news-thumbnail{
        width: 100%;
    }
}

@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;
    }

    .slider-controls-container {
        margin-top: -5px;
        padding: 10px 0;
        z-index: 200;
    }

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

    .news-thumbnail{
        width: 100%;
    }
}

@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%;
    }
}
