/* ========== СТРАНИЦА ВУЗ (VUZ.HTML) ========== */

/* Hero блок */
.hero-vuz {
    background: linear-gradient(135deg, #0A2B5B 0%, #1A4B8F 100%);
    padding: 180px 20px 100px;
    text-align: center;
    color: white;
}
.hero-vuz-container {
    max-width: 1200px;
    margin: 0 auto;
}
.hero-vuz h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 20px;
}
.hero-vuz h1 span {
    color: var(--accent-orange);
}
.hero-vuz p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
    color: rgba(255,255,255,0.85);
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}
.hero-stat i {
    font-size: 24px;
    color: var(--accent-orange);
}

/* Секция фильтров */
.filters-section {
    background: white;
    padding: 40px 20px;
    border-bottom: 1px solid #eef2f7;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.filters-container {
    max-width: 1300px;
    margin: 0 auto;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group label {
    display: block;
    font-weight: 700;
    color: var(--logo-blue);
    margin-bottom: 12px;
    font-size: 14px;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    background: #F0F4F9;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    color: #555;
}
.filter-btn:hover {
    background: #E0E8F0;
}
.filter-btn.active {
    background: var(--logo-blue);
    color: white;
}
.filter-search {
    margin-top: 20px;
}
.filter-search input {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}
.filter-search input:focus {
    border-color: var(--logo-blue);
    box-shadow: 0 0 0 3px rgba(0,86,156,0.1);
}

/* Секция программ */
.programs-section {
    padding: 60px 20px;
    background: #F5F7FB;
}
.programs-container {
    max-width: 1300px;
    margin: 0 auto;
}
.programs-header {
    text-align: center;
    margin-bottom: 40px;
}
.programs-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(28px, 4vw, 36px);
    color: var(--logo-blue);
}
.programs-header h2 span {
    color: var(--accent-orange);
}
.programs-header p {
    color: #666;
    margin-top: 10px;
}
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Карточка программы */
.program-card {
    background: white;
    border-radius: 24px;
    padding: 25px;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(0,86,156,0.15);
}
.program-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    color: white;
}
.program-badge.mti {
    background: linear-gradient(135deg, #00569C, #0078D4);
}
.program-badge.map {
    background: linear-gradient(135deg, #E67E22, #F5A623);
}
.program-icon {
    width: 55px;
    height: 55px;
    background: var(--accent-ice);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.program-icon i {
    font-size: 26px;
    color: var(--logo-blue);
}
.program-code {
    font-size: 12px;
    color: var(--accent-orange);
    font-weight: 700;
    margin-bottom: 8px;
}
.program-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--logo-blue);
    margin-bottom: 8px;
}
.program-profile {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.program-desc-preview {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 12px 0;
    padding: 0 0 12px 0;
    border-bottom: 1px solid #eee;
}
.program-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.program-form, .program-price {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
}
.program-form i, .program-price i {
    color: var(--accent-orange);
}
.program-price small {
    font-size: 11px;
    color: #999;
    font-weight: normal;
}
.program-duration {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.program-duration i {
    margin-right: 4px;
}
.program-btn {
    width: 100%;
    background: var(--accent-ice);
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-weight: 700;
    color: var(--logo-blue);
    cursor: pointer;
    transition: 0.3s;
}
.program-btn:hover {
    background: var(--logo-blue);
    color: white;
}

/* Модальное окно программы */
.program-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.program-modal-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--logo-blue);
    margin-bottom: 8px;
    font-size: 22px;
}
.program-modal-code {
    font-size: 13px;
    color: var(--accent-orange);
    font-weight: 600;
}
.program-modal-university-info {
    background: #E8F0FE;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--logo-blue);
    text-align: center;
}
.program-modal-university-info i {
    margin-right: 8px;
    color: var(--accent-orange);
}
.program-modal-profile {
    background: var(--accent-ice);
    padding: 12px 20px;
    border-radius: 30px;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--logo-blue);
}
.program-modal-description {
    margin: 20px 0;
}
.program-modal-description h4 {
    font-size: 14px;
    color: var(--logo-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.program-modal-description h4 i {
    color: var(--accent-orange);
}
.program-modal-description p {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}
.program-modal-jobs {
    margin: 20px 0;
    padding: 15px;
    background: #F0F9FF;
    border-radius: 16px;
}
.program-modal-jobs h4 {
    font-size: 14px;
    color: var(--logo-blue);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.program-modal-jobs h4 i {
    color: var(--accent-orange);
}
.jobs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.job-tag {
    background: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--logo-blue);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.program-modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #F9FAFB;
    padding: 15px;
    border-radius: 16px;
}
.info-item i {
    font-size: 20px;
    color: var(--accent-orange);
}
.info-item span {
    font-size: 12px;
    color: #888;
}
.info-item strong {
    font-size: 16px;
    color: var(--logo-blue);
}
.info-item small {
    font-size: 11px;
    color: #999;
}
.program-modal-note {
    background: #FFF8E7;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #B8860B;
    margin-bottom: 25px;
}

/* КНОПКИ В МОДАЛЬНОМ ОКНЕ */
.program-modal-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.program-modal-actions .btn-accent,
.program-modal-actions .btn-outline {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    border-radius: 50px !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.program-modal-actions .btn-accent {
    background: var(--btn-accent) !important;
    color: white !important;
    border: none !important;
}

.program-modal-actions .btn-accent:hover {
    background: var(--accent-orange) !important;
}

.program-modal-actions .btn-outline {
    background: transparent !important;
    border: 2px solid var(--logo-blue) !important;
    color: var(--logo-blue) !important;
}

.program-modal-actions .btn-outline:hover {
    background: var(--logo-blue) !important;
    color: white !important;
}

/* Преимущества */
.vuz-advantages {
    padding: 80px 20px;
    background: white;
}
.vuz-advantages-container {
    max-width: 1200px;
    margin: 0 auto;
}
.advantages-grid-vuz {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.advantage-vuz-card {
    text-align: center;
    padding: 30px 20px;
    background: #F9FAFB;
    border-radius: 24px;
    transition: 0.3s;
}
.advantage-vuz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}
.advantage-vuz-card i {
    font-size: 44px;
    color: var(--accent-orange);
    margin-bottom: 20px;
}
.advantage-vuz-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--logo-blue);
    margin-bottom: 12px;
}
.advantage-vuz-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* FAQ для ВУЗ */
.faq-vuz {
    padding: 80px 20px;
    background: #F5F7FB;
}
.faq-vuz .faq-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Нет результатов */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 24px;
}
.no-results i {
    font-size: 48px;
    color: var(--accent-orange);
    margin-bottom: 20px;
}
.no-results h3 {
    font-size: 22px;
    color: var(--logo-blue);
    margin-bottom: 10px;
}
.no-results p {
    color: #888;
}

