/* ============================================================
   ideal-kilo.css — İdeal Kilo / BMI sayfasına özel stiller
   - SADECE sismanlik-testi.php tarafından yüklenir.
   - Kapsam: tüm seçiciler .ik-page ile başlar (globali ezmez).
   - !important yok, hack'li media query yok.
   - Çift scroll yok: overflow-x yönetimi kapsam içinde (clip).
   ============================================================ */

.ik-page {
  box-sizing: border-box;
  overflow-x: clip;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ik-page *,
.ik-page *::before,
.ik-page *::after {
  box-sizing: inherit;
}

.ik-page :where(h1, h2, h3, p, figure) {
  margin: 0;
}

.ik-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  width: 100%;
}

.ik-card {
  background: #fff;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ik-card-spaced {
  margin-top: 30px;
}

/* Giriş / hero */
.ik-intro {
  text-align: center;
  margin-bottom: 30px;
}

.ik-hero-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  height: auto;
  display: block;
}

.ik-lead {
  width: 100%;
  line-height: 1.8;
  color: #444;
  font-size: 1.15em;
  text-align: left;
  background: #fdfdfd;
  padding: 25px;
  border-radius: 10px;
  border: 1px solid #eee;
}

.ik-title {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.9rem;
}

.ik-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

/* Form */
.ik-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ik-field {
  margin-bottom: 20px;
}

.ik-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
}

