/* ============================================================
   NFC Medya — Global Responsive Fixes v2
   Ortak public site güvenlik ağı. Sayfa tasarımını değiştirmez;
   küçük ekranlarda taşma, sabit genişlik ve okunabilirlik sorunlarını düzeltir.
   ============================================================ */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after { min-width: 0; }
img, video, canvas, svg, iframe { max-width: 100%; }
img, video { height: auto; }
iframe { width: 100%; }

main, section, article, header, footer, nav, form { min-width: 0; }
p, li, a, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
input, select, textarea, button { max-width: 100%; }

/* Mobil drawer hiçbir telefonda viewport dışına taşmasın. */
#mobileMenu {
    width: min(20rem, 92vw) !important;
    max-width: 92vw !important;
    overscroll-behavior: contain;
}
#mobileMenu nav { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }

/* Büyük başlıkların 320–430px cihazlarda kırılmasını yumuşatır. */
@media (max-width: 767.98px) {
    h1 { line-height: 1.08 !important; }
    h2 { line-height: 1.15 !important; }

    /* Sık kullanılan Tailwind spacing sınıfları mobilde gereksiz yatay baskı oluşturmasın. */
    .px-10, .px-12, .px-14, .px-16 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .py-20, .py-24, .py-28, .py-32 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }

    /* Uzun CTA satırları / buton grupları taşmasın. */
    .flex { min-width: 0; }
    a[class*="inline-flex"], button[class*="inline-flex"] { white-space: normal; text-align: center; }

    /* Sabit/min-width kartları telefon genişliğine zorla. */
    [class*="min-w-["] { min-width: 0 !important; }
    [class*="max-w-["] { max-width: 100%; }

    /* Formlar dokunmatik kullanım için okunabilir kalsın. */
    input, select, textarea { font-size: 16px; }
}

@media (max-width: 479.98px) {
    #mobileMenu { width: min(19rem, 94vw) !important; max-width: 94vw !important; }
    #mobileMenu > div:first-child { padding-left: 1rem !important; padding-right: 1rem !important; }
    #mobileMenu nav { padding-left: 1rem !important; padding-right: 1rem !important; }

    .rounded-3xl { border-radius: 1.25rem !important; }
    .gap-8 { gap: 1.25rem !important; }
    .gap-10, .gap-12 { gap: 1.5rem !important; }
}

/* Hareket azaltma tercihini global animasyonlarda da dikkate al. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   NFC Medya — Responsive v3
   Telefonlarda sadece taşmayı engellemek yerine gerçek mobil
   yerleşim: CTA, kart, form ve içerik boşluklarını düzenler.
   ============================================================ */
@media (max-width: 767.98px) {
    .container { width: 100% !important; max-width: 100% !important; }

    /* Sabit header altında içerik güvenli kalsın. */
    #siteHeader .container { min-height: 64px; }

    /* Hero aksiyonları ve istatistikleri küçük cihazda sıkıştırma. */
    #home .flex.flex-wrap.gap-4.justify-center > a {
        flex: 1 1 220px;
        max-width: 320px;
        justify-content: center;
        text-align: center;
    }
    #home .glass { min-width: 0 !important; flex: 1 1 125px; padding-left: 1rem !important; padding-right: 1rem !important; }

    /* Kart ve formlarda desktop padding'i telefona taşımama. */
    .nfc-card,
    form .form-input,
    #contactForm { min-width: 0; }
    .nfc-card { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    #contactForm button[type="submit"] { width: 100% !important; }

    /* Uzun mail, URL, başlık ve proje metinleri viewport'u büyütmesin. */
    [class*="text-"] a,
    .prose a,
    address,
    .form-input { overflow-wrap: anywhere; word-break: break-word; }

    /* Harita ve embed'ler telefon ekranında gereğinden fazla yüksek kalmasın. */
    .map-frame { min-height: 280px; }
    section > div[class*="h-[380px]"] { height: 300px !important; }
}

@media (max-width: 479.98px) {
    #home .glass { flex-basis: calc(50% - .5rem); }
    #home .glass:last-child:nth-child(odd) { flex-basis: 100%; }
    #home .flex.flex-wrap.gap-4.justify-center > a { max-width: none; width: 100%; flex-basis: 100%; }
    .nfc-card { border-radius: 1.25rem !important; }
    .map-frame { min-height: 240px; }
}
