@font-face {
    font-family: "Raleway";
    src: url("./Lato-Black.ttf");
}

* {
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
}

body {
    background-color: #212529;
    margin: 0;
}

.menu, .footer, .articles {
    user-select: none;
}

.container {
    color: white;
    width: 100%;
    margin: auto;
}

.menu {
    padding: 10px;
    letter-spacing: 0.3px;
    justify-content: end;
    display: flex;
    text-align: center;
    min-height: 50px;
    flex-wrap: wrap;
}

.menuButton {
    float: right;
    min-width: 50px;
    min-height: 50px;
    font-size: 20px;
    padding: 15px;
    opacity: 0.99;
    color: white;
    text-decoration: none;
    transition: 0.2s;
    margin: 10px;
    border-radius: 6px;
    background-color: #495057;
}

.menuButton:hover {
    opacity: 0.7;
}

.menuButtonAvatar {
    float: right;
    max-width: 55px;
    max-height: 55px;
    border-radius: 50%;
    background-color: #495057;
    margin: 10px;
}

.menuButtonAvatar img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
}

.menuButtonAvatar img:hover {
    cursor: pointer;
    opacity: 0.7;
}

.profileMenu {
    position: absolute;
    top: 80px;
    right: 20px;
    background-color: #343a40;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    padding: 15px;
    text-align: left;
    width: 200px;
    z-index: 999;
}

.profileMenu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 8px;
    border-radius: 5px;
    background-color: #495057;
    margin: 5px 0;
}

.profileMenu a:hover {
    background-color: #6c757d;
}

.logoButton {
    position: absolute;
    left: 20px;
}

.logoButton img {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin-right: 5px;
}

