/* Global Reset for Body and HTML */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    font-family: 'Bebas Neue', sans-serif;
    box-sizing: border-box;
}

/* Container Level Fix for Overflow */
.container, .welcome-section, .highlights {
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
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);
}

header.scrolled {
    padding: 10px;
    background-color: rgba(43, 43, 43, 0.8);
    opacity: 0.9;
    border-bottom: none;
}

/* Navigation */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

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

/* 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;
    /* 모든 상태에서 글자 색상을 검은색으로 설정 */
}



/* 슬라이더 스타일 */
/* Slide image styling with a darker overlay */
.slide {
    position: relative; /* Allows positioning of overlay text */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.2); /* Slightly darkens the image */
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3em;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    opacity: 0.9;
    z-index: 10; /* Ensures the text is above the image */
}

.overlay-text h1 {
    font-size: 70px;
    margin: 0;
}

.overlay-text h2 {
    color: #fff;
    font-size: 20px;
}

#about-button {
    background-color: #161617; /* Dark background color */
    color: #fff; /* White text color */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light border */
    border-radius: 25px; /* Rounded shape */
    padding: 10px 25px; /* Padding for size */
    font-family: 'Bebas Neue', sans-serif; /* Font style */
    font-size: 18px; /* Font size */
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

#about-button:hover {
    background-color: #333; /* Darken on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

#about-button:active {
    transform: scale(0.95); /* Slightly shrink on click */
}


.about-button:hover {
    background-color: #555;
}


.slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}


.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border: none;
}

/* Image transparency when scrolled */
.slide img.scrolled {
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
    opacity: 0.5; /* Semi-transparent when scrolled */
}


:root{
    --pri:#ff2e2e;       /* 포인트 컬러 */
    --pri-weak:#ff7a7a;  /* 약한 포인트 */
    --bg1:#111;          /* 카드 배경 그라데이션 시작 */
    --bg2:#1b1b1b;       /* 카드 배경 그라데이션 끝 */
    --ink:#ffffff;       /* 텍스트 */
    --ink-weak:#dddddd;  /* 보조 텍스트 */
    --line:rgba(255,255,255,.08);
    --glow:rgba(0,0,0,.5);
  }

  #race-countdown {
    transition: opacity 0.2s ease;
  }
  
  #race-countdown{
    position: fixed; top: 80px; left: 50px; z-index: 2000;
    width: 320px; padding: 16px 16px 12px;
    background: linear-gradient(135deg,var(--bg1) 0%,var(--bg2) 100%);
    border: 2px solid var(--pri);
    border-radius: 14px; color:var(--ink);
    font-family:'Bebas Neue',sans-serif;
    box-shadow:0 10px 26px var(--glow);
    user-select:none; cursor:grab;
  }
  #race-countdown.dragging{ cursor:grabbing; }
  
  #race-countdown .cdn-title{
    font-size:18px; letter-spacing:1px; color:var(--pri);
    margin-bottom:6px; text-transform:uppercase; line-height:1.2;
  }
  /* 화살표 버튼 */
 /* 화살표 컨테이너: 카드의 세로 '중간'에 배치 */
#countdown .cdn-arrows,
#race-countdown .cdn-arrows {
  position: absolute;
  left: -12px;                 /* 살짝 바깥으로 */
  right: -12px;                /* 양쪽 동일 오프셋 */
  top: 50%;                    /* 세로 중앙 */
  transform: translateY(-50%); /* 정확히 중앙 정렬 */
  display: flex;
  justify-content: space-between; /* 좌우 끝으로 분리 */
  align-items: center;
  pointer-events: none;        /* 드래그/클릭 방해 방지 */
}

/* 실제 버튼만 클릭 가능하도록 */
#countdown .cdn-arrow,
#race-countdown .cdn-arrow {
  pointer-events: auto;
  background: #ff2e2e;
  color: #111;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
  transition: transform 0.2s ease;
}

/* 필요하면: 좌/우 버튼 미세 위치 보정 */
#race-countdown .cdn-arrow.left { margin-left: 2px; }
#race-countdown .cdn-arrow.right { margin-right: 2px; }

