/* Основные стили для реестра инструкторов */
.kaskad-instructors-container,
.kaskad-check-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Roboto', sans-serif;
}

/* Заголовки */
.instructors-header,
.check-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1b65ca;
}

.instructors-header h1,
.check-header h1 {
    color: #1b65ca;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 32px;
    margin-bottom: 10px;
}

.instructors-header p,
.check-header p {
    color: #666;
    font-size: 18px;
}

/* Поиск и фильтры */
.search-section {
    background: #f3f7fc;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #1b65ca;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #1557b0;
    box-shadow: 0 0 0 3px rgba(27, 101, 202, 0.1);
}

.search-button {
    padding: 12px 30px;
    background: #1b65ca;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #1557b0;
}

.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

/* Карточки инструкторов */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.instructor-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.instructor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Заголовок карточки */
.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 10px 0 8px;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    width: 100%;
    line-height: 1.3;
}

/* Фото инструктора */
.instructor-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #1b65ca;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.instructor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Статус бейдж */
.status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-expired {
    background: #ffebee;
    color: #c62828;
}

.status-valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-invalid {
    background: #ffebee;
    color: #c62828;
}

/* Тело карточки */
.card-body {
    margin-bottom: 20px;
    flex: 1;
}

/* Строки в карточке */
.card-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
    line-height: 1.4;
}

.card-row .label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    flex-shrink: 0;
    font-size: 14px;
}

.card-row .value {
    color: #333;
    word-break: break-word;
    font-size: 14px;
    flex: 1;
}

.card-row .value.certificate-value {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
}

.card-row .value.expired {
    color: #c62828;
    font-weight: 500;
}

.card-row .value[title] {
    cursor: help;
    border-bottom: 1px dotted #999;
}

/* Подвал карточки */
.card-footer {
    text-align: right;
    margin-top: auto;
}

.check-button {
    display: inline-block;
    padding: 10px 20px;
    background: #1b65ca;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.check-button:hover {
    background: #1557b0;
    color: white;
    text-decoration: none;
}

.check-button.secondary {
    background: #6c757d;
}

.check-button.secondary:hover {
    background: #545b62;
}

/* Форма проверки */
.check-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.check-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #1b65ca;
    border-radius: 4px;
    font-size: 16px;
}

.alternative-search {
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.alternative-search p {
    font-weight: 600;
    margin-bottom: 15px;
    color: #555;
}

.name-results {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
}

/* Результат проверки */
.check-result {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.check-result.valid {
    border-left: 5px solid #4CAF50;
}

.check-result.invalid {
    border-left: 5px solid #f44336;
}

.check-result.not-found {
    border-left: 5px solid #ff9800;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.result-header h2 {
    margin: 0;
    font-size: 24px;
}

.result-timestamp {
    color: #666;
    font-size: 14px;
}

.result-body h3 {
    font-size: 28px;
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Профиль инструктора в детальном просмотре */
.instructor-profile {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.instructor-photo-large {
    width: 200px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #1b65ca;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.instructor-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-info {
    flex: 1;
}

/* Детали в результатах проверки */
.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.detail-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-size: 16px;
    word-break: break-word;
}

.detail-value.expired {
    color: #c62828;
    font-weight: 500;
}

.detail-value .status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
}

/* Полное удостоверение */
.detail-row .certificate-full {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-top: 5px;
    color: #333;
}

.expired-note {
    font-size: 12px;
    color: #c62828;
    margin-left: 5px;
}

/* Секция договора */
.contract-section {
    margin-top: 25px;
    padding: 0;
    background: transparent;
    border-left: none;
}

.contract-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.contract-section p {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.contract-section .action-button {
    display: inline-block;
    padding: 8px 16px;
    background: #1b65ca;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s;
    border: none;
}

.contract-section .action-button:hover {
    background: #1557b0;
    color: white;
    text-decoration: none;
}

/* Подвал результатов */
.result-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-button {
    padding: 12px 25px;
    background: #1b65ca;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.action-button:hover {
    background: #1557b0;
    color: white;
}

.action-button.secondary {
    background: #6c757d;
}

.action-button.secondary:hover {
    background: #545b62;
}

/* Информационные блоки */
.instructors-info,
.check-info {
    background: #f3f7fc;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.instructors-info h3,
.check-info h3 {
    color: #1b65ca;
    margin-top: 0;
    margin-bottom: 15px;
}

.instructors-info ol,
.check-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.instructors-info li,
.check-info li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.important-note,
.legal-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.important-note p,
.legal-notice p {
    margin: 0;
    color: #856404;
}

/* Кнопка возврата */
.back-to-register-button {
    display: inline-block;
    padding: 10px 20px;
    background: #f0f0f1;
    color: #2271b1;
    text-decoration: none;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-register-button:hover {
    background: #e0e0e0;
    color: #135e96;
    border-color: #6c757d;
    text-decoration: none;
}

/* Сообщения */
.loading-message,
.loading,
.no-results,
.error-message,
.error {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.no-results {
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.error-message,
.error {
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
    padding: 20px;
}

/* Стили для подсказок */
[title] {
    cursor: help;
}

/* Адаптивность */
@media (max-width: 768px) {
    .kaskad-instructors-container,
    .kaskad-check-container {
        padding: 15px;
    }
    
    .instructors-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box,
    .input-group {
        flex-direction: column;
    }
    
    .search-button,
    .check-button {
        width: 100%;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .card-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-row .label {
        margin-bottom: 5px;
        min-width: auto;
        width: 100%;
    }
    
    .card-row .value {
        width: 100%;
    }
    
    .card-row .value.certificate-value {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
	}
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        text-align: center;
    }
    
    .instructor-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .instructor-photo-large {
        margin: 0 auto;
        width: 150px;
        height: 200px;
    }
    
    .instructor-card .instructor-photo {
        width: 80px;
        height: 80px;
    }
    
    .contract-section .action-button {
        display: block;
        text-align: center;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
}