/* =============================================================================
   NextE&M 지금의 이야기 페이지 스타일시트
   작성일: 2025.06.20
   설명: footprints.php 페이지 전용 스타일
============================================================================= */

/* -----------------------------------------------------------------------------
   영상 섹션 스타일
----------------------------------------------------------------------------- */
.video-showcase {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.video-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    right: -20%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 비율 */
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.play-button svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
    margin-left: 3px; /* 시각적 중앙 정렬 */
}

.video-card:hover .play-button {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1rem;  /* 더 작게 축소 */
    color: var(--primary-color);
    margin-bottom: 0.6rem;  /* 여백도 조정 */
    font-weight: 600;
    line-height: 1.2;
}

.video-info p {
    font-size: 0.75rem;  /* 더 작게 축소 */
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 0;
}

/* 영상 섹션 반응형 디자인 */
/* 태블릿: 뉴스 카드가 작은 2개로 바뀔 때 영상은 3열→1열 전환 */
@media (max-width: 960px) {
    .video-grid {
        grid-template-columns: 1fr;
        max-width: 660px;  /* 뉴스 카드와 동일한 너비 */
        margin: 0 auto;
        padding: 0 2rem;
    }
    
    .video-info h3 {
        font-size: 0.9rem;  /* 태블릿에서 더 작게 */
    }
    
    .video-info p {
        font-size: 0.7rem;  /* 태블릿에서 더 작게 */
    }
}

/* 모바일: 뉴스 카드가 1개씩 표시될 때 */
@media (max-width: 740px) {
    .video-showcase {
        padding: 4rem 1rem;
    }
    
    .video-grid {
        max-width: 400px;  /* 모바일에 적합한 크기 */
    }
    
    .play-button {
        width: 56px;
        height: 56px;
    }
    
    .play-button svg {
        width: 24px;
        height: 24px;
    }
    
    .video-info {
        padding: 1.2rem;
    }
    
    .video-info h3 {
        font-size: 0.85rem;  /* 모바일에서 더 작게 */
    }
    
    .video-info p {
        font-size: 0.65rem;  /* 모바일에서 더 작게 */
        line-height: 1.3;  /* 가독성 향상을 위해 line-height 조정 */
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .video-grid {
        max-width: 320px;
        padding: 0 1rem;
    }
    
    .video-info h3 {
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);  /* 작은 화면에서 더 작게 */
    }
    
    .video-info p {
        font-size: clamp(0.6rem, 2vw, 0.65rem);  /* 작은 화면에서 더 작게 */
    }
}

/* -----------------------------------------------------------------------------
   영상 카드 확대 재생 스타일
----------------------------------------------------------------------------- */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.video-overlay[style*="block"] {
    opacity: 1;
}

.video-player {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10;
}

.video-player iframe {
    width: 100%;
    height: 100%;
}

/* 카드 확대 애니메이션 */
.video-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.video-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1000px;
    height: auto;
    z-index: 3000;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 255, 255, 0.2);
}

.video-card.expanded .video-info {
    display: none;
}

.video-card.expanded .video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
}

.video-card.expanded .video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .video-card.expanded {
        width: 95vw;
        max-width: none;
    }
}

/* -----------------------------------------------------------------------------
   기본 레이아웃
----------------------------------------------------------------------------- */
.news-content {
    padding: 4rem 5%;
    background-color: var(--light-color);
}

/* 슬라이더 전용 셉션 스타일 */
.news-content-slider {
    padding: 8rem 2rem 10rem 2rem;  /* 하단 패딩 10rem으로 증가 */
    /* 밝은 그레이 그라디언트 배경 애니메이션 - 깔끔하고 밝은 느낌 */
    background: linear-gradient(120deg, #f8f8f8, #f0f0f0, #fafafa, #efefef);
    background-size: 200% 200%;
    animation: gradientShift 30s ease infinite;
    overflow: hidden;
    position: relative;
}

.news-content h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
}

/* -----------------------------------------------------------------------------
   뉴스 그리드 레이아웃
----------------------------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   뉴스 카드
----------------------------------------------------------------------------- */
.news-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-content h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.news-date {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.news-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-color);
    margin-bottom: 1.2rem;
}

.news-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-button:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
   영문 페이지 추가 스타일
