/* ===================== */
/* Hero Section */
/* ===================== */
.hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;

    /* padding: 80px 0;
    min-height: 100vh; */
}

.hero .background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /* transition: background-image 0.4s ease; */
    z-index: -2;
    filter: blur(1px) brightness(0.7);
}

.hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    z-index: -1;
}

.hero .text-container {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-30%);
    width: 40vw;
    z-index: 1;
    color: white;
    transition: background-image 1s ease;
}

/* 텍스트 컨테이너가 아래에서 위로 나타나는 애니메이션을 위한 클래스 */
.text-container.fade-in-up {
    /* 애니메이션 속성만 여기에 정의 */
    animation: fadeInUp 1s ease-out forwards; 
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .text-container h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero .text-container h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero .text-container p {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    margin-bottom: 4rem;
}

.hero .text-container .cta-button {
    padding: 0.8rem 2rem;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.hero .text-container .cta-button:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}
  
.hero .card-container {
    position: absolute;
    top: 95%;
    right: 0;
    transform: translateY(-50%);
    height: 60vh; /* 이 값도 카드의 높이에 따라 조정될 수 있습니다. */
    width: 50vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    cursor: grab;
}

.hero .card-track {
    display: flex;
    height: 100%;
    gap: 1.5rem;
    padding-left: 20px;
}

.hero .card {
    width: 140px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hero .card.active {
    transform: scale(1.15) translateY(-20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.hero .navigation {
    position: absolute;
    bottom: 50px;
    right: 50px;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 2;
}

.hero .nav-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease;
}

.hero .nav-btn:hover {
    background: rgba(255,255,255,0.4);
}

.hero .card-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero .card-counter {
    font-size: 1.2rem;
    font-weight: 100;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ===================== */
/* 모바일 반응형 추가 CSS */
/* ===================== */
@media (max-width: 1200px) {
    .hero .text-container h1 {
        font-size: 4rem;
    }
}

@media (max-width: 992px) {
    .hero .text-container h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        justify-content: flex-start;

        height: auto; /* 작은 화면에서 높이가 콘텐츠에 맞춰지도록 설정 */
        min-height: auto; /* 필요에 따라 최소 높이도 변경 */
        padding: 60px 0;
    }

    .hero .background {
        height: 100%;
        position: fixed; /* Make the background static on smaller screens */
    }
    
    .hero .overlay {
        height: 100%;
        position: fixed; /* Make the background static on smaller screens */
    }

    .hero .text-container {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 90%;
        margin-top: 15vh; /* Push content down to avoid the top edge */
        text-align: center;
    }

    .hero .text-container h1 {
        font-size: 2.5rem;
    }

    .hero .text-container p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }
    
    .hero .card-container {
        position: relative;
        top: 0;
        right: 0;
        transform: none;
        width: 100%;
        height: auto;
        margin-top: 4rem;
        padding-bottom: 0rem; /* Remove padding from card-container */
    }

    .hero .card {
        width: 120px;
        height: 180px;
    }
    
    .hero .navigation {
        /* bottom: 20px;
        right: 20px; */
        position: relative; /* Change to relative */
        bottom: auto;
        right: auto;
        justify-content: center;
        margin-top: 2rem; /* Add some space between cards and navigation */
        margin-bottom: 2rem; /* Add space at the bottom */
    }

    .hero .nav-btn {
        width: 32px;
        height: 32px;
    }
  }

  @media (max-width: 480px) {
    .hero .text-container h1 {
        font-size: 2rem;
    }
    
    .hero .card {
        width: 100px;
        height: 150px;
    }

    /* Reduce gap on very small screens */
    .hero .card-track {
        gap: 1rem;
    }
}

/* ===================== */
/* 화면 높이가 800px 이하일 때 */
/* ===================== */
  /* @media (max-height: 800px) {
    .hero .text-container {
      top: 30%;
    }

    .hero .card-container {
      top: 80%;
    }
  } */



/* ===================== */
/* Gallery Section */
/* ===================== */
.gallery-container {
    width: 100%;
    display: flex;
    flex-direction: column; /* 세로로 정렬 */
    align-items: center;
    justify-content: center;
    position: relative;

    --primary-color: #333333;
    --secondary-color: #555555;
    --background-color: #ffffff;
    --card-spacing: 24px;

    background-color: var(--background-color);
    color: var(--secondary-color);
    overflow: hidden;

    padding: 80px 0; /* 상하 여백 추가 */
    min-height: 100vh; /* 최소 높이를 100vh로 설정하여 콘텐츠가 적을 때도 화면을 꽉 채움 */
}

.gallery-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-background {
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    /* 만약 배경 이미지 위에 유리 효과를 낼 경우, 여기에 블러를 추가할 수 있습니다. */
    /* background-image: url('../images/media2025/media2.webp');
    background-size: cover;
    background-position: center; */
    /* filter: blur(8px); */
    /* transform: none; */
}

.gallery-content-wrapper {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1200px;
    /* height: 80vh; */

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-text-content {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-color);
    /* 텍스트에도 유리 느낌 카드 위에 올라가는 듯한 입체감을 줄 수 있습니다. */
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); */
}

#gallery-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

#gallery-text-subtitle,
#gallery-description {
    font-size: 1rem;
    max-width: 700px;
    line-height: 2;
    margin: 0.5rem auto;
    color: var(--secondary-color);
}

