/* Normalize.css Reset for Cross-Browser Consistency */
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

main {
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    background-color: transparent;
    text-decoration: none;
}

img {
    border-style: none;
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Main Styles */
html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    flex-direction: column;
    padding: 0 0 30px 0;
}

body.stats-page {
    background-image: url('//www.stlcardshub.com/static/images/wp2109579-st-louis-cardinals-wallpapers.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    margin: 0;
    min-height: 100vh;
}

header {
    width: 100%;
}

.header-container {
    background-image: url('//www.stlcardshub.com/static/wallpapers/eDybLUF-st-louis-cardinals-desktop-wallpaper.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #C41E3A;
    color: #FFFFFF;
    padding: 10px;
}

.header-container table {
    width: 100%;
    border-collapse: collapse;
}

.header-container td {
    vertical-align: top;
}

.header-container td:nth-child(1) {
    width: 400px;
    padding-left: 5px;
    text-align: center;
}

.header-container td:nth-child(2) {
    width: auto;
    text-align: center;
}

.header-container td:nth-child(3) {
    width: 400px;
    padding-right: 5px;
    text-align: right;
}

.header-logo {
    max-width: 95% !important;
    height: 170px !important;
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    margin-left: auto;
    margin-right: 0;
    width: 400px;
}

.logo-svg .cardinals-text path {
    filter: drop-shadow(5px 5px 4px rgba(0, 0, 0, 0.3));
}

.main-nav {
    width: 100%;
    position: relative;
    z-index: 1000 !important;
}

.main-nav ul {
    display: -webkit-flex !important;
    display: -moz-flex !important;
    display: flex !important;
    gap: 15px;
    flex-wrap: wrap;
}

.main-nav ul li {
    display: inline !important;
}

.main-nav ul li a {
    color: #000 !important;
    padding: 10px;
    display: inline-block !important;
    text-decoration: none !important;
}

.home-content {
    min-height: 300px;
    color: #000;
    padding: 0;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.home-layout {
    display: flex;
    width: 100%;
    max-width: 1600px;
    gap: 40px;
    padding: 20px;
}

.photo-gallery {
    width: 340px;
    margin-left: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.photo-gallery h3 {
    font-size: 18px;
    color: #C41E3A;
    margin: 0 0 8px 0;
    text-align: center;
    font-family: Arial, sans-serif;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-container img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 5px;
    cursor: pointer;
}

.photo-snippet {
    font-size: 12px;
    color: #333;
    margin: 0;
    line-height: 1.4;
    font-family: Arial, sans-serif;
}

.photo-source {
    font-size: 12px;
    color: #333;
    margin: 0;
    font-family: Arial, sans-serif;
}

.photo-source a {
    color: #C41E3A;
}

.photo-source a:hover {
    text-decoration: underline;
}

.articles {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.articles h2 {
    font-size: 24px;
    color: #002D72;
    margin: 0 0 20px 0;
    text-align: center;
}

.articles-container {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 820px;
}

.article-block {
    width: 400px;
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.article-block img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.article-block h3 {
    font-size: 18px;
    color: #C41E3A;
    margin: 0 0 10px 0;
}

.article-block p {
    font-size: 14px;
    color: #333;
    margin: 0 0 10px 0;
    flex-grow: 1;
}

.read-more {
    padding: 8px 16px;
    background-color: #C41E3A;
    color: #FFFFFF;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.read-more:hover {
    background-color: #002D72;
}

.standings {
    width: 340px;
    margin-right: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.standings h3 {
    font-size: 18px;
    color: #C41E3A;
    margin: 0 0 8px 0;
    text-align: center;
    font-family: Arial, sans-serif;
}

.standings-container {
    font-size: 12px;
    font-family: Arial, sans-serif;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
}

.standings-header, .standings-section {
    margin-bottom: 10px;
}

.standings-header h4, .standings-section h4 {
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #002D72;
    margin: 0 0 5px;
    text-align: center;
}

.standings-header .cardinals-logo {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto 5px;
    object-fit: contain;
}

.standings-row {
    display: flex;
    align-items: center;
    line-height: 1.2;
    padding: 2px 0;
}

.standings-header-row {
    background-color: #C41E3A;
    color: #FFFFFF;
    font-weight: bold;
    padding: 2px 0;
}

.standings-logo {
    width: 50px;
    text-align: center;
}

.standings-logo img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    vertical-align: middle;
}

.standings-team {
    width: 190px;
    text-align: left;
    font-family: Arial, sans-serif;
}

.division-tag {
    font-size: 10px;
    position: relative;
    top: -4px;
    line-height: 1;
}

.standings-wins, .standings-losses {
    width: 50px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.standings-avg {
    width: 70px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.standings-row hr {
    margin: 2px 0;
    border: 0;
    border-top: 1px solid #ccc;
    width: 100%;
}

.standings-header .standings-row {
    justify-content: center;
}

#main-content {
    padding: 0;
}

.box-scores {
    max-width: 90%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 10px;
    width: fit-content;
    color: #FFFFFF;
    display: inline-block;
    height: auto;
    margin: 0 auto;
}

.box-score-table-container {
    text-align: center;
    width: 100%;
}

.box-score-table-container h3 {
    background-color: rgba(0, 100, 0, 0.7);
    color: #FFFFFF;
    margin: 0;
    padding: 10px 34px 10px 10px;
    font-size: 22px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: inline-block;
    position: relative;
}

.box-score-table-container h3::after {
    content: '';
    display: inline-block;
    background: url('//www.stlcardshub.com/static/images/580-5807388_tee-clipart.png') no-repeat center;
    background-size: contain;
    background-color: #006400;
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    vertical-align: middle;
    margin-left: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.box-score-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    background-color: #FFFFFF;
}

.box-score-table th, .box-score-table td {
    border: 1px solid #ccc;
    padding: 3px;
    text-align: center;
    vertical-align: middle;
}

.box-score-table td:first-child {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.box-score-table th:first-child,
.box-score-table td:first-child {
    width: 200px;
    min-width: 200px;
}

.box-score-table th {
    background-color: #C41E3A;
    color: #FFFFFF;
    font-weight: bold;
}

.box-score-table th:not(:first-child) {
    font-size: 10px;
}

.box-score-table th:not(:first-child),
.box-score-table td:not(:first-child) {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    text-align: center;
}

.box-score-table tbody tr:nth-child(1) {
    background-color: #FFFFFF;
    color: #002D72;
}

.box-score-table tbody tr:nth-child(2) {
    background-color: #002D72;
    color: #FFFFFF;
}

.box-score-table .inning {
    width: 12px;
    min-width: 12px;
    max-width: 12px;
    text-align: center;
}

.box-score-table .team-logo {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

.box-score-table .runs, .box-score-table .hits, .box-score-table .lob {
    font-weight: bold;
}

.box-score-table tbody tr:nth-child(1) td:first-child {
    color: #002D72;
    font-weight: bold;
}

.box-score-table tbody tr:nth-child(2) td:first-child {
    color: #FFFFFF;
    font-weight: bold;
}

.status {
    font-size: 0.8em;
    color: #ccc;
    margin-top: 5px;
    font-family: Arial, sans-serif;
}

.news-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 90%;
}

.news-item {
    max-width: 300px;
    padding: 10px;
    background-color: #FFFFFF;
    border: 1px solid #000;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: Arial, sans-serif;
    color: #002D72;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    color: #C41E3A;
}

.news-item .news-date {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.news-item p {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: #002D72;
    flex-grow: 1;
}

.news-item a {
    padding: 8px 16 wishedpx;
    background-color: #C41E3A;
    color: #FFFFFF;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    margin-top: auto;
}

.news-item a:hover {
    background-color: #002D72;
}

.news-search {
    text-align: center;
    margin: 20px 0;
}

.news-search input {
    padding: 8px;
    width: 300px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: Arial, sans-serif;
}

.news-search button, #load-more {
    padding: 8px 16px;
    background-color: #C41E3A;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.news-search button:hover, #load-more:hover {
    background-color: #002D72;
}

.load-more-container {
    text-align: center;
    margin: 20px 0;
    margin-bottom: 80px;
}

.admin-login, .admin-dashboard, .analytics, .db-maintenance {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.admin-login form, .db-maintenance form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db-maintenance form button {
    margin: 5px 0;
}

.admin-dashboard nav ul {
    display: flex;
    gap: 20px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.modal-content {
    background-color: #F5F5DC;
    padding: 30px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-height: 80vh;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-content p {
    margin: 10px 0;
    font-size: 1.2em;
    color: #333;
}

.modal-content a {
    color: #C41E3A;
    font-weight: bold;
    font-size: 1.1em;
}

.modal-content a:hover {
    text-decoration: underline;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

.footer {
    background-color: #0C2340 !important;
    color: #F5F5DC;
    padding: 5px 10px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 12px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2px 0;
}

.footer p {
    margin: 2px 0;
    font-size: 9px;
}

.footer a {
    color: #F5F5DC;
}

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

.stl-schedule {
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 10px;
    background-color: #C41E3A;
    margin: 0 auto;
    margin-top: 0;
    width: 100%;
    max-width: 1200px;
    max-height: 825px;
}

.stl-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    height: 40px;
}

.stl-month-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 250px;
    height: 30px;
    background-color: #FFFFFF;
    border: 2px solid #002D72;
    border-radius: 15px;
    padding: 0 10px;
}

.stl-nav-link {
    color: #C41E3A;
    font-size: 16px;
    font-family: Arial, sans-serif;
    line-height: 30px;
    transition: color 0.3s;
}

.stl-nav-link:hover {
    color: #F5F5DC;
}

.stl-title {
    color: #C41E3A;
    font-size: 16px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    line-height: 30px;
    text-align: center;
}

.stl-calendar {
    width: 100%;
    height: 100%;
    text-align: center;
}

.stl-calendar p {
    color: #F5F5DC;
    font-size: 12px;
    font-family: DOJCTArial, sans-serif;
    margin: 5px 0 0;
    text-align: center;
    height: 20px;
}

.stl-table {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 745px;
    border-collapse: collapse;
    table-layout: fixed;
}

.stl-header th {
    width: 14.28%;
    height: 30px;
    color: #F5F5DC;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    background-color: #C41E3A;
    border: 1px solid #002D72;
    border-radius: 5px;
    text-align: center;
}

.stl-table tbody tr {
    height: 100px;
}

.stl-day, .stl-game-day {
    background-color: #FFFDD0;
    border: 1px solid #002D72;
    border-radius: 5px;
    text-align: left;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #333;
    padding: 2px;
    vertical-align: top;
    overflow: hidden;
}

.stl-game-day {
    background-color: #FFF5E1;
}

.stl-game-date {
    display: block;
    color: #C41E3A;
    font-weight: bold;
    font-size: 12px;
    margin: 0;
    line-height: 1;
}

.stl-matchup {
    font-size: 12px;
    margin: 0;
    word-wrap: break-word;
    line-height: 1;
}

.stl-team-logo {
    width: 16px;
    height: 16px;
    display: block;
    margin: 0 0 1px;
}

.stl-game-result {
    display: block;
    margin: 0;
    line-height: 1;
}

.stl-game-result span {
    font-size: 12px;
    font-weight: 900;
}

.stl-game-result .win {
    color: green;
}

.stl-game-result .loss {
    color: red;
}

.oyl-game-time {
    font-size: 12px;
    color: #333;
    display: block;
    margin: 0;
    line-height: 1;
}

.stl-no-game {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1;
}

.error-message {
    color: #FF0000;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
}

.stl-events-left, .stl-events-right {
    width: 200px;
    min-height: 300px;
    background-color: transparent;
}

.calendar-box {
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    max-width: 400px;
    margin: 0 auto;
    height: 185px;
}

.calendar-container {
    width: 100%;
    overflow: hidden;
}

.calendar-marquee {
    overflow: hidden;
    width: 100%;
    white-space: nowrap;
}

.marquee-content {
    display: inline-flex;
    animation: marquee 20s linear infinite;
    gap: 20px;
}

.calendar-marquee .game-entry {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    padding: 5px;
}

.calendar-title {
    color: #C41E3A;
    font-size: 18px;
    text-align: center;
    margin: 0 0 10px 0;
    font-family: Arial, sans-serif;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.calendar-marquee:hover .marquee-content {
    animation-play-state: paused;
}

.stats-section {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #C41E3A;
    border-radius: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
    max-height: 600px;
    overflow-y: auto;
}

.stats-section h2 {
    font-size: 24px;
    color: #C41E3A;
    text-align: center;
    margin: 0 0 20px 0;
    font-family: Arial, sans-serif;
}

.stats-section h3 {
    font-size: 18px;
    color: #005C8E;
    margin: 20px 0 10px;
    font-family: Arial, sans-serif;
}

.stats-filter-container {
    border: 1რ: 1px solid #002D72;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.pitcher-container,
.il-pitcher-container,
.player-container,
.il-player-container {
    border: 1px solid #002D72;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.stats-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-filter label {
    font-size: 14px;
    color: #333;
    font-family: Arial, sans-serif;
}

.stats-filter select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: Arial, sans-serif;
}

.stats-filter button {
    padding: 5px 15px;
    background-color: #C41E3A;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.stats-filter button:hover {
    background-color: #002D72;
}

.scrollable {
    overflow-x: auto;
    margin: 10px 0;
}

.stats-section table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.stats-section th,
.stats-section td {
    border: 1px solid #002D72;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.stats-section th {
    background-color: #C41E3A;
    color: #FFFFFF;
    font-weight: bold;
}

.stats-section td {
    background-color: #FFFDD0;
    color: #333;
}

.stats-section p {
    font-size: 14px;
    color: #333;
    text-align: center;
    font-family: Arial, sans-serif;
}

.frontpage-news-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.frontpage-news-section h2 {
    font-size: 20px;
    color: #0C2340;
    margin: 0 0 15px 0;
    text-align: center;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.frontpage-news-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 600px;
    overflow-y: auto;
    align-items: stretch;
    padding: 10px;
}

.frontpage-news-article {
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    padding: 10px;
    border: 2px solid #C41E3A;
    border-radius: 8px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.frontpage-news-article img {
    width: 200px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.frontpage-news-article h3 {
    font-size: 16px;
    color: #C41E3A;
    margin: 0 0 8px 0;
    font-family: Arial, sans-serif;
    line-height: 1.3;
    text-align: center;
}

.frontpage-news-article p {
    font-size: 12px;
    color: #333;
    margin: 0 0 10px 0;
    flex-grow: 1;
    line-height: 1.5;
    font-family: Arial, sans-serif;
    text-align: center;
}

.frontpage-news-article a {
    padding: 6px 12px;
    background-color: #0C2340;
    color: #FFFFFF;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.frontpage-news-article a:hover {
    background-color: #C41E3A;
}

@media (prefers-contrast: high) {
    a, button, .read-more, .news-item a {
        background-color: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    .stats-section th {
        background-color: #000;
        color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calendar-marquee {
        animation: none;
    }
    * {
        transition: none !important;
    }
}

@media (max-width: 1024px) {
    .home-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .photo-gallery, .articles, .standings {
        width: 100%;
        max-width: 340px;
        margin-left: 0;
        margin-right: 0;
    }
    .articles-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .article-block {
        width: 100%;
        max-width: 400px;
    }
    .frontpage-news-section {
        width: 100%;
        max-width: 800px;
    }
    .frontpage-news-container {
        width: 100%;
        max-width: 800px;
        grid-template-columns: repeat(2, 1fr);
    }
    .frontpage-news-article {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .header-container td:nth-child(1),
    .header-container td:nth-child(3) {
        display: none !important;
    }
    .calendar-box {
        display: none !important;
    }
    .header-container td:nth-child(2) {
        width: 100% !important;
        text-align: center;
    }
    .header-logo {
        max-width: 80vw;
        height: 120px !important;
    }
    .main-nav {
        position: relative;
        z-index: 1000 !important;
    }
    .main-nav ul {
        gap: 6px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        display: -webkit-flex !important;
        display: -moz-flex !important;
        display: flex !important;
        visibility: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    .main-nav ul li a {
        font-size: 10px !important;
        padding: 6px !important;
        background-color: #C41E3A !important;
        color: #FFFFFF !important;
        border: 1px solid #002D72 !important;
        border-radius: 4px !important;
        text-align: center !important;
        display: inline-block !important;
        text-decoration: none !important;
        line-height: 1.2 !important;
        min-height: 30px !important;
        min-width: 40px !important;
        max-width: 80px !important;
        -webkit-box-sizing: border-box !important;
        -moz-box-sizing: border-box !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .main-nav ul li a:hover {
        background-color: #002D72 !important;
    }
    .home-layout {
        padding: 5px;
        gap: 15px;
    }
    .photo-gallery, .standings {
        max-width: 90vw;
    }
    .gallery-container img {
        max-height: 120px;
    }
    .standings-container {
        font-size: calc(10px + 0.2vw);
    }
    .stl-schedule {
        margin: 0 auto;
        max-width: 95vw;
        padding: 5px;
        max-height: 600px;
    }
    .stl-nav {
        height: 35px;
    }
    .stl-month-box {
        width: 200px;
        height: 25px;
    }
    .stl-nav-link {
        font-size: 12px;
        line-height: 25px;
    }
    .stl-title {
        font-size: 12px;
        line-height: 25px;
    }
    .stl-table {
        width: 100%;
        max-width: 100%;
        max-height: 500px;
        font-size: calc(8px + 0.2vw);
    }
    .stl-header th {
        width: 14.28%;
        height: 25px;
        font-size: 9px;
        padding: 2px;
    }
    .stl-table tbody tr {
        height: 70px;
    }
    .stl-day, .stl-game-day {
        font-size: 8px;
        padding: 1px;
    }
    .stl-game-date {
        font-size: 8px;
    }
    .stl-matchup {
        font-size: 8px;
    }
    .stl-team-logo {
        width: 10px;
        height: 10px;
        margin: 0;
    }
    .stl-game-result span {
        font-size: 8px;
    }
    .stl-game-time {
        font-size: 8px;
    }
    .stl-no-game {
        font-size: 8px;
    }
    .stl-calendar p {
        font-size: 10px;
        margin: 2px 0 0;
        height: 15px;
    }
    .box-scores {
        max-width: 95vw;
        padding: 5px;
        margin: 5px auto;
        overflow-x: auto;
        border: 1px solid #fff;
        border-radius: 8px;
        background-color: rgba(0, 0, 0, 0.7);
        -webkit-overflow-scrolling: touch;
    }
    .box-score-table-container {
        width: 100%;
        text-align: center;
    }
    .box-score-table {
        width: 100%;
        min-width: 320px;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
        font-size: calc(8px + 0.5vw);
        background-color: #FFFFFF;
        table-layout: auto;
        border-spacing: 0;
    }
    .box-score-table th, .box-score-table td {
        border: 1px solid #ccc;
        padding: 5px;
        text-align: center;
        vertical-align: middle;
    }
    .box-score-table th {
        background-color: #C41E3A;
        color: #FFFFFF;
        font-weight: bold;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .box-score-table td:first-child {
        display: -webkit-flex;
        display: -moz-flex;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 24px;
    }
    .box-score-table th:first-child,
    .box-score-table td:first-child {
        min-width: 130px;
        max-width: 160px;
        text-align: left;
        padding-left: 8px;
        display: table-cell !important;
    }
    .box-score-table .team-logo {
        width: 18px;
        height: 18px;
        margin-right: 5px;
        vertical-align: middle;
        flex-shrink: 0;
    }
    .box-score-table th:nth-child(11),
    .box-score-table td:nth-child(11),
    .box-score-table th:nth-child(12),
    .box-score-table td:nth-child(12),
    .box-score-table th:nth-child(13),
    .box-score-table td:nth-child(13),
    .box-score-table th:nth-child(14),
    .box-score-table td:nth-child(14) {
        min-width: 35px;
        display: table-cell;
    }
    .box-score-table th:nth-child(n+2):nth-child(-n+10),
    .box-score-table td:nth-child(n+2):nth-child(-n+10) {
        display: none !important;
    }
    .box-score-table tbody tr:nth-child(1) {
        background-color: #FFFFFF;
        color: #002D72;
    }
    .box-score-table tbody tr:nth-child(2) {
        background-color: #002D72;
        color: #FFFFFF;
    }
    .box-score-table .runs, .box-score-table .hits, .box-score-table .lob {
        font-weight: bold;
    }
    .box-score-table-container h3 {
        font-size: calc(14px + 1vw);
        padding: 8px;
        background-color: rgba(0, 100, 0, 0.7);
        color: #FFFFFF;
        border-radius: 6px 6px 0 0;
        margin: 0;
        display: inline-block;
        position: relative;
    }
    .box-score-table-container h3::after {
        content: '';
        background: url('//www.stlcardshub.com/static/images/580-5807388_tee-clipart.png') no-repeat center;
        background-size: contain;
        background-color: #006400;
        width: 18px;
        height: 18px;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }
    .status {
        font-size: calc(8px + 0.4vw);
        color: #ccc;
        margin-top: 5px;
    }
    .news-carousel {
        padding: 10px;
        max-width: 95vw;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .news-item {
        max-width: 250px;
        padding: 5px;
    }
    .news-item img {
        height: 100px;
    }
    .news-item h3 {
        font-size: 14px;
    }
    .news-item .news-date {
        font-size: 10px;
    }
    .news-item p {
        font-size: 10px;
    }
    .news-item a {
        padding: 5px 10px;
        font-size: 11px;
    }
    .news-search input {
        width: 90vw;
    }
    .load-more-container {
        margin-bottom: 60px;
    }
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 15px;
    }
    .modal-content img {
        max-height: 70vh;
    }
    .close-button {
        font-size: 1.5em;
        top: 10px;
        right: 15px;
    }
    .stats-section {
        padding: 10px;
        margin: 10px auto;
        max-width: 95vw;
    }
    .stats-section h2 {
        font-size: 20px;
    }
    .stats-section h3 {
        font-size: 16px;
    }
    .stats-filter {
        flex-direction: column;
        align-items: center;
    }
    .stats-filter select,
    .stats-filter button {
        width: 100%;
        max-width: 200px;
    }
    .stats-section table {
        font-size: calc(10px + 0.2vw);
    }
    .stats-section th,
    .stats-section td {
        padding: 5px;
    }
    .frontpage-news-section h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    .frontpage-news-container {
        grid-template-columns: 1fr;
        max-height: 400px;
        max-width: 95vw;
        padding: 5px;
    }
    .frontpage-news-article {
        padding: 8px;
        max-width: 280px;
    }
    .frontpage-news-article img {
        width: 180px;
    }
    .frontpage-news-article h3 {
        font-size: 14px;
    }
    .frontpage-news-article p {
        font-size: 11px;
    }
    .frontpage-news-article a {
        padding: 5px 10px;
        font-size: 11px;
    }
    .footer {
        padding: 1px;
        font-size: calc(6px + 0.2vw);
        line-height: 1;
        max-height: 10px;
        overflow: hidden;
    }
    .footer ul {
        display: none;
    }
    .footer p {
        font-size: calc(5px + 0.2vw);
        margin: 0;
        line-height: 1;
    }
}

@media (max-width: 480px) {
    .header-logo {
        max-width: 75vw;
        height: 100px !important;
    }
    .main-nav {
        position: relative;
        z-index: 1000 !important;
    }
    .main-nav ul {
        gap: 4px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        display: -webkit-flex !important;
        display: -moz-flex !important;
        display: flex !important;
        visibility: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    .main-nav ul li a {
        font-size: 8px !important;
        padding: 4px !important;
        background-color: #C41E3A !important;
        color: #FFFFFF !important;
        border: 1px solid #002D72 !important;
        border-radius: 4px !important;
        text-align: center !important;
        display: inline-block !important;
        text-decoration: none !important;
        line-height: 1.2 !important;
        min-height: 28px !important;
        min-width: 36px !important;
        max-width: 70px !important;
        -webkit-box-sizing: border-box !important;
        -moz-box-sizing: border-box !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .main-nav ul li a:hover {
        background-color: #002D72 !important;
    }
    .box-scores {
        padding: 4px;
        margin: 3px auto;
    }
    .box-score-table {
        font-size: calc(7px + 0.4vw);
        min-width: 280px;
    }
    .box-score-table th:first-child,
    .box-score-table td:first-child {
        min-width: 110px;
        max-width: 140px;
        padding: 4px 6px;
    }
    .box-score-table .team-logo {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }
    .box-score-table th:nth-child(11),
    .box-score-table td:nth-child(11),
    .box-score-table th:nth-child(12),
    .box-score-table td:nth-child(12),
    .box-score-table th:nth-child(13),
    .box-score-table td:nth-child(13),
    .box-score-table th:nth-child(14),
    .box-score-table td:nth-child(14) {
        min-width: 30px;
    }
    .box-score-table-container h3 {
        font-size: calc(12px + 0.8vw);
        padding: 6px;
    }
    .box-score-table-container h3::after {
        width: 16px;
        height: 16px;
        right: 6px;
    }
    .status {
        font-size: calc(7px + 0.3vw);
    }
    .stl-schedule {
        max-width: 95vw;
        max-height: 450px;
    }
    .stl-table {
        font-size: calc(7px + 0.2vw);
    }
    .stl-header th {
        font-size: 8px;
    }
    .stl-table tbody tr {
        height: 60px;
    }
    .stl-day, .stl-game-day {
        font-size: 7px;
    }
    .stl-game-date, .stl-matchup, .stl-game-time, .stl-no-game {
        font-size: 7px;
    }
    .stl-team-logo {
        width: 8px;
        height: 8px;
    }
    .stl-game-result span {
        font-size: 7px;
    }
    .frontpage-news-container {
        max-height: 350px;
        max-width: 95vw;
    }
    .frontpage-news-article {
        max-width: 85vw;
    }
    .frontpage-news-article img {
        max-width: 120px;
    }
    .frontpage-news-article h3 {
        font-size: 11px;
    }
    .frontpage-news-article p {
        font-size: 9px;
    }
    .frontpage-news-article a {
        padding: 3px 6px;
        font-size: 9px;
    }
    .news-carousel {
        max-width: 95vw;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .news-item {
        max-width: 85vw;
    }
    .news-item img {
        max-height: 80px;
    }
    .news-item h3 {
        font-size: 12px;
    }
    .news-item p {
        font-size: 9px;
    }
    .news-item .news-date {
        font-size: 8px;
    }
    .news-item a {
        padding: 4px 8px;
        font-size: 10px;
    }
    .footer {
        padding: 1px;
        font-size: calc(5px + 0.2vw);
        line-height: 1;
        max-height: 10px;
        overflow: hidden;
    }
    .footer p {
        font-size: calc(4px + 0.2vw);
        line-height: 1;
    }
}