:root {
  --primary-orange: #FF6B35;
  --secondary-red: #E73E33;
  --accent-green: #A8E6CF;
  --text-color: #333;
  --bg-color: #fff;
  --font-base: 16px;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Accessibility Variables */
body.high-contrast {
  --primary-orange: #000;
  --secondary-red: #fff;
  --accent-green: #ff0;
  --text-color: #fff;
  --bg-color: #000;
}

body.high-contrast a {
  color: #ff0;
}

body.light-bg {
  --bg-color: #f5f5f5;
}

body.grayscale {
  filter: grayscale(100%);
}

body.readable-font {
  --font-family: Arial, sans-serif;
}

body.link-underline a {
  text-decoration: underline !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

a {
  color: var(--primary-orange);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-red);
}

/* Layout */
header {
  background-color: var(--bg-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.announcement-bar {
  background-color: var(--secondary-red);
  color: #fff;
  text-align: center;
  padding: 10px;
  display: none; /* Hidden by default */
}

nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

#site-title-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}

#site-title-logo a {
  font-size: 2rem;
}

@media (max-width: 600px) {
  #site-title-logo a {
    font-size: 1.4rem;
  }
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  font-weight: bold;
  color: var(--text-color);
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: 80vh;
}

footer {
  background-color: #333;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

/* Components */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-orange);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--secondary-red);
  color: #fff;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card .btn {
    margin-top: auto;
}

/* Slider */
.slider-container {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
  height: 400px; /* Fixed height for slider */
}

.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 10px;
    text-align: center;
}

/* Form */
form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.event-checkbox {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

/* Accessibility Tool */
.accessibility-tool {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

.accessibility-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-orange);
  color: #fff;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.accessibility-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: none;
  width: 250px;
}

.accessibility-panel.active {
  display: block;
}

.accessibility-panel button {
  display: block;
  width: 100%;
  padding: 8px;
  margin-bottom: 5px;
  background-color: #f0f0f0;
  border: none;
  cursor: pointer;
  text-align: left;
  color: #333;
}

.accessibility-panel button:hover {
  background-color: #e0e0e0;
}

.media-controls {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

.video-link {
  font-weight: bold;
  color: var(--text-color);
}

.audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-orange);
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.audio-btn:hover {
    color: var(--secondary-red); 
}

/* Responsive */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--primary-orange);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .media-controls {
    width: 100%;
    order: 3;
    justify-content: center;
    margin-right: 0;
    margin-top: 10px;
    padding: 5px 0;
    border-top: 1px solid #eee; /* Optional visual separation */
  }

  .video-link {
    /* No special mobile styles needed if flex container handles it, 
       but let's ensure it doesn't break layout */
  }

  #site-title-logo {
    order: 1;
    position: static;
    left: auto;
    transform: none;
    max-width: calc(100% - 60px); /* Ensure space for menu button */
    text-align: left;
  }

  #site-title-logo a {
    white-space: normal; /* Allow wrapping */
    font-size: 1.2rem;
  }
  
  .menu-toggle {
    order: 2;
    display: flex;
  }

  nav ul {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
  }

  nav ul.active {
    display: flex;
  }
}

/* Sponsors */
.sponsors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 120px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sponsor-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Sections Separation */
section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

/* Acknowledgements */
.acknowledgements-list {
    list-style: none;
    padding: 0;
}

.acknowledgements-list li {
    margin-bottom: 5px;
}

/* Banner */
.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Results Table */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.responsive-table th, 
.responsive-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.responsive-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .responsive-table, 
    .responsive-table tbody, 
    .responsive-table tr, 
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #fff;
    }

    .responsive-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--primary-orange);
    }
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--text-color);
    border-left: 5px solid var(--primary-orange);
    padding-left: 10px;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Rules Modal */
.rules-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.rules-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close-rules {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-rules:hover,
.close-rules:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#rules-body ul {
    padding-left: 20px;
    margin-top: 10px;
}

#rules-body li {
    margin-bottom: 8px;
}

/* Event Selection Optimization */
.events-section-title {
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-orange);
    border-bottom: 2px solid var(--accent-green);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-checkbox label strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-orange);
}


.policy-section {
    margin-bottom: 2rem;
}

.policy-section h3 {
    color: var(--primary-orange);
    border-bottom: 2px solid var(--accent-green);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.policy-section ol, .policy-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-section li {
    margin-bottom: 0.8rem;
}

.contact-info-box {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-orange); 
    margin-top: 1rem;
}

/* High Contrast Fixes for new sections */
body.high-contrast .policy-section h3 {
    color: #ff0 !important;
    border-color: #fff !important;
}

body.high-contrast .contact-info-box {
    background-color: #000;
    border: 1px solid #fff;
    border-left: 5px solid #ff0;
}

/* Grayscale overrides */
body.grayscale .contact-info-box {
    background-color: #eee;
    border-left-color: #333;
}


/* Intro Section Typography Optimization */
#intro-section {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, #ffffff, #fff5f2);
}

