/* RESET & БАЗА */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fefefe;
    color: #111;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ШАПКА */
.header {
    background: #fff;
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

/* НАВИГАЦИЯ */
.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav__link {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 1rem;
}

.nav__link:hover {
    color: #2A7DE1;
}

/* Адаптив для навигации */
@media (max-width: 768px) {
    .header__container {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav {
        gap: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav__link {
        font-size: 0.95rem;
    }
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1E3A8A, #2A7DE1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

/* КНОПКИ */
.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.2s ease;
    text-align: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn--small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background: #111;
    color: white;
}

.btn--small:hover {
    background: #2A7DE1;
    transform: scale(0.97);
}

.btn--telegram {
    background: #0088cc;
    color: white;
}

.btn--large {
    padding: 14px 36px;
    font-size: 1.1rem;
}

.btn--primary {
    background: #2A7DE1;
    color: white;
    box-shadow: 0 4px 12px rgba(42, 125, 225, 0.25);
}

.btn--primary:hover {
    background: #1E5EB0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 125, 225, 0.3);
}

/* HERO */
.hero {
    padding: 60px 0 48px;
    text-align: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.hero__title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 900px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #111, #1f3b6e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: #3a4a66;
    margin-bottom: 32px;
    font-weight: 400;
}

/* ФИЛЬТРЫ */
.filters-section {
    padding: 16px 0 24px;
    background: white;
    border-bottom: 1px solid #ebeff4;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-chip {
    background: #f1f5f9;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    font-family: inherit;
}

.filter-chip:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.filter-chip.active {
    background: #2A7DE1;
    color: white;
    box-shadow: 0 2px 8px rgba(42, 125, 225, 0.3);
}

/* СЕТКА КАРТОЧЕК */
.offers {
    padding: 48px 0 64px;
}

.offers__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* КАРТОЧКА */
.offer-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
    border-color: #cbdff2;
}

.offer-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.offer-salary {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2A7DE1;
    margin-bottom: 12px;
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #4b5565;
    border-bottom: 1px dashed #eef2f8;
    padding-bottom: 12px;
}

.offer-type, .offer-location {
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
}

.offer-desc {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 20px;
    line-height: 1.45;
    flex: 1;
}

/* БАННЕР В КАРТОЧКЕ */
.offer-banner {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f9f3e6, #fff6e8);
    border-radius: 16px;
    padding: 12px;
}

.offer-banner img {
    max-width: 100%;
    border-radius: 12px;
}

/* КНОПКА ПОДРОБНЕЕ */
.offer-details-btn {
    display: inline-block;
    background: #2A7DE1;
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 40px;
    font-weight: 600;
    text-align: center;
    transition: 0.2s;
    margin-top: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    width: 100%;
}

.offer-details-btn:hover {
    background: #1E5EB0;
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #3a6ea5;
    grid-column: 1 / -1;
}

/* ПОДВАЛ */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 32px 0;
    margin-top: 20px;
}

.footer__container {
    text-align: center;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px dotted;
}

.footer a:hover {
    color: white;
}

.footer__disclaimer {
    font-size: 0.75rem;
    margin-top: 16px;
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal__content {
    background: white;
    border-radius: 28px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal__close {
    position: sticky;
    top: 12px;
    right: 20px;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 12px 16px 0 0;
    transition: 0.2s;
}

.modal__close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.modal__body {
    padding: 24px 28px 32px;
    clear: both;
}

.modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111;
}

.modal__salary {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2A7DE1;
    margin-bottom: 20px;
}

.modal__description {
    color: #2c3e50;
    line-height: 1.6;
}

.modal__description h4 {
    margin: 20px 0 12px 0;
    font-size: 1.2rem;
    color: #1e2a3a;
}

.modal__description ul {
    margin: 8px 0 16px 20px;
}

.modal__description li {
    margin: 8px 0;
}

.modal__apply-btn {
    display: inline-block;
    background: #2A7DE1;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 700;
    margin-top: 24px;
    text-align: center;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.modal__apply-btn:hover {
    background: #1E5EB0;
    transform: translateY(-2px);
}

/* АДАПТИВ */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .offers__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header__container {
        flex-direction: column;
    }
    
    .filters {
        gap: 8px;
    }
    
    .filter-chip {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.7rem;
    }
    
    .btn--large {
        padding: 12px 24px;
    }

    .modal__body {
        padding: 20px;
    }
    
    .modal__title {
        font-size: 1.4rem;
    }
}

/* ПАГИНАЦИЯ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination__btn {
    background: #f1f5f9;
    border: none;
    padding: 10px 18px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1e293b;
}

.pagination__btn:hover:not(:disabled) {
    background: #2A7DE1;
    color: white;
    transform: translateY(-2px);
}

.pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination__pages {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination__page {
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1e293b;
}

.pagination__page:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.pagination__page.active {
    background: #2A7DE1;
    color: white;
    box-shadow: 0 2px 8px rgba(42, 125, 225, 0.3);
}

.pagination__info {
    font-size: 0.85rem;
    color: #64748b;
    margin-left: 16px;
}

@media (max-width: 640px) {
    .pagination {
        gap: 8px;
    }
    
    .pagination__btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .pagination__page {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}