:root {
    --f1-red: #E10600;
    --f1-red-dark: #B20000;
    --f1-dark: #15151E;
    --f1-dark-lighter: #1A1A2E;

    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #D1D1D1;
    --dark-gray: #6B6B6B;

    --font-heading: Georgia, 'Times New Roman', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--f1-dark-lighter);
    background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--f1-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--f1-red-dark);
    text-decoration: none;
}

a:hover {
    color: var(--f1-red);
    text-decoration: underline;
}

ul,
ol {
    padding-left: 1.5rem;
}

/*NAV BAR*/

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: var(--f1-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--white);
}

.nav-logo:hover {
    color: var(--f1-red);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    padding: 0;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

nav ul li a:hover {
    color: var(--f1-red);
    border-bottom: 2px solid var(--f1-red);
    text-decoration: none;
}

nav ul li a:focus {
    color: var(--f1-red);
    border-bottom: 2px solid var(--f1-red);
    text-decoration: none;
    outline: 2px solid var(--f1-red);
    outline-offset: 2px;
}

/*BUTTONS*/
.btn {
    display: inline-block;
    background-color: var(--f1-red);
    color: var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--f1-red-dark);
    color: var(--white);
    text-decoration: none;
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--f1-dark);
    color: var(--f1-dark);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.btn-outline:hover {
    background-color: var(--f1-dark);
    color: var(--white);
    text-decoration: none;
}

/*FOOTER*/
footer {
    background-color: var(--f1-dark);
    color: var(--white);
    padding: 3rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--medium-gray);
}

.footer-col a:hover {
    color: var(--f1-red);
    text-decoration: none;
}

.footer-col p {
    color: var(--medium-gray);
}

/*BREADCRUMB*/
.breadcrumb {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

.breadcrumb a {
    color: var(--dark-gray);
}

.breadcrumb a:hover {
    color: var(--f1-red);
}

/*CONTENT PAGE HEADER*/
.page-header {
    padding: 2rem 2rem 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
}

/*CONTENT PAGE LAYOUT*/
.content-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-main {
    flex: 3;
}

.content-sidebar {
    flex: 1;
    align-self: flex-start;
    position: sticky;
    top: 80px;
}

/*SIDEBAR BOXES*/
.sidebar-box {
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-box h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-box ul {
    list-style: none;
    padding: 0;
}

.sidebar-box ul li {
    margin-bottom: 0.5rem;
}

.sidebar-box ul li a {
    color: var(--f1-dark-lighter);
    font-size: 0.95rem;
}

.sidebar-box ul li a:hover {
    color: var(--f1-red);
}

/*CALLOUT BOX (Key Facts / Important Rules)*/
.callout {
    background-color: var(--light-gray);
    border-left: 4px solid var(--f1-red);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
}

.callout h4 {
    margin-bottom: 0.5rem;
}

/*BACK TO TOP BUTTON*/
.back-to-top {
    display: inline-block;
    margin: 2rem 0;
    font-weight: 600;
    color: var(--f1-dark);
}

.back-to-top:hover {
    color: var(--f1-red);
    text-decoration: none;
}

/*HOMEPAGE SPECIFIC STYLES*/

/*HERO SECTION*/
.hero {
    background-color: var(--f1-dark);
    color: var(--white);
    text-align: center;
    padding: 5rem 2rem;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--medium-gray);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 4rem 2rem;
}

.card {
    flex: 1;
    max-width: 350px;
    text-align: center;
    padding: 2.5rem 2rem;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

/*WHY SECTION*/
.why-section {
    background-color: var(--light-gray);
    text-align: center;
    padding: 4rem 2rem;
}

.why-section h2 {
    margin-bottom: 2.5rem;
}

.why-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.why-card {
    flex: 1;
    max-width: 320px;
    padding: 2rem;
    border: 2px dashed var(--medium-gray);
    border-radius: 8px;
    background-color: var(--white);
}

.why-card h4 {
    margin-bottom: 0.75rem;
}

.why-card p {
    color: var(--dark-gray);
    margin-bottom: 0;
}

/*TABLE STYLES*/


.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}


table {
    width: 100%;
    border-collapse: collapse;
}


caption {
    font-size: 0.9rem;
    color: var(--f1-dark);
    text-align: left;
    padding-bottom: 0.75rem;
}


th {
    background-color: var(--f1-dark);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 0.75rem 1rem;
}


td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 0.95rem;
    color: var(--f1-dark-lighter);
}


tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}


tbody tr:hover {
    background-color: var(--medium-gray);
}


.sprint-row {
    border-left: 4px solid var(--f1-red);
}


.sprint-row td:last-child {
    color: var(--f1-red);
    font-weight: 700;
}

/*QUESTION FORM*/
.quiz-form {
    margin-top: 2.5rem;
}

.quiz-form h2 {
    margin-bottom: 0.5rem;
}

.quiz-form p {
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--f1-dark);
    font-family: var(--font-body);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--f1-dark-lighter);
    background-color: var(--white);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--f1-red);
}

.form-group textarea {
    resize: vertical;
}

/*RESPONSIVE DESIGN*/
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .card {
        max-width: 100%;
    }

    .why-cards {
        flex-direction: column;
        align-items: center;
    }

    .why-card {
        max-width: 100%;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .content-sidebar {
        position: static;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}