----------------------------------------------------------------------------- */
.news-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.news-item.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-item.featured .news-image {
    height: 100%;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.news-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* -----------------------------------------------------------------------------
   팝업 모달
----------------------------------------------------------------------------- */
.news-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.news-popup-content {
    background: var(--white);
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    border-radius: 10px;
    position: relative;
}

.news-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* -----------------------------------------------------------------------------
   슬라이더
----------------------------------------------------------------------------- */
.auto-slider {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 슬라이더 섉션에서의 auto-slider 스타일 */
.news-content-slider .auto-slider {
    width: 100%;
    max-width: 1720px; /* 4개 카드 표시 */
    margin: 0 auto;
}

/* 옵션 1: 가로 전체 너비 (뷰포트 너비 사용) */
.auto-slider.full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
}

.slider-wrapper {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    /* 상하 여백으로 그림자 공간 확보 */
    padding: 20px 0;
}

.promo-container {
    display: flex;
    gap: 2rem;
    transition: transform 0.3s ease;
    padding: 0 0.8rem; /* 양쪽 대칭 패딩 */
    width: max-content;
}


.promo-module {
    flex: 0 0 400px; /* 고정 너비 */
    /* 모듈은 단순 컨테이너 역할만 */
    position: relative;
}

/* iframe 기본 스타일 */
.promo-module iframe {
    /* scale 제거 - 원본 크기 유지 */
    width: 100%;
    height: 100%;
    display: block;
}

/* 호버 텍스트 오버플로 처리는 iframe 내부에서 처리해야 함 */

/* 모듈 호버 효과 제거 - 카드에서 처리 */

/* -----------------------------------------------------------------------------
   슬라이더 버튼 - 글래스모피즘 스타일
   
   구조:
   - .slider-button: 주 컨테이너
   - .glass-bg: 글래스모피즘 배경 레이어 (backdrop-filter 적용)
   - .glass-shine: 클릭 시 반짝임 효과 레이어
   - .glass-icon: 화살표 SVG 컨테이너
   
   핵심 기술:
   - backdrop-filter를 사용한 진정한 글래스모피즘
   - @supports를 통한 프로그레시브 향상
   - GPU 가속을 위한 will-change 속성
   - 다크모드 및 접근성 지원
----------------------------------------------------------------------------- */

/* 메인 버튼 컨테이너 */
.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.3s ease;
    z-index: 2;
}

/* 쉐브론 스타일 버튼 */
.slider-button-chevron {
    width: 32px;  /* 90% 크기로 축소 */
    height: 72px;
    /* 버튼 전체에 대한 그림자 */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1))
            drop-shadow(0 8px 24px rgba(31, 38, 135, 0.2));
}

/* 외부 glow를 위한 가상 요소 */
.slider-button-chevron::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
}


/* 쉐브론 SVG 스타일 */
.chevron-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chevron-path {
    transition: all 0.3s ease;
    /* 부드러운 가장자리 */
    shape-rendering: geometricPrecision;
}





/* 호버 효과 - 쉐브론 버튼 */
.slider-button-chevron:hover {
    transform: translateY(-50%) scale(1.05);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15))
            drop-shadow(0 12px 32px rgba(31, 38, 135, 0.3));
}

/* 호버 시 glow 강화 */
.slider-button-chevron:hover::before {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        transparent 70%
    );
}

.slider-button-chevron:hover .chevron-path {
    filter: brightness(1.1) contrast(1.1);
}


/* 클릭(active) 효과 - 쉐브론 버튼 */
.slider-button-chevron:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-button-chevron:active .chevron-path {
    opacity: 0.9;
    filter: brightness(0.95) contrast(1.05);
}



/* 성능 최적화: GPU 가속 */
.slider-button {
    will-change: transform;
}

/* 모션 설정 견줄일 때 */
@media (prefers-reduced-motion: reduce) {
    .slider-button,
    .chevron-path {
        transition: none !important;
        animation: none !important;
    }
}


/* 고대비 모드 */
@media (prefers-contrast: high) {
    .slider-button-chevron .chevron-path {
        fill: rgba(255, 255, 255, 0.9);
        stroke: rgba(0, 0, 0, 0.9);
        stroke-width: 2;
    }
    
    .slider-button-chevron:hover .chevron-path {
        fill: rgba(255, 255, 255, 1);
        stroke: rgba(0, 0, 0, 1);
        stroke-width: 3;
    }
}

/* 포커스 상태 - 접근성을 위한 스타일 */

.slider-button-chevron:focus-visible .chevron-path {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 2;
}

.slider-button-prev {
    left: 22px;  /* 버튼을 좀 더 안쪽으로 */
}