.gallery-card-track {
    display: flex;
    gap: var(--card-spacing);
    white-space: nowrap;
    animation: scroll-left linear infinite;
    animation-duration: 80s; /* 속도 유지 */
}

.gallery-card {
    width: 350px;
    height: 450px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    
    /* ===== Glassmorphism 스타일 적용 ===== */
    /* background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1) */
    /* =================================== */

    /* ==== 섀도우 스타일 ==== */
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 5px solid rgba(255, 255, 255, 0.5); */
    /* =================================== */

    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Pause animation on hover */
.gallery-card:hover {
    transform: translateY(-10px);
    animation-play-state: paused;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 이미지 자체는 투명해지지 않도록 유지 */
}

/* Keyframe animation for infinite scroll */
@keyframes scroll-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-1 * (250px + 24px) * 10));
    }
}

/* ===================== */
/* 모바일 반응형 추가 CSS */
/* ===================== */
@media (max-width: 768px) {
  .gallery-container {
      height: auto; /* 작은 화면에서 높이가 콘텐츠에 맞춰지도록 설정 */
      min-height: auto; /* 필요에 따라 최소 높이도 변경 */
      padding: 60px 0;
  }
    .gallery-text-content {
        margin-bottom: 2rem;
    }
    #gallery-title {
        font-size: 2.5rem;
    }
    #gallery-text-subtitle {
        font-size: 0.9rem;
    }
    .gallery-card {
        width: 180px;
        height: 250px;
    }
    
    /* Update keyframe for responsive card width */
    @keyframes scroll-left {
        from {
            transform: translateX(0);
        }
        /* Adjusted to handle the change in card size. 12 is the number of cards */
        to {
            transform: translateX(calc(-1 * (180px + 24px) * 12));
        }
    }
}

@media (max-width: 480px) {
    #gallery-title {
        font-size: 2rem;
    }
    .gallery-card {
        width: 150px;
        height: 200px;
    }
    
    /* Update keyframe for smaller cards */
    @keyframes scroll-left {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(calc(-1 * (150px + 24px) * 12));
        }
    }
}



/* ===================== */
/* Video Section */
/* ===================== */
.media-video-section {
    background: url('../images/home2025/03_YHCC-TO-THE-FULLEST-316.webp') center/cover no-repeat;
    min-height: 100vh; /* 최소 높이를 100vh로 설정하여 콘텐츠가 적을 때도 화면을 꽉 채움 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-video-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    width: 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0px;
    box-sizing: border-box;
    border-radius: 25px;
}
  
.media-video-container {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    margin-bottom: 2rem;

    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}
  
.media-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
    
.media-video-description {
    max-width: 900px;
    text-align: left;
}
  
.media-video-description p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 2rem;
    color: #ffffff;
}

.media-register-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;

    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    width: 100%;
    max-width: 450px;
    text-align: center;
}
  
.media-register-btn:hover {
    color: #ffffff;
    box-shadow: 0 0 30px #ffffff;
    transform: scale(1.03);
}
  
.media-register-btn:active {
    color: #b5ff4c;
    box-shadow: 0 0 40px #b5ff4c;
    transform: scale(0.98);
}

/* ===================== */
/* 모바일 반응형 추가 CSS */
/* ===================== */
@media (max-width: 768px) {
    .media-video-section {
        height: auto; /* 작은 화면에서 높이가 콘텐츠에 맞춰지도록 설정 */
        min-height: auto; /* 필요에 따라 최소 높이도 변경 */
    }
    
    .media-video-glass {
        padding: 2rem 1rem;
        width: 100%;
        border-radius: 0;
    }

    .media-video-container {
        margin-bottom: 1rem;
    }
}