/* Sports Fixtures and Results - Coventry College Styling */

/* CSS Variables - Coventry College Brand Colors */
:root {
    --primary-color: #222222;
    --secondary-color: #e5f308;
    --accent-color: #ff6600; /* Orange accent */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #28a745; /* Green for wins */
    --error-color: #dc3545; /* Red for losses */
    --home-color: #0066cc;
    --away-color: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Skip to content link (accessibility) */
.skip-link {
    position: absolute;
    top: -42px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

main {
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    width: 100%;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.header-logo a {
    display: flex;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-logo a:hover {
    opacity: 0.8;
}

.logo {
    height: auto;
    width: 160px;
    max-width: 160px;
    display: block;
}

.header-title {
    flex: 1 1 auto;
    text-align: center;

}

header h1 {
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-light);
    font-size: 1em;
}

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

.academy-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.academy-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color:white;
}

.academy-button:active {
    transform: translateY(0);
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--secondary-color);
    background-color: var(--bg-color);
}

.tab-button {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    margin-bottom: -2px;
    text-transform: uppercase;
}

.tab-button:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.tab-button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: -2px;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    background-color: var(--secondary-color);
}

/* Tab Content */
.tab-content {
    border-radius: 0 0 8px 8px;
    min-height: 400px;
    margin-top: 2em;
}

/* Sub-tabs Navigation (Fixtures/Results) */
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-color);
    padding: 0;
}

.sub-tab-button {
    padding: 12px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    margin-bottom: -2px;
    text-transform: uppercase;
}

.sub-tab-button:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.sub-tab-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.sub-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--border-color);
}

/* Sub-tab Content */
.sub-tab-content {
    position: relative;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-light);
    font-size: 1.1em;
}

/* Error State */
.error {
    text-align: center;
    padding: 60px 20px;
    color: var(--error-color);
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
}

.error p {
    margin-bottom: 20px;
}

.retry-button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.retry-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.retry-button:active {
    transform: translateY(0);
}

.retry-button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Last Updated Timestamp */
.last-updated {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
    padding: 10px;
    font-style: italic;
}

/* Sections */
.fixtures-section,
.results-section {
    margin-bottom: 0;
}

.fixtures-section h2,
.results-section h2 {
    display: none; /* Hide h2 since we have sub-tabs now */
}

/* Matches Container */
.matches-container {
    width: 100%;
}

/* Month Header for Matches */
.month-header-match {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 0 15px 0;
    margin-top: 30px;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
}

.month-header-match:first-child {
    margin-top: 0;
}

/* Match Card */
.match-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    animation: fadeInRow 0.5s ease-out;
    display: flex;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-won {
    border-left: 4px solid var(--success-color);
}

.match-lost {
    border-left: 4px solid var(--error-color);
}

/* Venue Badge (H/A) */
.venue-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    color: var(--text-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.match-content {
    flex: 1;
    padding: 15px 20px 15px 45px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Match Date */
.match-date {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 400;
}

/* Match Teams - Horizontal layout for fixtures */
.match-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.team-name-container,
.team-score-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
}

.team-score-container {
    flex-direction: row;
}

.team-name {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--away-color);
    line-height: 1.2;
    text-align: center;
}

.team-name.coventry-college {
    color: var(--primary-color);
    font-weight: 700;
}

.match-vs {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-light);
    text-transform: lowercase;
    flex: 0 0 auto;
    padding: 0 10px;
}

.score-number {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-color);
}

.score-number.coventry-score {
    color: var(--error-color);
}

.score-number.score-loser {
    opacity: 0.5;
}

.score-number.coventry-score.score-loser {
    opacity: 0.5;
}

.score-number-stacked.score-tbc {
    color: var(--border-color) !important;
}

/* Match Teams - Stacked layout for results */
.match-teams-stacked {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 60px;
}

.match-teams-stacked::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border-color);
}

.team-row {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.team-row:last-child {
    border-bottom: none;
}

.score-number-stacked {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--text-color);
    text-align: right;
    line-height: 1;
}

