.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    position: relative;
}

h1 {
    margin: 0;
    color: #0055a5;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.calcspo__content {
    margin: 0 auto;
    padding-bottom: 50px;
}

.subtitle {
    color: #424242;
    margin-top: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.product-tagline {
    display: inline-block;
    background: #e3f2fd;
    color: #0055a5;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    margin: 15px 0;
    border: 2px solid #bbdefb;
    font-size: 1rem;
}

.header-content {
    margin-bottom: 10px;
}

.instruction-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.instruction-btn {
    background-color: #0055a5;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.instruction-btn:hover {
    background-color: #003d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.instruction-btn i {
    margin-right: 8px;
    font-weight: bold;
}

.instruction-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #0055a5;
    display: none;
}

.instruction-panel h3 {
    color: #0055a5;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.2rem;
}

.instruction-steps {
    counter-reset: step;
    margin-bottom: 12px;
}

.step {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    font-size: 0.95rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    background: #0055a5;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.important-note {
    background: rgba(255, 193, 7, 0.15);
    border-left: 4px solid #ffc107;
    padding: 10px;
    border-radius: 0 5px 5px 0;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* СЕКЦИЯ ПОИСКА СПЕЦИАЛЬНОСТИ */
.search-section {
    margin-bottom: 20px;
}

.section-title {
    color: #0055a5;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    font-weight: bold;
}

.input-container {
    background-color: #f5f9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #bbdefb;
    transition: all 0.3s;
}

.input-container:focus-within {
    border-color: #0055a5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.input-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #0055a5;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.input-with-icon {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', sans-serif;
    border: 1px solid #90caf9;
    border-radius: 5px;
    background: white;
    color: #333;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.input-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.hint-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.hint-badge {
    background: #e3f2fd;
    color: #0055a5;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #bbdefb;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.hint-badge:hover {
    background: #d0e7ff;
    border-color: #0055a5;
    transform: translateY(-1px);
}

/* СПИННЕР ЗАГРУЗКИ */
.spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner.active {
    display: block;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 4px solid #e3f2fd;
    border-top-color: #0055a5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* СПИСОК СПЕЦИАЛЬНОСТЕЙ */
.specialties-container {
    display: none;
    margin-top: 15px;
}

.specialties-container.active {
    display: block;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.specialty-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.specialty-card:hover {
    border-color: #0055a5;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.specialty-card.selected {
    border-color: #0055a5;
    background: #e3f2fd;
}

.specialty-card.selected::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: #0055a5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.specialty-code {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0055a5;
    margin-bottom: 4px;
}

.specialty-name {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.specialty-year {
    font-size: 0.8rem;
    color: #666;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}

.specialty-directions-count {
    font-size: 0.8rem;
    color: #666;
    background: #f0f7ff;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 5px;
    border: 1px dashed #bbdefb;
}

/* ИНФОРМАЦИОННЫЙ БАННЕР */
.info-banner {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    display: none;
}

.info-banner.active {
    display: block;
    min-height: fit-content;
}

.info-banner i {
    color: #4caf50;
    font-size: 16px;
}

.info-banner.error {
    background-color: #fee;
    border-left-color: #f44336;
}

.info-banner.success {
    background-color: #e8f5e9;
    border-left-color: #4caf50;
    color: #2e7d32;
}

.info-title {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.info-text {
    color: #424242;
    font-size: 0.9rem;
}

/* КНОПКИ */
.btn-container {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    background-color: #0055a5;
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: none;
}

.btn:hover {
    background-color: #003d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn.visible {
    display: inline-block;
}

.reset-btn {
    background-color: #6c757d;
}

.reset-btn:hover {
    background-color: #5a6268;
}

/* РЕЗУЛЬТАТЫ */
.results-section {
    margin-top: 25px;
    display: none;
}

.results-section.active {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3f2fd;
    margin-bottom: 15px;
}

.results-title {
    font-size: 1.3rem;
    color: #0055a5;
    margin: 0;
}

.results-count {
    background-color: #e3f2fd;
    color: #0055a5;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.programs-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* КАРТОЧКИ НАПРАВЛЕНИЙ - компактный вариант */
.program-item {
    background: white;
    border-left: 4px solid #0055a5;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
}

.program-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left-color: #003d7a;
}

.program-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.program-code-name {
    flex: 1;
}

.program-code {
    font-weight: bold;
    color: #0055a5;
    font-size: 1rem;
    margin-bottom: 4px;
}

.program-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 4px 0;
    color: #003d7a;
}

.program-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 8px;
}

.badge-without-ege {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.badge-with-ege {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.program-description {
    margin: 12px 0;
    line-height: 1.4;
    color: #444;
    padding: 8px 0;
    border-top: 1px dashed #e0e0e0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 0.95rem;
}

/* КОМПАКТНЫЕ ТРЕБОВАНИЯ В ОДНУ СТРОКУ */
.program-requirements {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.requirements-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.requirements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.requirement-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #444;
    white-space: nowrap;
    border: 1px solid #e0e0e0;
}

.requirement-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.requirement-icon.passed {
    background: #4caf50;
    color: white;
}

.requirement-icon.not-passed {
    background: #ffebee;
    color: #f44336;
}

/* КНОПКИ ДЕЙСТВИЙ */
.program-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.action-btn.primary {
    background: linear-gradient(135deg, #0055a5 0%, #003d7a 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* НЕТ РЕЗУЛЬТАТОВ */
.no-results {
    text-align: center;
    padding: 30px 25px;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 50px;
    color: #666;
    margin-bottom: 15px;
}

.no-results h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 8px;
}

.no-results p {
    color: #666;
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* ФОРМА КОНТАКТОВ */
.contact-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    margin: 20px 0;
    display: none;
}

.contact-form .form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s;
    margin-bottom: 12px;
}

.contact-form .form-input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.95rem;
}

.required-field::after {
    content: " *";
    color: #dc3545;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.consent-checkbox input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
}

.success-banner {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.view-results-btn {
    background-color: transparent !important;
    color: #0055a5 !important;
    border: 2px solid #0055a5 !important;
}

.view-results-btn:hover {
    background-color: #0055a5 !important;
    color: white !important;
}

/* НОВАЯ КНОПКА "ОТПРАВИТЬ" */
.send-btn {
    background-color: #28a745 !important;
    color: white !important;
    border: 2px solid #28a745 !important;
}

.send-btn:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .contact-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* НОВАЯ КНОПКА ДЛЯ ВОЗВРАТА К ФОРМЕ */
.back-to-form-btn {
    background-color: #ff9800 !important;
    color: white !important;
    border: 2px solid #ff9800 !important;
}

.back-to-form-btn:hover {
    background-color: #f57c00 !important;
    border-color: #f57c00 !important;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* СООБЩЕНИЯ ОБ ОШИБКАХ И УСПЕХЕ */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

.success-message {
    color: #28a745;
    background: #d4edda;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .specialties-grid {
        grid-template-columns: 1fr;
        max-height: 250px;
    }

    .program-header {
        flex-direction: column;
        gap: 8px;
    }

    .program-requirements {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .requirements-list {
        width: 100%;
    }

    .program-actions {
        flex-direction: column;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .input-hints {
        flex-direction: column;
        align-items: flex-start;
    }

    .instruction-container {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }

    .product-tagline {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .instruction-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .btn {
        padding: 8px 20px;
        font-size: 15px;
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0055a5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003d7a;
}

/* УТИЛИТЫ */
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.hidden { display: none; }
.text-center { text-align: center; }