:root {
    --ast-global-color-0: #00558c;
    --ast-global-blue: #00558c;
    --ast-global-lightblue: #99d1ef;
    --ast-global-purple: #2b3990;
    --ast-global-darkgreen: #07733b;
    --ast-global-lightgreen: #2266b1;
    --ast-global-background: #ffffff;
    --ast-global-grey: #bcbec0;
    --ast-global-darkgrey: #58595b;
    --ast-global-black: #000000;

    /* LAcon colors */
    --lacon-dark-blue: #082c45;
    --lacon-teal: #bcc5cf;
    --lacon-nav-grey: #ccc;
    --lacon-nav-red: #e8816e;

    --lacon-max-width: 1240px;
}

/* Header and logo responsive styles */
#top-bar {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: var(--lacon-teal);
    padding: 0;
}

#top-bar > div {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#logo-container {
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 35px;
    background-color: var(--lacon-dark-blue);
}

#logo {
    margin: 20px 0px;
    max-width: 100%;
    height: auto;
}

@media screen and (max-width: 768px) {
    #logo-container {
        padding: 0 20px;
    }
    
    #logo {
        margin: 15px 0;
        max-height: 60px;
    }
    
    #top-bar form {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #top-bar button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 480px) {
    #logo-container {
        padding: 0 15px;
    }
    
    #logo {
        margin: 10px 0;
        max-height: 50px;
    }
    
    #top-bar > div {
        gap: 10px;
    }
    
    #top-bar form {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    #top-bar button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

nav {
    background: var(--lacon-nav-grey);
}

nav ul {
    max-width: var(--lacon-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 1.5em;
    padding: 0.5em 1em;
    list-style: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: bold;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: black;
}

nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--lacon-nav-red);
    text-decoration-thickness: 2px;
}

/* Responsive navbar styles */
@media screen and (max-width: 768px) {
    nav ul {
        gap: 1em;
        font-size: 0.85rem;
        padding: 0.5em 0.75em;
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-direction: column;
        gap: 0.5em;
        font-size: 0.9rem;
        padding: 0.75em 1em;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.5em 0;
    }
    
    /* Keep the last items (portal and site links) at the bottom */
    nav ul li:has(a[href*="portal"]),
    nav ul li:has(a[href*="LAcon site"]) {
        margin-left: 0 !important;
    }
}

button {
    display: inline-block;
    background: var(--lacon-nav-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--lacon-dark-blue)
}

main {
    max-width: var(--lacon-max-width);
    margin: 2rem auto;
}

.nav {
    font-family: Poppins;
}
.panel {
    background: var(--ast-global-background);
}

.text-dark {
    color: var(--ast-global-blue) !important;
}

body {
    font-family:
        Nunito Sans,
        Sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-style: normal;
}

h1 {
    color: var(--ast-global-darkgrey);
    font-size: 2em;
    line-height: 1.2;
}

h2 {
    color: var(--ast-global-darkgrey);
    font-size: 1.7em;
    line-height: 1.3;
}

h3,
legend {
    color: var(--ast-global-darkgrey);
    font-size: 1.5em;
    line-height: 1.4;
}

h4 {
    color: var(--ast-global-darkgrey);
    line-height: 1.5;
    font-size: 1.3em;
}

h5 {
    color: var(--ast-global-darkgrey);
    line-height: 1.6;
    font-size: 1.2em;
}

h6 {
    color: var(--ast-global-darkgrey);
    line-height: 1.7;
    font-size: 1.1em;
}

h1,
h1.page-title,
h2 {
    font-family: Poppins;
}

.login .btn {
    font-family: Poppins;
}

.login label {
    font-family: Poppins;
}

.btn,
.subtitle {
    font-family: Poppins;
}

.center-title {
    color: #283891;
    font-family: Poppins;
    font-size: clamp(1.875rem, 1.5461rem + 1.3158vw, 3.125rem);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

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

.results th,
.results td {
    border: 1px solid #dee2e6;
}

.results td {
    border: 1px solid #dee2e6;
    text-align: center;
}

.results td:empty {
    border: none;
}

.results .eliminated {
    background-color: lightgrey;
    color: darkred;
}

.results .winner {
    background-color: var(--ast-global-lightblue);
}

.results .won {
    font-weight: bold;
}
