:root {
    --main-dark: #1f1f27;
    --f1-red: #e10801;
    --f1-dark-red: #a20500;
    --dark-gray: #949494;
    --light-gray: #d0d0d1;
    --white: #fff;
    --background-dark: #070b0c;
    --max-width-desktop: 1100px;
}

@font-face {
    font-family: 'Formula1 Display-Bold';
    src: url('../fonts/Formula1-Bold_web.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Formula1 Regular';
    src: url('../fonts/Formula1-Regular-1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: var(--background-dark);
    color: var(--white);
    font-family: 'Titilium Web', sans-serif; /* Assuming Titilium Web is added correctly */
    margin: 0;
    padding: 0;
}


h1 {
    font-size: 3.5rem;
    font-family: 'Formula1 Display-Bold', sans-serif; 
}

h2 {
    font-size: 2.5rem;
    font-family: 'Formula1 Display-Bold', sans-serif;
    margin-bottom: 1rem;
    text-align: left;
}

h3 {
    font-size: 1.4rem;
    font-family: 'Formula1 Display-Bold', sans-serif;
    text-align: left;
}
/*
h3 {
    font-size: 1.4rem;
    font-family: 'Formula1 Regular', sans-serif;
}*/

h4 {
    font-size: 1rem;
    font-family: 'Formula1 Regular', sans-serif;
}


p {
    font-family: 'Titilium Web', sans-serif;
    font-size: 1rem; /* 24px */
    line-height: 1.5rem; /* 30px */
    letter-spacing: 0.03em; /* 2% of the current font size */
    margin-bottom: 1em;
    text-align: left;
}

a {
    font-family: inherit; /* This ensures the link text inherits the font-family from the parent, which is 'Titilium Web' for paragraphs */
    color: var(--f1-red); /* This will apply the F1 red color from your variables */
    text-decoration: underline; /* This adds an underline to your link */
}

a:hover,
a:focus {
    text-decoration: none; /* Removes the underline on hover/focus for a change in appearance */
}

.img-cover {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: absolute;
    flex-direction: column; /* Stack the content vertically */
    justify-content: center; /* Center the content vertically */
    align-items: center; /* Center the content horizontally */
    top: 0;
    left: 0;
    z-index: 1;
}

.dropdown {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-bottom: 2rem;

}

.text-wrapper {
    margin-bottom: 2.5rem;
}

.select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 200px;
}

.select-wrapper label {
    font-family: 'Formula1 Regular';
    font-size: 0.8rem;
}

.points-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: white; /* Ensuring text is visible on a dark background */
}

#controls {
    display: flex;
    flex-direction: column;
    padding: 0px;
    border-right: 2px solid white; /* Divider between controls and main content */
    align-items: flex-start;
    justify-content: flex-start;
}

#controls p {
    font-family: 'Formula1 Regular';
    font-size: 0.8rem;
    margin: 10px 0 5px 0;
}

#controls select {
    margin-bottom: 15px;
    width: 100%;
    padding: 5px;
}

.main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 10px;
}

.top-3-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
}

#linechart-container {
    flex-grow: 1;
}
/* Additional styling for lists, tables, etc., can be added here */

.h1-hero {
    font-family: 'Formula1 Display-Bold', sans-serif;
    font-size: 3.5rem;
    color: var(--white);
    margin-top: 0rem;
    margin-bottom: 2.5rem;
}

.h1-accent {
    font-family: 'Formula1 Display-Bold', sans-serif;
    font-size: 5.5rem;
    color: var(--f1-red);
    margin-bottom: 0.5rem;
}


.h2-accent {
    font-family: 'Formula1 Display-Bold', sans-serif;
    font-size: 2.5rem;
    color: var(--f1-red);
    margin-bottom: 0.5rem;
}

.h3-accent {
    font-family: 'Formula1 Display-Bold', sans-serif;
    font-size: 2rem;
    color: var(--f1-red);
    margin-bottom: 0.5rem;
}

/* The header background */
header {
    background-size: cover;
    background-position: center;
    height: 100vh; /* Adjust the height as needed */
    position: relative;
    color: var(--white);
}

.header-background {
    position: relative;
    background-image: url('src/img/Merc-W15-Front.webp');
    background-size: cover;
    background-position: center 10%; /* Adjust as needed */
    justify-content: center; /* Center the content vertically */
    height: 100vh;
    /* min-width: 1000px;  Prevent the background image from being too small */
    overflow: hidden; /* Hide any overflow caused by min-width 070b0c*/
}

.header-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(7, 11, 12, 0) 40%, var(--background-dark) 80%);
    z-index: 2;
}

.header-content {
    position: absolute;
    top: 10%; /* Change the value here to adjust the vertical position */
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    text-align: center;
    z-index: 1;
    width: 90%;
    max-width: var(--max-width-desktop); /* Ensure the content doesn't grow too wide on large screens */
    padding: 0 20px;
    opacity: 0;
    /*letter-spacing: .2rem; */
}


