body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
    color: black;
    font-size: 18px;
    position: relative;
    min-height: 100vh;
    background-image: url("./images/background-transparent.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
}

h1, h2 {
    text-align: center;
    font-size: 2em;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2em;
}

select, button {
    display: block;
    margin: 0 auto;
    margin-bottom: 30px;
}

button {
    padding: 15px 30px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.2em;
}

button:hover {
    background-color: #0056b3;
}

#saveText {
    display: none;
}

p {
    text-align: center;
    font-size: 1.2em;
}

a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.2em;
}

a:hover {
    text-decoration: underline;
}

select {
    display: block;
    margin: 0 auto;
    margin-bottom: 30px;
    padding: 15px 25px;
    width: 100%;
    max-width: 600px;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    background: white !important;
    /* Remove Android arrow */
    background-position: right 50% top 50% !important;
    background-repeat: no-repeat !important;
    background-size: 0 !important;
}

select::placeholder
{
    color: #dc3545 !important;
}

select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.2);
}

#swiLogo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: 30vh;
    width: auto;
}

#schoolLogo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: 20vh;
    width: auto;
}

.search-container {
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.search-container input {
    padding: 15px 25px;
    width: calc(100% - 20px);
    max-width: 600px;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-container input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 3px 8px rgba(0,123,255,0.2);
}

.search-container button {
    padding: 15px 40px;
    width: 100%;
    max-width: 600px;
    border-radius: 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.search-container button:hover {
    background: linear-gradient(135deg, #0056b3, #004094);
    transform: translateY(-1px);
}

.table-container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px 15px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}

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

tr:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

button, input, tr {
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .search-container {
        padding: 0 15px;
    }
    
    .table-container {
        padding: 0 15px;
    }
    
    .search-container input,
    .search-container button {
        width: 100%;
        margin-right: 0;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 12px 8px;
    }
}

.text-center {
    flex: 1;
    margin: 0;
    width: 100%;
}

.text-center a {
    display: block;
    width: 100%;
    padding: 15px 40px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    text-align: center;
    font-size: 1.2em;
    max-width: 540px;
}

.text-center a:hover {
    background: linear-gradient(135deg, #0056b3, #004094);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
}

*, *:before, *:after {
    box-sizing: border-box;
}

.route-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.route-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.route-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

@media (max-width: 768px) {
    .route-buttons {
        padding: 0 20px;
    }
}

#inputCarpark {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

#inputCarpark button {
    width: 100%;
    max-width: 600px;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#inputCarpark button:hover {
    background: linear-gradient(135deg, #0056b3, #004094);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    #inputCarpark {
        padding: 0 15px;
    }
    
    /* #reset,  */
    select, 
    #inputCarpark button {
        width: 100%;
    }
}

.nav-link {
    position: absolute;
    top: 20px;
    left: 20px;
}

.nav-link a {
    display: inline-block;
    padding: 14px 17px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 100%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link a:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.nav-link-2 {
    position: absolute;
    top: 20px;
    left: 20px;
}

.nav-link-2 a {
    display: inline-block;
    padding: 13px 15px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 100%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link-2 a:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-info {
    text-align: center;
}

.button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pagination-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.pagination-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #0056b3, #004094);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .button-container {
        width: 100%;
        gap: 15px;
    }
    
    .pagination-btn {
        flex: 1;
    }
}

.subtitle {
    text-align: center;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

.display {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 20px;
    gap: 12px;
}

.display .text-center {
    flex: 1;
    margin: 0;
}

.display .text-center a {
    display: block;
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    text-align: center;
    font-size: 1.2em;
}

.display .text-center a:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
}

.display #info-button {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #dc3545;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-style: italic;
    font-family: 'Times New Roman', serif;
    flex-shrink: 0;
    border: 3px solid #dc3545;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.display #info-button:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.cadets-button {
    padding: 5px 10px; 
    font-size: 14px;    
    background-color: #007BFF; 
    color: white;       
    text-decoration: none; 
    border-radius: 5px;  
    display: inline-block; 
    text-align: center; 
}

.cadets-button:hover {
    background-color: #0056b3; 
}





.contingent-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contingent-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.contingent-container {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: 3rem;
}

.plan-image {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}

.plans-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    /* margin-top: 3rem; */
}

.plan-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* margin-bottom: 1rem; */
}

.plan-section h2 {
    font-size: 2.4rem;
}

/* Underline the h2 */
.plan-section h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: #007bff;
    /* margin-top: 0.5rem; */
}

.plan-image-container {
    width: 100%;
    position: relative;
}

