/* 헤더 스타일 */
header {
    background-color: #0f0f0f;
    color: #fff;
    padding: 20px;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: padding 0.3s ease, background-color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07); /* Transparent white line */
}

/* Header when scrolled */
/* header.scrolled {
    background-color: rgba(15, 15, 15, 0.8); Semi-transparent background on scroll
} */

/* Header Wrapper */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 드롭다운 스타일 */
.dropdown {
    position: relative;
    display: none; /* 기본적으로 숨김 */
}

.dropdown-toggle {
    background-color: #0f0f0f;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    width: 100%;
    text-align: left;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #0f0f0f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 10px 0;
    border-radius: 4px;
}

.dropdown-menu .team-link {
    display: block;
    padding: 10px 15px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu .team-link:hover {
    background-color: #333;
    color: #fff;
}


/* 모바일 환경에서 드롭다운 활성화 */
@media (max-width: 768px) {
    .team-nav-bar {
        flex-wrap: wrap;
        justify-content: start;
    }

    .dropdown {
        display: block; /* 모바일에서는 드롭다운 표시 */
        width: 100%;
    }

    .dropdown-menu {
        display: none; /* 기본적으로 숨김 */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #0f0f0f;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        padding: 10px 0;
        border-radius: 4px;
    }
    
    .dropdown-menu.show {
        display: block; /* .show 클래스가 있을 때 드롭다운 표시 */
    }
    

    .team-link {
        display: block;
        text-align: left;
    }
}

/* 데스크톱 환경에서 기존 네비게이션 스타일 유지 */
@media (min-width: 769px) {
    .dropdown {
        display: none; /* 데스크톱에서는 드롭다운 숨김 */
    }

    .team-nav-bar {
        display: flex;
        justify-content: center;
    }
}

/* 모바일 환경에서 team-nav-bar 숨기기 */
/* Mobile-specific styles: Hide team-nav-bar on mobile */
@media (max-width: 768px) {
    .team-nav-bar {
        display: none !important; /* 모바일 환경에서 완전히 숨김 */
    }
}


/* Team Navigation Bar: always visible below the header */
.team-nav-bar {
    display: flex;
    justify-content: center;
    background-color: #0f0f0f; /* Matches the header background */
    padding: 30px 0px 10px 0px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for separation */
    position: sticky;
    top: 60px; /* Adjusted to sit just below the header */
    z-index: 999;
    transition: background-color 0.3s ease; /* Transition for background color */
}

/* Team Navigation Bar when scrolled */
.team-nav-bar.scrolled {
    background-color: rgba(15, 15, 15, 0.8); /* Semi-transparent background on scroll */
}

/* Other styles remain unchanged */


/* Team links in the nav bar */
.team-link {
    color: #e0e0e0; /* Light text color */
    margin: 0 15px; /* Spacing between links */
    font-size: 16px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Bebas Neue', sans-serif;
}

.team-link:hover {
    background-color: #333; /* Darker background on hover */
    color: #ffffff; /* White text on hover */
}

.team-link.active {
    background-color: #444; /* Highlight the selected team */
    color: #fff;
    font-weight: bold;
}

body {
    background-color: #0f0f0f;
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    padding-top: 70px; /* Offset to account for fixed header and team nav bar */
}

/* 네비게이션 스타일 */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
    color: #b5b5b5;
    text-decoration: underline;
    transform: scale(1.1);
}

/* News section styling */
.news-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    padding: 10px 20px 20px 20px;
    margin: 0 auto;
}

.news-item {
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Image styling inside news item */
.news-item img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* News content styling */
.news-content h5 {
    color: #ffffff;
    font-size: 20px;
    margin: 10px 0;
    line-height: 1.3;
}

.news-content p {
    color: #cccccc;
    font-size: 16px;
    line-height: 1.5;
}

/* Button styling inside news item */
.news-content .btn-primary {
    background-color: #333;
    color: #e0e0e0;
    padding: 10px 20px;
    text-align: center;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.news-content .btn-primary:hover {
    background-color: #444;
    color: #ffffff;
}

/* 노트북 버전 이상에서는 기존 스타일 유지 */
@media (min-width: 769px) {
    .news-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 기존 4열 레이아웃 유지 */
        gap: 20px;
        list-style: none;
        padding: 10px 20px 20px 20px;
        margin: 0 auto;
    }

    .news-item img {
        height: auto; /* 이미지 비율 유지 */
        max-height: 200px; /* 이미지 최대 높이 설정 */
    }

    .news-content h5 {
        font-size: 20px; /* 기존 폰트 크기 유지 */
    }

    .news-content p {
        font-size: 16px; /* 기존 폰트 크기 유지 */
        line-height: 1.5;
    }

    .news-content .btn-primary {
        padding: 10px 20px; /* 버튼 크기 유지 */
    }
}

/* 모바일 환경에서 새로운 스타일 적용 */
@media (max-width: 768px) {
    .team-nav-bar {
        flex-wrap: wrap; /* 팀 링크를 줄 바꿈 허용 */
        padding: 10px;
    }

    .news-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 반응형 레이아웃 */
        gap: 20px;
        list-style: none;
        padding: 0;
    }

    .news-item img {
        height: 150px; /* 이미지 높이 조정 */
        object-fit: cover;
    }

    .news-content h5 {
        font-size: 16px; /* 제목 폰트 크기 축소 */
    }

    .news-content p {
        font-size: 12px; /* 본문 폰트 크기 축소 */
    }

    .news-content .btn-primary {
        padding: 8px 15px; /* 버튼 크기 축소 */
    }
}


/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: #b5b5b5;
    border: 1px solid #444;
    margin: 0 5px;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a.active {
    background-color: #444;
    color: #ffffff;
}

.pagination a:hover {
    background-color: #666;
    color: #ffffff;
}

/* Footer styling */
footer {
    margin-top: 50px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #444;
}

.footer-content h3 {
    margin-bottom: 10px;
}

.footer-content ul {
    list-style: none;
    padding: 0;
}

.footer-content ul li {
    display: inline;
    margin-right: 10px;
}

.footer-content a {
    color: #fff;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-bottom p {
    font-size: 0.8em;
}

.f1-logos ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.f1-logos li {
    display: inline-block;
    margin: 1% 1%;
}

.f1-logos img {
    width: auto;
    height: 45px;
    vertical-align: middle;
}

/* Fade-in keyframes */
@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInText 1s forwards;
}

.fade-in-text:nth-child(1) {
    animation-delay: 0.3s;
}

.fade-in-text:nth-child(2) {
    animation-delay: 0.5s;
}

.fade-in-text:nth-child(3) {
    animation-delay: 0.7s;
}

.fade-in-text:nth-child(4) {
    animation-delay: 0.9s;
}