/* 모바일에서 너무 튀어나오지 않게 */
@media (max-width: 480px) {
  #countdown .cdn-arrows,
  #race-countdown .cdn-arrows {
    left: -6px;
    right: -6px;
  }
}

  
  
  #countdown .cdn-arrow, #race-countdown .cdn-arrow {
    background: #ff2e2e;
    color: #111;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,.4);
    transition: transform 0.2s ease;
  }
  
  #countdown .cdn-arrow:hover, #race-countdown .cdn-arrow:hover {
    filter: brightness(1.1);
    transform: scale(1.1);
  }
  
  #race-countdown .cdn-nextline{
    font-size:16px; letter-spacing:.5px; margin-bottom:10px; color:var(--ink-weak);
  }
  #cdn-next-label{
    background:var(--pri); color:#111; padding:2px 8px; border-radius:6px;
    font-size:16px; letter-spacing:.5px;
  }
  
  #race-countdown .cdn-grid{
    display:grid; grid-template-columns: repeat(2,1fr); gap:10px;
    margin-bottom:12px;
  }
  #race-countdown .cdn-cell{
    background:#0f0f0f; border:1px solid var(--line);
    border-radius:10px; padding:10px 8px; text-align:center;
    box-shadow: inset 0 0 10px color-mix(in oklab, var(--pri) 15%, transparent);
  }
  #race-countdown .cdn-cell span{
    display:block; font-size:34px; line-height:1; margin-bottom:4px;
    text-shadow:0 0 8px color-mix(in oklab, var(--pri) 70%, transparent);
  }
  
  #race-countdown .cdn-seplist{
    background:#121212; border:1px solid var(--line);
    border-radius:10px; padding:6px; max-height:260px; overflow:auto;
  }
  .cdn-item{
    display:grid; grid-template-columns: 22px 1fr auto; align-items:center;
    gap:10px; padding:8px 6px; border-radius:8px; transition:background .2s ease;
    border-left:4px solid var(--pri);
  }
  .cdn-item:hover{ background:rgba(255,255,255,.05); }
  .cdn-item .icon{ font-size:14px; opacity:.9; text-align:center; }
  .cdn-item .lbl{ font-size:16px; letter-spacing:.6px; line-height:1.1; }
  .cdn-item .when{ font-size:13px; color:#bbb; letter-spacing:.3px; text-align:right; white-space:nowrap; }
  .cdn-item.past{ opacity:.55; border-left-color: color-mix(in oklab, var(--pri) 40%, transparent); }
  .cdn-item.active{ outline:1px solid color-mix(in oklab, var(--pri) 50%, #4caf50); background:rgba(255,255,255,.04); }
  
  .cdn-live{
    display:inline-flex; align-items:center; gap:6px;
    background:var(--pri); color:#111; border-radius:999px;
    padding:2px 8px; font-size:12px; letter-spacing:.3px; margin-left:6px;
  }
  .cdn-live .dot{ width:8px; height:8px; border-radius:50%; background:var(--pri-weak); box-shadow:0 0 8px var(--pri-weak); }
  
  

/* Welcome Section */
/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 50px;
    background-color: #0f0f0f;
    animation: fadeIn 1.5s ease forwards;
    margin: 0;
}

.welcome-section h1 {
    font-size: 70px;
    color: #fff;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 0.3s;
}

.welcome-section p {
    font-size: 28px;
    color: #ccc;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 0.5s;
}

.welcome-section .highlight-card {
    background-color: #1f1f1f;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.welcome-section .highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.welcome-section .highlight-card h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #fff; /* Adjust this color to match your main accent color */
}

.welcome-section .highlight-card p {
    font-family: "Titillium Web";
    font-weight: 540;
    font-size: 14px;
    color: #cccccc;
}

.highlights {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

/* Highlight Card Style Update */
.highlight-card {
    background-color: #1f1f1f;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: fadeInText 0.8s forwards ease-out;
}

/* On hover, enhance scaling and shadow */
.highlight-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Animation delay for highlight cards */
.highlight-card:nth-child(1) {
    animation-delay: 0.3s;
}

.highlight-card:nth-child(2) {
    animation-delay: 0.5s;
}

.highlight-card:nth-child(3) {
    animation-delay: 0.7s;
}

.highlight-card:nth-child(4) {
    animation-delay: 0.9s;
}

.highlight-card:nth-child(5) {
    animation-delay: 1.1s;
}

.highlight-card:nth-child(6) {
    animation-delay: 1.3s;
}


.highlight-card h3 {
    font-size: 2vw;
    margin-bottom: 10px;
}

.highlight-card p {
    font-size: 1vw;
    color: #ccc;
}

/* Responsive Design for Mobile */
/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .highlights {
        flex-direction: column; /* 세로로 카드 정렬 */
        align-items: flex-start; /* 카드들을 왼쪽 정렬 */
        padding: 0; /* 패딩 제거 */
        gap: 20px; /* 카드 간 간격 */
    }

    .highlight-card {
        position: relative; /* 위치 조정 가능하게 설정 */
        left: -150px; /* 카드 전체를 왼쪽으로 이동 */
        width: calc(95% + 15px); /* 왼쪽 이동분 만큼 너비를 확장 */
        padding: 20px; /* 내부 패딩 유지 */
        text-align: left; /* 텍스트를 왼쪽 정렬 */
        box-sizing: border-box; /* 패딩 포함 */
    }

    .highlight-card h3 {
        font-size: 18px; /* 제목 크기 */
        margin-bottom: 10px; /* 제목과 본문 간 간격 */
    }

    .highlight-card p {
        font-size: 14px; /* 본문 크기 */
        line-height: 1.5; /* 본문 줄 간격 */
    }

    .highlight-card .icon {
        font-size: 40px; /* 아이콘 크기 */
        margin-bottom: 10px; /* 아이콘과 본문 간 간격 */
    }
}




.highlight-card .icon {
    font-size: 40px; /* Adjust icon size */
    color: #ffffff; /* Icon color */
    margin: 10px 0; /* Space above and below the icon */
}

.image-section {
    position: relative; /* Allows positioning of overlay text */
    overflow: hidden; /* Crop the image within the section */
    width: 100vw; /* Full width of the viewport */
    height: 200px; /* Reduced height for the rectangle shape */
    margin-top: 130px; /* Increased top margin to bring the image down */
    margin-left: -50px; /* Remove any extra margin on the left */
}

.image-section img {
    width: 100%; /* Full width of the section */
    height: 100%; /* Full height of the section */
    object-fit: cover; /* Crops the image to fit within the rectangle */
    filter: blur(3px) brightness(0.7); /* Adds blur and darkens for effect */
    border-radius: 0; /* Remove rounded corners */
}

/* Adjusted overlay text position */
.image-section .overlay-text {
    position: absolute;
    top: 60%; /* Move text down slightly by setting top to 60% */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -60%); /* Centering trick */
    color: #fff; /* Text color */
    font-size: 3em; /* Adjust font size */
    font-family: 'Bebas Neue', sans-serif;
    text-align: center;
}
.welcome-section p {
    font-size: 28px;
    color: #ccc;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 0.5s; /* Delay to stagger appearance */
}

/* Highlights Section within Welcome */
.welcome-section .highlights {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px 0;
}

.welcome-section .highlight-card {
    background-color: #1f1f1f;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.welcome-section .highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.welcome-section .highlight-card h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #fff; /* Adjust this color to match your main accent color */
}

.welcome-section .highlight-card p {
    font-size: 16px;
    color: #cccccc;
}

.highlights {
    display: flex;
    gap: 100px !important;
    padding: 0 200px !important;
}

.highlight-card {
    background-color: #1c1c1c !important;
    padding: 20px !important;
    border-radius: 10px !important;
    text-align: center !important;
    color: #fff !important;
    margin: 0 10px !important;
    flex: 0 1 30% !important;
}

.highlight-card .icon {
    font-size: 40px; /* Adjust icon size */
    color: #ffffff; /* Icon color */
    margin: 10px 0; /* Space above and below the icon */
}

.image-section {
    position: relative; /* Allows positioning of overlay text */
    overflow: hidden; /* Crop the image within the section */
    width: 100vw; /* Full width of the viewport */
    height: 200px; /* Reduced height for the rectangle shape */
    margin-top: 130px; /* Increased top margin to bring the image down */
    margin-left: -50px; /* Remove any extra margin on the left */
}

.image-section img {
    width: 100%; /* Full width of the section */
    height: 60%; /* Full height of the section */
    object-fit: cover; /* Crops the image to fit within the rectangle */
    filter: blur(0.1px) brightness(0.7); /* Adds blur and darkens for effect */
    border-radius: 0; /* Remove rounded corners */
}

/* Adjusted overlay text position */
.image-section .overlay-text {
    position: absolute;
    top: 60%; /* Move text down slightly by setting top to 60% */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -130%); /* Centering trick */
    color: #fff; /* Text color */
    font-size: 3em; /* Adjust font size */
    font-family: 'Bebas Neue', sans-serif;
    text-align: center;
}

/* About Section Styling */
.about-section {
    background-color: #1f1f1f;
    color: #e0e0e0;
    padding: 50px;
    margin: -50px auto;
    border-radius: 8px;
    text-align: left;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.about-section h2 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 20px;
}

.about-section h3 {
    font-size: 30px;
    margin: 20px 0 10px;
    color: #e0e0e0; /* Accent color for subheadings */
}

.about-section p {
    font-size: 18px;
    line-height: 1.6;
    margin: 10px auto;
    max-width: 700px;
    font-family: 'Oswald';
}

/* 푸터 스타일 */
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 */
/* Updated fade-in keyframes */
@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Initial hidden state for text */
.fade-in-text {
    opacity: 0; /* 초기 숨김 상태 */
    transform: translateY(30px) scale(0.95);
    animation: fadeInText 1s forwards ease-out; /* 애니메이션 적용 */
    animation-delay: 0.3s; /* 모든 요소에 기본 딜레이 추가 */
    visibility: visible; /* 요소가 숨겨지지 않도록 보장 */
    z-index: 10; /* 다른 요소보다 앞에 표시되도록 설정 */
    position: relative;
}

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