/* ════════════════════════════════════════
   گزینه ۲ — Registration Form Styles
   ════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0F2C4A;
  --navy-light: #163A5F;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --white: #F8F9FA;
  --gray: #E8ECF0;
  --gray-dark: #8A9BB0;
  --text: #1A2E42;
  --error: #E05252;
  --success: #2ECC71;
  /* رنگ نارنجی جدید */
  --orange: #E8650A;
  --orange-light: #F47C28;
  --orange-dark: #C4540A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  background: var(--orange);
  background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange) 50%, var(--orange-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

/* ─── BRAND LOGO ─── */
.brand-logo {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  animation: logoFadeIn 0.7s 0.1s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.brand-logo img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  animation: logoFloat 5s ease-in-out 0.8s infinite;
}

@keyframes logoFadeIn {
  0%   { opacity: 0; transform: translateY(-20px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* حرکت ریز و پیوسته لوگو به چپ/راست/بالا/پایین */
@keyframes logoFloat {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(5px, -6px); }
  50%  { transform: translate(-4px, 2px); }
  75%  { transform: translate(-6px, -4px); }
  100% { transform: translate(0, 0); }
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s 0.5s ease forwards;
}

.hero-title span { color: rgba(255,255,255,0.85); text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.hero-subtitle {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.8s ease forwards;
}

.scroll-cta {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeUp 0.9s 1.1s ease forwards;
}

.scroll-cta span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.1em;
}

.scroll-arrow {
  width: 28px;
  height: 28px;
  border-right: 2px solid rgba(255,255,255,0.8);
  border-bottom: 2px solid rgba(255,255,255,0.8);
  transform: rotate(45deg);
  animation: bounce 1.5s infinite;
}

/* ─── FORM SECTION ─── */
.form-section {
  background: var(--white);
  padding: 6rem 1.5rem;
  position: relative;
}

.section-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  margin: 1.2rem auto 3.5rem;
  border-radius: 2px;
}

.form-card {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15,44,74,0.10), 0 4px 16px rgba(15,44,74,0.06);
  padding: 3rem 3.5rem;
  border: 1px solid rgba(232,101,10,0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
}

/* ─── FIELD GROUPS (scroll-animated) ─── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.field-group.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.field-label .required-star {
  color: var(--orange);
  margin-right: 2px;
}

.field-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--gray);
  border-radius: 10px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.2s;
  outline: none;
  direction: rtl;
}

.field-input:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(232,101,10,0.12);
}

.field-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(224,82,82,0.10);
}

.field-input.valid { border-color: var(--success); }

select.field-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A9BB0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
}

.error-msg {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1rem;
  font-weight: 500;
  padding-right: 2px;
}

/* ─── SUBMIT ─── */
.submit-wrap {
  margin-top: 2.2rem;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.submit-btn {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  color: #fff;
  border: none;
  padding: 1rem 3.5rem;
  border-radius: 50px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.05em;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s;
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,101,10,0.35); }
.submit-btn:hover::before { left: 100%; }
.submit-btn:active { transform: translateY(0); }

/* ─── SUCCESS OVERLAY ─── */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(232, 101, 10, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.success-overlay.show { display: flex; }

.success-box {
  background: #fff;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 380px;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.success-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #fff;
}

.success-box h3 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 0.6rem; }
.success-box p { color: var(--gray-dark); font-size: 0.95rem; }

.close-success {
  margin-top: 1.8rem;
  padding: 0.7rem 2.5rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* ─── FOOTER ─── */
footer {
  background: var(--navy);
  color: rgba(248,249,250,0.75);
  padding: 3.5rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), var(--orange));
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--orange-light);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(248,249,250,0.55);
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col p, .footer-col a {
  font-size: 0.88rem;
  color: rgba(248,249,250,0.65);
  line-height: 2;
  display: block;
  text-decoration: none;
}

.footer-col a:hover { color: var(--orange-light); }

.footer-bottom {
  max-width: 900px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248,249,250,0.08);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(248,249,250,0.35);
}

/* ─── KEYFRAME ANIMATIONS ─── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(8px); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .form-card { padding: 2rem 1.4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .field-group.full { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .brand-logo img { width: 100px; height: 100px; }
}