#intro-section h1 {
    text-align: center;
    color: var(--primary-orange);
    font-size: 2.2em;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

#intro-section h2 {
    color: var(--secondary-red);
    font-size: 1.5em;
    margin-bottom: 2rem;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

#intro-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-green);
    margin: 10px auto 0;
    border-radius: 2px;
}

#intro-section p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

#intro-section p:nth-last-of-type(2) {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary-orange);
    text-align: left;
    display: inline-block;
}

/* Global Centering for Page Titles and Section Headers */
main > h1 {
    text-align: center;
    color: var(--primary-orange);
    margin-bottom: 2rem;
}

#sponsors-section h2,
#slider-section h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
}

/* Footer Logos */
.footer-logos {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 2rem;
    padding: 1rem;
    flex-wrap: wrap;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.logo-group {
    text-align: center;
}

.logo-group h4 {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.1rem;
}

.logo-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    width: 220px;
    margin: 0 auto;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .footer-logos {
        gap: 2rem;
        flex-direction: column;
        align-items: center;
    }
}

/* History Section Buttons */
.history-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
    position: relative;
    font-size: 1.1rem;
}

.history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-orange);
}

.history-btn .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #fff5f0;
    color: var(--primary-orange);
    border-radius: 50%;
    margin-right: 15px;
    font-size: 1.2rem;
}

.history-btn .text {
    flex-grow: 1;
    font-weight: bold;
    color: #333;
}

.history-btn .arrow {
    color: #999;
    transition: transform 0.3s;
}

.history-btn:hover .arrow {
    transform: translateX(5px);
    color: var(--primary-orange);
}

/* History Modal */
.info-modal {
    display: none;
    position: fixed;
    z-index: 2100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.info-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {transform: translateY(-50px); opacity: 0;} 
    to {transform: translateY(0); opacity: 1;}
}

.close-info-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-info-modal:hover,
.close-info-modal:focus {
    color: var(--primary-orange);
    text-decoration: none;
    cursor: pointer;
}

/* High Contrast for History Btn */
body.high-contrast .history-btn {
    background-color: #000;
    border: 2px solid #fff;
    color: #fff;
}

body.high-contrast .history-btn .text {
    color: #ff0;
}

body.high-contrast .history-btn .icon {
    background-color: #333;
    color: #ff0;
}

body.high-contrast .history-btn .arrow {
    color: #fff !important;
}

body.high-contrast .info-modal-content {
    background-color: #000;
    border: 2px solid #ff0;
}

body.high-contrast .close-info-modal {
    color: #fff;
}

/* WCAG 2.0 Level AA Focus Indicators */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Enhancing accessibility for errors */
.form-error {
    color: var(--secondary-red);
    background-color: #ffe6e6;
    border: 1px solid var(--secondary-red);
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
    font-weight: bold;
}

/* Contact Section Styles */
.contact-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-card h3 {
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--accent-green);
    display: table;
    margin: 0 auto 1.5rem auto;
    padding-bottom: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 6px;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-item i {
    font-size: 2rem;
    color: var(--secondary-red);
    margin-bottom: 1rem;
}

.contact-item .label {
    font-weight: bold;
    color: #555;
    margin-bottom: 0.5rem;
    display: block;
}

.contact-item .value {
    color: var(--text-color);
    font-size: 1.1em;
}

.contact-item .value a {
    color: var(--primary-orange);
    text-decoration: none;
    word-break: break-all;
}

.contact-item .value a:hover {
    text-decoration: underline;
}

/* Dark mode / High contrast adjustments */
body.high-contrast .contact-card {
    background-color: #333;
    border: 1px solid #fff;
}

body.high-contrast .contact-item {
    background-color: #000;
    border-color: #fff;
}

body.high-contrast .contact-item .label {
    color: #fff;
}

body.high-contrast .contact-item .value a {
    color: #ff0;
}


body.high-contrast .contact-card h3 {
    color: #fff;
    border-bottom-color: #ff0;
}

/* =========================================
   Universal Accessibility Overrides
   ========================================= */

/* High Contrast Mode - Fix "Black on Black" Issues */
body.high-contrast nav .logo,
body.high-contrast nav .logo a,
body.high-contrast h1, 
body.high-contrast h2, 
body.high-contrast h3, 
body.high-contrast h4, 
body.high-contrast h5, 
body.high-contrast h6,
body.high-contrast .section-title,
body.high-contrast .events-section-title,
body.high-contrast .event-checkbox label strong,
body.high-contrast .responsive-table td::before,
body.high-contrast strong {
    color: #ff0 !important; /* Force Yellow text for headings/important elements */
}

body.high-contrast .section-title,
body.high-contrast .events-section-title {
    border-color: #fff !important;
}

/* Fix Intro Section in High Contrast */
body.high-contrast #intro-section {
    background-image: none !important;
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #fff; /* Add border to define the section */
}


