html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f2f2f2;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-right: 350px;
    position: relative;
}

:root {
    --primary: #037ac1;
    --secondary: rgb(0, 94, 148);
    --text: #1f2937;
    --background: #f8fafc;
    --success: #22c55e;
    --border: #e2e8f0;
    --speciality-bg: #f1f5f9;
}

.main-header {
    background: #037ac1;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1100;
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
}
.logo_img {
        height: 40px;
    }

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav-list a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-list a:hover {
    opacity: 0.8;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.main-page {
    width: 350px;
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    background: rgb(255, 255, 255);
    color: rgb(107, 107, 107);
    padding: 0 0 30px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    /* Добавлено */
    flex-direction: column;
}

#region {
    padding: 0 20px;
    /* margin-bottom: 15px; */
    position: relative;
    z-index: 1;
    overflow: hidden;
    flex-shrink: 0;
}

#region select {
    width: 100%;
    padding: 10px 15px;
    background: rgb(255, 255, 255);
    color: rgb(107, 107, 107);
    border: 1px solid #40556b;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b6b6b'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
}

.city-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 20px 30px 20px;
    flex: 1;
    /* Добавлено */
    overflow-y: auto;
}

.city-list::-webkit-scrollbar {
    width: 8px;
}

.city-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.city-list::-webkit-scrollbar-thumb {
    background: #037ac1;
    border-radius: 4px;
}

.city-list::-webkit-scrollbar-thumb:hover {
    background: rgb(0, 94, 148);
}

.city-link {
    display: block;
    padding: 12px 15px;
    color: rgb(107, 107, 107);
    text-decoration: none;
    border: 1px solid grey;
    transition: all 0.2s ease;
    font-size: 14px;
    border-radius: 4px;
    line-height: normal;
}

.city-link:hover {
    background: #037ac1;
    color: #fff;
    transform: translateX(5px);
}

.city-link.active {
    background: #037ac1;
    font-weight: 500;
    color: white;
}

.content-wrapper {
    flex: 1;
    padding: 20px;
}

.vacancies-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
}

.vacancy-card {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    width: 750px;
}

.single .vacancy-card {
    height: 100%;
}

