/* Contact Form - Refined premium minimal style */

.contact-form-container {
    position: relative;
    max-width: 760px;
    margin: 10px auto;
    border-radius: 22px;
    border: 1px solid rgba(122, 206, 255, 0.26);
    background: linear-gradient(180deg, rgba(10, 26, 50, 0.93), rgba(7, 18, 38, 0.96));
    box-shadow: 0 22px 48px rgba(2, 9, 22, 0.55);
    padding: 26px;
    overflow: hidden;
    animation: formFadeIn 0.3s ease-out;
}

.contact-form-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(900px 220px at 100% -20%, rgba(88, 201, 255, 0.18), transparent 70%);
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-header {
    margin-bottom: 22px;
}

.contact-form-header h3 {
    color: #d9eeff;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    font-weight: 620;
    letter-spacing: 0.006em;
    margin-bottom: 8px;
}

.contact-form-header p {
    color: #96b3d4;
    font-size: 0.95rem;
    line-height: 1.45;
}

.contact-context-hint {
    display: none;
    margin-top: 9px;
    border: 1px solid rgba(120, 199, 255, 0.22);
    border-radius: 10px;
    background: rgba(10, 27, 52, 0.62);
    color: #a8c9e9;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 9px 10px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group label {
    display: block;
    color: #d3e7ff;
    font-weight: 540;
    letter-spacing: 0.003em;
    margin-bottom: 7px;
    font-size: 0.9rem;
}

.required {
    color: #7ad8ff;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(117, 194, 255, 0.25);
    background: rgba(8, 20, 40, 0.78);
    color: #e5f2ff;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 11px 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #8ea7c5;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(149, 221, 255, 0.82);
    background: rgba(11, 26, 49, 0.86);
    box-shadow: 0 0 0 3px rgba(95, 186, 246, 0.18);
}

.char-count {
    margin-top: 6px;
    text-align: right;
    color: #8da8c7;
    font-size: 0.78rem;
}

.form-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 14px;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid rgba(108, 190, 255, 0.22);
    background: rgba(12, 30, 57, 0.62);
    color: #b7d8f6;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.form-section-toggle:hover {
    border-color: rgba(146, 217, 255, 0.55);
    background: rgba(14, 35, 66, 0.76);
}

.form-section-toggle svg {
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.form-section-toggle.is-open svg {
    transform: rotate(180deg);
}

.optional-toggle-label {
    font-size: 0.88rem;
    font-family: var(--font-display);
}

.optional-fields {
    margin-bottom: 16px;
    animation: slideDown 0.24s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-checkbox {
    margin: 16px 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(109, 190, 255, 0.2);
    background: rgba(9, 24, 47, 0.7);
    padding: 14px;
}

.checkbox-label {
    display: grid;
    grid-template-columns: 19px 1fr;
    align-items: start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    border: 1px solid rgba(131, 206, 255, 0.65);
    background: rgba(8, 21, 40, 0.95);
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    border-color: rgba(135, 216, 255, 0.95);
    background: linear-gradient(180deg, rgba(109, 215, 255, 0.95), rgba(77, 182, 241, 0.95));
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #06213b;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus ~ .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(95, 186, 246, 0.25);
}

.checkbox-text {
    color: #d6e8ff;
    font-size: 0.88rem;
    line-height: 1.45;
}

.privacy-note {
    margin-top: 9px;
    margin-left: 28px;
    color: #8aa9cb;
    font-size: 0.78rem;
    line-height: 1.45;
}

.recaptcha-badge {
    margin: 12px 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(111, 191, 255, 0.2);
    background: rgba(8, 23, 44, 0.62);
    padding: 12px 13px;
}

.recaptcha-badge-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recaptcha-icon {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #59de9f;
    box-shadow: 0 0 0 0 rgba(89, 222, 159, 0.5);
    animation: recaptchaPulse 1.7s infinite;
}

@keyframes recaptchaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(89, 222, 159, 0.4);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(89, 222, 159, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(89, 222, 159, 0);
    }
}

.recaptcha-text {
    flex: 1;
}

.recaptcha-text strong {
    display: block;
    color: #cbe5ff;
    font-size: 0.85rem;
    font-weight: 580;
    margin-bottom: 2px;
}

.recaptcha-text p {
    margin: 0;
    color: #89a8ca;
    font-size: 0.76rem;
}

.btn-submit {
    width: 100%;
    border: 1px solid rgba(130, 208, 255, 0.5);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(91, 194, 248, 0.95), rgba(67, 163, 218, 0.95));
    color: #08233f;
    font-family: var(--font-display);
    font-size: 0.93rem;
    font-weight: 640;
    letter-spacing: 0.01em;
    padding: 12px 16px;
    min-height: 48px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    box-shadow: 0 10px 24px rgba(13, 91, 143, 0.35);
}

.btn-submit .btn-text,
.btn-submit .btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 30px rgba(15, 105, 164, 0.42);
}

.btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(8, 34, 58, 0.3);
    border-top-color: #0a2a4b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.contact-success {
    text-align: center;
    padding: 30px 12px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(93, 211, 165, 0.96), rgba(64, 188, 145, 0.96));
    color: #042c29;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-success h3 {
    color: #d9ecff;
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.contact-success p {
    color: #9ab5d2;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 8px;
}

.contact-success-meta {
    color: #86a6c9;
    font-size: 0.84rem;
}

.message-group.full-width {
    grid-column: 1 / -1;
}

.contact-form-bubble {
    max-width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.contact-form-bubble .contact-form-container {
    margin: 0;
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 18px;
        border-radius: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-header h3 {
        font-size: 1.12rem;
    }

    .privacy-note {
        margin-left: 0;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }
}
