/* ==========================================================================
   Forms
   ========================================================================== */

.form-section {
    padding: 80px 0;
    background: var(--color-dark);
}

.form-section__inner {
    max-width: 640px;
    margin: 0 auto;
}

.form-section__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    text-align: center;
    margin-bottom: 12px;
}

.form-section__subtitle {
    text-align: center;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* Form base */
.tz-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tz-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tz-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tz-form__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}

.section--light .tz-form__label {
    color: var(--color-text);
}

.tz-form__input,
.tz-form__select,
.tz-form__textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--color-white);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.section--light .tz-form__input,
.section--light .tz-form__select,
.section--light .tz-form__textarea {
    color: var(--color-dark);
    background: var(--color-white);
    border-color: var(--color-border);
}

.tz-form__input::placeholder,
.tz-form__textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.section--light .tz-form__input::placeholder,
.section--light .tz-form__textarea::placeholder {
    color: #999;
}

.tz-form__input:focus,
.tz-form__select:focus,
.tz-form__textarea:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(197,160,40,0.15);
}

.tz-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C5A028' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.tz-form__textarea {
    resize: vertical;
    min-height: 100px;
}

/* Validation states */
.tz-form__group--error .tz-form__input,
.tz-form__group--error .tz-form__select {
    border-color: var(--color-error);
}

.tz-form__error {
    font-size: 0.8rem;
    color: var(--color-error);
    display: none;
}

.tz-form__group--error .tz-form__error {
    display: block;
}

/* Checkbox */
.tz-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.tz-form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-gold);
}

.tz-form__checkbox-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.section--light .tz-form__checkbox-text {
    color: var(--color-text);
}

.tz-form__checkbox-text a {
    color: var(--color-gold);
    text-decoration: underline;
}

/* Submit */
.tz-form__submit {
    margin-top: 8px;
}

/* Success message */
.tz-form__success {
    display: none;
    text-align: center;
    padding: 24px;
    color: var(--color-success);
    font-size: 1.1rem;
    font-weight: 500;
}

.tz-form__success--visible {
    display: block;
}

/* Dynamic field */
.tz-form__dynamic {
    display: none;
}

.tz-form__dynamic--visible {
    display: flex;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal--open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    cursor: pointer;
}

.modal__content {
    position: relative;
    background: var(--color-dark-mid);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: color var(--transition);
}

.modal__close:hover {
    color: var(--color-white);
}

.modal__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 24px;
}

/* Certificate modal */
.modal__window--cert {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal__cert-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-md);
    display: block;
}

.hero__cert-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: pointer;
}

.hero__cert-link:hover {
    color: var(--color-gold);
}