body.high-contrast #intro-section p {
    color: #ff0 !important; /* Yellow text for better visibility against black */
}

/* Fix Header Navigation in High Contrast */
body.high-contrast nav a {
    color: #ff0 !important;
}


/* Fix Buttons in High Contrast (Black button needs border) */
body.high-contrast .btn {
    border: 2px solid #fff;
    background-color: #000;
    color: #fff;
}
body.high-contrast .btn:hover {
    background-color: #333;
    text-decoration: underline;
}

/* Fix Form Elements in High Contrast */
body.high-contrast label,
body.high-contrast .checkbox-group label {
    color: #fff;
}
body.high-contrast input[type="text"],
body.high-contrast input[type="email"],
body.high-contrast input[type="tel"],
body.high-contrast input[type="number"],
body.high-contrast select,
body.high-contrast textarea {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

/* Fix Small/Muted text in High Contrast */
body.high-contrast small,
body.high-contrast .event-checkbox label small {
    color: #ccc !important;
}

/* Fix Header Shadow/Border in High Contrast */
body.high-contrast header {
    border-bottom: 1px solid #fff;
    box-shadow: none;
}

/* Grayscale Mode - Enhance Contrast */
body.grayscale nav .logo,
body.grayscale h1, 
body.grayscale h2, 
body.grayscale h3, 
body.grayscale .section-title,
body.grayscale .event-checkbox label strong {
    color: #000 !important; /* Force Black instead of Grey-Orange */
}

body.grayscale .btn {
    border: 1px solid #333; /* Ensure buttons have definition */
}

/* Registration Instructions Styles */
.registration-instructions {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-left: 5px solid var(--primary-orange);
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 4px;
}

.registration-instructions h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-orange);
  font-size: 1.2rem;
}

.registration-instructions ul, .registration-instructions ol {
  padding-left: 20px;
  margin-bottom: 0;
}

.registration-instructions ul li, .registration-instructions ol li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* High contrast mode support */
body.high-contrast .registration-instructions {
  background-color: #000;
  border-color: #fff;
  border-left-color: #ff0;
  color: #fff;
}

body.high-contrast .registration-instructions h3 {
  color: #ff0;
}

/* Fix Table Header in High Contrast */
body.high-contrast .responsive-table th {
    background-color: #000;
    color: #ff0;
    border: 1px solid #fff;
}

body.high-contrast .responsive-table td {
    border: 1px solid #fff;
    color: #fff;
}

/* Event Lists as Tags in Table */
.event-name-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-name-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--text-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* High Contrast & Dark Mode Support for Tags */
body.high-contrast .event-name-tag {
    background-color: #000;
    border: 1px solid #fff;
    color: #fff;
}

body.grayscale .event-name-tag {
    background-color: #fff;
    border: 1px solid #333;
    color: #000;
}

/* Mobile Responsive Adjustments for Event List Cell */
@media (max-width: 768px) {
    .responsive-table td.event-list-cell {
        padding-left: 15px; /* Reset padding to use full width */
        padding-top: 45px; /* Make space for the absolute labeled before element */
        text-align: left; /* Align grid to left */
    }

    .responsive-table td.event-list-cell::before {
        width: 100%;
        top: 10px;
        left: 15px;
        position: absolute;
    }
}

/* History Section Buttons */
.history-btn {
    width: 100%;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
}

.history-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-orange);
}

.history-btn .icon {
    font-size: 2rem;
    color: var(--primary-orange);
    width: 60px;
    text-align: center;
}

.history-btn .text {
    flex: 1;
    text-align: left;
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    padding: 0 1rem;
}

.history-btn .arrow {
    color: #ccc;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.history-btn:hover .arrow {
    color: var(--primary-orange);
    transform: translateX(5px);
}

/* High Contrast Support for Buttons */
body.high-contrast .history-btn {
    background-color: #000;
    border: 2px solid #fff;
}
body.high-contrast .history-btn:hover {
    border-color: #ff0;
    background-color: #333;
}
body.high-contrast .history-btn .text {
    color: #fff;
}
body.high-contrast .history-btn:hover .text {
    color: #ff0;
}
body.high-contrast .history-btn .icon {
    color: #ff0;
}
body.high-contrast .history-btn .arrow {
    color: #fff;
}
body.high-contrast .history-btn:hover .arrow {
    color: #ff0;
}

/* Accordion Styles for History Section */
.history-item {
    display: flex;
    flex-direction: column;
}

.history-content {
    display: none;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-btn.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary-orange);
    background-color: #fff9f0; /* Slight highlight */
}

.history-btn.active .arrow {
    transform: rotate(90deg) !important; /* Override hover effect */
    color: var(--primary-orange);
}

/* High Contrast adjustments for Accordion */
body.high-contrast .history-content {
    background-color: #000;
    border: 2px solid #fff;
    border-top: none;
    color: #fff;
}

body.high-contrast .history-btn.active {
    background-color: #333;
    border-color: #ff0;
}