.slider-button-next {
    right: 22px;  /* 버튼을 좀 더 안쪽으로 */
}

/* 버튼 비활성화 스타일 */
.slider-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 비활성화 상태에서는 효과 없음 */
.slider-button-chevron:disabled .chevron-path {
    fill: rgba(128, 128, 128, 0.2);
    stroke: rgba(255, 255, 255, 0.3);
    filter: none;
}

.slider-button:disabled:hover {
    transform: translateY(-50%);
}

/* -----------------------------------------------------------------------------
   페이지네이션
----------------------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.page-btn,
.page-num {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-num:hover,
.page-num.active {
    background: var(--primary-color);
    color: white;
}

/* -----------------------------------------------------------------------------
   통합 반응형 디자인
   - 슬라이더 카드 개수와 UI 최적화를 함께 관리
----------------------------------------------------------------------------- */

/* 데스크톱 대형: 3개 카드 (1790px 이하) */
@media (max-width: 1790px) {
    .news-content-slider .auto-slider {
        max-width: 1290px;
    }
}

/* 데스크톱 중형: 2개 카드 (1360px 이하) */
@media (max-width: 1360px) {
    .news-content-slider .auto-slider {
        max-width: 860px;
    }
}

/* 태블릿: 2개 작은 카드 + 태블릿 최적화 (960px 이하) */
@media (max-width: 960px) {
    .news-content-slider .auto-slider {
        max-width: 660px;
    }
    
    .promo-module {
        flex: 0 0 300px; /* 카드 크기 축소 */
    }
    
    /* 태블릿용 버튼 크기 조정 */
    .slider-button-chevron {
        width: 28px;  /* 32px에서 축소 */
        height: 63px; /* 비율 유지 */
    }
    
    /* 섹션 패딩 조정 */
    .news-content-slider {
        padding: 6rem 1.5rem 8rem 1.5rem;
    }
}

/* 모바일: 1개 카드 + 전체 모바일 최적화 (740px 이하) */
@media (max-width: 740px) {
    .news-content-slider .auto-slider {
        max-width: 325px; /* 첫 여백 고려하여 조정 */
    }
    
    /* 뉴스 그리드 모바일 최적화 */
    .news-item.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-content {
        padding: 2rem 1rem;
    }
    
    /* 슬라이더 섹션 모바일 최적화 */
    .news-content-slider {
        padding: 3rem 1rem 5rem 1rem;
    }
    
    /* 모바일 버튼 크기 */
    .slider-button-chevron {
        width: 26px;
        height: 58px;
    }
    
    /* 버튼 위치 조정 - 데스크톱과 동일하게 */
    .slider-button-prev {
        left: 22px;
    }
    
    .slider-button-next {
        right: 22px;
    }
    
    /* 터치 친화적 여백 */
    .promo-container {
        gap: 1.5rem;
    }
    
    /* 호버 시 glow 효과 감소 (모바일은 호버 없음) */
    .slider-button-chevron::before {
        background: radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.05) 40%,
            transparent 70%
        );
    }
}

/* 작은 모바일: 추가 최적화 (480px 이하) */
@media (max-width: 480px) {
    .promo-module {
        flex: 0 0 280px; /* 더 작은 카드 */
    }
    
    .news-content-slider .auto-slider {
        max-width: 310px; /* 원래 값으로 복원 */
    }
    
    .news-card img {
        height: 150px; /* 모바일에서 더 작은 썸네일 */
    }
    
    /* 더 작은 버튼 */
    .slider-button-chevron {
        width: 24px;
        height: 54px;
    }
    
    /* 최소 패딩 */
    .news-content-slider {
        padding: 2rem 0.5rem 4rem 0.5rem;
    }
    
    /* 버튼 위치는 데스크톱과 동일하게 유지 */
    .slider-button-prev {
        left: 22px;
    }
    
    .slider-button-next {
        right: 22px;
    }
    
    /* 카드 간격 축소 */
    .promo-container {
        gap: 1rem;
    }
}

/* 초소형 모바일: 최대 최적화 (360px 이하) */
@media (max-width: 360px) {
    .promo-module {
        flex: 0 0 260px;
    }
    
    .news-content-slider .auto-slider {
        max-width: 290px; /* 원래 값으로 복원 */
    }
    
    /* 버튼 위치는 여전히 22px 유지 */
    .slider-button-prev {
        left: 22px;
    }
    
    .slider-button-next {
        right: 22px;
    }
}

/* =============================================================================
   배경 애니메이션
============================================================================= */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}