.plan-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.plan-key {
    text-align: left;
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 6px 8px;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    font-size: 0.55rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: auto;
    min-width: 160px;
    max-width: calc(100% - 10px);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.plan-key p {
    text-align: left;
    margin: 1px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px;
    white-space: nowrap;
    font-size: 1em;
}

.plan-key p::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    flex-shrink: 0;
}

.plan-key p:nth-child(1)::before {
    background-color: #007bff; /* Blue for Cadets */
}

.plan-key p:nth-child(2)::before {
    background-color: #28a745; /* Green for Parents */
}

.plan-key p:nth-child(3)::before {
    background-color: #ffc107; /* Yellow for Guests */
}

.plan-label {
    color: #666;
    font-size: 0.7em;
    font-style: italic;
    background-color: white;
    padding: 8px 16px;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-style: italic;
    font-weight: 600;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.image-container {
    position: relative;
    display: inline-block;
    width: fit-content;
}

.plan-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.image-legend {
    position: absolute;
    bottom: 34px;
    right: 34px;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 4px 8px !important;
    border-radius: 4px;
    margin: 0 !important;
    font-size: 0.9em !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 10;
}

.contingent-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.info-icon {
    width: 30px;
    height: 30px;
    border: 3px solid #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #007bff;
    font-style: italic;
    font-family: 'Times New Roman', serif;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.info-icon:hover 
{
    background: #cedff1;
}

@media (min-width: 768px) {
    .plan-key {
        font-size: 0.65rem;
        padding: 8px 10px;
        top: 32px;
        left: 32px;
    }

    .plan-key p::before {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .plan-key {
        font-size: 0.5rem;
        padding: 4px 6px;
        top: 32px;
        left: 32px;
    }

    .plan-key p::before {
        width: 5px;
        height: 5px;
    }
}

.select-container {
    flex: 1;
    margin: 0;
    width: 100%;
    position: relative;
    border-radius: 50px !important;
}

.select-container select {
    margin: 0;
    width: 100%;
    max-width: 540px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
}

/* Remove the default arrow in IE */
.select-container select::-ms-expand {
    display: none;
}

/* For iOS devices specifically */
.select-container select {
    background-color: transparent;
    border-radius: 0;
}

#info-button:first-of-type {
    border: 3px solid #dc3545;
    color: #dc3545;
}

#info-button:first-of-type:hover {
    background: #fae3e5;
}

#info-button:last-of-type {
    border: 3px solid #007bff;
    color: #007bff;
}

#info-button:last-of-type:hover {
    background: #cedff1;
}

/* Make select placeholder text red */
select option:first-child {
    color: #dc3545;
}

/* Make Warrior Contingent button blue */
.text-center a {
    /* ... existing styles ... */
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.text-center a:hover {
    background: linear-gradient(135deg, #0056b3, #004094);
}

/* Color code the info buttons */
.display:first-child #info-button {
    border: 3px solid #dc3545;
    color: #dc3545;
}

.display:first-child #info-button:hover {
    background: #fae3e5;
}

.display:last-child #info-button {
    border: 3px solid #007bff;
    color: #007bff;
}

.display:last-child #info-button:hover {
    background: #cedff1;
}

#warriorContingentButton
{
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease
}

#defaultOption {
    color: #dc3545;
}

#red-back-button a {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

#red-back-button a:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

select option[disabled] {
    color: #dc3545;
}

select option {
    color: inherit;
}

select:invalid {
    color: #dc3545;
}

select option[disabled] {
    color: #dc3545 !important;
    -webkit-text-fill-color: #dc3545;
}

select:invalid {
    color: #dc3545 !important;
    -webkit-text-fill-color: #dc3545;
}

select option:not([disabled]) {
    color: initial;
    -webkit-text-fill-color: initial;
}

/* Additional iOS and Safari specific fixes */
select::-webkit-outer-spin-button,
select::-webkit-inner-spin-button,
select::-webkit-search-decoration,
select::-webkit-search-cancel-button,
select::-webkit-search-results-button,
select::-webkit-search-results-decoration,
select::-webkit-inner-spin-button,
select::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
    margin: 0;
}

/* Force remove any potential arrow indicators */
select {
    text-indent: 1px;
    text-overflow: '';
    border-radius: 50px !important;
    -webkit-border-radius: 50px !important;
}

/* Android specific fixes */
select::-ms-expand {
    display: none !important;
}

select:focus {
    background-image: none !important;
    background: white !important;
}

.select-container {
    position: relative;
    border-radius: 50px !important;
}