.logoButtonText {
    float: right;
    font-size: 50px;
    padding: 5px;
    opacity: 0.99;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.cur-page {
    opacity: 0.72;
}

.articles {
    position: sticky;
    top: 25px;
    align-self: flex-start;
    height: fit-content;
    padding: 30px;
    margin: 25px;
    background-color: #343a40;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 15%;
    text-align: center;
    float: left;
}

.articleText {
    font-family: "Raleway", sans-serif;
    font-size: 24px;
    color: #DEE2E6;
    margin: 10px 0;
}

.articleButton {
    display: block;
    width: 100%;
    padding: 20px;
    margin: 10px 0;
    font-size: 20px;
    background-color: #495057;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.1s;
}

.g-page {
    background: url();
}

.p-page {
    background: url();
    display: flex;
    align-items: flex-start;
}

.c-page {
    background: url();
}

.content {
    width: 100%;
    padding: 30px;
}

.slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 50px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.slides {
    position: relative;
    width: 100%;
    height: auto;
}

.slide {
    width: 100%;
    display: none;
    transition: opacity 0.5s ease-in-out;
    height: 600px;
    object-fit: contain;
}

.slide.active {
    display: block;
    opacity: 1;
}

.speedway-article {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
    line-height: 0%;
}

.speedway-title {
    font-size: 24px;
}

.projektButton, .contactButton {
    padding: 10px 20px;
    display: block;
    background-color: #ff5c5c;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    color: white;
    font-weight: 600;
}

.boxes {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.project img, .contact img {
    width: -webkit-fill-available;
    height: 250px;
    object-fit: cover;
}

.games img {
    mix-blend-mode: multiply;
}

.project > a, .contact > a {
    text-decoration: none;
}

.project > p, .contact > p {
    padding: 10px;
}

.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: border 0.3s, transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border: 2px solid #fff;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
    user-select: none;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.arrow:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.arrow.left {
    left: 10px;
}

.arrow.right {
    right: 10px;
}

.footer {
    clear: both;
    color: #5c656d;
    text-align: center;
    padding: 30px;
    font-size: 15px;
    background-color: #1d2124;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: center;
    flex-direction: row;
    width: 80%;
    margin: auto;
    flex-wrap: wrap;
}

.contact, .shortcuts {
    font-family: "Raleway", sans-serif;
    font-size: 16px;
    text-align: left;
    float: left;
    padding: 20px 20px 0 20px;
    margin: 0 50px 0;
}

.contact i, .shortcuts i {
    font-size: 22px;
}

.contact > p > a, .shortcuts > p > a {
    padding: 5px;
    font-size: 17px;
    text-decoration: none;
    color: #CED4DA;
}

.contact-text, .shortcuts-text {
    display: flex;
    justify-content: center;
    align-items: center;
}

.socials {
    clear: both;
    padding: 10px;
}

.socials > a > img {
    width: 36px;
    height: 36px;
    margin: 15px;
}

.copyright {
    clear: both;
}

.recruitment-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #343a40;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.recruitment-section h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
}

.recruitment-status {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.recruitment-status.closed {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.recruitment-status.open {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.recruitment-status i {
    font-size: 24px;
}

.available-positions {
    margin: 30px 0;
    padding: 25px;
    background: #495057;
    border-radius: 8px;
    border-left: 5px solid #4a6fa5;
}

.available-positions h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-item {
    margin: 20px 0;
    padding: 20px;
    border-left: 4px solid #ff5c5c;
    background: #343a40;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.position-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.position-item strong {
    color: #ffffff;
    font-size: 20px;
    display: block;
    margin-bottom: 10px;
}

.position-item p {
    color: #ced4da;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.application-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: bold;
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid #495057;
    border-radius: 6px;
    background: #212529;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.3);
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

.submit-btn {
    background-color: #ff5c5c;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn:hover {
    background-color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 92, 92, 0.3);
}

.submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    border: 2px solid #c3e6cb;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    border: 2px solid #f5c6cb;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

.success-message i,
.error-message i {
    font-size: 24px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#errorText {
    font-weight: bold;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.required-asterisk {
    color: #ff5c5c;
    margin-left: 3px;
}

.form-note {
    font-size: 14px;
    color: #adb5bd;
    margin-top: 5px;
    font-style: italic;
}

@media (max-width: 1200px) {
    .articles {
        width: 20%;
    }
    
    .footer-content {
        width: 90%;
    }
    
    .contact, .shortcuts {
        margin: 0 30px;
    }
}

@media (max-width: 992px) {
    .articles {
        width: 25%;
        margin: 15px;
        padding: 20px;
    }
    
    .articleText {
        font-size: 22px;
    }
    
    .articleButton {
        padding: 15px;
        font-size: 18px;
    }
    
    .slide {
        height: 500px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact, .shortcuts {
        float: none;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu {
        justify-content: center;
        padding: 5px;
    }
    
    .logoButton {
        position: relative;
        left: 0;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .logoButtonText {
        font-size: 40px;
    }
    
    .menuButton {
        margin: 5px;
        padding: 10px;
        min-width: 45px;
        min-height: 45px;
        font-size: 18px;
    }
    
    .menuButtonAvatar {
        max-width: 45px;
        max-height: 45px;
        margin: 5px;
    }
    
    .menuButtonAvatar img {
        min-width: 45px;
        max-width: 45px;
        min-height: 45px;
        max-height: 45px;
    }
    
    .articles {
        position: relative;
        width: 90%;
        float: none;
        margin: 20px auto;
        top: 0;
    }
    
    .p-page {
        flex-direction: column;
    }
    
    .content {
        padding: 15px;
    }
    
    .slider {
        margin: 30px auto;
    }
    
    .slide {
        height: 400px;
    }
    
    .boxes {
        gap: 20px;
    }
    
    .project img, .contact img {
        height: 200px;
    }
    
    .thumbnail {
        width: 70px;
        height: 50px;
    }
    
    .arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
        line-height: 40px;
    }
    
    .profileMenu {
        top: 70px;
        right: 10px;
        width: 180px;
    }
}

@media (max-width: 576px) {
    .logoButtonText {
        font-size: 32px;
    }
    
    .logoButton img {
        width: 60px;
        height: 60px;
    }
    
    .menuButton {
        margin: 3px;
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
        font-size: 16px;
    }
    
    .menuButtonAvatar {
        max-width: 40px;
        max-height: 40px;
    }
    
    .menuButtonAvatar img {
        min-width: 40px;
        max-width: 40px;
        min-height: 40px;
        max-height: 40px;
    }
    
    .articles {
        width: 95%;
        padding: 15px;
        margin: 15px auto;
    }
    
    .articleText {
        font-size: 20px;
    }
    
    .articleButton {
        padding: 12px;
        font-size: 16px;
        margin: 8px 0;
    }
    
    .slide {
        height: 300px;
    }
    
    .speedway-article {
        padding: 15px;
    }
    
    .speedway-title {
        font-size: 20px;
    }
    
    .project img, .contact img {
        height: 150px;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
        line-height: 35px;
    }
    
    .footer {
        padding: 20px;
    }
    
    .contact, .shortcuts {
        padding: 10px;
        margin: 5px 0;
    }
    
    .socials > a > img {
        width: 30px;
        height: 30px;
        margin: 10px;
    }
    
    .profileMenu {
        width: 160px;
        padding: 10px;
        right: 5px;
    }
}

@media (max-width: 400px) {
    .logoButtonText {
        font-size: 28px;
    }
    
    .logoButton img {
        width: 50px;
        height: 50px;
    }
    
    .menuButton {
        padding: 6px;
        margin: 2px;
        font-size: 14px;
        min-width: 35px;
        min-height: 35px;
    }
    
    .slide {
        height: 250px;
    }
    
    .thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }
    
    .footer {
        padding: 15px;
        font-size: 14px;
    }
    
    .contact > p > a, .shortcuts > p > a {
        font-size: 15px;
    }
}