/* ================================================================
   UNIWERSALNE MEDIA QUERIES DLA WSZYSTKICH PODSTRON
   Wersja: 2.0 - Poprawiona responsywność mobile
   ================================================================ */

/* ========== MOBILE (do 768px) ========== */
@media (max-width: 768px) {
    /* Zapobieganie poziomemu scrollowi */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    * {
        box-sizing: border-box;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* NAWIGACJA */
    .hamburger {
        display: flex;
    }
    
    .navbar-container {
        padding: 0 15px;
        height: 70px;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .nav-menu {
        position: fixed !important;
        left: -100% !important;
        top: 70px !important;
        flex-direction: column;
        background-color: #FFFFFF;
        width: 100% !important;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0 !important;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .nav-item {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-link {
        padding: 12px 20px;
        font-size: 16px;
        display: block;
    }
    
    .nav-link.cta-btn {
        margin: 10px 20px;
        width: calc(100% - 40px);
        display: inline-block;
    }
    
    .dropdown-menu {
        position: static !important;
        box-shadow: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-top: 10px;
        background-color: #F8F9FA;
        padding: 10px 0;
        width: 100%;
    }
    
    .dropdown-item {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* HERO / PAGE HERO */
    .hero,
    .page-hero {
        height: auto !important;
        min-height: 400px;
        padding: 80px 15px 50px;
    }
    
    .hero-content,
    .page-hero-content {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero-content h1,
    .page-hero-content h1 {
        font-size: 26px !important;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-content p,
    .page-hero-content p {
        font-size: 15px !important;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .hero-btn,
    .cta-button,
    .btn {
        padding: 12px 25px;
        font-size: 15px;
        width: auto;
    }
    
    /* SEKCJE */
    section,
    .content-section,
    .features-section,
    .pricing-section,
    .applications-section,
    .cta-section {
        padding: 40px 15px !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* NAGŁÓWKI */
    .section-header h2,
    .content-header h2,
    h2 {
        font-size: 24px !important;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .section-header p,
    .content-header p {
        font-size: 15px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
    
    h4 {
        font-size: 18px !important;
    }
    
    /* GRIDY */
    .features-grid,
    .offer-grid,
    .products-grid,
    .services-grid,
    .applications-grid,
    .benefits-grid,
    .pricing-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* KARTY */
    .feature-card,
    .offer-card,
    .product-card,
    .service-card,
    .pricing-card,
    .application-card {
        padding: 25px 20px !important;
        margin-bottom: 0;
    }
    
    .feature-card h3,
    .offer-card h3 {
        font-size: 20px !important;
    }
    
    .feature-card p,
    .offer-card p {
        font-size: 14px !important;
    }
    
    /* STATYSTYKI */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .stat-number {
        font-size: 32px !important;
    }
    
    .stat-label {
        font-size: 13px !important;
    }
    
    /* TESTIMONIALS */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* PARTNERZY */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .partner-logo {
        height: 50px !important;
    }
    
    /* FORMULARZ KONTAKTOWY */
    .contact-form input,
    .contact-form textarea,
    .form-input {
        font-size: 15px !important;
        padding: 12px !important;
        width: 100%;
    }
    
    .submit-btn,
    .form-button {
        padding: 14px !important;
        font-size: 15px !important;
        width: 100%;
    }
    
    /* FOOTER */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section a {
        display: block;
        margin: 8px 0;
    }
    
    .footer-bottom {
        padding: 20px 15px !important;
        font-size: 13px !important;
        text-align: center;
    }
    
    /* BACK TO TOP / SCROLL TO TOP */
    .back-to-top,
    .scroll-top {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    /* TABELE */
    table {
        font-size: 14px !important;
    }
    
    th, td {
        padding: 10px 8px !important;
    }
    
    /* LISTY */
    ul, ol {
        padding-left: 20px;
    }
    
    li {
        margin-bottom: 8px;
    }
    
    /* CTA SEKCJA */
    .cta-section h2 {
        font-size: 24px !important;
    }
    
    .cta-section p {
        font-size: 15px !important;
    }
    
    /* BREADCRUMBS */
    .breadcrumb {
        font-size: 13px !important;
        padding: 10px 15px !important;
    }
    
    /* MODAL */
    .modal-content {
        margin: 0 !important;
        width: 100% !important;
        max-height: 100vh;
        border-radius: 0 !important;
    }
    
    .modal-body {
        padding: 20px 15px !important;
    }
    
    /* IMAGES W GRID */
    .image-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* TECHNOLOGIE / IKONY */
    .technology-item,
    .icon-box {
        margin-bottom: 15px;
    }
}

/* ========== SMALL MOBILE (do 480px) ========== */
@media (max-width: 480px) {
    .navbar-container {
        height: 60px !important;
    }
    
    .nav-menu {
        top: 60px !important;
        max-height: calc(100vh - 60px);
    }
    
    .logo img {
        max-height: 35px !important;
    }
    
    .hero,
    .page-hero {
        min-height: 350px;
        padding: 70px 15px 40px;
    }
    
    .hero-content h1,
    .page-hero-content h1 {
        font-size: 22px !important;
    }
    
    .hero-content p,
    .page-hero-content p {
        font-size: 14px !important;
    }
    
    section {
        padding: 35px 15px !important;
    }
    
    .section-header h2,
    .content-header h2 {
        font-size: 22px !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .partners-grid {
        grid-template-columns: 1fr !important;
    }
    
    .feature-card,
    .offer-card {
        padding: 20px 15px !important;
    }
}

/* ========== TABLETS (769px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-container {
        padding: 0 30px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .features-grid,
    .offer-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 896px) and (orientation: landscape) {
    .hero,
    .page-hero {
        min-height: 300px;
        padding: 60px 15px 40px;
    }
    
    .hero-content h1,
    .page-hero-content h1 {
        font-size: 28px !important;
    }
    
    .nav-menu {
        max-height: calc(100vh - 60px);
    }
}
