/* style.css - Shared across all pages */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

body.home {
  background: linear-gradient(
      rgba(255, 255, 255, 0.75),
      rgba(255, 255, 255, 0.75)
    ),
    url("images/photo1.jpg") no-repeat center center fixed;
  background-size: cover;
}

body.archive {
  background: linear-gradient(
      rgba(255, 255, 255, 0.55),
      rgba(255, 255, 255, 0.55)
    ),
    url("images/bigLibrary.jpg") no-repeat center center fixed;
  background-size: cover;
}

body.restricted {
  background-size: cover;
}

/* Header layout */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #003366;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  border-bottom: 3px solid #e67e22;
}

.header-left {
  flex: 0 0 auto;
}

.header-left img {
  max-height: 70px;
  height: auto;
  width: auto;
  border: 3px solid #e67e22;
  border-radius: 6px;
  padding: 2px;
  background-color: white;
  margin-left: 5px;
  margin-top: 10px;
}

.header-main {
  flex: 1;
  text-align: center;
}

.header-main h1 {
  margin: 0;
  font-size: 2em;
  color: white;
}

.header-main nav {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header-main nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
}

.header-main nav a:hover {
  background-color: #0055aa;
  border-radius: 5px;
}

/* Table styling (moved up) */
.race-announcement,
.results-table {
  box-sizing: border-box;
}

.race-announcement {
  width: 80%;
  margin: 20px auto;
  border-radius: 6px;
  background: white;
}

.race-announcement table {
  width: 100%;
  border-collapse: collapse;
}

.race-announcement th,
.race-announcement td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: center;
}

.race-announcement th {
  background-color: #003366;
  color: white;
}

/* Wrapper to contain tables and allow horizontal scrolling on small screens */
.table-wrapper {
  width: 90%;
  margin: 20px auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid #e67e22;
  border-radius: 6px;
  background-color: white;
  padding: 0.5rem;
}

/* Inner tables must not exceed wrapper bounds */
.table-wrapper table {
  width: 100%;
  min-width: 600px; /* Ensures table isn't squashed on small screens */
  border-collapse: collapse;
}

/* Table cells */
.table-wrapper th,
.table-wrapper td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: center;
}

/* Heading row styles */
.table-wrapper th {
  background-color: #003366;
  color: white;
}

.results-table {
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.results-table th,
.results-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  text-align: center;
}

.results-table th {
  background-color: #bdc3c7;
}

/* Responsive adjustment */
@media (max-width: 600px) {
  .header-right nav {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .table-wrapper {
  width: 95%;
  padding: 0.25rem;
  }
}

.header-left img {
  height: 60px;
  max-height: 70px;
  width: auto;
  border: 3px solid #e67e22;
  border-radius: 6px;
  padding: 2px;
  background-color: white;
  margin: 10px 0 0 10px;
}

.header-right nav {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

main h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.about-members {
  width: 50%;
  margin: 2rem auto;
  border: 2px solid #e67e22;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.85rem;
}

.about-members th,
.about-members td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: center;
}

.about-members th {
  background-color: #003366;
  color: white;
}

.button.small {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.social-icon {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  margin-left: 10px;
}

.social-icon:hover {
  opacity: 0.75;
  transition: opacity 0.2s ease-in-out;
}

.news-ticker {
  display: block;
  background-color: #e67e22;
  color: white;
  padding: 0.5rem 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  animation: slideIn 3s ease forwards;
  position: relative;
  z-index: 999;
  text-decoration: none;
}

.news-ticker:hover {
  background-color: #cf5f00;
  cursor: pointer;
}

.news-ticker .news-subtext {
  font-weight: normal;
  font-size: 1rem;
}

.news-icon {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  margin-right: 8px;
}

.race-announcement,
.results-table {
  width: 95%;
  padding: 0.5rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav {
  background: #2c3e50;
  padding: 0.5rem;
}

nav a {
  color: #ecf0f1;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: #e67e22;
}

main {
  padding: 4rem;
}

footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 1rem;
  border-top: 2px solid #e67e22;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:visited {
  color: white;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
}

th {
  background: #bdc3c7;
  padding: 0.75rem;
}

td {
  padding: 0.75rem;
  border: 1px solid #ccc;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.secure {
  background: #fff;
  padding: 2rem;
  max-width: 500px;
  margin: 2rem auto;
  border: 1px solid #ccc;
}

.download-section {
  background-color: #f9f9f9;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 20px;
}

.download-section h3 {
  margin-top: 0;
}

.button {
  display: inline-block;
  padding: 8px 16px;
  margin: 4px;
  background-color: #4c93db;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #004080;
}

.diagonal-strike {
  position: relative;
  display: inline-block;
  color: black;
}

.diagonal-strike::after {
  content: "";
  position: absolute;
  top: 40%;
  bottom: 0%;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: red;
  transform: rotate(-25deg);
  transform-origin: center;
}
