/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */
.visa-app-page {
  --color-primary: #c42127;
  --color-primary-dark: #a31b20;
  --color-primary-light: #fef0ef;
  --color-primary-lighter: #fff5f5;

  --color-success: #10b981;
  --color-success-light: #d1fae5;

  --color-text-primary: #1a1a2e;
  --color-text-secondary: #4a4a68;
  --color-text-muted: #8e8ea9;

  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fc;
  --color-bg-tertiary: #f1f3f8;

  --color-border: #e8eaf0;
  --color-border-light: #f0f2f5;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-primary: 0 8px 24px rgba(196, 33, 39, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --container-max: 1100px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.visa-hero {
  position: relative;
  background: var(--dark);
  padding: 80px 0 120px;
  overflow: hidden;
}

.visa-hero .hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.visa-hero .shape {
  position: absolute;
  border-radius: 50%;
}

.visa-hero .shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  top: -200px;
  right: -100px;
}

.visa-hero .shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
  bottom: -100px;
  left: -50px;
}

.visa-hero .shape-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 70%
  );
  top: 30%;
  left: 15%;
}

.visa-hero .shape-4 {
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  bottom: 20%;
  right: 20%;
}

.visa-hero .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.visa-hero .hero-content {
  text-align: center;
  color: white;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(10px);
}

.hero-badge svg {
  width: 18px;
  height: 18px;
}

.hero-title {
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.hero-title .title-accent {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: var(--space-sm);
}

.hero-title .title-main {
  display: block;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.visa-main-content {
  padding: 0 0 var(--space-3xl);
  background: var(--color-bg-secondary);
}

.visa-main-content .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Başvuru sonrası başarı/hata mesajı – her zaman görünür, progress ile örtülmez */
.form-result-message {
  scroll-margin-top: 100px;
}
.form-result-message:empty {
  display: none;
}
.form-result-message:not(:empty) {
  padding-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.form-alert {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.form-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Mesaj varken progress container’ı biraz aşağı itele (negatif margin ile üstü örtmesin) */
.form-result-message:not(:empty) ~ .progress-container {
  margin-top: 0;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */
.progress-container {
  background: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  margin-top: -60px;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-tertiary);
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  position: relative;
}

.step-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
}

.step-check {
  position: absolute;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition-base);
  color: white;
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
  text-align: center;
  max-width: 100px;
}

.step-line {
  flex: 1;
  max-width: 80px;
  height: 3px;
  background: var(--color-border);
  margin: 0 var(--space-sm);
  margin-bottom: 28px;
  border-radius: 2px;
  transition: background var(--transition-base);
}

/* Step States */
.step-item.active .step-circle {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.step-item.active .step-number {
  color: var(--color-primary);
}

.step-item.active .step-label {
  color: var(--color-primary);
}

.step-item.completed .step-circle {
  background: var(--color-success);
  border-color: var(--color-success);
}

.step-item.completed .step-number {
  opacity: 0;
  transform: scale(0);
}

.step-item.completed .step-check {
  opacity: 1;
  transform: scale(1);
}

.step-item.completed .step-label {
  color: var(--color-success);
}

.step-item.completed + .step-line {
  background: var(--color-success);
}

/* ============================================
   FORM WRAPPER
   ============================================ */
.form-wrapper {
  background: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.form-section {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--color-border-light);
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.section-icon {
  width: 52px;
  height: 52px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-title-wrapper {
  flex: 1;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 4px;
}

.section-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================
   FORM GRID
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.form-grid.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.form-group {
  position: relative;
}

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

/* ============================================
   INPUT WRAPPER - Floating Labels
   ============================================ */
.input-wrapper,
.select-wrapper,
.textarea-wrapper {
  position: relative;
}

.input-wrapper input,
.textarea-wrapper textarea {
  width: 100%;
  padding: 20px 16px 8px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  transition: all var(--transition-base);
  outline: none;
}

.input-wrapper input {
  height: 56px;
}

.textarea-wrapper textarea {
  min-height: 120px;
  resize: vertical;
}

.input-wrapper label,
.textarea-wrapper label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all var(--transition-fast);
  background: var(--color-bg-primary);
  padding: 0 4px;
}

.textarea-wrapper label {
  top: 20px;
  transform: none;
}

.input-wrapper input:focus,
.input-wrapper input:not(:placeholder-shown),
.textarea-wrapper textarea:focus,
.textarea-wrapper textarea:not(:placeholder-shown) {
  border-color: var(--color-primary);
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

.textarea-wrapper textarea:focus + label,
.textarea-wrapper textarea:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg-primary);
}

.input-hint {
  right: 16px;
  bottom: -20px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.required {
  color: var(--color-primary);
}

/* Number input - hide spinners */
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================
   CUSTOM SELECT WRAPPER
   ============================================ */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: -1;
}

.select-wrapper label {
  position: absolute;
  left: 16px;
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg-primary);
  padding: 0 4px;
  pointer-events: none;
  z-index: 2;
}

/* Custom Select Display */
.custom-select-display {
  width: 100%;
  height: 56px;
  padding: 20px 40px 8px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  position: relative;
}

.custom-select-display.placeholder {
  color: var(--color-text-muted);
}

.custom-select-display:hover,
.custom-select-display.active {
  border-color: var(--color-primary);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: transform var(--transition-base);
}

.select-arrow svg {
  width: 20px;
  height: 20px;
}

.custom-select-display.active + .select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Custom Select Dropdown */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-bg-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
}

.custom-select-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.custom-select-option:hover {
  background: var(--color-primary-lighter);
  color: var(--color-primary);
}

.custom-select-option.selected {
  background: var(--color-primary);
  color: white;
}

.custom-select-option.selected:hover {
  background: var(--color-primary-dark);
  color: white;
}

.custom-select-option:not(:last-child) {
  border-bottom: 1px solid var(--color-border-light);
}

/* Scrollbar styling for dropdown */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ============================================
   RADIO CARDS
   ============================================ */
/* Form-group içinde label + radio-cards: tek satırda, soldaki alanla aynı hizada */
.form-group-radio,
.form-group:has(.group-label) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-lg);
  min-height: 56px;
}

