/* ===============================
   GLOBAL STYLES
=============================== */
body {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    background: #0a0a0a;
    color: #fff;
}

a { text-decoration: none; color: white; }

.top3-per-formula h2 {
    text-align: center;
    margin-bottom: 40px; /* optional spacing below the heading */
    color: #ffcc00;      /* optional: make it match site highlight */
}

.news-images {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap; /* allows stacking on small screens */
}

.news-item .news-image {
    max-width: 40%;
    border-radius: 8px;
}

.news-item .highlight-name {
    font-weight: bold;
    color: #ffcc00;  /* matches your site highlight */
}

/* ===============================
   HEADER & NAV
=============================== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    border-bottom: 3px solid #e10600;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 18px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    display: block;
    padding: 15px 18px;
    font-size: 13px;
    text-transform: uppercase;
    transition: 0.3s;
}

nav ul li a:hover {
    background: #e10600;
}

/* Dropdown menus */
nav ul li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    display: none;
    flex-direction: column;
    min-width: 220px;
}

nav ul li:hover ul {
    display: flex;
}

nav ul li ul li a {
    padding: 10px;
    font-size: 12px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===============================
   HERO BANNER OVERLAY LOGO
=============================== */
.hero {
  margin-top: 70px;
  height: 500px;
  position: relative;
  overflow: hidden;
}

.hero-slideshow img {
  position: absolute;
  width: 100%;
  height: 500px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  filter: brightness(50%);
}

.hero-slideshow img.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2; /* make sure overlay content is on top */
}

.hero-overlay h1 {
  font-size: 50px;
  text-shadow: 0 0 15px #e10600;
  margin-top: 10px;
}

.hero-logo {
  max-width: 400px;
  margin-bottom: 15px;
}

.hero-dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* adjust opacity for darkness */
  z-index: 1;
}

/* ===============================
   SECTIONS
=============================== */
.section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
}

.news-item {
    background: #1a1a1a;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #e10600;
}

/* ===============================
   SPONSORS
=============================== */
.sponsors {
    background: #000;
    padding: 50px 20px;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.sponsor-grid img {
    max-width: 100%;
    background: white;
    padding: 10px;
}

/* ===============================
   FOOTER
=============================== */
.footer {
  background: #111;
  border-top: 3px solid #e10600;
  color: #fff;
  padding: 40px 20px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: auto;
}

.footer-column {
  flex: 1 1 300px; /* responsive */
  margin: 10px;
  text-align: center;
}

.footer-column p {
  margin: 5px 0;
  line-height: 1.5;
}

.footer-column a {
  color: #ffcc00;
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 15px;
}


/* ===============================
   FORMULA SECTIONS
=============================== */
.formula-section {
    max-width: 600px;          /* Constrain section width */
    margin: 20px auto;         /* Center horizontally with vertical spacing */
    background: rgba(255,255,255,0.05);
    padding: 15px 20px;
    border-radius: 5px;
    box-sizing: border-box;
}

.formula-section h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    text-align: center;        /* Center the title */
}

.formula-section ol {
    padding-left: 20px;
}

.formula-section li {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Telemetry bar */
.telemetry-bar {
    width: 80%;          /* relative to section */
    max-width: 300px;    /* max width */
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.telemetry-fill {
    height: 100%;
    background: linear-gradient(90deg, red, orange);
    transition: width 0.5s ease;
}

/* ===============================
   STANDINGS TABLE
=============================== */
.standings {
    padding: 60px 20px;
    background: #111;
    color: white;
    text-align: center;
}

.standings h2 {
    margin-bottom: 20px;
}

#standingsTable {
    width: 100%;
    max-width: 800px;
    margin: auto;
    border-collapse: collapse;
}

#standingsTable th,
#standingsTable td {
    padding: 12px;
    border-bottom: 1px solid #333;
}

#standingsTable th {
    background: #222;
}

#standingsTable tr:hover {
    background: rgba(255, 0, 0, 0.2);
    transition: 0.3s;
}

/* Leader Highlight */
.leader {
    background: rgba(255, 215, 0, 0.2);
    font-weight: bold;
}

/* Refresh Button */
.refresh-btn {
    margin-bottom: 20px;
    padding: 8px 15px;
    background: red;
    border: none;
    color: white;
    cursor: pointer;
}

/* ===============================
   FLOATING COUNTDOWN
=============================== */
.countdown-timer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: black;
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,0,0,0.6);
    z-index: 9999;
    width: 260px;
}

