/* 헤더 스타일 */
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.scrolled {
    padding: 10px;
    background-color: rgba(43, 43, 43, 0.8);
    opacity: 0.9;
    border-bottom: none; /* Remove border when scrolled */
}

body {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
}

/* 네비게이션 스타일 */
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: #000;
    text-decoration: underline;
    transform: scale(1.1);
}

/* CSS for Teams dropdown */
.teams-menu {
    position: relative;
}

.teams-menu .dropdown-content {
    display: none; /* Hide by default */
    position: absolute;
    background-color: #f9f9f9;
    top: 100%;
    left: 0;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 10px;
}

.teams-menu:hover .dropdown-content {
    display: block; /* Show on hover */
}


/* 드롭다운 스타일 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    max-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    transition: max-height 0.3s ease;
    overflow: hidden;
    width: 160px;
    /* 드롭다운 메뉴의 너비를 조정합니다. */
    left: 50%;
    /* TEAMS 글자의 중앙으로 이동하기 위해 left 값을 50%로 설정합니다. */
    /* transform: translateX(-50%); */
    /* left 값을 기준으로 왼쪽으로 50%만큼 이동합니다. */
    top: 100%;
    /* TEAMS 글자의 아래로 이동합니다. */
}

.dropdown-content.show {
    display: block;
    height: 530px;
    /* 드롭다운 메뉴의 최대 높이 */
}

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

.dropdown-content ul li a{
    padding-left: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: large;
    color: #333;
    transition: background-color 0.3s ease;
    margin-left: 20px;
    /* 왼쪽 마진 없음 */
    position: relative;
    /* |를 위치시키기 위해 상대적 위치 지정 */
}

/* .dropdown-content ul li::before {
    content: '||||';
    font-size: x-large;
    font-weight: 2000;
    position: absolute;
    left: 1%;
    color: transparent;
    transition: color 0.3s ease;
    letter-spacing: -0.41em;
} */

/* 팀별 색상에 맞추어 | 색상 변경 */
/* 각 팀별 색상 설정 */
.dropdown-content ul li:nth-child(1):before {
    color: #27F4D2;
    /* Mercedes */
}

.dropdown-content ul li:nth-child(2):before {
    color: #3671C6;
    /* Red Bull Racing */
}

.dropdown-content ul li:nth-child(3):before {
    color: #E8002D;
    /* Ferrari */
}

.dropdown-content ul li:nth-child(4):before {
    color: #FF8000;
    /* McLaren */
}

.dropdown-content ul li:nth-child(5):before {
    color: #FF87BC;
    /* Alpine */
}

.dropdown-content ul li:nth-child(6):before {
    color: #6692FF;
    /* RB */
}

.dropdown-content ul li:nth-child(7):before {
    color: #229971;
    /* Aston Martin */
}

.dropdown-content ul li:nth-child(8):before {
    color: #64C4FF;
    /* Williams */
}

.dropdown-content ul li:nth-child(9):before {
    color: #52E252;
    /* Kick Sauber */
}

.dropdown-content ul li:nth-child(10):before {
    color: #B6BABD;
    /* Haas */
}

.dropdown-content ul li a {
    color: black;
    /* 기본 글자 색상 */
}

.dropdown-content ul li a:link,
/* 방문 전 링크 */
.dropdown-content ul li a:visited,
/* 방문 후 링크 */
.dropdown-content ul li a:hover,
/* 호버 상태 */
.dropdown-content ul li a:active {
    /* 활성 상태 */
    color: black;
    /* 모든 상태에서 글자 색상을 검은색으로 설정 */
}

body {
    padding-top: 50px;
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
}

/* Teams Section Styling */
.teams-section {
    padding: 50px 20px;
    text-align: center;
    background-color: #161617;
    color: #ffffff;
}

.teams-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Team Box */
/* Ensures each team box has a consistent size */
/* Default Team Box Styling */
.team-box {
    border-radius: 8px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* Image Section */
.team-box .image-section {
    background-color: #e0e0e0;
    padding: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.team-box img {
    max-width: 100%; /* Scale to fit the width */
    max-height: 100%; /* Scale to fit the height */
    object-fit: contain; /* Maintain aspect ratio without cropping */
}

/* Button Section */
.team-box .button-section {
    background-color: #1f1f1f;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.team-box .explore-button {
    background-color: #1f1f1f;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;

}

.team-box .explore-button:hover {
    background-color: #333;
}

/* Alpine Logo */
.logo-alpine {
    height: 60px;
    width: auto;
}

/* Aston Martin Logo */
.logo-astonmartin {
    height: 70px;
    width: auto;
}

/* Ferrari Logo */
.logo-ferrari {
    height: 65px;
    width: auto;
}

/* Haas Logo */
.logo-haas {
    height: 75px;
    width: auto;
}

/* McLaren Logo */
.logo-mclaren {
    height: 80px;
    width: auto;
}

/* Mercedes Logo */
.logo-mercedes {
    height: 70px;
    width: auto;
}

/* Racing Bulls Logo */
.logo-racingbulls {
    height: 78px;
    width: auto;
}

/* Red Bull Logo */
.logo-redbull {
    height: 70px;
    width: auto;
}

/* Sauber Logo */
.logo-sauber {
    height: 68px;
    width: auto;
}

/* Williams Logo */
.logo-williams {
    height: 60px;
    width: auto;
}


/* Fade-in effect */
.fade-in-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 푸터 스타일 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #444;
}

.footer-content {
    margin-bottom: 20px;
}

.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 */
/* Fade-in keyframes */
@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial hidden state for text */
.fade-in-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInText 1s forwards;
}

/* Staggered effect for each fade-in element */
.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;
}

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

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

/* Initial hidden state for text */
.fade-in-text {
    opacity: 0;
    transition: opacity 2s ease, transform 1s ease;
}

/* Fully visible state */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInText 1s forwards;
}