.group-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.form-group-radio .radio-cards,
.form-group:has(.group-label) .radio-cards {
  flex: 1 1 auto;
  min-width: 0;
}

/* Vize Geçmişi: 3 sütunda label üstte, butonlar altta – iç içe geçmeyi önler */
.form-grid.three-cols .form-group-radio,
.form-grid.three-cols .form-group:has(.group-label) {
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  gap: var(--space-sm);
}
.form-grid.three-cols .form-group-radio .group-label,
.form-grid.three-cols .form-group:has(.group-label) .group-label {
  margin-bottom: 0;
}
.form-grid.three-cols .form-group-radio .radio-cards,
.form-grid.three-cols .form-group:has(.group-label) .radio-cards {
  width: 100%;
  flex: 0 0 auto;
}

.radio-cards {
  display: flex;
  gap: var(--space-md);
}

.radio-card {
  flex: 1;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: 52px;
  padding: 0 var(--space-lg);
  background: var(--color-bg-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.radio-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  position: relative;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.radio-indicator::after {
  content: "";
  position: absolute;
  top: calc(50% - 0px);
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.radio-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
}

/* Radio Card Hover */
.radio-card:hover .radio-card-content {
  border-color: var(--color-primary);
  background: var(--color-primary-lighter);
}

.radio-card:hover .radio-text {
  color: var(--color-primary);
}

/* Radio Card Checked */
.radio-card input:checked + .radio-card-content {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
}

.radio-card input:checked + .radio-card-content .radio-indicator {
  border-color: white;
  background: transparent;
}

.radio-card input:checked + .radio-card-content .radio-indicator::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-card input:checked + .radio-card-content .radio-text {
  color: white;
}

/* ============================================
   SUBMIT SECTION
   ============================================ */
.submit-section {
  padding: var(--space-xl);
  background: var(--color-bg-secondary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  height: 60px;
  padding: 0 var(--space-xl);
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  color: white;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(196, 33, 39, 0.4);
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-btn:disabled,
.submit-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: opacity var(--transition-base);
}

.btn-icon {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-base);
}

.submit-btn:hover .btn-icon {
  transform: translateX(4px);
}

.btn-loader {
  position: absolute;
  display: none;
}

.btn-loader svg {
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.submit-btn.loading .btn-content {
  opacity: 0;
}

.submit-btn.loading .btn-loader {
  display: block;
}

.submit-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 14px;
  color: var(--color-text-muted);
}

.submit-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-lg);
}

.loading-content p {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
  .form-grid.three-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.three-cols .form-group:last-child {
    grid-column: 1 / -1;
  }

  .step-label {
    font-size: 11px;
    max-width: 70px;
  }

  .step-line {
    max-width: 50px;
  }
}

/* Mobile Large */
@media (max-width: 768px) {
  .visa-hero {
    padding: 60px 0 100px;
  }

  .hero-title .title-main {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .progress-container {
    padding: var(--space-lg);
    margin-top: -50px;
  }

  .progress-steps {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .step-circle {
    width: 40px;
    height: 40px;
  }

  .step-number {
    font-size: 14px;
  }

  .step-label {
    display: none;
  }

  .step-line {
    max-width: 30px;
    margin-bottom: 0;
  }

  .form-grid,
  .form-grid.three-cols {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: var(--space-lg);
  }

  .section-header {
    flex-direction: row;
    align-items: center;
  }

  .section-icon {
    margin: 0;
  }

  .section-title-wrapper {
    text-align: left;
  }

  .form-group-radio,
  .form-group:has(.group-label) {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    gap: var(--space-sm);
  }

  .form-group-radio .group-label,
  .form-group:has(.group-label) .group-label {
    margin-bottom: 0;
  }

  .radio-cards {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .radio-cards .radio-card {
    flex: 0 0 calc(50% - 8px);
  }

  .submit-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .visa-hero {
    padding: 40px 0 80px;
  }

  .hero-badge {
    font-size: 12px;
    padding: 8px 16px;
  }

  .hero-title .title-accent {
    font-size: 14px;
  }

  .hero-title .title-main {
    font-size: 28px;
  }

  .progress-container {
    margin-top: -40px;
  }

  .step-circle {
    width: 36px;
    height: 36px;
  }

  .step-line {
    max-width: 20px;
  }

  .form-section {
    padding: var(--space-md);
  }

  .section-icon {
    width: 44px;
    height: 44px;
  }

  .section-title {
    font-size: 18px;
  }

  .input-wrapper input,
  .select-wrapper select {
    height: 52px;
    font-size: 15px;
  }

  .radio-card-content {
    height: 48px;
  }

  .submit-btn {
    height: 54px;
    font-size: 16px;
  }
}
