/* ==========================================================================
   MOBILE OVERRIDES — React DOM kebab-case style attribute hedefli.
   ========================================================================== */

@media (max-width: 1024px) {

  /* --- Section padding --------------------------------------------------- */
  .section { padding: 56px 16px !important; }

  /* --- Container & max-width --------------------------------------------- */
  .container,
  [style*="max-width: 1240"],
  [style*="max-width: 1360"],
  [style*="max-width: 1180"],
  [style*="max-width: 1100"],
  [style*="max-width: 1080"],
  [style*="max-width: 1000"],
  [style*="max-width: 960"],
  [style*="max-width: 640"],
  [style*="max-width: 560"]   { max-width: 100% !important; width: 100% !important; }

  /* --- Grid → 1 kolon ---------------------------------------------------- */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* --- Display class (büyük başlıklar) ----------------------------------- */
  .display { font-size: 30px !important; line-height: 1.1 !important; }

  /* --- Yatay flex'i dikeye al -------------------------------------------- */
  [style*="display: flex"][style*="gap: 48"],
  [style*="display: flex"][style*="gap: 64"],
  [style*="display: flex"][style*="gap: 80"] {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* --- Görseller --------------------------------------------------------- */
  img { max-width: 100% !important; height: auto !important; }
  header img, [alt="NEGS Tech"] { height: 28px !important; width: auto !important; }

  [style*="width: 1100"],
  [style*="width: 1240"],
  [style*="width: 720"],
  [style*="width: 800"],
  [style*="width: 640"],
  [style*="width: 560"]      { width: 100% !important; max-width: 100% !important; }

  /* --- Font-size (kebab-case) ------------------------------------------- */
  [style*="font-size: 96"],
  [style*="font-size: 88"],
  [style*="font-size: 80"],
  [style*="font-size: 72"],
  [style*="font-size: 64"]   { font-size: 36px !important; line-height: 1.05 !important; }

  [style*="font-size: 56"],
  [style*="font-size: 48"],
  [style*="font-size: 44"],
  [style*="font-size: 40"]   { font-size: 26px !important; line-height: 1.1 !important; }

  [style*="font-size: 38"],
  [style*="font-size: 36"],
  [style*="font-size: 32"]   { font-size: 20px !important; line-height: 1.2 !important; }

  [style*="font-size: clamp"] { font-size: 30px !important; line-height: 1.1 !important; }

  /* --- Padding (kebab-case değerleri) ------------------------------------ */
  [style*="padding: 36px"],
  [style*="padding: 40px"]   { padding: 16px !important; }
  [style*="padding: 48px"]   { padding: 18px !important; }
  [style*="padding: 56px"],
  [style*="padding: 64px"]   { padding: 20px !important; }
  [style*="padding: 72px"],
  [style*="padding: 80px"]   { padding: 22px !important; }
  [style*="padding: 96px"]   { padding: 24px !important; }

  [style*="padding: 120px 48px"],
  [style*="padding: 140px 48px"],
  [style*="padding: 160px 48px"],
  [style*="padding: 96px 48px"],
  [style*="padding: 80px 48px"]  { padding: 56px 16px !important; }

  [style*="padding: 104px 16px"],
  [style*="padding: 100px 16px"] { padding: 88px 12px 16px !important; }

  /* Hücre/satır padding */
  [style*="padding: 20px 28px"],
  [style*="padding: 24px 28px"],
  [style*="padding: 24px 32px"],
  [style*="padding: 12px 28px"],
  [style*="padding: 20px 36px"]  { padding: 14px !important; }

  /* --- Negatif offset dekoratif ----------------------------------------- */
  [style*="right: -120"],
  [style*="right: -220"],
  [style*="right: -80"],
  [style*="left: -120"],
  [style*="left: -220"],
  [style*="left: -80"],
  [style*="top: -80"]        { display: none !important; }

  /* --- Animasyon --------------------------------------------------------- */
  [style*="marquee"], [style*="tickerScroll"] { animation-duration: 30s !important; }

  /* --- Buton ------------------------------------------------------------- */
  .btn { width: 100% !important; justify-content: center !important; padding: 14px 20px !important; }
  .btn--link { width: auto !important; }

  /* --- Yatay scroll engelle --------------------------------------------- */
  html, body { overflow-x: hidden !important; }

  [style*="overflow-x: auto"] { -webkit-overflow-scrolling: touch; }

  /* --- VEGA ------------------------------------------------------------- */
  #vega [style*="display: flex"] { gap: 16px !important; }

  /* ========== HESAPLAYICI =============================================== */
  #hesaplayici .display { font-size: 28px !important; }

  /* Yük listesi satırı → kart */
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] {
    grid-template-columns: 1fr 32px !important;
    grid-template-areas:
      "name del"
      "count count"
      "watt  watt"
      "total total" !important;
    gap: 8px !important;
    padding: 14px !important;
  }
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] > *:nth-child(1) { grid-area: name; font-weight: 600; }
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] > *:nth-child(2) { grid-area: count; }
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] > *:nth-child(3) { grid-area: watt; }
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] > *:nth-child(4) { grid-area: total; text-align: right; }
  #hesaplayici [style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"] > *:nth-child(5) { grid-area: del; justify-self: end; }

  /* Header satırını (eyebrow'lu) gizle */
  #hesaplayici [style*="background: rgb(250, 250, 247)"][style*="grid-template-columns: 2fr 1fr 1fr 1fr 40px"],
  #hesaplayici .yuk-header-row { display: none !important; }

  /* Input görünür yap */
  #hesaplayici input[type="text"],
  #hesaplayici input:not([type]),
  #hesaplayici input[type="number"] {
    background: #FAFAF7 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    font-size: 14px !important;
  }
  #hesaplayici input[type="range"] { width: 100% !important; }

  /* 3-kolon kontroller (range/red/pf) → stack */
  #hesaplayici [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 18px 14px !important;
  }

  /* ========== HARITA =================================================== */
  #iletisim-harita .container > div {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  #iletisim-harita .map-shell,
  #iletisim-harita .map-canvas {
    min-height: 320px !important;
    height: 320px !important;
  }
  #iletisim-harita .map-shell {
    border-radius: 14px !important;
    box-shadow: 0 14px 32px -12px rgba(15,36,69,0.2), 0 0 0 1px rgba(15,36,69,0.06) !important;
  }
  #iletisim-harita [style*="grid-template-columns: 120px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  /* ========== MOBİL NAV ================================================ */
  .nav-mobile-toggle { display: inline-flex !important; }
  .nav-desktop-links { display: none !important; }
  .nav-cta-desktop  { display: none !important; }

  .nav-mobile-panel {
    position: fixed; inset: 80px 12px auto 12px;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 24px 60px -10px rgba(15,36,69,0.25), 0 0 0 1px rgba(15,36,69,0.06);
    display: flex; flex-direction: column; gap: 4px;
    z-index: 60;
  }
  .nav-mobile-panel a {
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f2445;
    font-size: 16px;
    font-weight: 500;
  }
  .nav-mobile-panel a.active { background: rgba(230,81,0,0.08); color: #e65100; }
  .nav-mobile-panel a.cta {
    background: linear-gradient(135deg,#e65100,#ff8a3d);
    color: #fff; text-align: center; margin-top: 6px;
  }
}

/* Desktop'ta hamburger gizli */
@media (min-width: 1025px) {
  .nav-mobile-toggle, .nav-mobile-panel { display: none !important; }
}

/* Global yatay scroll güvenliği — JSX inline style'ları viewport'tan taşamaz */
html, body { max-width: 100vw; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