/* Central container for contenpt */
/* .container {
    width: 90%;
    height: auto;
    max-width: var(--max-width-desktop);
    margin: 10rem auto;
    position: relative;
    color: var(--white);
    text-align: center;
    transform: translateY(-50%);
} */
.container {
    width: 100%;
    max-width: var(--max-width-desktop);
    margin: 0 auto 2rem;
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: left;
}

.intro_container {
    width: 90%;
    height: auto;
    max-width: var(--max-width-desktop);
    margin: 10rem auto;
    position: relative;
    color: var(--white);
    text-align: center;
    /* transform: translateY(-50%); */
    /* Additional styling */
}
/* body {
    font-family: Arial, sans-serif; */
    /* background-color: #080b0c; */
    /* background-color: #080b0c; */
    /* background-color: #0f0f0f;
    color: #ffffff;
    padding: 40px;
    margin: 0;
} */

.tooltip {
    /* width: 150px; */
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #580000;
    color: #ffffff;
    padding: 10px;
    border-radius: 3px;
    pointer-events: none;
}

.infoButtons {
    position: absolute;
    text-align: center;
    width: auto;
    padding: 5px;
    font: 12px sans-serif;
    background: rgba(155, 155, 155, 0.749);
    border: 1px solid #580000;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

#info {
    position: absolute;
    text-align: center;
    width: auto;
    padding: 1px;
    font: 12px sans-serif;
    background: var('--f1-red');
    border: 1px solid #580000;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.country-label {
    pointer-events: none;
    fill: #333;
    font-weight: bold;
}

.bar-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

#controls {
    display: flex;
    padding: 0;
    margin-bottom: 20px;
    padding-right: 2rem;
    align-items: flex-start;
    justify-content: flex-start;
}

#heatmap-container {
    width: 100%;
    height: 600px;
    overflow: auto;
}

.cell {
    transition: opacity 0.1s;
}

line.vertical, line.horizontal {
    stroke: rgb(50, 50, 50);
    stroke-width: 1px;
}

#top-3-container {
    display: flex;
    padding: 0;
    margin-bottom: 20px;
    max-width: var(--max-width-desktop);
    text-align: left;
    justify-content: flex-start;
    gap: 2rem;
}

/* .top-3 {
    display: flex;
    flex-direction: column;
    align-items: start;
    margin: 0 0;
} */

.top-3 .points {
    font-family: 'Formula1 Display-Bold';
    font-size: 2rem;
    font-weight: bold;
}

.top-3 {
    font-family: 'Formula1 Regular';
    font-size: 1rem;
    display: flex;
    justify-content: start;
    padding: 0;
}

#main-container {
    width: 1100px;
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

#map-container {
    flex: 2;
}

#calendar-table-container {
    flex: 1;
    padding-left: 20px;
}

.calendar-table {
    width: 100%;
    border-collapse: separate;  /* Use separate instead of collapse */
    border-spacing: 0 10px;  /* Add spacing between rows */
    margin: 20px 0;
    font-size: 0.8rem;
    font-family: "Formula1 Regular";
    text-align: left;
}

/* .calendar-table th,
.calendar-table td {
    padding: 5px 5px;
} */

.calendar-table th {
    font-size: 0.8rem;
    font-family: "Formula1 Regular";
    background-color: transparent;
    color: white;
}

.calendar-table .continent-cell {
    width: 2px;  /* Adjust width */
    height: 2px;  /* Adjust height */
}

.calendar-table th:nth-child(1),
.calendar-table td:nth-child(1) {
    width: 40px;
}

.calendar-table th:nth-child(2),
.calendar-table td:nth-child(2),
.calendar-table th:nth-child(4),
.calendar-table td:nth-child(4) {
    width: 2px;  /* Adjusted for smaller colored rectangles */
}

.calendar-table th:nth-child(3),
.calendar-table td:nth-child(3),
.calendar-table th:nth-child(5),
.calendar-table td:nth-child(5) {
    width: 150px;
    padding-left: 10px;
}

.calendar-table tr {
    transition: opacity 0.3s ease;
    border: 1px solid transparent;
}

#header-container {
    width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-family: "Formula1 Regular";
}

#year-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    margin-right: 3rem;
}

#metrics-container {
    display: flex;
    justify-content: left;
    gap: 60px;
    width: 100%;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: left;
}

.metric-label {
    color: #ffffff;
    margin-bottom: 5px;
    align-items: left;
}

.metric-value {
    font-family: "Formula1 Display-Bold";
    font-size: 1.5rem;
    color: #ffffff;
}

.name-label {
    color: var(--f1-red);
    /* font-weight: bold; */
    margin-bottom: 5px;
}