@font-face {
    font-family: 'Objectivity';
    src: url('fonts/Objectivity/Objectivity-Regular.woff2') format('.woff2');
    font-weight: normal;
    font-style: normal;
}

:root{
    --bg-color: rgb(20,20,20);
    --card-color: rgb(23,23,23);
}

body {
    font-family: 'Objectivity', sans-serif;
    font-size: clamp(14px, 18px, 22px);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.car-icon-container {
    text-align: center;
}

.bento-box-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    max-width: 60vw;
    width: 100%;
}

.bento-container {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    width: 100%;
    max-width: 1200px;
}

.small-info {
    grid-row: span 1;
}

.wide-info {
    grid-column: span 2; /* Spans the full width of the container */
}

.bento-box {
    background-color: var(--card-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.car-info {
    grid-row: span 2; 
}

.car-info-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.smaller-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    flex: 1;
    background-color: #3a3a3a;
}

.wide-card {
    grid-column: 2 / 3;
}

.card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
    color: #f1f1f1;
}

.card h2, .card h3 {
    margin: 0 0 10px;
}

.card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.card ul li {
    margin-bottom: 10px;
}

.card a {
    color: #FF8343;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .bento-box-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
    }

    .car-info {
        grid-row: span 1;
    }

    .wide-info {
        grid-column: span 1;
    }
}


header {
    font-family: 'Objectivity', sans-serif; 
    color: #FFEFD5;
    padding: 10px 0;
    text-align: center;
    position: relative;
    align-items: center;
    justify-content: center;
    background-color: #1f1f1f;
}

.heading-container {
    width: 100%;
    text-align: center;
    background-color: var(--bg-color);
    padding-top: 20px;
}
  
.heading-container h1 {
    color: #FFEFD5;
    margin: 0;
}

h1 {
    color: #FFEFD5;
    margin-bottom: 20px;
}

.heading-container h2{
    color: #888;
    margin-top: 40px;
    font-size: 24px;
}

nav ul{
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    z-index: 2;
    position: relative;
}

nav ul li{
    display: inline;
    margin-right: 10px;
}

nav ul li a{
    color: #FFEFD5;
    margin: 24px;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

h1{
    color: #FFEFD5;
}

.stat-list {
    list-style: none;
    padding: 0;
}

.stat-list li {
    font-size: 18px;
    margin-bottom: 10px;
}

header h1{
    animation: slideIn 1s ease-out;
    z-index: 2;
    position: relative;
    margin: 0;
}

header p{
    animation: slideIn 1s ease-out;
    z-index: 2;
    position: relative;
    margin: 0;
}

  /* Car Title Animation */
  .car-box {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    padding-top: 32px;
}

.car-title {
    font-size: 48px;
    margin: 0;
    display: inline-block;
    transform: translateX(-100%); /* Start off-screen */
    animation: slideIn 1s ease-out forwards;
}


/* Keyframes for sliding in the car title */
@keyframes slideIn {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

.car-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    min-width: 400px;
    height: auto;
    margin-left: 40px;
}

.car-outline {
    width: 80%;
    height: auto;
}

.popup {
    display: none;
    position: absolute;
    background-color: #333;
    color: white;
    padding: 12px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
    max-width: 120px;
    animation: slideIn 250ms ease-in-out;
}

/* Positioning of popups relative to car parts */
#hood-popup {
    top: 18%;
    left: 2%;
}

#roof-popup {
    top: 15%;
    left: 76%;
}

#front-wheel-popup {
    top: 60%;
    left: 18%;
}

#rear-wheel-popup {
    top: 60%;
    left: 75%;
}

/* Add media queries to adjust for smaller screens */
@media (max-width: 600px) {
    .car-container {
        min-width: 300px;
    }

    #hood-popup {
        top: 10%;
        left: 10%;
    }
    #roof-popup {
        top: 5%;
        left: 35%;
    }
    #front-wheel-popup {
        top: 55%;
        left: 12%;
    }
    #rear-wheel-popup {
        top: 55%;
        left: 70%;
    }
}