.ik-input,
.ik-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ik-input:focus,
.ik-select:focus {
  border-color: #4caf50;
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.ik-input:focus-visible,
.ik-select:focus-visible,
.ik-btn:focus-visible {
  outline: 3px solid rgba(76, 175, 80, 0.55);
  outline-offset: 2px;
}

.ik-input.ik-invalid {
  border-color: #e53935;
  background: #fff7f7;
}

.ik-input.ik-invalid:focus {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.ik-error {
  display: none;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #c62828;
}

.ik-error.ik-visible {
  display: block;
}

.ik-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ik-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.ik-btn[disabled] {
  opacity: 0.8;
  cursor: wait;
  transform: none;
}

.ik-btn-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: ik-spin 0.8s linear infinite;
}

/* Sonuç kutusu */
.ik-result {
  margin-top: 30px;
  padding: 20px;
  background: #e8f5e9;
  border-radius: 10px;
  border: 1px solid #c8e6c9;
  scroll-margin-top: 20px;
}

.ik-result[hidden] {
  display: none;
}

.ik-result-title {
  margin-top: 0;
  border-bottom: 1px solid #a5d6a7;
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-size: 1.35rem;
}

.ik-cat-underweight { color: #f9a825; }
.ik-cat-ideal { color: #2e7d32; }
.ik-cat-overweight { color: #ff5722; }
.ik-cat-obese { color: #f44336; }

.ik-data-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #ddd;
  padding-bottom: 5px;
}

.ik-data-label {
  font-weight: 600;
  color: #555;
}

.ik-data-value {
  font-weight: 700;
  color: #333;
  text-align: right;
}

.ik-data-value-range {
  color: #2e7d32;
}

/* Gösterge (gauge) */
.ik-gauge {
  margin-top: 22px;
}

.ik-gauge-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.ik-gauge-rail {
  position: relative;
  padding-top: 22px;
}

.ik-gauge-bar {
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f7;
}

.ik-gauge-seg-under {
  flex: 30;
  background: #ffc107;
}

.ik-gauge-seg-ideal {
  flex: 30;
  background: #4caf50;
}

.ik-gauge-seg-over {
  flex: 20;
  background: #ff9800;
}

.ik-gauge-seg-obese {
  flex: 20;
  background: #f44336;
}

.ik-gauge-marker {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  transition: left 0.8s ease;
}

.ik-gauge-marker::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 2px auto 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #2c3e50;
}

.ik-gauge-marker-dot {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  border-radius: 50%;
  background: #2c3e50;
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.ik-gauge-legend {
  display: flex;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
}

.ik-gauge-legend span:nth-child(1) { flex: 30; }
.ik-gauge-legend span:nth-child(2) { flex: 30; text-align: center; }
.ik-gauge-legend span:nth-child(3) { flex: 20; text-align: center; }
.ik-gauge-legend span:nth-child(4) { flex: 20; text-align: right; }

/* Tavsiye kutusu */
.ik-advice {
  margin-top: 20px;
  padding: 18px;
  background: #fff;
  border-radius: 8px;
  border-left: 6px solid #4caf50;
  line-height: 1.6;
}

.ik-advice-underweight { border-left-color: #f9a825; }
.ik-advice-ideal { border-left-color: #4caf50; }
.ik-advice-overweight { border-left-color: #ff5722; }
.ik-advice-obese { border-left-color: #f44336; }

/* Skeleton (analiz animasyonu) */
.ik-skeleton-line,
.ik-skeleton-block {
  border-radius: 8px;
  background: linear-gradient(90deg, #e8f5e9 25%, #d7e9d9 37%, #e8f5e9 63%);
  background-size: 400% 100%;
  animation: ik-shimmer 1.1s ease-in-out infinite;
}

.ik-skeleton-line {
  height: 22px;
  margin-bottom: 14px;
}

.ik-skeleton-line.short {
  width: 55%;
}

.ik-skeleton-block {
  height: 120px;
  margin-top: 16px;
}

.ik-analyzing-note {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2e7d32;
  margin-bottom: 14px;
}

/* Uyarı */
.ik-warning {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin-top: 20px;
  border-radius: 5px;
  color: #856404;
}

/* Bilgi kartları */
.ik-info-title {
  color: #2c3e50;
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.ik-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.ik-fact {
  padding: 20px;
  background: #f8f9fa;
  border-left: 4px solid #66bb6a;
  border-radius: 8px;
}

.ik-fact-accent-2 { border-left-color: #43a047; }
.ik-fact-accent-3 { border-left-color: #4caf50; }

.ik-fact p {
  color: #444;
  line-height: 1.7;
}

/* Yazar / tıbbi inceleme kutusu (YMYL trust signal) */
.ik-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: #666;
  background: #f6fbf4;
  border: 1px solid #dcefd7;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.ik-author-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4caf50;
  color: #fff;
  font-size: 1.1rem;
}

.ik-author-box time {
  white-space: nowrap;
}

/* SSS akordeonu (long-tail SEO) */
.ik-faq {
  margin-top: 30px;
}

.ik-faq-item {
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}

.ik-faq-item:last-child {
  margin-bottom: 0;
}

.ik-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  cursor: pointer;
  list-style: none;
}

.ik-faq-question::-webkit-details-marker {
  display: none;
}

.ik-faq-question::after {
  content: "+";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}

.ik-faq-item[open] .ik-faq-question::after {
  content: "−";
}

.ik-faq-question:hover {
  color: #2e7d32;
}

.ik-faq-question:focus-visible {
  outline: 3px solid rgba(76, 175, 80, 0.55);
  outline-offset: -3px;
}

.ik-faq-answer {
  padding: 0 20px 18px;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.75;
}

.ik-faq-answer p + p {
  margin-top: 10px;
}

.ik-faq-answer a {
  color: #2e7d32;
  font-weight: 600;
}

/* Kaynakça (YMYL outbound trust) */
.ik-references {
  font-size: 0.75rem;
  color: #777;
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
  line-height: 1.7;
}

.ik-references ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.ik-references li + li {
  margin-top: 4px;
}

.ik-references a {
  color: #2e7d32;
}

/* Animasyonlar */
@keyframes ik-spin {
  to { transform: rotate(360deg); }
}

@keyframes ik-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Duyarlı tasarım (standart media query) */
@media (max-width: 600px) {
  .ik-container {
    padding: 10px;
    margin: 20px auto;
  }

  .ik-card {
    padding: 20px;
  }

  .ik-form-grid {
    grid-template-columns: 1fr;
  }

  .ik-title {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ik-page *,
  .ik-page *::before,
  .ik-page *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}
