/* Общие сбросы и шрифты */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: #f4f7fc;
    padding: 30px 15px;
    color: #1a2634;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    padding: 40px 45px;
    box-shadow: 0 20px 60px rgba(0, 20, 40, 0.08);
}

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #0b2b40;
}
h1 + p {
    color: #5e6f7e;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Секции формы */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eef2f7;
}
.form-section:last-of-type {
    border-bottom: none;
}
.form-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #005a8c;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}
.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #1e3b4f;
}
.form-group input, 
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    font-size: 15px;
    transition: 0.2s;
    background: #fafcff;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #0077be;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.15);
}
.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.hint {
    font-size: 14px;
    color: #6f7d8b;
    margin-bottom: 14px;
}

/* Блок кейса (добавляется динамически) */
.case-item {
    background: #f8fafd;
    border-radius: 16px;
    padding: 18px 20px 20px 20px;
    margin-bottom: 18px;
    border: 1px solid #e2e9f2;
    display: block;
}

.case-item .case-title {
    font-weight: 600;
    color: #003f66;
    margin-bottom: 4px;
}

.case-item input, 
.case-item textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d9e3;
    border-radius: 8px;
    font-size: 14px;
}

.case-item .file-label {
    font-size: 13px;
    color: #3c5a70;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-item .file-label input {
    padding: 6px 0;
}

.case-item .remove-case {
    justify-self: end;
    background: none;
    border: none;
    color: #b91c1c;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: 0.2s;
    padding: 6px 12px;
}

.case-item .remove-case:hover {
    opacity: 1;
    background: #fee8e8;
    border-radius: 8px;
}

/* Блок фото внутри кейса */
.case-photo-block {
    width: 100%;
    box-sizing: border-box;
}

.case-photo-block .photo-name,
.case-photo-block .photo-desc {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.photos-container {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Кнопки */
.btn-secondary {
    background: #e7edf5;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    color: #004a73;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
}
.btn-secondary:hover {
    background: #d0ddea;
}

.btn-primary {
    background: #0077be;
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 18px;
    transition: 0.2s;
    box-shadow: 0 6px 20px rgba(0, 119, 190, 0.25);
}
.btn-primary:hover {
    background: #005f99;
    transform: scale(1.01);
    box-shadow: 0 8px 28px rgba(0, 119, 190, 0.35);
}

/* Адаптив */
@media (max-width: 600px) {
    .container { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
}

/* Подразделы в форме */
.sub-section {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #f8fafd;
    border-radius: 12px;
    border: 1px solid #eef2f7;
}

.sub-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #005a8c;
    margin-bottom: 12px;
    border-bottom: 2px solid #dce8f0;
    padding-bottom: 6px;
}

/* Блок курса (добавляется динамически) */
.course-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #e2e9f2;
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px 15px;
    align-items: end;
}

.course-item .course-title {
    font-weight: 500;
    color: #003f66;
    grid-column: 1 / -1;
    font-size: 13px;
    margin-bottom: 2px;
}

.course-item .remove-course {
    background: none;
    border: none;
    color: #b91c1c;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
    align-self: center;
}

.course-item .remove-course:hover {
    background: #fee8e8;
}

@media (max-width: 600px) {
    .course-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* --- НАВЫКИ --- */
.skill-group {
    background: #ffffff;
    border: 1px solid #dce8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.skill-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f4f8fe;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.skill-group-header:hover {
    background: #e8f0fa;
}

.skill-group-header .group-title {
    font-weight: 600;
    color: #003f66;
    font-size: 15px;
    border: none;
    background: transparent;
    flex: 1;
    padding: 4px 0;
}

.skill-group-header .group-title:focus {
    outline: none;
}

.skill-group-header .group-toggle {
    font-size: 18px;
    color: #005a8c;
    transition: 0.3s;
    margin-left: 10px;
}

.skill-group-header .group-toggle.open {
    transform: rotate(180deg);
}

.skill-group-header .remove-group {
    background: none;
    border: none;
    color: #b91c1c;
    cursor: pointer;
    font-size: 16px;
    padding: 0 8px;
    opacity: 0.6;
    transition: 0.2s;
}

.skill-group-header .remove-group:hover {
    opacity: 1;
}

.skill-group-body {
    padding: 10px 14px 14px 14px;
    display: none;
}

.skill-group-body.open {
    display: block;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.skill-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #0077be;
    flex-shrink: 0;
}

.skill-item .skill-name {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1a2634;
    flex: 1;
    padding: 2px 4px;
}

.skill-item .skill-name:focus {
    outline: none;
    background: #f0f5fc;
    border-radius: 4px;
}

.skill-item .remove-skill {
    background: none;
    border: none;
    color: #b91c1c;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.4;
    transition: 0.2s;
    padding: 0 4px;
}

.skill-item .remove-skill:hover {
    opacity: 1;
}

.add-skill-btn {
    background: none;
    border: 1px dashed #b8ccdd;
    border-radius: 6px;
    padding: 6px 12px;
    color: #005a8c;
    cursor: pointer;
    font-size: 13px;
    margin-top: 6px;
    transition: 0.2s;
    width: 100%;
    text-align: center;
}

.add-skill-btn:hover {
    background: #f0f5fc;
    border-color: #0077be;
}

@media (max-width: 600px) {
    .skill-group-header {
        flex-wrap: wrap;
    }
    .skill-group-header .group-title {
        width: 100%;
        margin-bottom: 4px;
    }
}