/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #457b9d, #1d3557);
    color: #ffffff; /* Pure white for better contrast */
    display: flex;
    flex-wrap: wrap; /* Allows wrapping for smaller screens */
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2rem; /* Adjusted for mobile */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
    flex: 1; /* Takes up space if navbar wraps */
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px; /* Space when wrapped */
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem; /* Adjusted for smaller screens */
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 0 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
    background-color: #a8dadc;
    color: #102a43; /* Dark navy for better contrast */
}

/* Champion Section Styling */
.champion-section {
    text-align: center;
    background: linear-gradient(135deg, #2e3a4b, #243240); /* Lighter gradient */
    color: #ffffff; /* Pure white for better contrast */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    max-width: 60%; /* Use 90% of the width for smaller screens */
}

/* Trophy Icon and Champion Content */
.champion-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Add space between the text and icons */
    flex-wrap: wrap; /* Wrap content for smaller screens */
}

.trophy-icon {
    font-size: 3rem;
    color: #f1c40f; /* Gold color */
}

.champion-text {
    text-align: center;
    max-width: 500px;
}

.champion-section h2 {
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #ffd700; /* Brighter gold for better contrast */
}

.champion-section p {
    font-size: 1.2rem;
    font-weight: normal;
    margin: 0;
    color: #ffffff; /* Soft light text */
}

.champion-section strong {
    font-size: 1.4rem; /* Emphasis for champion's name */
    color: #f39c12; /* Gold for the champion name */
    font-weight: bold;
}

section {
    background: #ffffff;
    margin: 20px auto;
    padding: 15px; /* Reduced padding for mobile */
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section h2 {
    color: #1d3557; /* Darker blue for better contrast */
    font-size: 1.5rem; /* Adjusted for smaller screens */
    margin-bottom: 15px;
    text-transform: capitalize;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

section h3 {
    color: #1d3557; /* Darker blue for better contrast */
    font-size: 1.5rem; /* Adjusted for smaller screens */
    margin-bottom: 15px;
    text-transform: capitalize;
    padding-bottom: 5px;
}

.project-btn {
    background-color: #457b9d; /* Navy background for better contrast */
    color: #ffffff; /* White text for contrast */
    font-size: 1rem;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-btn:hover {
    background-color: #1d3557; /* Darker navy */
    color: #a8dadc; /* Lighter blue */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem; /* Slightly smaller text for smaller screens */
}

table th, table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

table th {
    background: #457b9d; /* Navy background */
    color: #ffffff; /* White text */
    text-transform: uppercase;
}

table tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tr:hover {
    background-color: #e8f1f2;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px 0;
    background: #102a43; /* Slightly darker navy */
    color: #ffffff; /* Pure white for better contrast */
    font-size: 1rem;
    border-radius: 8px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

footer a {
    color: #a8dadc;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

span#currentYear {
    color: #ffffff; /* Ensure contrast with footer background */
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* Stack title and navbar vertically */
        text-align: center;
    }

    header h1 {
        font-size: 1.8rem; /* Smaller font for smaller screens */
        margin-bottom: 10px; /* Space between title and navbar */
    }

    .navbar {
        flex-direction: column; /* Stack navbar links vertically */
        margin-top: 0;
    }

    .navbar a {
        font-size: 0.9rem; /* Smaller links for smaller screens */
        margin: 5px 0; /* Space between links */
    }

    section {
        padding: 10px; /* Reduce padding for smaller screens */
    }

    section h2 {
        font-size: 1.3rem; /* Smaller section titles */
    }

    table {
        font-size: 0.8rem; /* Smaller text for tables */
    }
    .champion-section {
        padding: 15px;
        max-width: 95%; /* Slightly reduce width for mobile */
    }

    .champion-section h2 {
        font-size: 1.8rem; /* Adjust for smaller screens */
    }

    .champion-section p {
        font-size: 1.1rem; /* Slightly smaller for readability */
    }

    .champion-content {
        flex-direction: column; /* Stack content vertically */
        gap: 10px; /* Reduce gap for smaller screens */
    }

    .trophy-icon {
        font-size: 2.5rem; /* Adjust icon size for smaller screens */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem; /* Further reduce font size */
    }

    .navbar a {
        font-size: 0.8rem; /* Smaller links */
        padding: 0.4rem 0.8rem;
    }

    table th, table td {
        padding: 5px; /* Compact table cells */
    }
    .champion-section h2 {
        font-size: 1.6rem; /* Further reduce heading size */
    }

    .champion-section p {
        font-size: 1rem; /* Ensure readability */
    }

    .trophy-icon {
        font-size: 2rem; /* Reduce trophy size further */
    }
}

.fixed-sidebar {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
}

/* Make room for the fixed sidebar on desktop only */
@media (min-width: 769px) {
    body {
        margin-right: 340px;
    }
}

/* Hide the sidebar on screens smaller than 768px */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    body {
        margin-right: 0 !important; /* Remove margin to avoid blank space */
    }
}
