/* =============================================================================
   CorumKuyumcu — Mobil (telefon & küçük tablet, max 768px)
   Masaüstü stiller style.css içinde kalır.
   ============================================================================= */

@media (max-width: 768px) {
  :root {
    --nav-height: 58px;
  }

  html {
    font-size: 14px;
  }

  /* Sabit navbar altinda icerik baslasin (ust uste binme onlenir) */
  body {
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* --- Menü açıkken navbar overlay'in üstünde olmalı --- */
  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  body.menu-open .navbar {
    z-index: calc(var(--z-modal) + 10) !important;
    position: fixed !important;
  }

  /* Karartma — içerik üstünde, menü panelinin altında */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: calc(var(--z-modal) - 5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Yan menü paneli — tam opak */
  #navLinks {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 92vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-direction: column;
    align-items: stretch;
    background: #0a0a0f;
    border-left: 2px solid rgba(212, 168, 83, 0.5);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.92);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: calc(var(--z-modal) + 1);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    isolation: isolate;
  }

  #navLinks::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0a0a0f;
    z-index: -1;
  }

  #navLinks.active {
    transform: translateX(0);
  }

  .mobile-menu-head-item {
    flex-shrink: 0;
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    background: #12121a;
    border-bottom: 1px solid rgba(212, 168, 83, 0.35);
  }

  .mobile-menu-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
  }

  .mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-white);
    border: 1px solid rgba(212, 168, 83, 0.35);
    border-radius: var(--radius-sm);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #navLinks li:not(.mobile-menu-head-item) {
    width: 100%;
  }

  #navLinks a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(212, 168, 83, 0.15);
  }

  #navLinks a::after {
    display: none;
  }

  #navLinks a:active {
    background: rgba(212, 168, 83, 0.12);
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    z-index: calc(var(--z-modal) + 2);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #0a0a0f;
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
    overflow: visible;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.65rem;
    min-height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }

  .navbar-container {
    min-height: var(--nav-height);
    gap: 0.75rem;
  }

  .navbar-brand {
    font-size: 1.15rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Ust barda yatay menu linkleri gorunmesin — sadece cekmece */
  .navbar-container > .nav-links {
    position: fixed !important;
  }

  .page-header {
    padding: 1.25rem 0 2rem;
  }

  .page-title {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 0.75rem;
  }

  .page-breadcrumb {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.25rem;
    margin-bottom: 0.75rem;
  }

  .page-header .section-subtitle {
    margin-bottom: 0;
  }

  .hero {
    padding: 1.25rem 0 2.5rem;
  }

  .hero-home {
    padding-top: 2.25rem;
    padding-bottom: 0;
  }

  .hero-home .hero-content {
    padding-top: 0.5rem;
  }

  .hero-badge {
    margin-bottom: 1.15rem;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .hero-stat-item {
    min-width: 88px;
  }

  .hero-ticker {
    margin-top: 1.5rem;
  }

  .prices-section,
  .calculator-section,
  .about-section {
    padding-top: 2rem;
  }

  .midas-app {
    padding-top: 0.5rem;
  }

  .prices-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-content,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer {
    padding: 3rem 0 1.5rem;
  }

  .about-section {
    padding: 2rem 0 3rem;
    background: transparent;
  }

  .about-grid {
    gap: 2rem;
  }

  .about-content h2 {
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }

  .about-content p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .about-section > .container > .section-title {
    margin-top: 2.5rem !important;
    font-size: 1.75rem;
  }

  .about-section .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .about-stat-box {
    padding: 1.25rem 1rem;
  }

  .about-stat-number {
    font-size: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .category-tabs,
  .period-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar,
  .period-tabs::-webkit-scrollbar {
    display: none;
  }

  .category-tab,
  .period-tab {
    flex-shrink: 0;
  }

  .history-controls {
    grid-template-columns: 1fr;
  }

  .calc-result {
    padding: 1rem;
  }

  .calc-result-grid--units,
  .calc-result-grid--totals {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .calc-result-item--fark {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(212, 168, 83, 0.28);
  }

  .calc-result-amount {
    font-size: 1.3rem;
  }

  .calc-result-amount--unit {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .price-ticker-wrapper {
    padding: 0.5rem 0;
  }

  .ticker-item {
    padding: 0 1rem;
  }
}
