/* ═══════════════════════════════════════════════════════
   AnadoluByte — Mobil & tablet iyileştirmeleri
   ═══════════════════════════════════════════════════════ */

/* ── Tablet: hamburger menü, sade header ── */
@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-logo .logo-text {
    max-width: min(42vw, 9.5rem);
  }

  .header-logo .logo-name {
    font-size: 0.9375rem;
  }

  .header-logo .logo-tag {
    font-size: 0.625rem;
  }

  .header-logo .logo-mark-img {
    width: 36px;
    height: 36px;
  }

  .menu-btn {
    display: flex;
    order: 4;
  }

  .header-actions {
    order: 3;
    margin-left: auto;
    gap: 0.35rem;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .header-actions .btn-primary.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .header-actions .icon-btn {
    width: 36px;
    height: 36px;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + 0.5rem);
    left: var(--site-gutter);
    right: var(--site-gutter);
    flex: none;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100dvh - var(--header-h) - 1.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.65rem;
    z-index: 210;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a,
  .header-nav-parent {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    font-size: 0.9375rem;
    border-radius: var(--radius);
  }

  .header-nav-dropdown {
    width: 100%;
  }

  .header-nav-submenu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: none;
    padding: 0 0 0.35rem 0.65rem;
    background: transparent;
  }

  .header-nav-dropdown.open .header-nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .header-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 205;
    border: none;
    background: rgba(15, 23, 42, 0.35);
    cursor: pointer;
    touch-action: manipulation;
  }

  body.site-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .welcome-inner {
    padding-block: 2rem 1.5rem;
    gap: 2rem;
  }

  .welcome-visual {
    max-width: 100%;
    overflow: hidden;
  }

  .preview-stack {
    max-width: 100%;
  }

  .preview-float-1 {
    right: 0;
    top: -8px;
  }

  .preview-float-2 {
    left: 0;
    bottom: 16px;
  }

  .section {
    padding: 4rem 0;
  }

  .section-head {
    margin-bottom: 2rem;
  }

  .section-head h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .bento-item-1,
  .bento-item-2 {
    grid-column: span 1;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .card-grid-4,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .pricing-row {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-social a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .footer-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .account-support-grid {
    grid-template-columns: 1fr;
  }

  .checkout-form-grid,
  .form-row,
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .cart-item-actions {
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
  }

  .cart-package-price {
    white-space: normal;
  }

  .page-dynamic-hero {
    padding-top: calc(var(--header-h) + 1.25rem);
  }

  .auth-shell,
  .auth-page {
    padding-inline: var(--site-gutter);
  }
}

/* ── Telefon: tipografi, dokunma, performans ── */
@media (max-width: 640px) {
  :root {
    --site-gutter: 1rem;
    --header-h: 60px;
  }

  .welcome {
    min-height: auto;
    min-height: unset;
  }

  .welcome-copy h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.65rem);
    max-width: none;
    line-height: 1.1;
  }

  .welcome-lead {
    font-size: 1rem;
    max-width: none;
  }

  .welcome-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .welcome-actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .welcome-stats {
    gap: 1rem 1.5rem;
  }

  .welcome-stats strong {
    font-size: 1.5rem;
  }

  .preview-float {
    position: relative;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin-top: 0.65rem;
    animation: none;
  }

  .preview-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .preview-card-main {
    animation: none;
  }

  .blob {
    animation: none;
    opacity: 0.35;
  }

  .trust-track {
    animation-duration: 50s;
  }

  .section {
    padding: 3.25rem 0;
  }

  .btn-lg {
    padding: 0.8rem 1.25rem;
    font-size: 0.9375rem;
  }

  .price-card.featured {
    transform: none;
  }

  .header-actions .btn-primary.btn-sm {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .live-help-root {
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
  }

  .live-help-panel {
    width: min(288px, calc(100dvw - 2 * var(--site-gutter)));
    max-height: min(420px, calc(100dvh - 6rem - env(safe-area-inset-bottom, 0px)));
  }

  .live-help-fab span {
    display: none;
  }

  .live-help-fab {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .faq-item summary {
    padding-right: 1.5rem;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 960px) and (hover: none) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .icon-btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .blob,
  .preview-card-main,
  .preview-float,
  .trust-track {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
