/* Base Styles - Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, Geneva, Arial Black;
    font-weight: normal;
    font-size: 14px;
    background-color: darkblue;
    line-height: 1.5;
}

/* Header */
#header {
    background-color: rgb(0,111,55);
    margin: 10px;
    height: auto;
    min-height: 80px;
    border-radius: 5px;
    padding: 15px;
}

h1 {
    font-size: 24px;
    text-align: center;
    color: yellow;
    font-family: "century Gothic", "Gill Sans", "Bauhaus 93", "Comic Sans MS", Arial, Ink Free, serif;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

h1 img {
    max-width: 40px;
    height: auto;
}

/* Navigation - Mobile Friendly */
#navbar ul {
    padding: 5px;
    list-style-type: none;
    text-align: center;
    background-color: darkblue;
    margin: 10px;
    border-radius: 5px;
}

#navbar ul li {
    display: inline-block;
    margin: 2px;
}

#navbar ul li a {
    text-decoration: none;
    font-family: Arial;
    padding: 8px 12px;
    color: white;
    background-color: darkblue;
    font-weight: bold;
    display: inline-block;
    border-radius: 5px;
    font-size: 12px;
}

#navbar ul li a:hover {
    color: black;
    background-color: white;
}

/* Main Content */
.main {
    background-color: white;
    margin: 10px;
    border-radius: 5px;
    padding: 15px;
    font-size: 100%;
    overflow-x: auto;
}

/* Sidebar - Responsive */
.sideright {
    background-color: white;
    margin: 10px;
    border-radius: 5px;
    padding: 15px;
    width: auto;
}

.imagesidebar {
    margin: 10px;
    border-radius: 5px;
    width: auto;
    max-width: 100%;
    height: auto;
}

/* Tables - Responsive */
table {
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    display: block;
}

th, td {
    border: 1px solid black;
    text-align: left;
    padding: 8px;
}

/* Images and Videos */
img {
    max-width: 100%;
    height: auto;
}

video {
    max-width: 100%;
    height: auto;
}

/* Form Elements */
input, textarea, select {
    max-width: 100%;
    box-sizing: border-box;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input[type="submit"], button {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

/* Footer */
#footer {
    background-color: rgb(0,111,55);
    margin: 10px;
    border-radius: 5px;
    color: yellow;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    clear: both;
}

#footer ul {
    padding: 5px;
    list-style-type: none;
    text-align: center;
    margin: 10px;
}

#footer ul li {
    display: inline-block;
    margin: 0 5px;
}

#footer ul li a {
    text-decoration: none;
    font-family: Arial;
    padding: 5px 10px;
    color: white;
    background-color: rgb(0,111,55);
    border-radius: 5px;
}

#footer ul li a:hover {
    color: black;
    background-color: white;
}

/* Headings */
h2 {
    font-size: 20px;
    color: green;
    text-align: center;
    margin-bottom: 15px;
}

h3 {
    color: blue;
    font-size: 18px;
    text-align: center;
    margin: 15px 0;
}

p {
    font-size: 16px;
    margin-bottom: 10px;
}

/* Image Gallery / Candidate Photos */
.main img {
    max-width: 100px;
    border-radius: 50%;
    margin: 5px;
}

/* Responsive Design - Tablet and Desktop */
@media (min-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h1 img {
        max-width: 50px;
    }
    
    .sideright {
        float: right;
        width: 280px;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .imagesidebar {
        float: right;
        width: 300px;
        margin: 10px;
        clear: right;
    }
    
    .main {
        margin-right: 320px;
        margin-left: 10px;
    }
    
    #navbar ul li a {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 40px;
    }
    
    .main {
        font-size: 110%;
    }
    
    p {
        font-size: 18px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    #navbar ul li {
        display: block;
        margin: 5px 0;
    }
    
    #navbar ul li a {
        display: block;
        padding: 12px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 18px;
        flex-direction: column;
    }
    
    h1 img {
        max-width: 30px;
    }
    
    .main {
        padding: 12px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    p {
        font-size: 14px;
    }
    
    .sideright ul li a {
        font-size: 12px;
    }
    
    #footer ul li {
        display: block;
        margin: 5px 0;
    }
    
    #footer {
        font-size: 10px;
    }
}

/* Fix for Slider on Mobile */
#slider {
    overflow: hidden;
    margin: 10px;
}

@keyframes slide {
    0% { left: 0; }
    10% { left: 0; }
    20% { left: -100%; }
    30% { left: -100%; }
    40% { left: -200%; }
    50% { left: -200%; }
    60% { left: -300%; }
    70% { left: -300%; }
    80% { left: -400%; }
    90% { left: -400%; }
    100% { left: 0; }
}

#slider figure img {
    float: left;
    width: 10%;
}

#slider figure {
    margin: 10px;
    position: relative;
    width: 500%;
    animation: slide 20s infinite;
}