* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #353839;
    margin: 0;
    padding: 0;
    font-family: "Formula1", Arial, Helvetica, sans-serif;
    color: #EDEADE;
}

header.body-title {
    padding-top: 20px;
    padding-bottom: 10px;
    font-family: "Formula1", Arial, Helvetica, sans-serif;
    font-weight: 900;        
    text-align: center;
    color: #EDEADE;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(231,29,29,0.05) 100%);
}

header.body-title h1 {
    margin: 0;
    font-size: 150%;
    letter-spacing: 2px;
}

.tagline {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    color: #E71D1D;
    font-style: italic;
    letter-spacing: 1px;
}

/* Scrolling Text Styles */
.scrolling-text {
height: 50px; 
overflow: hidden;
position: relative;
background-color: rgba(0,0,0,0.2);
}

.scrolling-text p {
position: absolute;
width: auto;
height: 100%;
margin: 0;
line-height: 50px;
text-align: center;
color: #EDEADE;
font-family: "Formula1"; font-style: italic;
white-space: nowrap;

/* Starting position */
-moz-transform:translateX(100%);
-webkit-transform:translateX(100%); 
transform:translateX(100%);

/* Apply animation to this element */ 
-moz-animation: scroll-left 40s linear infinite;
-webkit-animation: scroll-left 40s linear infinite;
animation: scroll-left 40s linear infinite;
}

/* Move it (define the animation) */
@-moz-keyframes scroll-left {
0% { -moz-transform: translateX(100%); }
100% { -moz-transform: translateX(-100%); }
}
@-webkit-keyframes scroll-left {
0% { -webkit-transform: translateX(100%); }
100% { -webkit-transform: translateX(-100%); }
}
@keyframes scroll-left {
0% { 
-moz-transform: translateX(100%); /* Browser bug fix */
-webkit-transform: translateX(100%); /* Browser bug fix */
transform: translateX(100%); 
}
100% { 
-moz-transform: translateX(-100%); /* Browser bug fix */
-webkit-transform: translateX(-100%); /* Browser bug fix */
transform: translateX(-100%); 
}
}

/* Gallery Styles */
.circuits-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.gallery-container {
    position: relative;
    width: 150%;
    max-width: 950px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gallery-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.gallery-image.active {
    opacity: 1;
}

.gallery-caption {
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
    color: #EDEADE;
    letter-spacing: 1px;
    font-style: italic;
}

main {
    min-height: calc(100vh - 300px);
}

.index-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}

button.start {
  border-radius: .25rem;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 400;
  padding-left: 25px;
  padding-right: 25px;
  color: #fff;
  -webkit-clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
  clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
  height: 70px;
  font-size: 0.9rem;
  line-height: 14px;
  letter-spacing: 1.2px;
  transition: all .3s ease-in;
  background-image: linear-gradient(90deg,#1c1c1c,#e71d1d);
  border: 0 solid;
  overflow: hidden;
  width: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.start:hover {
  cursor: pointer;
  transform: scale(1.1);
}

a {
  text-decoration: none;
}

button.about {
  background: #fbca1f;
  font-family: "Formula1"; font-style: italic;
  padding: 0.6em 1.3em;
  font-weight: 900;
  font-size: 18px;
  border: 3px solid black;
  border-radius: 0.4em;
  box-shadow: 0.1em 0.1em;
  cursor: pointer;
  min-width: 200px;
}

footer {
    margin-top: 50px;
}


footer .about h2 {
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    text-align: center;
    letter-spacing: 1px;
}

footer .about p {
    text-align: center;
    margin: 0;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(231,29,29,0.2);
    margin-top: 20px;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}


hr {
  border: none;
  height: 4px;
  background: beige
}

.about {
    text-align: center;
    color: #EDEADE;
    margin-top: 40px;
    margin-bottom: 40px;
    font-family: "Formula1", Arial, Helvetica, sans-serif;
}

.footer {
    text-align: center;
    color: #EDEADE;
    margin-bottom: 20px;
    font-family: "Formula1", Arial, Helvetica, sans-serif;
    background-color: rgba(0,0,0,0.2);
}

.flag {
  height: 1.1em;           /* matches text height */
  width: auto;
  vertical-align: middle;  /* centers nicely with text */
  margin: 0 0.4em 0 0.2em; /* space before name */
  border-radius: 2px;      /* optional subtle rounding */
}