/* ═══════════════════════════════════════════════════════════════
   MOBILE-ONLY OVERRIDES (max-width: 767px)
   Desktop is NEVER affected by these rules.
   Loaded AFTER tailwind.css to guarantee override.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Global text scaling ── */
    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    section p,
    section .text-lg,
    section .text-base {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    /* ── Hero Section ── */
    #hero {
        min-height: 100svh !important;
        padding-top: 5rem !important;
        padding-bottom: 4rem !important;
        align-items: flex-end !important;
    }

    .mb-16 {
        margin-bottom: 1.5rem !important;
    }

    section:first-of-type h1 {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    section:first-of-type .btn-primary,
    section:first-of-type a[href="#kalkulator"] {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }

    section:first-of-type a[href^="tel:"] {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }

    section:first-of-type p {
        margin-bottom: 1.5rem !important;
    }

    /* ── General section spacing (skip hero) ── */
    section+section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Smaller gaps in grids */
    .gap-8,
    .gap-10 {
        gap: 1rem !important;
    }

    /* ── Grupa firm logos ── */
    section .grid .bg-white div[style*="height: 112px"] {
        height: 60px !important;
    }

    section .grid .bg-white div[style*="height: 40px"] {
        height: 28px !important;
    }

    section .grid .bg-white div[style*="height: 80px"] {
        height: 50px !important;
    }

    section .grid .bg-white {
        padding: 0.75rem !important;
    }

    section .grid .bg-white h4 {
        font-size: 0.875rem !important;
    }

    section .grid .bg-white .btn-primary {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
    }

    /* ── Contact tiles ── */
    #kontakt {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    #kontakt .shadow-lg,
    #kontakt .shadow-sm {
        padding: 0.75rem !important;
    }

    #kontakt .w-14 {
        width: 2rem !important;
        height: 2rem !important;
        margin-bottom: 0.375rem !important;
    }

    #kontakt .w-14 svg {
        width: 1rem !important;
        height: 1rem !important;
    }

    #kontakt .tracking-widest {
        font-size: 0.6rem !important;
        margin-bottom: 0.125rem !important;
    }

    #kontakt .text-xl,
    #kontakt .text-lg {
        font-size: 0.8rem !important;
    }

    #kontakt .gap-6 {
        gap: 0.5rem !important;
    }

    #kontakt .mb-10,
    #kontakt .mb-8 {
        margin-bottom: 0.5rem !important;
    }

    /* ── Map ── */
    .min-h-\[350px\] {
        min-height: 220px !important;
    }

    /* ── Kalkulator ── */
    #kalkulator {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    #kalkulator h2 {
        margin-bottom: 0.25rem !important;
    }

    #kalkulator>div>div>p {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }

    #kalkulator label {
        font-size: 0.65rem !important;
        margin-bottom: 0.125rem !important;
    }

    #kalkulator input,
    #kalkulator select {
        padding: 0.375rem !important;
        font-size: 0.75rem !important;
    }

    #kalkulator button {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.65rem !important;
    }

    /* Slider labels (MIN/PROGI/MAKS) */
    #kalkulator .tracking-widest {
        font-size: 0.5rem !important;
        margin-top: 0.125rem !important;
    }

    /* Slider value display */
    #kalkulator .tabular-nums {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    #kalkulator .gap-6,
    #kalkulator .gap-8,
    #kalkulator .gap-4 {
        gap: 0.375rem !important;
    }

    #kalkulator .p-8,
    #kalkulator .p-10,
    #kalkulator .p-6 {
        padding: 0.75rem !important;
    }

    #kalkulator .mb-8,
    #kalkulator .mb-6,
    #kalkulator .mb-4 {
        margin-bottom: 0.25rem !important;
    }

    #kalkulator .mt-3 {
        margin-top: 0.25rem !important;
    }

    #kalkulator .text-4xl,
    #kalkulator .text-3xl {
        font-size: 1.25rem !important;
    }

    /* Calculator result area */
    #kalkulator .bg-brand-navy {
        padding: 0.75rem !important;
    }

    #kalkulator .text-6xl {
        font-size: 2rem !important;
        line-height: 1 !important;
    }

    #kalkulator .text-2xl {
        font-size: 0.875rem !important;
    }

    #kalkulator .mt-8 {
        margin-top: 0.5rem !important;
    }

    #kalkulator .bg-white\/5 {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    #kalkulator .btn-primary {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        font-size: 0.75rem !important;
    }

    #kalkulator .py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* ── Zakres usług (Oferta) boxes ── */
    #oferta .bg-brand-paper {
        padding: 1.25rem !important;
    }

    #oferta .bg-brand-paper .w-16 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    #oferta .bg-brand-paper .w-16 svg,
    #oferta .bg-brand-paper .w-8 {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    #oferta .bg-brand-paper h4 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* ── Jak wyceniamy boxes ── */
    .min-h-\[320px\] {
        min-height: auto !important;
    }

    #kalkulator details .gap-5 {
        gap: 0.5rem !important;
    }

    #kalkulator details .gap-12 {
        gap: 0.75rem !important;
    }

    #kalkulator details .py-10 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    #kalkulator details .mb-10,
    #kalkulator details .mb-8 {
        margin-bottom: 0.5rem !important;
    }

    #kalkulator details .mb-6 {
        margin-bottom: 0.25rem !important;
    }

    #kalkulator details .w-10 {
        width: 1.75rem !important;
        height: 1.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* ── Grupa firm ── */
    #grupafirm {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    #grupafirm .mb-16 {
        margin-bottom: 0.75rem !important;
    }

    #grupafirm .bg-white {
        padding: 1rem !important;
    }

    #grupafirm .bg-white div[style*="height: 112px"] {
        height: 50px !important;
        margin-bottom: 0.5rem !important;
    }

    #grupafirm .bg-white div[style*="height: 40px"] {
        height: auto !important;
        margin-bottom: 0.25rem !important;
    }

    #grupafirm .bg-white div[style*="height: 80px"] {
        height: auto !important;
        margin-bottom: 0.25rem !important;
    }

    #grupafirm .bg-white h4 {
        font-size: 0.9rem !important;
    }

    #grupafirm .bg-white img {
        max-height: 50px !important;
    }

    #grupafirm .btn-primary {
        padding: 0.375rem 1rem !important;
        font-size: 0.75rem !important;
    }

    #grupafirm .h-12 {
        height: auto !important;
    }

    #grupafirm .mb-8 {
        margin-bottom: 0.375rem !important;
    }

    #grupafirm .mt-16 {
        margin-top: 1rem !important;
    }

    #grupafirm .py-10 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* ── Aktualności ── */
    #aktualnosci {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    #aktualnosci .mb-16 {
        margin-bottom: 0.75rem !important;
    }

    #aktualnosci .rounded-xl img,
    #aktualnosci .group img {
        max-height: 180px !important;
        object-fit: cover !important;
    }

    #aktualnosci .group .p-5,
    #aktualnosci .group .p-6 {
        padding: 0.5rem !important;
    }

    #aktualnosci .group h3 {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }

    #aktualnosci .group p {
        font-size: 0.7rem !important;
    }

    /* ── Footer ── */
    footer {
        padding-top: 1.5rem !important;
        padding-bottom: 0.75rem !important;
    }

    footer .gap-12 {
        gap: 1rem !important;
    }

    footer .mb-16 {
        margin-bottom: 1rem !important;
    }

    footer h4 {
        font-size: 0.8rem !important;
        margin-bottom: 0.375rem !important;
    }

    footer p,
    footer a,
    footer li,
    footer span,
    footer address {
        font-size: 0.7rem !important;
    }

    footer .space-y-6>*+* {
        margin-top: 0.5rem !important;
    }

    footer .space-y-4>*+* {
        margin-top: 0.375rem !important;
    }

    footer .text-xl {
        font-size: 0.875rem !important;
    }

    footer .pt-8 {
        padding-top: 0.75rem !important;
    }

    footer .h-10 {
        height: 1.75rem !important;
    }
}