/* apply.tuit.uz — custom styles layered on top of Tailwind CDN utilities. */

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  line-height: 1;
  vertical-align: middle;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

/* ── Buttons (plain CSS so they work without Tailwind compilation) ── */
.btn-gold,
.btn-outline-white,
.btn-navy-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.7rem 1.4rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-gold {
  background: #c5a55a;
  color: #0f1a2e;
  box-shadow: 0 6px 18px rgba(197, 165, 90, 0.28);
}
.btn-gold:hover {
  background: #d4b878;
  transform: translateY(-1px);
}
.btn-outline-white {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn-navy-outline {
  border: 1px solid #0f1a2e;
  color: #0f1a2e;
}
.btn-navy-outline:hover {
  background: #0f1a2e;
  color: #fff;
}

/* ── Hero slideshow ── */
.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-img {
  transform: scale(1.08);
  transition: transform 7s ease-out;
}
.hero-slide.is-active .hero-img {
  transform: scale(1);
}
.hero-anim {
  opacity: 0;
  transform: translateY(18px);
}
.hero-slide.is-active .hero-anim {
  animation: heroIn 0.8s ease forwards;
}
@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Reveal-on-scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Accreditation marquee */
.marquee {
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover {
  animation-play-state: paused;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Field error lists rendered by Django */
.errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: #dc2626;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-anim,
  .hero-img {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ════════ Apply anketa — TUIT two-panel form design ════════ */
.tuit-anketa {
  --navy: #0f2547;
  --navy-2: #163a68;
  --navy-deep: #0a1a35;
  --gold: #e8b54b;
  --gold-soft: #f3cf86;
  --ink: #1c2740;
  --muted: #7d899e;
  --line: #e3e7ef;
  --field-bg: #f7f9fc;
  font-family: "Manrope", "Inter", ui-sans-serif, sans-serif;
  color: var(--ink);
  display: flex;
  justify-content: center;
}
.tuit-anketa *,
.tuit-anketa *::before,
.tuit-anketa *::after {
  box-sizing: border-box;
}

.tuit-card {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -30px rgba(15, 37, 71, 0.45),
    0 8px 24px -12px rgba(15, 37, 71, 0.2);
}

/* Left panel */
.tuit-side {
  position: relative;
  background:
    radial-gradient(120% 90% at 0% 0%, #1b3a68 0%, transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #dfe7f5;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.tuit-side-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(
    circle at 30% 20%,
    #000 0%,
    transparent 70%
  );
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 70%);
}
.tuit-side-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  bottom: -140px;
  background: radial-gradient(
    circle,
    rgba(232, 181, 75, 0.28),
    transparent 65%
  );
  filter: blur(8px);
}
.tuit-side-deco {
  position: absolute;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}
.tuit-side-deco--1 {
  width: 120px;
  height: 120px;
  top: 48px;
  right: 38px;
  transform: rotate(18deg);
}
.tuit-side-deco--2 {
  width: 70px;
  height: 70px;
  top: 74px;
  right: 90px;
  transform: rotate(-8deg);
  background: rgba(255, 255, 255, 0.03);
}
.tuit-brand {
  position: relative;
  z-index: 2;
}
.tuit-logo {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.tuit-logo-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow:
    0 14px 34px -10px rgba(0, 0, 0, 0.6),
    0 0 0 5px rgba(255, 255, 255, 0.1);
}
.tuit-brand-name {
  font-family: "Sora", ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: 44px;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  color: #fff;
  line-height: 1;
}
.tuit-brand-name::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  margin-top: 14px;
}
.tuit-brand-sub {
  font-size: 14px;
  line-height: 1.6;
  color: #aebbd2;
  margin: 0;
  max-width: 280px;
  font-weight: 500;
}
.tuit-side-foot {
  position: relative;
  z-index: 2;
  font-size: 13px;
  color: #9fb0cc;
  display: flex;
  align-items: center;
  gap: 9px;
}
.tuit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 181, 75, 0.2);
  animation: tuit-pulse 2s infinite;
}
@keyframes tuit-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Right panel */
.tuit-main {
  padding: 42px 46px 38px;
}
.tuit-head {
  margin-bottom: 22px;
}
.tuit-title {
  font-family: "Sora", ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.tuit-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* Tabs */
.tuit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tuit-anketa .apply-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: #eef1f7;
  border: 1.5px solid transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.tuit-anketa .apply-tab:hover {
  color: var(--navy);
}
.tuit-anketa .apply-tab.is-active {
  color: var(--navy-deep);
  background: rgba(232, 181, 75, 0.16);
  border-color: rgba(232, 181, 75, 0.5);
}
.tuit-anketa .apply-panel {
  display: none;
}
.tuit-anketa .apply-panel.is-active {
  display: block;
  animation: tuit-fade 0.4s both;
}
@keyframes tuit-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Fields */
.tuit-field {
  margin-bottom: 16px;
}
.tuit-anketa label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}
.tuit-anketa label i {
  color: var(--gold);
  font-style: normal;
}
.tuit-anketa label .opt {
  color: var(--muted);
  font-weight: 500;
}
.tuit-anketa input,
.tuit-anketa select,
.tuit-anketa textarea {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
  outline: none;
}
.tuit-anketa textarea {
  resize: vertical;
  min-height: 88px;
}
.tuit-anketa select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%237d899e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.tuit-anketa input::placeholder,
.tuit-anketa textarea::placeholder {
  color: #aab3c4;
}
.tuit-anketa input:hover,
.tuit-anketa select:hover,
.tuit-anketa textarea:hover {
  border-color: #cdd5e3;
}
.tuit-anketa input:focus,
.tuit-anketa select:focus,
.tuit-anketa textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(232, 181, 75, 0.16);
}
.tuit-anketa input.tuit-err,
.tuit-anketa select.tuit-err,
.tuit-anketa textarea.tuit-err {
  border-color: #e2574c;
  background: #fdf3f2;
  box-shadow: 0 0 0 4px rgba(226, 87, 76, 0.12);
}
/* File inputs */
.tuit-anketa input[type="file"] {
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.tuit-anketa input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.tuit-anketa input[type="file"]:hover::file-selector-button {
  background: var(--navy-2);
}

/* Phone with country-code prefix select */
.tuit-phone {
  display: flex;
  gap: 8px;
}
.tuit-phone select {
  flex: 0 0 auto;
  width: auto;
  min-width: 116px;
  padding-right: 32px;
  background-position: right 11px center;
}
.tuit-phone input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Inline icons (Telegram / WhatsApp labels) */
.tuit-ic {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 2px;
  color: #229ed9;
}
.tuit-ic--wa {
  color: #25d366;
}

.tuit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tuit-anketa .errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: #e2574c;
  font-size: 12.5px;
  font-weight: 600;
}
.tuit-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0 16px;
}
.tuit-docnote {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.tuit-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

.tuit-btn {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Sora", ui-sans-serif, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 12px 26px -10px rgba(232, 181, 75, 0.7);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    filter 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tuit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(232, 181, 75, 0.8);
  filter: brightness(1.03);
}
.tuit-btn:active {
  transform: translateY(0);
}
.tuit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.tuit-btn-spin {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(10, 26, 53, 0.3);
  border-top-color: var(--navy-deep);
  border-radius: 50%;
  animation: tuit-spin 0.7s linear infinite;
}
.tuit-btn.loading .tuit-btn-spin {
  display: inline-block;
}
.tuit-btn.loading .tuit-btn-txt {
  opacity: 0.7;
}
@keyframes tuit-spin {
  to {
    transform: rotate(360deg);
  }
}

.tuit-status-link {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
}
.tuit-status-link a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.tuit-status-link a:hover {
  color: var(--gold);
}

@media (max-width: 860px) {
  .tuit-card {
    grid-template-columns: 1fr;
  }
  .tuit-side {
    padding: 30px 26px;
  }
  .tuit-brand-name {
    font-size: 34px;
  }
  .tuit-main {
    padding: 30px 24px 28px;
  }
}
@media (max-width: 480px) {
  .tuit-row {
    grid-template-columns: 1fr;
  }
}

/* ════════ Auto-balancing grids — last (incomplete) row stretches to fill ════════ */
/* Flexbox: items have a base width then flex-grow, so the final row's items
   expand to fill the width instead of leaving an orphan. Adapts per breakpoint. */
.auto-2 > *,
.auto-3 > *,
.auto-4 > * {
  min-width: 0;
}
.auto-2 > * { flex: 1 1 380px; }
.auto-3 > * { flex: 1 1 300px; }
.auto-4 > * { flex: 1 1 210px; }

/* ════════ Important-dates timeline — columns scale to the number of dates ════════ */
@media (min-width: 768px) {
  .dates-timeline {
    grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  }
}