.countdown-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.countdown-header span { cursor: pointer; color: #e10600; }

.countdown-body {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.countdown-body div span {
    font-size: 20px;
    font-weight: bold;
    display: block;
}

.countdown-body div small {
    font-size: 10px;
    color: #aaa;
}

/* ===============================
   MOBILE RESPONSIVENESS
=============================== */
@media (max-width: 900px) {

    nav ul {
        flex-direction: column;
        display: none;
        background: #000;
        width: 100%;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li ul {
        position: static;
        display: none;
        background: #111;
    }

    nav ul li ul.active {
        display: flex;
    }

    .hamburger { display: flex; }
}

@media (max-width: 600px) {
    .hero-overlay h1 { font-size: 36px; }
    .countdown-timer { width: 90%; right: 5%; bottom: 10px; }
    .formula-section ol li { width: 100%; }
    .telemetry-bar { max-width: 90%; }
}

/* ===============================
   RULES PAGE
=============================== */

.rules-page {
    max-width: 1000px;
    margin: auto;
}

.rules-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.rules-nav a {
    padding: 8px 15px;
    background: #111;
    border: 1px solid #e10600;
    font-size: 12px;
    text-transform: uppercase;
    transition: 0.3s;
}

.rules-nav a:hover {
    background: #e10600;
}

.rule-block {
    background: #111;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #e10600;
}

.rule-block h3 {
    margin-top: 0;
    color: #ffcc00;
}

/* RULES PAGE STYLING */

.rule-block h4 {
    margin-top: 30px;
    color: #e10600;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.rule-block ul {
    margin-left: 20px;
    line-height: 1.6;
}

.penalty-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.penalty-table th,
.penalty-table td {
    padding: 10px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.penalty-table th {
    background: #222;
}

.penalty-table tr:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* Floating Back to Top Button */
#backToTop {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 99;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: #007BFF; /* Blue button */
    color: white;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

#backToTop:hover {
    background-color: #0056b3;
}

.events-page {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.events-page h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #ffcc00; /* match site highlight color */
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event {
  padding: 1rem;
  border: 1px solid #e10600;
  border-radius: 8px;
  background-color: #111; /* dark background to match site */
  color: #fff;
  box-shadow: 0 2px 6px rgba(255,0,0,0.2);
}

.event h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #ffcc00;
}

.event p {
  margin: 0.3rem 0;
  color: #ddd;
}

.event.upcoming {
    border: 2px solid #e10600; /* bright red border for upcoming */
    background-color: #1a1a1a;
    color: #fff;
}

.event.past {
    border: 2px solid #555; /* muted border for past */
    background-color: #222;
    color: #aaa;
    opacity: 0.8;
}

.events-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.month-header {
    grid-column: 1 / -1;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
    border-bottom: 2px solid #e10600;
    padding-bottom: 5px;
    color: #e10600;
}

/* ===============================
   SECTIONS
=============================== */
.section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
}

.team-intro p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #ddd;
    text-align: justify;
}

/* ===============================
   TEAM GRID
=============================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.team-member {
    background: #111;
    border: 2px solid #e10600;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255,0,0,0.3);
}

.team-member h3 {
    margin-top: 0;
    color: #ffcc00;
}

.team-member p {
    margin: 10px 0 0;
    color: #ddd;
    font-size: 14px;
}

.team-member img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #e10600;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(255,0,0,0.3);
    transition: transform 0.3s;
}

.team-member img:hover {
    transform: scale(1.05);
}

/* ===============================
   SPONSORS PAGE STYLES
=============================== */
.sponsors-page {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
    color: #fff;
}

.sponsors-page h1, .sponsors-page h2, .sponsors-page h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffcc00;
}

.sponsors-page p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ddd;
}

/* Sponsor List */
.sponsor-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.sponsor-item {
    background: #111;
    border: 2px solid #e10600;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
}

.sponsor-item:hover {
    transform: translateY(-5px);
}

.sponsor-item a {
    color: #ffcc00;
    text-decoration: none;
    display: block;
    margin-top: 5px;
}

.sponsor-item a:hover {
    text-decoration: underline;
}

/* Trophy Sponsors Table */
.trophy-sponsors table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.trophy-sponsors th, .trophy-sponsors td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.trophy-sponsors th {
    background: #222;
}

.trophy-sponsors tr:hover {
    background: rgba(255,0,0,0.1);
}

/* Contact Section */
.contact-sponsor {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.contact-sponsor a {
    color: #ffcc00;
    text-decoration: none;
}

.contact-sponsor a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .sponsor-list {
        grid-template-columns: 1fr;
    }
}

