/**
 * mobile.css — Mobil Uygulama Deneyimi
 * Yalnızca ≤768px ekranlar için geçerlidir.
 * Masaüstünde hiçbir etki yoktur.
 */

/* ─────────────────────────────────────────────────────────────
   1. iOS Safe Area & PWA Viewport
───────────────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  :root {
    --safe-area-bottom: env(safe-area-inset-bottom);
  }
}

/* ─────────────────────────────────────────────────────────────
   2. Alt Navigasyon Çubuğu — Varsayılan: display:none
───────────────────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}

/* Admin ayarlar butonu — varsayılan gizli, JS tarafından gösterilir */
.mobile-nav-settings {
  display: none;
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  :root {
    --safe-area-bottom: env(safe-area-inset-bottom);
  }
}

/* ─────────────────────────────────────────────────────────────
   2. Alt Navigasyon Çubuğu (Tab Bar) — Tüm Ekran Boyutları
   Varsayılan: display:none → sadece mobilde açılır
───────────────────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   3. Mobil Özel Stiller (≤768px)
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Genel ── */
  html {
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    /* Alt nav için yer bırak */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  /* ── Üst Header — Liquid Glass Floating Bar ── */
  .header {
    height: 54px;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    border-radius: var(--border-radius-pill);
    background-color: var(--surface-color);
    border: var(--glass-border);
    border-top: var(--glass-border-highlight);
    backdrop-filter: var(--glass-backdrop-blur);
    -webkit-backdrop-filter: var(--glass-backdrop-blur);
    box-shadow: var(--card-shadow);
  }

  :root {
    --header-height: 66px;
  }

  .nav-menu {
    display: none !important;
  }

  .mobile-toggle {
    display: none !important;
  }

  .logo {
    font-size: 1.05rem;
  }

  /* ── Alt Navigasyon Çubuğu — Floating Liquid Glass Pill ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 480px;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: var(--surface-color);
    border: var(--glass-border);
    border-top: var(--glass-border-highlight);
    border-radius: var(--border-radius-pill);
    backdrop-filter: var(--glass-backdrop-blur);
    -webkit-backdrop-filter: var(--glass-backdrop-blur);
    z-index: 200;
    align-items: center;
    justify-content: space-around;
    box-shadow: var(--card-shadow);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px 4px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
  }

  .mobile-nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
  }

  .mobile-nav-item span {
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  /* Aktif tab */
  .mobile-nav-item.active {
    color: var(--accent-primary);
  }

  /* Aktif tab — üst çizgi indikatörü */
  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 0 0 4px 4px;
  }

  /* ── Hero Bölümü ── */
  .hero {
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 32px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .hero-content { order: 2; }
  .hero-visual  { order: 1; }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-actions {
    justify-content: center;
    gap: 12px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 0.875rem;
  }

  .avatar-wrapper {
    width: 180px;
    height: 180px;
  }

  /* ── Section ── */
  .section {
    padding: 40px 0;
  }

  .container {
    padding: 0 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }

  /* ── Post Kartları ── */
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .post-card {
    border-radius: var(--border-radius-md);
  }

  /* Kartlara basınca geri bildirim */
  .post-card:active,
  .card:active {
    transform: scale(0.985);
    transition: transform 0.1s ease;
  }

  /* Hover efektlerini mobilde kapat (parmak hover göremez) */
  .post-card:hover,
  .card:hover {
    transform: none;
  }

  .post-content {
    padding: 16px;
  }

  .post-title {
    font-size: 1.15rem;
  }

  /* ── Butonlar — Dokunma Dostu ── */
  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  .btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
  }

  /* ── Footer ── */
  .footer, footer {
    display: none !important;
  }

  /* ── Tipografi ── */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.25rem; }

  /* ── Stack Kartlar (Anasayfa) ── */
  .stack-wrapper {
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  /* ── Projects grid ── */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-card {
    padding: 20px;
  }

  /* ── About Grid ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .profile-card {
    padding: 24px;
  }

  /* ── Social Feed Carousel ── */
  .social-carousel-card {
    min-width: 200px;
    max-width: 200px;
  }

  /* ── Scroll çubuğunu gizle ── */
  .social-carousel-track::-webkit-scrollbar { display: none; }

  /* ── Genel dokunma hedefleri ── */
  a, button, [role="button"] {
    min-height: 36px;
  }

  /* ── Modal ── */
  #backoffice-modal > div {
    width: 96% !important;
    max-height: 92vh !important;
    padding: 20px !important;
    border-radius: 16px !important;
  }

  /* ── Form elemanları ── */
  input, select, textarea {
    font-size: 16px !important; /* iOS auto-zoom'u engelle */
  }

  /* ── Sayfa geçiş animasyonu ── */
  @keyframes pageSlideIn {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  main, .stack-section, .section {
    animation: pageSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

}

/* ─────────────────────────────────────────────────────────────
   4. Küçük Ekranlar (≤375px — iPhone SE vb.)
───────────────────────────────────────────────────────────── */
@media (max-width: 375px) {
  .hero-title { font-size: 1.75rem; }
  .mobile-nav-item span { font-size: 0.6rem; }
  .mobile-nav-item svg { width: 20px; height: 20px; }
}
