:root {
    --primary-color: #000;
    --secondary-color: #fff;
    --color-accent: #FF1801;

    --font-size-1: 1rem;
    --font-size-2: 1.2rem;
    --font-size-3: 1.8rem;
    --font-size-4: 2.5rem;
    --font-size-5: 3.5rem;
    --font-size-6: 4rem;
    --font-size-title: 6rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 20px auto;
    padding: 16px 32px;
    background-color: var(--primary-color);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.logo img {
    width: 100px;
}

.nav-list {
    display: flex;
    gap: 60px;
    list-style: none;
}

.nav-link a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: var(--font-size-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.nav-link a:hover {
    color: var(--color-accent);
}


.hero {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.45)),
        url("./images/F1 Hero.jpg");
    background-size: cover;
    background-position: center;
    height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
}

.title {
    font-size: var(--font-size-title);
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 8px;
    text-align: center;
}


.container {
    width: 85%;
    margin: 0 auto;
    padding: 100px 0;
}

.section-title {
    font-size: var(--font-size-6);
    color: var(--color-accent);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 60px;
    
}

.c {
    height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.4s ease;
}
.overlay-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
}
.overlay-img::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background-color: var(--color-accent);
    top: 10%;
    left: -10%;
    border-radius: inherit;
    z-index: -1;
    transition: all 0.4s ease;
}


.griglia-domanda-f1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8rem;
    width: 85%;
    margin: 0 auto;
    position: relative;
    z-index: 0;
    justify-content: center;
    align-items: center;
}

.c:hover {
    transform: translateY(-12px);
}

.overlay-img:hover::before {
    transform: translateY(24px);
}

.griglia-p {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: var(--font-size-2);
    text-align: center;
    padding: 40px;
    border-radius: 16px;
    max-width: 900px;
    line-height: 1.6;
}

.primo {
    background-color: #ffcc01;
}

.secondo {
    background-color: #9e9e9e;
}

.terzo {
    background-color: #c47100;
}

.weekend-di-gara {
    padding: 100px 0;
    text-align: center;
}

.subtitle {
    font-size: var(--font-size-3);
    margin-bottom: 60px;
}


.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 85%;
    margin: 0 auto;
}

.card {
    padding: 40px;
    background-color: var(--secondary-color);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-12px);
    border: 2px solid var(--color-accent);
}



.icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px auto;
    transition: all 0.4s ease;
}

.card:hover .icon {
    background-color: var(--color-accent);
    transform: scale(1.1);
}

.icon img {
    width: 50px;
    filter: invert(1);
}



.card-title {
    font-size: var(--font-size-4);
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.card-text {
    font-size: var(--font-size-2);
    line-height: 1.6;
    color: var(--primary-color);
}

.ol,
.ol * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ol {
    width: 100%;
    max-width: 680px;
    margin: 80px auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    list-style: none;
    counter-reset: ol-counter;
}

.ol > li {
    counter-increment: ol-counter;
    padding: 1rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    border-radius: 10px;
    color: var(--secondary-color);
    background-color: #0e0e0e;
    border-left: 5px solid #333;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* barra di calore in background */
.ol > li::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255,24,1,0.13), transparent);
    width: calc(var(--p) * 1%);
    pointer-events: none;
}

.ol > li:nth-child(1)  { --p:100; border-left-color: #FFD700; }
.ol > li:nth-child(2)  { --p:88;  border-left-color: #C0C0C0; }
.ol > li:nth-child(3)  { --p:74;  border-left-color: #CD7F32; }
.ol > li:nth-child(4)  { --p:58;  border-left-color: var(--color-accent); }
.ol > li:nth-child(5)  { --p:48;  border-left-color: var(--color-accent); }
.ol > li:nth-child(6)  { --p:36;  border-left-color: #444; }
.ol > li:nth-child(7)  { --p:28;  border-left-color: #444; }
.ol > li:nth-child(8)  { --p:20;  border-left-color: #444; }
.ol > li:nth-child(9)  { --p:12;  border-left-color: #444; }
.ol > li:nth-child(10) { --p:6;   border-left-color: #444; }

.ol > li:hover {
    transform: translateX(8px);
    background-color: #181818;
}

/* numero posizione */
.ol > li::before {
    content: counter(ol-counter, decimal-leading-zero);
    font-weight: 800;
    font-size: 1.4em;
    color: var(--color-accent);
    min-width: 2.5rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.ol > li span {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

footer {
    background-color: var(--primary-color);
    height: 120px;
    margin-top: 100px;
}