/* ===============================
   🔧 Reset and Base Styles
================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0a0a0a;
  color: #ffffff;
  padding: 20px;
  line-height: 1.6;
}

.title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #e10600;
}

/* ===============================
   🧭 Filter Buttons
================================== */
.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  gap: 10px;
}

.filter-btn {
  background: #1c1c1c;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #e10600;
  transform: scale(1.05);
}

/* ===============================
   🖼️ Gallery Grid
================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

/* Card Container */
.gallery-item {
  background: #111;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

/* Image Styling */
.gallery-item img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(30%) contrast(90%);
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: grayscale(0%) contrast(110%);
}

/* ===============================
   💡 Lightbox Styles
================================== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
}

.lightbox .close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 30px;
  cursor: pointer;
  color: #fff;
  transition: color 0.3s ease;
}
.lightbox .close:hover {
  color: #e10600;
}

.lightbox-nav {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.lightbox-nav button {
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  margin: 0 20px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}
.lightbox-nav button:hover {
  color: #e10600;
  transform: scale(1.1);
}
/* Subtitle below title */
.subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #ccc;
  margin-top: -10px;
  margin-bottom: 30px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 20px;
  font-size: 0.95rem;
  color: #888;
  border-top: 1px solid #333;
}

footer a {
  color: #e10600;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer .race-tagline {
  font-style: italic;
  color: #aaa;
  margin-top: 10px;
}


/* ===============================
   📱 Responsive Styles
================================== */
@media (max-width: 1024px) {
  .title {
    font-size: 2rem;
  }
  .filter-btn {
    padding: 10px 20px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .filter-buttons {
    flex-direction: column;
    align-items: center;
  }
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .lightbox-img {
    max-width: 95%;
    max-height: 70%;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.8rem;
  }
  .filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  .lightbox .close {
    top: 15px;
    right: 20px;
    font-size: 26px;
  }
  .lightbox-nav button {
    font-size: 32px;
  }
}
