/* ============================================================
   PsykoLink — Kavram Havuzu Sayfası
   Design System: Psiko Mavi & Mint Paleti
   Fonts: Poppins (headers) + Inter (body)
   ============================================================ */

:root {
  --primary-green:  #10B981;
  --primary-blue:   #3B82F6;
  --accent-purple:  #6C63FF;
  --success-green:  #22C55E;
  --soft-gray:      #F9FAFB;
  --dark-navy:      #0C0F1A;
  --text-black:     #1F2937;
  --text-muted:     #4B5563;
  --text-light:     #9CA3AF;
  --white:          #FFFFFF;
  --border:         rgba(59, 130, 246, 0.2);
  --radius-lg:      28px;
  --radius-md:      18px;
  --radius-sm:      12px;
  --container:      clamp(16rem, 90vw, 1200px);
}

*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text-black);
  background: var(--soft-gray);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.inner {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Shared utilities ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-blue);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, #10B981, #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 0.75rem;
}

/* ============================================================
   1. HERO
   ============================================================ */
.kavram-hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(160deg, #EFF6FF 0%, #F0FDF4 50%, #F9FAFB 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.kavram-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(16, 185, 129, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.kavram-hero .inner {
  position: relative;
  max-width: 820px;
}

.kavram-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-black);
  margin-bottom: 1.25rem;
}

.kavram-hero .hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 0.75rem;
}

.kavram-hero .hero-desc {
  font-size: 0.93rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   2. ARAMA ALANI
   ============================================================ */
.kavram-search-section {
  padding: 3rem 0 2rem;
  background: var(--white);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.kavram-search-section .inner {
  max-width: 680px;
}

.kavram-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.kavram-search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
}

.kavram-search-input {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 3rem;
  border-radius: 999px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  font-size: 0.97rem;
  font-family: "Inter", sans-serif;
  color: var(--text-black);
  background: var(--soft-gray);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kavram-search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: var(--white);
}

.kavram-search-input::placeholder {
  color: var(--text-light);
}

.no-results-msg {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
  display: none;
}

/* ============================================================
   3. ALFABETİK NAVİGASYON
   ============================================================ */
.alpha-nav {
  padding: 1.5rem 0;
  background: var(--white);
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  position: sticky;
  top: 65px;
  z-index: 100;
}

.alpha-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
}

.alpha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.alpha-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-blue);
  border-color: rgba(59, 130, 246, 0.2);
}

.alpha-btn.active {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.alpha-btn.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.alpha-all-btn {
  padding: 0 0.85rem;
  width: auto;
  font-size: 0.78rem;
  border-radius: 999px;
}

/* ============================================================
   4. KAVRAM GRID
   ============================================================ */
.kavram-grid-section {
  padding: 3rem 0 4rem;
  background: var(--soft-gray);
  min-height: 30vh;
}

.kavram-grid-section .inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.kavram-count {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 500;
}

.kavram-count strong {
  color: var(--primary-blue);
}

.kavram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.kavram-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kavram-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kavram-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -16px rgba(14, 22, 40, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.kavram-card:hover::before {
  opacity: 1;
}

.kavram-card-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.12));
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.kavram-card h3 {
  font-size: 1.05rem;
  color: var(--text-black);
  flex: 1;
}

.kavram-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kavram-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  width: fit-content;
  margin-top: auto;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.kavram-card-link:hover {
  background: rgba(59, 130, 246, 0.07);
  transform: translateX(2px);
}

.kavram-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
}

.kavram-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  color: rgba(59, 130, 246, 0.25);
}

.kavram-empty-state p {
  font-size: 0.95rem;
}

/* ============================================================
   5. RASTGELE KAVRAM KEŞFİ
   ============================================================ */
.random-kavram {
  padding: 4rem 0;
  background: var(--white);
}

.random-kavram .inner {
  max-width: 680px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.random-kavram-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.random-kavram-desc {
  font-size: 0.97rem;
  color: var(--text-muted);
}

.random-kavram-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  color: var(--white);
  font-size: 0.97rem;
  font-weight: 700;
  font-family: "Inter", sans-serif;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(59, 130, 246, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.random-kavram-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 36px -12px rgba(59, 130, 246, 0.5);
}

.random-kavram-btn.spinning i {
  animation: spinOnce 0.5s ease;
}

@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .kavram-hero { padding: 3.5rem 0 3rem; }

  .alpha-nav { top: 60px; }

  .kavram-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .kavram-grid {
    grid-template-columns: 1fr;
  }

  .alpha-track {
    gap: 0.2rem;
  }

  .alpha-btn {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.75rem;
  }
}
