/* Tarhestan Forms — front */
.tfm,.tfm-modal{--tfm-accent:#f79521;--tfm-navy:#16213E;--tfm-red-1:#82151d;--tfm-red-2:#bf1e2e;--tfm-ink:#1b2440;--tfm-muted:#667089;--tfm-line:#e1e5ee;--tfm-soft:#f4f6fa;--tfm-r:14px}
.tfm{direction:rtl;text-align:right;color:var(--tfm-ink);font-family:inherit;line-height:1.8}
.tfm *,.tfm *::before,.tfm *::after{box-sizing:border-box}
.tfm [hidden]{display:none!important}
.tfm p.tfm-title{margin:0 0 1rem;font-size:1.1rem;font-weight:900;color:var(--tfm-ink)}
.tfm-grid{display:grid;grid-template-columns:1fr 1fr;gap:.85rem 1rem}
.tfm-field{min-width:0}
.tfm-field--wide{grid-column:1/-1}
.tfm .tfm-label{display:block;margin:0 0 .35rem;font-size:.85rem;font-weight:700;color:var(--tfm-ink)}
.tfm .tfm-label small{font-weight:400;color:var(--tfm-muted)}
.tfm-req{color:var(--tfm-red-2)}
.tfm .tfm-input:not(#tfm-x){display:block;width:100%;min-height:48px;margin:0;padding:.6rem .9rem;border:1.5px solid var(--tfm-line);border-radius:12px;background:#fff;color:var(--tfm-ink);font:inherit;font-size:.95rem;line-height:1.6;box-shadow:none;transition:border-color .2s,box-shadow .2s}
.tfm textarea.tfm-input:not(#tfm-x){min-height:96px;resize:vertical}
.tfm select.tfm-input:not(#tfm-x){appearance:none;-webkit-appearance:none;padding-left:2.4rem;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23667089' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left .9rem center}
.tfm .tfm-input:not(#tfm-x):focus{outline:none;border-color:var(--tfm-navy);box-shadow:0 0 0 3px color-mix(in srgb,var(--tfm-navy) 14%,transparent)}
.tfm .tfm-input[dir=ltr]::placeholder{text-align:left}
.tfm-field.has-error .tfm-input:not(#tfm-x){border-color:var(--tfm-red-2)}
.tfm p.tfm-error{margin:.3rem 0 0;font-size:.78rem;color:var(--tfm-red-2)}
.tfm p.tfm-error:empty{display:none}
.tfm-course-fixed{display:flex;align-items:center;gap:.5rem;min-height:48px;padding:.5rem .9rem;border-radius:12px;background:color-mix(in srgb,var(--tfm-accent) 12%,#fff);border:1.5px solid color-mix(in srgb,var(--tfm-accent) 35%,#fff);font-size:.95rem;font-weight:800;line-height:1.7}
.tfm-course-fixed span{font-size:inherit}
.tfm-course-fixed::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--tfm-accent)}
.tfm-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.tfm-alert{margin:.9rem 0 0;padding:.6rem .85rem;border-radius:10px;background:color-mix(in srgb,var(--tfm-red-2) 8%,#fff);color:var(--tfm-red-2);font-size:.85rem}
.tfm .tfm-submit:not(#tfm-x){position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;margin:1rem 0 0;padding:0 1.25rem;border:0;border-radius:13px;color:#fff;font:inherit;font-size:1rem;font-weight:800;cursor:pointer;box-shadow:0 12px 26px -16px var(--tfm-red-2);
	background-color:color-mix(in srgb,var(--tfm-red-1) 81%,transparent);
	background-image:linear-gradient(to right,color-mix(in srgb,var(--tfm-red-1) 81%,transparent) 0%,var(--tfm-red-2) 50%,color-mix(in srgb,var(--tfm-red-1) 81%,transparent) 100%);
	background-size:200% auto;transition:background-position .5s,transform .15s}
.tfm .tfm-submit:not(#tfm-x):hover{background-position:right center}
.tfm .tfm-submit:not(#tfm-x):active{transform:scale(.98)}
.tfm-spinner{position:absolute;width:22px;height:22px;border-radius:50%;border:2.5px solid #fff;border-inline-end-color:transparent;opacity:0;animation:tfm-spin .7s linear infinite}
.tfm-submit.is-loading{pointer-events:none}
.tfm-submit.is-loading .tfm-submit__text{opacity:0}
.tfm-submit.is-loading .tfm-spinner{opacity:1}
@keyframes tfm-spin{to{transform:rotate(360deg)}}
.tfm p.tfm-privacy{margin:.6rem 0 0;font-size:.75rem;color:var(--tfm-muted);text-align:center}
.tfm-success{display:grid;justify-items:center;gap:.6rem;padding:1.5rem 1rem;text-align:center;outline:none;animation:tfm-in .4s both}
.tfm-success__icon{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#e3f6ec;color:#138a5e;font-size:1.6rem;font-weight:900}
.tfm p.tfm-success__text{margin:0;font-weight:700;font-size:1rem;line-height:1.9}
@keyframes tfm-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Button + modal */
.tfm-open:not(#tfm-x){display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 1.6rem;border:0;border-radius:13px;color:#fff;font:inherit;font-weight:800;cursor:pointer;box-shadow:none;background:linear-gradient(to right,var(--tfm-red-1,#82151d),var(--tfm-red-2,#bf1e2e));transition:filter .2s}
.tfm-open:not(#tfm-x):hover{filter:brightness(1.08)}
.tfm-modal{position:fixed;inset:0;z-index:99997;display:grid;place-items:center;padding:1rem;direction:rtl}
.tfm-modal[hidden]{display:none!important}
.tfm-modal__backdrop{position:absolute;inset:0;background:rgba(15,22,40,.55);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);opacity:0;transition:opacity .25s}
.tfm-modal.is-open .tfm-modal__backdrop{opacity:1}
.tfm-modal__dialog{position:relative;width:100%;max-width:560px;max-height:calc(100dvh - 2rem);overflow-y:auto;padding:1.6rem;border-radius:22px;background:#fff;box-shadow:0 40px 90px -30px rgba(0,0,0,.5);opacity:0;transform:translateY(14px) scale(.97);transition:opacity .25s,transform .3s cubic-bezier(.3,.7,.2,1)}
.tfm-modal.is-open .tfm-modal__dialog{opacity:1;transform:none}
.tfm-modal__close:not(#tfm-x){position:absolute;top:.9rem;left:.9rem;width:36px;height:36px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--tfm-soft);color:var(--tfm-muted);font-size:1.4rem;line-height:1;cursor:pointer;box-shadow:none}
.tfm--modal p.tfm-title{padding-left:2.5rem}
html.tfm-lock{overflow:hidden}

@media (max-width:560px){
	.tfm-grid{grid-template-columns:1fr}
	.tfm-modal{place-items:end stretch;padding:0}
	.tfm-modal__dialog{max-width:none;border-radius:22px 22px 0 0;padding:1.3rem 1.1rem calc(1.3rem + env(safe-area-inset-bottom));transform:translateY(100%)}
}
@media (prefers-reduced-motion:reduce){.tfm *,.tfm-modal *{transition-duration:.01ms!important;animation-duration:.01ms!important}}