/* assets/css/style.css */
/* Independent frontend styles for onlinevisit.drrashidpour.ir */

:root {
  --bg: #f8f7ff;
  --bg-soft: #f2f8ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #22304a;
  --muted: #66728a;
  --border: rgba(108, 99, 255, 0.14);
  --primary: #6c63ff;
  --primary-dark: #554bd6;
  --secondary: #34c8b5;
  --accent: #ff8fab;
  --danger: #d92d20;
  --success: #157347;
  --warning: #b54708;
  --success-bg: rgba(52, 200, 181, 0.13);
  --danger-bg: rgba(217, 45, 32, 0.08);
  --warning-bg: rgba(255, 143, 171, 0.12);
  --shadow: 0 16px 48px rgba(77, 84, 170, 0.14);
  --shadow-card: 0 10px 30px rgba(31, 36, 64, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --container: min(1120px, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Vazirmatn", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(108, 99, 255, 0.16), transparent 28%),
    radial-gradient(circle at left 20%, rgba(52, 200, 181, 0.15), transparent 25%),
    linear-gradient(180deg, #fcfbff 0%, #f7fbff 100%);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
  font-family: "Vazirmatn", system-ui, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.soft-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(10px);
}

.page-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)),
    linear-gradient(90deg, rgba(108, 99, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(108, 99, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 255, 0.76);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  font-size: 0.85rem;
  color: var(--muted);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.brand-photo {
  overflow: hidden;
  border-radius: 50%;
}

.brand-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 999px;
}

.online-visit-section {
  min-height: calc(100vh - 84px);
}

.online-visit-form {
  width: min(920px, 100%);
  margin-inline: auto;
  padding: 2rem;
}

.glow-card {
  position: relative;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: auto -6% 96% auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 143, 171, 0.18);
  filter: blur(12px);
  pointer-events: none;
}

.section-head {
  max-width: 760px;
  margin-bottom: 2rem;
}

.form-head {
  text-align: right;
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.08);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.section-head h1 {
  line-height: 1.35;
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.form-alert {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: var(--warning-bg);
  border: 1px solid rgba(255, 143, 171, 0.22);
  color: var(--muted);
}

.form-alert strong {
  color: var(--primary-dark);
}

.form-group-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2rem 0 1rem;
}

.form-group-title span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7d7aff);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(108, 99, 255, 0.22);
}

.form-group-title h2 {
  margin: 0;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
  position: relative;
}

.field span {
  font-weight: 800;
  font-size: 0.95rem;
}

.field span b {
  color: var(--danger);
}

.conditional-field[hidden] {
  display: none !important;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.86rem 1rem;
  border: 1px solid rgba(108, 99, 255, 0.14);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input:hover,
select:hover,
textarea:hover,
.date-toggle:hover {
  border-color: rgba(108, 99, 255, 0.26);
}

input:focus,
select:focus,
textarea:focus,
.date-toggle:focus {
  border-color: rgba(108, 99, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.08);
  background: #fff;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.date-toggle.is-invalid {
  border-color: rgba(217, 45, 32, 0.6);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.08);
}

.full-width {
  margin-top: 1rem;
}

.field-error {
  min-height: 1.4em;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.7;
}

.counter {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.82rem;
}

.date-picker {
  position: relative;
}

.date-toggle {
  width: 100%;
  min-height: 52px;
  padding: 0.86rem 1rem;
  border: 1px solid rgba(108, 99, 255, 0.14);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: right;
}

.date-toggle span {
  min-height: 1.35em;
  display: inline-flex;
  align-items: center;
}

.date-toggle b {
  color: var(--primary-dark);
  font-size: 1rem;
}

.calendar-popover {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 0.6rem);
  z-index: 30;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(108, 99, 255, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.calendar-head strong {
  color: var(--text);
}

.calendar-nav {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(108, 99, 255, 0.14);
  border-radius: 12px;
  background: rgba(108, 99, 255, 0.06);
  color: var(--primary-dark);
  font-weight: 900;
}

.available-date-list {
  display: grid;
  gap: 0.55rem;
}

.available-date-option {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(108, 99, 255, 0.14);
  border-radius: 14px;
  background: rgba(108, 99, 255, 0.045);
  color: var(--text);
  text-align: right;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.available-date-option:hover,
.available-date-option:focus-visible,
.available-date-option.is-selected {
  background: rgba(108, 99, 255, 0.11);
  border-color: rgba(108, 99, 255, 0.32);
  transform: translateY(-1px);
}

.no-date-option {
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(217, 45, 32, 0.06);
  color: var(--muted);
}

.agreement-box {
  margin-top: 1.3rem;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(108, 99, 255, 0.055);
  border: 1px dashed rgba(108, 99, 255, 0.18);
}

.check-field {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text);
  line-height: 1.9;
  cursor: pointer;
}

.check-field input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 0.35rem;
  padding: 0;
  border-radius: 6px;
  accent-color: var(--primary);
}

.form-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 0.82rem 1.35rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7d7aff);
  color: #fff;
  box-shadow: 0 12px 30px rgba(108, 99, 255, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(108, 99, 255, 0.16);
  color: var(--primary-dark);
}

.status-box {
  margin-top: 1.4rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(108, 99, 255, 0.11);
}

.status-empty {
  color: var(--muted);
  background: rgba(108, 99, 255, 0.055);
}

.status-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(52, 200, 181, 0.28);
}

.status-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(217, 45, 32, 0.18);
}

.preview-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.preview-list li {
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(108, 99, 255, 0.12);
}

.preview-list li:last-child {
  border-bottom: 0;
}

.preview-list strong {
  color: var(--text);
}

.form-footnote {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(108, 99, 255, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-inner a {
  color: var(--primary-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-nav {
    position: absolute;
    top: 84px;
    inset-inline: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(108, 99, 255, 0.12);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }
}

@media (max-width: 720px) {
  :root {
    --container: min(100% - 1.25rem, 1120px);
  }

  .section {
    padding: 4rem 0;
  }

  .header-inner {
    min-height: 76px;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small {
    font-size: 0.78rem;
  }

  .online-visit-form {
    padding: 1.15rem;
    border-radius: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .calendar-popover {
    position: fixed;
    inset-inline: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    max-height: min(80vh, 560px);
    overflow-y: auto;
  }
}

@media (max-width: 420px) {
  .header-inner {
    min-height: auto;
    padding: 0.8rem 0;
  }

  .brand {
    max-width: calc(100% - 52px);
  }

  .brand strong,
  .brand small {
    white-space: normal;
  }

  .section-head h1 {
    font-size: 1.75rem;
  }

  .form-alert {
    display: grid;
  }
}