@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Улучшенные стили для иконок в формах */
.fas {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Эффект для иконок в полях ввода */
.input-icon .fas {
    color: var(--gray);
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.input-wrapper:focus-within .fas {
    color: var(--primary);
    /* Убрано увеличение при фокусе */
    filter: drop-shadow(0 0 6px var(--primary));
}

/* Эффект для иконок в кнопках */
.btn .fas {
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.btn:hover .fas {
    transform: translateY(-1px);
    /* Убрано увеличение при наведении */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Специальные цвета для иконок в формах */
.fas.fa-phone {
    color: var(--success);
}

.fas.fa-user {
    color: var(--primary);
}

.fas.fa-envelope {
    color: var(--primary);
}

.fas.fa-calendar {
    color: var(--warning);
}

.fas.fa-map-marker-alt {
    color: var(--danger);
}

.fas.fa-venus {
    color: #ec4899;
}

.fas.fa-mars {
    color: #3b82f6;
}

.fas.fa-heart {
    color: #ef4444;
}

.fas.fa-star {
    color: #f59e0b;
}

.fas.fa-check {
    color: var(--success);
}

.fas.fa-times {
    color: var(--danger);
}

.fas.fa-info-circle {
    color: var(--primary);
}

.fas.fa-exclamation-triangle {
    color: var(--warning);
}

/* Анимация для иконок в заголовках форм */
.header .fas {
    font-size: 1.2em;
    margin-right: 0.5rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.header:hover .fas {
    opacity: 1;
    /* Убрано увеличение при наведении */
}

/* Эффект для иконок в секциях */
.section-title .fas {
    margin-right: 0.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.section:hover .section-title .fas {
    /* Убрано увеличение при наведении */
    filter: drop-shadow(0 0 6px var(--primary));
}

/* Эффект для иконок в переключателях языка */
.lang-switcher-container .fas {
    transition: all 0.3s ease;
}

.lang-switcher-container:hover .fas {
    /* Убрано увеличение при наведении */
}

/* Эффект для иконок в кастомных селектах */
.custom-select-trigger .fas {
    transition: all 0.3s ease;
}

.custom-select-trigger:hover .fas {
    /* Убрано увеличение при наведении */
}

/* Адаптивность для иконок в формах */
@media (max-width: 768px) {
    .fas {
        font-size: 0.9em;
    }
    
    .btn .fas {
        font-size: 1em;
    }
    
    .header .fas {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .fas {
        font-size: 0.85em;
    }
    
    .btn .fas {
        font-size: 0.95em;
    }
    
    .header .fas {
        font-size: 1em;
    }
}

/* Base variables and styles from profile.css */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    --gradient-soft: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-soft);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px -20px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
}

.header {
    background: var(--gradient);
    padding: 2rem;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
}

.content {
    padding: 2rem;
    position: relative;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: block;
    /* To behave like a legend */
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.form-field {
    margin-bottom: 1.25rem;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Улучшенные стили для полей ввода в форме */
.field-value {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.field-value input[type="text"],
.field-value input[type="number"],
.field-value input[type="email"],
.field-value select,
.field-value textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.field-value input[type="text"]:focus,
.field-value input[type="number"]:focus,
.field-value input[type="email"]:focus,
.field-value select:focus,
.field-value textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.field-value input[type="text"]:hover,
.field-value input[type="number"]:hover,
.field-value input[type="email"]:hover,
.field-value select:hover,
.field-value textarea:hover {
    border-color: var(--primary-light);
}

/* Стилизация выпадающих списков */
.field-value select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236366f1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Выделение опции 'Другая' в select */
select option.option-other {
    color: #2563eb;
    /* спокойный синий */
    font-weight: 700;
    background: #eff6ff;
    /* светло-синий фон */
}

/* Для Firefox */
select:focus>option.option-other {
    background: #dbeafe;
}

/* Стилизация текстовых областей */
.about-text textarea {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
    min-height: 150px;
    resize: vertical;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.about-text textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.about-text textarea:hover {
    border-color: var(--primary-light);
}

/* Улучшенные радио-кнопки */
.radio-group-inline {
    display: flex;
    gap: 16px;
}

.radio-group-inline label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-group-inline label:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.radio-group-inline input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin: 0;
    transition: all 0.2s ease;
    position: relative;
}

.radio-group-inline input[type="radio"]:checked {
    border-color: var(--primary);
    background-color: white;
}

.radio-group-inline input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
}

/* Кнопка отправки формы */
.form-actions .btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 100%;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.form-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.form-actions .btn:hover::before {
    transform: translateX(0);
}

.form-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Custom Language Switcher */
.lang-switcher-container {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.custom-select-wrapper {
    position: relative;
    width: 150px;
    font-family: 'Inter', sans-serif;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--light);
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-trigger:hover {
    border-color: var(--primary-light);
}

.custom-select-trigger.open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-select-trigger .arrow {
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--primary-dark);
    border-bottom: 2px solid var(--primary-dark);
    transform: rotate(-45deg);
    transition: transform 0.3s;
}

.custom-select-trigger.open .arrow {
    transform: rotate(135deg);
}

.custom-options {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.custom-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.custom-option:hover {
    background-color: var(--light);
}

.custom-option.selected {
    background-color: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

.custom-select-trigger span,
.custom-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-trigger img,
.custom-option img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


/* Анимация для полей при загрузке страницы */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.field:nth-child(1) {
    animation-delay: 0.1s;
}

.field:nth-child(2) {
    animation-delay: 0.15s;
}

.field:nth-child(3) {
    animation-delay: 0.2s;
}

.field:nth-child(4) {
    animation-delay: 0.25s;
}

.field:nth-child(5) {
    animation-delay: 0.3s;
}

.field:nth-child(6) {
    animation-delay: 0.35s;
}

.field:nth-child(7) {
    animation-delay: 0.4s;
}

.field:nth-child(8) {
    animation-delay: 0.45s;
}

.field:nth-child(9) {
    animation-delay: 0.5s;
}

.field:nth-child(10) {
    animation-delay: 0.55s;
}

/* Стили для плейсхолдеров */
::placeholder {
    color: #cbd5e1;
    opacity: 1;
}

/* Стили для мобильных устройств */
@media (max-width: 640px) {
    .container {
        margin: 0;
        padding: 0;
    }

    .form-card {
        border-radius: 0;
        padding: 0.5rem;
    }

    .header {
        padding: 2rem 1rem 1rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .content {
        padding: 1rem 0.5rem;
    }

    .section {
        padding: 1rem 0.5rem;
        margin-bottom: 1.2rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.7rem;
    }

    .form-field {
        margin-bottom: 1.1rem;
    }

    .field-label {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .field-value input,
    .field-value select,
    .field-value textarea {
        font-size: 1rem;
        padding: 1rem 0.8rem;
        border-radius: 12px;
        margin-bottom: 0.3rem;
    }

    .radio-group-inline {
        flex-direction: row;
        gap: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .radio-group-inline label {
        font-size: 1rem;
        padding: 0.5rem 0.7rem;
    }

    .form-actions {
        padding: 1rem 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
        height: 48px;
        font-size: 1.1rem;
        border-radius: 12px;
        margin-top: 0.5rem;
    }

    .input-hint {
        font-size: 0.9rem;
        margin-top: 0.2rem;
    }
}

@media (max-width: 400px) {
    .header {
        padding: 1.2rem 0.5rem 0.5rem 0.5rem;
    }

    .header h1 {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .form-actions .btn {
        height: 40px;
        font-size: 1rem;
    }
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 1.2rem;
    opacity: 0.7;
    pointer-events: none;
    transition: color 0.3s, opacity 0.3s;
}

.input-wrapper input[type="text"],
.input-wrapper input[type="tel"] {
    padding-left: 2.7rem !important;
}

.input-wrapper input:focus+.input-icon {
    color: var(--primary);
    opacity: 1;
}

.input-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
    opacity: 0.85;
}

.input-lg {
    height: 52px;
    font-size: 1.1rem;
    padding-top: 10px;
    padding-bottom: 10px;
}

.input-wrapper input.input-lg {
    padding-left: 2.7rem;
}

.input-wrapper input.input-lg:focus+.input-icon {
    color: var(--primary);
}

.input-wrapper input.input-lg:focus+.fa-phone {
    color: var(--primary);
}

.field-value input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.field-value input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.field-value input[type="tel"]:hover {
    border-color: var(--primary-light);
}

/* Дополнительные стили для переключателя языков */
.lang-switcher-container {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.custom-select-wrapper {
    position: relative;
    width: 160px;
    font-family: 'Inter', sans-serif;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-select-trigger:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.custom-select-trigger.open {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.custom-select-trigger .arrow {
    width: 12px;
    height: 12px;
    border-left: 2px solid #6366f1;
    border-bottom: 2px solid #6366f1;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.custom-select-trigger.open .arrow {
    transform: rotate(135deg);
}

.custom-options {
    position: absolute;
    top: 120%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.custom-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #1f2937;
    transform: translateX(4px);
}

.custom-option.selected {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    font-weight: 600;
}

.custom-select-trigger span,
.custom-option {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.custom-select-trigger img,
.custom-option img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.custom-option:hover img {
    /* Убрано увеличение при наведении */
}

/* Анимация появления опций */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-options.open .custom-option {
    animation: slideInDown 0.3s ease forwards;
}

.custom-options.open .custom-option:nth-child(1) { animation-delay: 0.05s; }
.custom-options.open .custom-option:nth-child(2) { animation-delay: 0.1s; }
.custom-options.open .custom-option:nth-child(3) { animation-delay: 0.15s; }
.custom-options.open .custom-option:nth-child(4) { animation-delay: 0.2s; }
.custom-options.open .custom-option:nth-child(5) { animation-delay: 0.25s; }

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .lang-switcher-container {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem auto;
        width: 100%;
        max-width: 200px;
    }
    
    .custom-select-wrapper {
        width: 100%;
    }
    
    .custom-select-trigger {
        justify-content: center;
        padding: 12px 16px;
    }
    
    .custom-options {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px) scale(0.95);
        width: 200px;
    }
    
    .custom-options.open {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}