/* ================================================
   COMPONENTS.CSS — Blog Bileşenleri
   ================================================ */

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before { opacity: 0.05; }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow-strong);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ================================================
   CARDS
   ================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--accent-glow), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
}

.card:hover::before { opacity: 1; }

/* Post Card */
.post-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-secondary);
  transition: transform var(--transition-slow);
}

.card:hover .post-card-image { transform: scale(1.03); }

.post-card-image-wrapper {
  overflow: hidden;
  position: relative;
}

.post-card-body {
  padding: var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}

.post-card:hover .post-card-title { color: var(--accent-light); }

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Featured Card (large) */
.post-card-featured {
  flex-direction: row;
  min-height: 280px;
}

.post-card-featured .post-card-image-wrapper {
  width: 45%;
  flex-shrink: 0;
}

.post-card-featured .post-card-image {
  height: 100%;
  aspect-ratio: unset;
}

.post-card-featured .post-card-title { font-size: 1.4rem; }

/* ================================================
   CATEGORY BADGE
   ================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.badge-teknoloji {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  border-color: rgba(124, 58, 237, 0.3);
}

.badge-ai, .badge-yapay-zeka {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.3);
}

.badge-yazilim {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-kisisel-gelisim {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-oyun {
  background: rgba(236, 72, 153, 0.15);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.3);
}

.badge-default {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* ================================================
   TAGS
   ================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--bg-card);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ================================================
   META INFO (date, read time)
   ================================================ */
.meta-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ================================================
   CAROUSEL
   ================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide .post-card {
  border-radius: var(--radius-xl);
  flex-direction: row;
  min-height: 380px;
}

.carousel-slide .post-card-image-wrapper {
  width: 55%;
  flex-shrink: 0;
}

.carousel-slide .post-card-image {
  height: 100%;
  aspect-ratio: unset;
}

.carousel-slide .post-card-body {
  padding: var(--space-2xl);
  justify-content: center;
}

.carousel-slide .post-card-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}

.carousel-slide .post-card-excerpt {
  font-size: 1rem;
  -webkit-line-clamp: 4;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--bg-card-hover);
}

.carousel-dots {
  display: flex;
  gap: var(--space-sm);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.carousel-dot.active {
  background: var(--accent);
  width: 24px;
}

/* ================================================
   SEARCH BAR
   ================================================ */
.search-wrapper {
  position: relative;
  max-width: 500px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* ================================================
   CATEGORY FILTER PILLS
   ================================================ */
.filter-pills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ================================================
   SIDEBAR ITEMS
   ================================================ */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.trending-item:last-child { border-bottom: none; }

.trending-item:hover .trending-title { color: var(--accent-light); }

.trending-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--border-strong);
  line-height: 1;
  min-width: 28px;
}

.trending-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.trending-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Category List */
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.category-item:last-child { border-bottom: none; }

.category-item:hover .category-name { color: var(--accent-light); }

.category-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.category-count {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ================================================
   FORM INPUTS
   ================================================ */
.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all var(--transition-fast);
}

input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}

/* ================================================
   POST DETAIL PAGE
   ================================================ */
.post-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg-primary) 100%);
}

.post-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.post-content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-3xl);
  align-items: start;
}

.post-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
}

.post-article h2 {
  font-size: 1.6rem;
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.post-article h3 {
  font-size: 1.3rem;
  margin: var(--space-xl) 0 var(--space-md);
}

.post-article p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-article ul, .post-article ol {
  list-style: disc;
  padding-left: var(--space-xl);
  margin: var(--space-md) 0;
  color: var(--text-secondary);
}

.post-article li { margin-bottom: var(--space-sm); }

.post-article img {
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}

/* Share Buttons */
.share-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.share-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn.twitter:hover { background: #1da1f2; border-color: #1da1f2; color: white; }
.share-btn.linkedin:hover { background: #0077b5; border-color: #0077b5; color: white; }
.share-btn.whatsapp:hover { background: #25d366; border-color: #25d366; color: white; }
.share-btn.copy:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* ================================================
   TOAST NOTIFICATION
   ================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  animation: slideInRight 0.3s ease;
  max-width: 350px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

/* ================================================
   DIVIDER
   ================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-2xl) 0;
}

/* Gradient divider */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: var(--space-2xl) 0;
  opacity: 0.5;
}

/* ================================================
   PAGE HEADER
   ================================================ */
.page-header {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
}

.page-header-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.page-header-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ================================================
   PAGINATION
   ================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-3xl);
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.page-btn:hover, .page-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* ================================================
   ABOUT PAGE
   ================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about-avatar-wrapper {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
  text-align: center;
}

.about-avatar {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-xl);
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-accent-strong);
  object-fit: cover;
  margin: 0 auto var(--space-xl);
}

.about-avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-xl);
  border: 3px solid var(--accent);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin: 0 auto var(--space-xl);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.skill-tag {
  padding: 0.4rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-code);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--bg-card);
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-avatar-wrapper { position: static; }
  .post-content-layout { grid-template-columns: 1fr; }
  .post-hero { height: 300px; }
  .post-article { padding: var(--space-xl); }
  .carousel-slide .post-card { flex-direction: column; }
  .carousel-slide .post-card-image-wrapper { width: 100%; height: 250px; }
}