.vacancy-header {
    display: grid;
    grid-template-areas: "title date";
    align-items: start;
    margin: 1rem 0 1rem 0;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.vacancy-title {
    grid-area: title;
    font-size: 2rem;
    color: var(--text);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.vacancy-date {
    grid-area: date;
    color: #64748b;
    font-size: 0.9rem;
    white-space: nowrap;
    text-align: right;
}

.vacancy-local {
    color: #64748b;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-right: 0px;
    line-height: 1.5;
    text-align: end;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.detail-section p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.vacancy-chart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.vacancy-actions {
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(37, 100, 235, 0.14);
}

.vacancy-salary {
    margin: 0.5rem auto;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.salary-discussed {
    font-weight: 600;
    color: #64748b;
    font-style: italic;
    width: 100%;
    text-align: center;
}

.salary-text {
    font-weight: 600;
    color: #22c55e;
    width: 100%;
    text-align: center;
}

.salary-range-separator {
    margin: 0 5px;
    color: #94a3b8;
}

.icon {
    width: 18px;
    height: 18px;
}

.vacancy-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vacancy-detail h1 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #718096;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #037ac1;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    padding: 0;
    list-style: none;
}

.pagination-item {
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: white;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-link.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: white;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.pagination-arrow:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-arrow svg {
    width: 20px;
    height: 20px;
}

.pagination-dots {
    display: inline-block;
    padding: 8px 12px;
    color: #666;
}

.main-footer {
    background-color: rgb(138, 141, 143);
    color: #ecf0f1;
    padding: 30px 0 20px;
    margin-top: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-top: 6px solid #037ac1;
}

.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-footer #copyright {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #bdc3c7;
}

.main-footer a {
    color: rgb(255, 255, 255);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
    position: relative;
    padding: 0 5px;
}

.main-footer a:hover {
    color: #037ac1;
}

.main-footer a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 5px;
    width: calc(100% - 10px);
    height: 1px;
    background-color: #037ac1;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-footer a:hover::after {
    transform: scaleX(1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.overlay.active {
    display: block;
}

.feedback {
    max-width: 350px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    height: 100%;
    box-sizing: border-box;
}

.feedback label {
    display: block;
    margin: 15px 0 5px;
    font-size: 14px;
    color: #333;
}

.feedback label b {
    color: #e74c3c;
}

.feedback input[type="text"],
.feedback input[type="email"],
.feedback input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.feedback input[type="text"]:focus,
.feedback input[type="email"]:focus,
.feedback input[type="tel"]:focus {
    outline: none;
    border-color: #037ac1;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.file {
    margin: 15px 0;
    font-size: 14px;
}

.file input[type="file"] {
    margin-top: 5px;
    width: 100%;
}

.file small {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.feedback label[for="check"] {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    font-size: 12px;
    line-height: 1.4;
}

.feedback label[for="check"] input {
    margin-right: 8px;
    margin-top: 3px;
}

.feedback a {
    color: #037ac1;
    text-decoration: none;
}

.feedback a:hover {
    text-decoration: underline;
}

.feedback>div:last-child {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    text-align: right;
}

.single {
    display: grid;
    grid-template-columns: auto auto;
    grid-auto-rows: 1fr;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ui-dialog {
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.ui-dialog span {
    text-align: start;
}

.message {
    font-size: large;
    line-height: 1.5;
}

.ui-dialog-titlebar {
    background: #037ac1;
    color: white;
    border: none;
}

.ui-dialog-content {
    padding: 20px !important;
    font-size: 14px;
}

.ui-button {
    background: #037ac1 !important;
    border-color: #037ac1 !important;
    color: white !important;
    padding: 8px 16px !important;
    transition: background 0.3s !important;
}

.ui-button:hover {
    background: var(--secondary) !important;
}

.ui-autocomplete-input {
    background-color: #fff !important;
    cursor: text !important;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.ui-menu-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.ui-menu-item:hover {
    background: #f8f9fa;
    cursor: pointer;
}

#respond {
    cursor: pointer;
}

.btn.processing {
    cursor: not-allowed;
    opacity: 0.7;
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.main-content {
    margin: auto;
    width: 75%;
    align-content: center;
    flex: 1 0 auto;
}

.main-content h2 {
    text-align: center;
}

.main-content p {
    text-align: justify;
    text-indent: 25px;
}

.error-page {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.error-code {
    font-size: 120px;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.error-message {
    font-size: 24px;
    color: #7f8c8d;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.6s forwards;
}

.btn-404 {
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.error-image {
    margin: 20px auto;
    max-width: 250px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.9s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contacts-container {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-card {
    margin: 10px auto 30px auto;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

p i {
    color: rgb(1, 67, 105);
}

.contact-title {
    color: rgb(50, 78, 107);
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.contact-info p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.contact-phone,
.contact-address {
    color: #2980b9;
}

.contact-email a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #3498db;
    text-decoration: underline;
}

.icon {
    margin-right: 10px;
    font-size: 1.2em;
    vertical-align: middle;
}

@media (max-width: 768px) {
    body {
        padding-right: 0;
    }

    .logo_img {
        height: 20px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-page {
        width: 100%;
        transform: translateX(100%);
        z-index: 1001;
        top: 95px;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.5);
        height: calc(100vh - 95px);
    }

    .main-page.active {
        transform: translateX(0);
    }

    .nav-list {
        display: none;
    }

    #region {
        margin-top: 15px;
    }

    #region select {
        font-size: 16px;
        padding: 12px 15px;
    }

    .vacancies-list {
        width: 100%;
        margin: 3rem 0 3rem 0;
        padding: 0 10px 0 10px;
        box-sizing: border-box;
    }

    .vacancy-header {
        grid-template-areas:
            "date"
            "title";
    }

    .vacancy-title {
        text-align: left;
        font-size: 1.7rem;
    }

    .vacancy-date {
        text-align: right;
        margin: .5rem 0 .5rem 0;
    }


    .vacancy-actions {
        flex-direction: column;
        gap: 8px;
    }

    .vacancy-card {
        padding: 1rem;
        margin: 0 0 2rem 0;
        width: 100%;
        box-sizing: border-box;
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    }

    .vacancy-local {
        display: flex;
        justify-content: end;
        text-align: end;
        color: #64748b;
        font-size: small;
        white-space: wrap;
        margin-right: 0px;
        margin-bottom: 10px;
    }

    .vacancy-details {
        width: 100%;
    }

    .vacancy-salary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        margin-bottom: 1rem;
    }

    .city-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .city-link {
        padding: 8px 12px;
    }

    .feedback {
        width: 100%;
        max-width: none;
        padding: 15px;
        box-sizing: border-box;
    }

    .single {
        width: 100%;
        display: grid;
        grid-template-columns: auto;
        grid-template-rows: auto auto;
        gap: 10px;
        grid-auto-flow: column;
    }

    .main-footer {
        padding: 20px 0;
    }

    .main-footer #copyright {
        font-size: 12px;
        line-height: 1.5;
    }

    .main-footer a {
        display: block;
        margin: 8px 0;
        padding: 0;
    }

    .main-footer a::after {
        left: 0;
        width: 100%;
    }

    .main-content {
        width: 90%;
    }

    .error-page {
        padding: 20px;
        margin: 30px 15px;
    }

    .error-code {
        font-size: 80px;
    }

    .error-message {
        font-size: 18px;
    }

    .error-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-404 {
        width: 100%;
        justify-content: center;
    }

    .contacts-container {
        padding: 15px;
    }

    .contact-card {
        padding: 20px;
    }
}