/* Sponsor logos */
.sponsor-logo {
    max-width: 150px;
    max-height: 80px;
    margin-bottom: 10px;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sponsors {
    padding: 60px 20px;
    background: #111;
    text-align: center;
}

.sponsors h2 {
    color: white;
    margin-bottom: 40px;
    font-size: 28px;
}

.sponsor-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.sponsor-logos img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: 0.3s ease;
}

.sponsor-logos img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Form container (centered) */
.form-container {
    max-width: 700px;
    width: 90%;
    margin: 40px auto;           /* center horizontally */
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Instructions box */
.instructions {
    margin-bottom: 20px;
    background: transparent;
    padding: 0;
    line-height: 1.6;
    color: #ddd;
}

/* Labels */
label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #fff;
}

/* Form container: centered with margin and width */
.form-container {
    max-width: 800px;           /* wider container */
    width: 90%;                 /* responsive on small screens */
    margin: 60px auto;          /* center horizontally with top/bottom space */
    background: rgba(255,255,255,0.05); /* subtle background */
    padding: 30px 40px;         /* more space inside */
    border-radius: 10px;
    box-sizing: border-box;
}

/* Instructions */
.instructions {
    margin-bottom: 25px;
    background: transparent;
    padding: 0;
    color: #ddd;
    line-height: 1.6;
}

/* Labels */
label {
    display: block;
    margin-top: 20px;
    font-weight: bold;
    color: #fff;
}

/* Inputs and Textareas: bigger and taller */
.form-container input,
.form-container textarea {
    width: 100%;              /* full width of container */
    max-width: 750px;         /* limit width */
    display: block;
    margin: 10px auto;        /* center inside container */
    padding: 15px 12px;       /* taller fields */
    border-radius: 6px;
    border: 1px solid #ccc;
    background: transparent;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
}

/* Textarea specific: taller by default */
.form-container textarea {
    min-height: 120px;        /* bigger box for multiple lines */
    resize: vertical;          /* user can expand if needed */
}

/* Submit button */
input[type="submit"] {
    background: #e10600;
    color: #fff;
    border: none;
    cursor: pointer;
    margin: 25px auto 0;      /* centered */
    display: block;
    padding: 14px 25px;       /* bigger button */
    font-size: 16px;
    border-radius: 6px;
    transition: 0.3s;
}

input[type="submit"]:hover {
    background: #ff3333;
}

/* Placeholder color */
input::placeholder,
textarea::placeholder {
    color: #aaa;
}

.thank-you-box {
    max-width: 600px;
    margin: 80px auto;   /* space from top */
    padding: 40px 30px;
    background: #111;
    border: 2px solid #e10600;
    border-radius: 10px;
    text-align: center;
}
.thank-you-box h1 {
    color: #ffcc00;
    margin-bottom: 20px;
}
.thank-you-box p {
    color: #ddd;
    line-height: 1.6;
}
.thank-you-box a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #e10600;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s;
}
.thank-you-box a:hover {
    background: #ff3300;
}

/* ===============================
   DROPDOWN MENU
================================= */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    min-width: 220px;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 1000;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu li a:hover {
    background: #c00000;
}

/* Desktop hover */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Mobile dropdown style */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #222;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }
}

.standings-page {
    max-width: 1100px;
    margin: 60px auto;
    padding: 20px;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.standings-table th,
.standings-table td {
    padding: 12px;
    border-bottom: 1px solid #444;
}

.standings-table th {
    background: #111;
    text-align: left;
}

.podium-summary {
    background: #111;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
}

.podium-summary h3 {
    margin-bottom: 10px;
}

/* ===============================
   MERCH PAGE
=============================== */

/* Merch Section Text Styling */
.merch-section {
    color: #ffffff;  /* all text white */
    text-align: center;
    padding: 2rem;
    background-color: #1a1a1a; /* optional: dark background to make white text pop */
}

.merch-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.merch-section p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.merch-item {
    background-color: #2a2a2a; /* darker card background */
    padding: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.merch-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.merch-info h3, 
.merch-info p, 
.merch-info .price {
    color: #ffffff; /* force all text inside card to be white */
}

.merch-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.merch-info .price {
    font-weight: bold;
    margin-top: 0.5rem;
}

.merch-carousel {
  position: relative;
  overflow: hidden;
}

.merch-carousel img {
  width: 100%;
  display: none;
  border-radius: 5px;
}

.merch-carousel img.active {
  display: block;
}

.merch-carousel button.prev,
.merch-carousel button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.merch-carousel button.prev { left: 10px; }
.merch-carousel button.next { right: 10px; }