.score-number-stacked.coventry-score {
    color: var(--error-color);
}

.score-number-stacked.coventry-score.coventry-won {
    color: var(--success-color);
}

.score-number-stacked.coventry-score.coventry-lost {
    color: var(--error-color);
}

.score-number-stacked.score-loser {
    opacity: 0.5;
}

.score-number-stacked.coventry-score.score-loser {
    opacity: 0.5;
}

.team-name-stacked {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.team-name-stacked.coventry-college {
    color: var(--error-color);
}

.team-name-stacked.coventry-college.coventry-won {
    color: var(--success-color);
}

.team-name-stacked.coventry-college.coventry-lost {
    color: var(--error-color);
}

.match-result-fallback {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 8px;
}

/* No Data Match */
.no-data-match {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 40px 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* Cards Container */
.cards-container {
    width: 100%;
}

/* Month Header Card */
.month-header-card {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 0 15px 0;
    margin-top: 30px;
    border-bottom: 2px solid var(--border-color);
}

.month-header-card:first-child {
    margin-top: 0;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Fixture Card */
.fixture-card {
    background: linear-gradient(to right, var(--bg-color) 0%, rgba(229, 243, 8, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeInRow 0.5s ease-out;
}

.fixture-card:hover {
    background: linear-gradient(to right, rgba(229, 243, 8, 0.1) 0%, rgba(229, 243, 8, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(229, 243, 8, 0.2);
    transform: translateY(-4px);
}

/* Result Card */
.result-card {
    background: linear-gradient(to right, var(--bg-color) 0%, var(--bg-light) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeInRow 0.5s ease-out;
}

.result-card:hover {
    background: linear-gradient(to right, var(--bg-light) 0%, #e8e8e8 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.result-won-card {
    border-left: 4px solid var(--success-color);
}

.result-lost-card {
    border-left: 4px solid var(--error-color);
}

/* Card Content */
.card-date {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 600;
}

.card-opposition {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.card-venue {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 15px;
}

.card-venue.venue-home {
    color: var(--home-color);
}

.card-venue.venue-away {
    color: var(--away-color);
}

/* Card Score Container */
.card-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.card-result {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* No Data Card */
.no-data-card {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 40px 20px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* Upcoming Fixture Banner */
.upcoming-fixture-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #333333 100%);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Rugby banner with background image */
.upcoming-fixture-banner.banner-rugby {
    background-image: url('https://www.coventrycollege.ac.uk/wp-content/uploads/2024/11/Solihull-SFC-v-Cov-College-131124-76.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.upcoming-fixture-banner.banner-rugby::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.upcoming-fixture-banner.banner-rugby .banner-content {
    position: relative;
    z-index: 1;
}

/* Basketball banner with background image */
.upcoming-fixture-banner.banner-basketball {
    background-image: url('https://www.coventrycollege.ac.uk/wp-content/uploads/2023/05/coventry-college-basketball-students-holding-basketball2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.upcoming-fixture-banner.banner-basketball::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.upcoming-fixture-banner.banner-basketball .banner-content {
    position: relative;
    z-index: 1;
}

/* Football banner with background image */
.upcoming-fixture-banner.banner-football {
    background-image: url('https://www.coventrycollege.ac.uk/wp-content/uploads/2022/06/sport-learners-agility-drills.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.upcoming-fixture-banner.banner-football::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
}

.upcoming-fixture-banner.banner-football .banner-content {
    position: relative;
    z-index: 1;
}

.banner-content {
    text-align: center;
}

.banner-header {
    margin-bottom: 20px;
}

.banner-label {
    font-size: 1.5em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    padding: .3em 0.5em;
}

.banner-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.banner-date {
    font-size: 1.1em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.banner-match {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.banner-team {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    text-align: center;
    min-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.banner-team.animate-fade-up {
    opacity: 1;
    transform: translateY(0);
}

.banner-team-right {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.banner-team-right.animate-fade-up {
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.banner-vs {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 2px;
    flex: 0 0 auto;
}

.banner-venue {
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-align: center;
    display: inline-block;
}

.banner-venue.venue-home {
    background-color: rgb(255 255 255 / 18%);
    color: white;
}

.banner-venue.venue-away {
    background-color: rgb(255 255 255 / 18%);
    color: white;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Tables */

thead {
    background-color: var(--primary-color);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1em;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: var(--bg-light);
}

/* Month header row */
tbody tr.month-header {
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

tbody tr.month-header:hover {
    background-color: var(--bg-light);
}

tbody tr.month-header td {
    padding: 20px 15px 10px 15px;
    color: var(--primary-color);
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    color: var(--text-color);
}

.no-data {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 30px !important;
}

/* Venue Styling */
.venue-home {
    color: var(--home-color);
    font-weight: 600;
}

.venue-away {
    color: var(--away-color);
    font-weight: 600;
}

/* Result Styling */
.result-won {
    color: var(--success-color);
    font-weight: 600;
}

.result-lost {
    color: var(--error-color);
    font-weight: 600;
}

/* Score Display Styling */
.score-container,
.card-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
}

.score-number {
    font-size: 2em;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #444444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: scoreReveal 0.6s ease-out;
}

/* Score numbers use default styling regardless of win/loss */

.score-separator {
    font-size: 1.5em;
    color: var(--text-light);
    font-weight: 400;
}

.result-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: badgeFadeIn 0.8s ease-out;
}

.result-badge.result-won {
    background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.result-badge.result-lost {
    background: linear-gradient(135deg, var(--error-color) 0%, #e85d75 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Score Animation */
@keyframes scoreReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
    50% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes badgeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fixture Row Animation */
.fixture-row {
    position: relative;
    animation: fadeInRow 0.5s ease-out;
}

@keyframes fadeInRow {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gradient Backgrounds and Shadows for Depth */
tbody tr.result-row {
    background: linear-gradient(to right, var(--bg-color) 0%, var(--bg-light) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

tbody tr.result-row:hover {
    background: linear-gradient(to right, var(--bg-light) 0%, #e8e8e8 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

tbody tr.fixture-row {
    background: linear-gradient(to right, var(--bg-color) 0%, rgba(229, 243, 8, 0.05) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

tbody tr.fixture-row:hover {
    background: linear-gradient(to right, rgba(229, 243, 8, 0.1) 0%, rgba(229, 243, 8, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(229, 243, 8, 0.2);
    transform: translateY(-2px);
}

/* Enhanced table styling with depth */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bg-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

/* Footer */
footer {
    width: 100%;
    margin-top: 40px;
    padding: 15px 0;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.editor-login {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.editor-login:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {

    .logo {
        height: 50px;
    }

    .academy-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 15px 0;
    }

    .header-content {
        padding: 0 15px;
    }

    .header-logo a{
        justify-content: center;
    }

    footer {
        padding: 12px 0;
    }

    .footer-content {
        padding: 0 15px;
    }

    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-logo {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .logo {
        height: 50px;
    }

    .header-title {
        flex: 0 0 100%;
        order: 2;
    }

    header h1 {
        font-size: 1.3em;
    }

    .header-button {
        flex: 0 0 100%;
        text-align: center;
        order: 3;
        margin-top: 15px;
    }

    .academy-button {
        width: 100%;
        max-width: 300px;
    }

    .tabs {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .tab-button {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        margin-bottom: 0;
    }

    .tab-button.active {
        border-bottom-color: var(--border-color);
        border-left: 3px solid var(--secondary-color);
    }

    .tab-content {
        padding: 20px 15px;
    }

    .sub-tabs {
        margin-bottom: 20px;
    }

    .sub-tab-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 100%;
    }

    /* Responsive card grid */
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .fixture-card,
    .result-card {
        padding: 15px;
    }

    .card-opposition {
        font-size: 1.1em;
    }

    /* Responsive match cards */
    .match-content {
        padding: 12px 15px 12px 40px;
    }

    .venue-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8em;
    }

    .match-teams {
        flex-direction: column;
        gap: 15px;
    }

    .venue-badge {
        width: 24px;
        height: 24px;
        font-size: 0.75em;
    }

    .match-teams {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .team-name-container,
    .team-score-container {
        width: 100%;
        justify-content: space-between;
    }

    .team-name-container:last-child,
    .team-score-container:last-child {
        flex-direction: row;
    }

    .match-vs {
        order: 2;
    }

    .team-name-container:first-child,
    .team-score-container:first-child {
        order: 1;
    }

    .team-name-container:last-child,
    .team-score-container:last-child {
        order: 3;
    }

    .score-number {
        font-size: 1em;
    }

    .match-vs {
        font-size: 0.85em;
        padding: 0;
        display: flex;
        justify-content: flex-start;
        width: 100%;
    }

    .upcoming-fixture-banner {
        padding: 20px 15px;
        margin-bottom: 30px;
    }

    .banner-label {
        font-size: 0.8em;
    }

    .banner-date {
        font-size: 1em;
    }

    .banner-match {
        flex-direction: column;
        gap: 15px;
    }

    .banner-team {
        font-size: 1.3em;
        min-width: 100px;
    }

    .banner-team-left {
        text-align: center;
    }

    .banner-team-right {
        text-align: center;
    }

    .banner-vs {
        font-size: 1.2em;
    }

    .banner-venue {
        font-size: 1em;
    }

    table {
        font-size: 0.9em;
    }

    th,
    td {
        padding: 10px 8px;
    }

    /* Responsive score display */
    .score-number {
        font-size: 1.6em;
    }

    .score-separator {
        font-size: 1.3em;
    }

    /* Stack table on very small screens */
    @media (max-width: 480px) {
        thead {
            display: none;
        }

        tbody tr {
            display: block;
            margin-bottom: 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
        }

        tbody td {
            display: block;
            text-align: right;
            padding: 8px 10px;
            border-bottom: 1px solid var(--bg-light);
        }

        tbody td:last-child {
            border-bottom: none;
        }

        tbody td::before {
            content: attr(data-label) ": ";
            float: left;
            font-weight: 600;
            color: var(--text-light);
        }
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .fixtures-section h2,
    .results-section h2 {
        font-size: 1.4em;
    }

    .upcoming-fixture-banner {
        padding: 15px 10px;
    }

    .banner-team {
        font-size: 1.1em;
        min-width: 80px;
    }

    .banner-vs {
        font-size: 1em;
    }

    /* Responsive score display */
    .score-number {
        font-size: 1.5em;
    }

    .score-separator {
        font-size: 1.2em;
    }

    .result-badge {
        font-size: 0.7em;
        padding: 3px 10px;
    }

    /* Responsive card grid for mobile */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .fixture-card,
    .result-card {
        padding: 15px;
    }

    .month-header-card {
        font-size: 1em;
        padding: 15px 0 10px 0;
    }

    /* Responsive match cards for mobile */
    .match-content {
        padding: 10px 12px 10px 35px;
        gap: 10px;
    }

    .venue-badge {
        width: 24px;
        height: 24px;
        font-size: 0.75em;
    }

    .match-teams {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .team-name-container,
    .team-score-container {
        width: 100%;
        justify-content: space-between;
    }

    .team-name-container:last-child,
    .team-score-container:last-child {
        flex-direction: row;
    }

    .match-vs {
        order: 2;
    }

    .team-name-container:first-child,
    .team-score-container:first-child {
        order: 1;
    }

    .team-name-container:last-child,
    .team-score-container:last-child {
        order: 3;
    }

    .team-name {
        font-size: 0.9em;
    }

    .score-number {
        font-size: 0.95em;
    }

    /* Stacked teams responsive */
    .match-teams-stacked {
        padding-left: 20px;
    }

    .match-teams-stacked::before {
        left: 0px;
    }

    .team-row {
        grid-template-columns: 20px 1fr;
        gap: 12px;
        padding: 10px 0;
    }

    .score-number-stacked {
        font-size: 1.5em;
    }

    .team-name-stacked {
        font-size: 1em;
    }

    .month-header-match {
        font-size: 1em;
        padding: 15px 0 10px 0;
    }
}

