/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e6ea;
  padding: 16px 24px;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-area {
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.header-tagline {
  font-size: 14px;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #01182f 0%, #032342 60%, #083c6c 100%);
  padding: 48px 24px;
  text-align: center;
}

.hero h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 15px;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  max-width: 720px;
  width: 100%;
  margin: -24px auto 40px;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* ===== FORM SECTIONS ===== */
.form-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 32px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.section-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #01182f;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}

/* ===== FORM ROWS ===== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 4px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group.full-width {
  width: 100%;
}

/* ===== LABELS ===== */
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.required {
  color: #e53e3e;
  font-weight: 700;
}

/* ===== INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

select:invalid,
select option[value=""][disabled] {
  color: #9ca3af;
}

select option {
  color: #0f172a;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #01182f;
  box-shadow: 0 0 0 3px rgba(1, 24, 47, 0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="date"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
  border-color: #94a3b8;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* ===== CHARACTER COUNTER ===== */
.char-counter {
  font-size: 12px;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

/* ===== ERROR STATE ===== */
input.error,
select.error,
textarea.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-msg {
  display: block;
  font-size: 13px;
  color: #e53e3e;
  margin-top: 4px;
  min-height: 18px;
}

/* ===== FILE UPLOAD ===== */
.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: #fafbfc;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: #0f3460;
  background: #f0f4f9;
}

.file-upload-icon {
  color: #64748b;
  margin-bottom: 12px;
}

.file-upload-text {
  font-size: 15px;
  color: #475569;
  margin-bottom: 6px;
}

.file-browse {
  color: #0f3460;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.file-upload-hint {
  font-size: 13px;
  color: #94a3b8;
}

.file-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f9f4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
}

.file-name {
  font-size: 14px;
  color: #166534;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-remove {
  background: none;
  border: none;
  font-size: 20px;
  color: #dc2626;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

.file-remove:hover {
  color: #991b1b;
}

/* ===== KVKK SECTION ===== */
.kvkk-section {
  background: #ffffff;
}

.kvkk-box {
  margin-bottom: 20px;
}

.kvkk-text {
  background: #f8fafc;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  padding: 20px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
}

.kvkk-text p {
  margin-bottom: 10px;
}

.kvkk-text strong {
  color: #1a1a2e;
}

.kvkk-text ul {
  margin: 8px 0 12px 20px;
}

.kvkk-text ul li {
  margin-bottom: 4px;
}

.kvkk-text a {
  color: #0f3460;
  text-decoration: underline;
}

/* ===== CUSTOM CHECKBOX ===== */
.kvkk-consent {
  padding-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #0f3460;
  border-color: #0f3460;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.15);
}

.checkbox-text {
  font-size: 14px;
  font-weight: 400;
  color: #334155;
  line-height: 1.6;
}

/* ===== TEAM TYPE SELECTOR (Radio) ===== */
.team-type-selector {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f0f4f9;
  border-radius: 10px;
  border: 1px solid #e2e6ea;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  flex: 1;
  padding: 16px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.radio-option:hover {
  background: #e0e8f0;
}

.radio-option:has(input:checked) {
  background: #ffffff;
  border-color: #0f3460;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.radio-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f3460;
  transform: scale(0);
  transition: transform 0.15s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
  border-color: #0f3460;
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
  transform: scale(1);
}

.radio-option input[type="radio"]:checked ~ .radio-label {
  font-weight: 700;
  color: #0f3460;
}

.radio-label {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
  transition: color 0.15s ease;
}

/* ===== MEMBER CARDS (ACCORDION) ===== */
.member-card {
  background: #f8fafc;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.member-card:hover {
  border-color: #cbd5e1;
}

.member-card.open {
  border-color: #0f3460;
}

.member-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.member-card-header:hover {
  background: #f0f4f9;
}

.member-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.member-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.member-summary {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-card.open .member-summary {
  color: #334155;
}

.accordion-arrow {
  display: flex;
  align-items: center;
  color: #94a3b8;
  transition: transform 0.25s ease;
}

.member-card.open .accordion-arrow {
  transform: rotate(180deg);
  color: #0f3460;
}

/* Accordion body */
.member-card-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.member-card.open .member-card-body {
  max-height: 800px;
  padding: 4px 20px 20px;
}

/* Flat mode (bireysel) — no accordion, just plain fields */
.member-card.mode-flat {
  background: transparent;
  border: none;
  margin-bottom: 0;
  overflow: visible;
}

.member-card.mode-flat .member-card-header {
  display: none;
}

.member-card.mode-flat .member-card-body {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.remove-member-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.remove-member-btn:hover {
  background: #fef2f2;
}

.add-member-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: #f0f4f9;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  color: #0f3460;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  margin-top: 4px;
}

.add-member-btn:hover {
  background: #e0e8f0;
  border-color: #01182f;
}

/* ===== SUBMIT SECTION ===== */
.submit-section {
  text-align: center;
  padding-top: 8px;
}

.submit-btn {
  width: 100%;
  max-width: 400px;
  padding: 14px 28px;
  background: #01182f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.submit-btn:hover:not(:disabled) {
  background: #032342;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 24, 47, 0.2);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top: 2.5px solid #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.submit-note {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 12px;
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
}

.success-icon {
  color: #16a34a;
  margin-bottom: 20px;
}

.success-message h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.success-message p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 8px;
}

.success-note {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 16px;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: auto;
  background: #1a1a2e;
  padding: 20px 24px;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: #64748b;
}

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

/* Tablet */
@media (max-width: 768px) {
  .hero {
    padding: 36px 20px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .form-section {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-container {
    margin-top: -16px;
  }
}

/* Mobil */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .header {
    padding: 12px 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .logo-img {
    height: 40px;
  }

  .header-tagline {
    font-size: 12px;
  }

  .hero {
    padding: 28px 16px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero-desc {
    font-size: 13px;
  }

  .form-container {
    padding: 0 12px;
    margin-top: -12px;
  }

  .form-section {
    padding: 20px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

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

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    padding: 10px 12px;
    font-size: 16px; /* iOS zoom engeli */
  }

  .file-upload-area {
    padding: 24px 16px;
  }

  .kvkk-text {
    padding: 14px;
    max-height: 160px;
    font-size: 12px;
  }

  .checkbox-text {
    font-size: 13px;
  }

  .submit-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .success-message {
    padding: 36px 20px;
  }

  .success-message h2 {
    font-size: 22px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

*:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}