.loading-spinner {
    text-align: center;
    padding: 60px;
    font-size: 18px;
    color: var(--logo-blue);
}
.loading-spinner i {
    margin-right: 10px;
}

/* ========== МОДАЛЬНОЕ ОКНО ДЛЯ ВСЕХ УСТРОЙСТВ ========== */

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 43, 91, 0.85);
    backdrop-filter: blur(8px);
}

.modal-program {
    max-width: 500px !important;
    width: 100%;
    margin: 0 auto !important;
    border-radius: 24px 0 0 24px  !important;
    padding: 30px 25px 40px !important;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: white;
    position: relative;
}

/* Кастомизация скроллбара - аккуратная, не выходит за край */
.modal-program {
    scrollbar-width: thin;
    scrollbar-color: var(--logo-blue) #f1f1f1;
}

.modal-program::-webkit-scrollbar {
    width: 4px;
}

.modal-program::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 8px 0;
}

.modal-program::-webkit-scrollbar-thumb {
    background: var(--logo-blue);
    border-radius: 4px;
}

.modal-program::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

.modal-program .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
    background: transparent;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-program .close-modal:hover {
    color: var(--accent-orange);
}

/* Анимация */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-program {
    animation: fadeIn 0.2s ease-out;
}

/* Для мобильных */
@media (max-width: 768px) {
    .modal-overlay.active {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-program {
        max-width: 100% !important;
        border-radius: 30px 30px 0 0 !important;
        max-height: 85vh;
        animation: slideUp 0.3s ease-out;
    }
    
    .modal-program .close-modal {
        top: 15px;
        right: 20px;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .filters-section {
        padding: 30px 15px;
    }
    .filter-buttons {
        gap: 8px;
    }
    .filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    .programs-grid {
        grid-template-columns: 1fr;
    }
    .advantages-grid-vuz {
        grid-template-columns: 1fr;
    }
    .program-modal-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .info-item {
        padding: 16px 18px;
    }
    .info-item i {
        font-size: 24px;
    }
    .info-item span {
        font-size: 13px;
    }
    .info-item strong {
        font-size: 20px;
    }
    .info-item small {
        font-size: 14px;
    }
    .program-modal-description p {
        font-size: 16px;
    }
    .job-tag {
        font-size: 14px;
        padding: 8px 16px;
    }
    .program-modal-profile {
        font-size: 16px;
        padding: 14px 20px;
    }
    .program-modal-header h2 {
        font-size: 22px;
    }
    .hero-stats {
        gap: 20px;
    }
    .hero-stat {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-program {
        padding: 20px 15px 30px !important;
    }
    .program-modal-header h2 {
        font-size: 20px;
    }
    .program-modal-code {
        font-size: 12px;
    }
    .program-modal-university-info {
        font-size: 14px;
        padding: 12px 14px;
    }
    .program-modal-profile {
        font-size: 15px;
        padding: 12px 16px;
    }
    .info-item {
        padding: 14px 16px;
    }
    .info-item i {
        font-size: 22px;
    }
    .info-item span {
        font-size: 12px;
    }
    .info-item strong {
        font-size: 18px;
    }
    .info-item small {
        font-size: 13px;
    }
    .program-modal-description p {
        font-size: 15px;
    }
    .job-tag {
        font-size: 13px;
        padding: 6px 14px;
    }
    .program-modal-actions .btn-accent,
    .program-modal-actions .btn-outline {
        padding: 12px 18px !important;
        font-size: 14px !important;
    }
}

/* ========== ВСПЛЫВАЮЩЕЕ ОКНО ДЛЯ ТЕСТА ========== */
.test-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.test-popup-overlay.show {
    opacity: 1;
}
.test-popup-container {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F7FF 100%);
    border-radius: 32px;
    padding: 35px 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    animation: popupSlideIn 0.4s ease-out;
}
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.test-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: 0.3s;
}
.test-popup-close:hover {
    color: var(--accent-orange, #F5A623);
}
.test-popup-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #F5A623, #FFD166);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.test-popup-icon i {
    font-size: 36px;
    color: #00569C;
}
.test-popup-container h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--logo-blue, #00569C);
    margin-bottom: 12px;
}
.test-popup-container p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 25px;
}
.test-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* СИНЯЯ КНОПКА "ПРОЙТИ ТЕСТ" */
.test-popup-btn-primary {
    background: var(--logo-blue, #00569C);
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 16px;
    border: none;
    cursor: pointer;
}
.test-popup-btn-primary:hover {
    background: #003d6b;
    transform: translateY(-2px);
}

/* БЕЛАЯ КНОПКА "ПРОДОЛЖИТЬ ПОИСК" (с обводкой) */
.test-popup-btn-secondary {
    background: white;
    border: 2px solid #ddd;
    color: #888;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}
.test-popup-btn-secondary:hover {
    border-color: var(--logo-blue, #00569C);
    color: var(--logo-blue, #00569C);
}

.test-popup-timer {
    font-size: 12px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.test-popup-timer i {
    color: var(--accent-orange, #F5A623);
}

/* Адаптив */
@media (max-width: 480px) {
    .test-popup-container {
        padding: 25px 20px;
        width: 95%;
    }
    .test-popup-container h3 {
        font-size: 18px;
    }
    .test-popup-container p {
        font-size: 14px;
    }
    .test-popup-icon {
        width: 55px;
        height: 55px;
    }
    .test-popup-icon i {
        font-size: 28px;
    }
}