@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 12px 40px 0 rgba(255, 0, 0, 0.25);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
*, *::before, *::after {
  box-sizing: border-box;
}
* {
    font-family: Georgia, 'Times New Roman', Times, serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: white;
    overflow-x: hidden;
}

#container {
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    z-index: 1000; 
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

#logo img {
    width: 155px;
    height: 45px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
}

#logo img:hover {
    transform: scale(1.1) rotate(-1deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

#menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

#menu a {
    font-size: 20px;
    position: relative;
    color: black;
    text-decoration: none;     
    display: inline-block;
    transition: color 0.35s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#menu a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: red;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu a:hover {
    color: red;
    transform: translateY(-2px) scale(1.05);  
}

#menu a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;  
}

#guzik {
    margin: 0;
    display: flex;
    align-items: center;
}

#another {
    position: relative;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: 140px;
    height: 45px;
    border-radius: 25px;
    background-color: red;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    overflow: hidden; 
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

#another::after {
    display: none !important;
}

#another::before {
    content: '';
    position: absolute;
    top: 0;
    left: -250%; 
    width: 220%;
    height: 100%;
    background-color: #000000;
    transform: skewX(-45deg);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

#another:hover::before {
    left: -30%;
}

#another:hover {
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

#section1-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./images/background1.jpg');
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    padding-top: 20px; /* Zmniejszone z 40px */
}

#container2 {
    padding-top: 80px; /* Miejsce na przyklejone menu fixed */
    display: flex;
    width: 100%;
    min-height: 480px; /* Zmniejszone z 700px */
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px; /* Zmniejszone z 40px */
}

#center {
    width: 75%;
    height: 480px; /* Zmniejszone z 700px */
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.9s ease-out; 
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    padding: 20px; /* Dodano padding wewnątrz, aby zawartość nie dotykała krawędzi */
}

#center:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

#center img {
    max-width: 380px; /* Zmniejszone z 500px, aby pasowało do niższej sekcji */
    margin-bottom: 20px; /* Zmniejszone z 30px */
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); 
    transition: transform 0.5s ease, filter 0.5s ease;
}

#center img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

#center h1 {
    color: #ffffff; 
    font-size: 3.2rem; /* Zmniejszone z 5rem dla zachowania proporcji */
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    max-width: 800px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); 
    animation: scaleIn 1s ease-out;
}

.reklama {
    width: 10%;
    height: 480px; /* Zmniejszone z 700px */
    background-color: rgba(255, 255, 255, 0.05);
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background-color 0.4s ease, transform 0.4s ease;
}

.reklama:last-of-type {
    border-radius: 20px 0 0 20px;
}

.reklama:first-of-type {
    border-radius: 0 20px 20px 0;
}

#container3 {
    background-color: #f7f8f9;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    position: relative;
    z-index: 2;
}

#text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

#text h2 {
    font-size: 22px;
    color: red; 
    margin: 0 0 20px 0;
    font-weight: 700;
    transition: transform 0.3s ease;
}

#text h2:hover {
    transform: translateY(-2px);
}

#text h1 {
    font-size: 48px;
    color: #0b1a30;
    margin: 0 0 35px 0;
    font-weight: bolder;
    line-height: 1.3;
}

#text p {
    font-size: 21px;
    color: #6c757d;
    line-height: 1.8;
    margin: 0 0 45px 0;
}

#onas {
    text-decoration: none;
    color: #0b1a30;
    transition: color 0.3s ease;
}

#onas:hover {
    color: red;
}

#section2-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./images/background2.jpg');
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: 100vh;
}

#container4 {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 0;
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: stretch;
}

.glass-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: #ffffff;
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.left-card {
    width: 55%;
    padding: 45px;
    display: flex;
    flex-direction: column;
}

.right-card {
    width: 42%;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.badge {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    opacity: 0.85;
    margin-bottom: 20px;
    transition: opacity 0.3s ease, letter-spacing 0.3s ease;
}

.left-card:hover .badge, .right-card:hover .badge {
    opacity: 1;
    letter-spacing: 2px;
}

.left-card > h2 {
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 35px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.right-card h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 40px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.btn-more {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid #ffffff;
    border-radius: 30px;
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    background-color: transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-more:hover {
    background-color: #ffffff;
    color: #0b1a30;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.product-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.product-item:hover {
    transform: translateY(-5px) scale(1.02); 
    background-color: rgba(255, 255, 255, 0.22); 
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.product-item h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
}

.product-item:hover h3 {
    color: #ff4d4d;
}

.product-item p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

#section3-bg {
    background-color: #f7f8f9;
    padding: 80px 20px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

#container5 {
    width: 90%;
    max-width: 1400px; /* Zwiększono z 1100px do 1400px, aby wyrównać z resztą sekcji */
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

#Park {
    position: relative; 
    top: -170px;
}

.section-badge {
    font-size: 15px;
    font-weight: 700;
    color: #0b1a30;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: #0b1a30;
    margin: 0 0 30px 0;
}

.section-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #6c757d;
    max-width: 950px;
    margin: 0 auto 50px auto;
}

.sub-heading {
    font-size: 20px;
    font-weight: 700;
    color: #0b1a30;
    margin-bottom: 40px;
}

.machines-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap; /* Zapewnia poprawne zwijanie kart na mniejszych ekranach */
}

.machine-card {
    flex: 1 1 220px; /* Pozwala kartom rozciągać się i wypełniać prawą stronę */
    text-align: left;
    cursor: pointer;
    background-color: #ffffff;
    border: 2px solid #e0e0e0; 
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.machine-img-wrapper {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.machine-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.4s ease, transform 0.5s ease;
}

.machine-text {
    font-size: 15px;
    line-height: 1.7;
    color: #6c757d;
    margin: 0;
    transition: color 0.4s ease;
}

.machine-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
    border-color: red;
}

.machine-card:hover .machine-img-wrapper img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.machine-card:hover .machine-text {
    color: red;
}

.machine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.machine-title {
    font-size: 18px;
    font-weight: 700;
    color: #0b1a30;
    margin: 15px 0;
}

.btn-expand {
    padding: 10px 22px;
    background-color: #0b1a30;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 15px;
}

.btn-expand:hover {
    background-color: red;
    transform: translateY(-2px);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    padding: 30px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: red;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain;
}

.modal-body h2 {
    font-size: 24px;
    color: #0b1a30;
    margin-bottom: 15px;
}

.modal-body p {
    font-size: 15px;
    line-height: 1.7;
    color: #6c757d;
    text-align: left;
}
#section4-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./images/Szablon.JPG');
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: 600px; 
    padding-top: 40px;
    padding-bottom: 60px; 
}

#container6 {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding-bottom: 50px;
}

.contact-card {
    width: 45%;
    height: auto;
    min-height: 480px;
    background-color: rgba(22, 33, 52, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 50px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.contact-title {
    font-size: 46px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: #ffffff;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(8px);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.icon-circle {
    width: 70px;
    height: 70px;
    background-color: #0b133c;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.contact-item:hover .icon-circle {
    transform: scale(1.15) rotate(5deg);
    background-color: red;
}

.contact-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #ffffff;
}

.contact-info p {
    font-size: 17px;
    margin: 0;
    color: #d1d5db;
}

.contact-info a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.map-container {
    width: 55%;
    height: 480px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative; 
    z-index: 1; 
    pointer-events: auto !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    position: relative;
    z-index: 2; 
    pointer-events: auto !important;
    touch-action: pan-x pan-y; 
}

footer {
    height: 100px;
    color: white;
    font-size: 26px;
    text-align: center;
    align-content: center;
    margin-top: 0;
    background-color: #0b1a30;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#scrollTopBtn {
    display: none;
    position: fixed; 
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background-color: darkblue;
    color: white;
    text-decoration: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 48px;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: #cc0000;
    transform: scale(1.15) translateY(-4px);
    box-shadow: 0 8px 20px rgba(204, 0, 0, 0.5);
}

.map-direct-link {
    display: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.map-direct-link:hover {
    background-color: red;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    #container {
        padding: 0 20px;
    }

    #menu {
        gap: 15px;
    }

    #menu a {
        font-size: 18px;
    }

    #center h1 {
        font-size: 3.5rem;
    }

    .reklama {
        display: none;
    }

    #center {
        width: 100%;
        margin: 0 20px;
    }

    #container4, #container6 {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .left-card, .right-card, .contact-card, .map-container {
        width: 100%;
        padding: 40px;
    }

    .machines-grid {
        flex-direction: column;
        gap: 20px;
    }

    #scrollTopBtn {
        display: block; 
    }

    .map-container {
        height: 300px;
        position: relative;
        z-index: 1;
    }
}

@media screen and (max-width: 768px) {
    #container {
        height: auto;
        padding: 15px 10px;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    #logo img {
        height: 35px;
        width: auto;
        margin-bottom: 10px;
    }

    #menu {
        flex-wrap: wrap; 
        justify-content: center;
        gap: 10px 15px; 
        width: 100%;
    }
    
    #menu a {
        font-size: 14px;
    }

    #container2 {
        padding-top: 180px;
        min-height: auto;
    }
    
    #center {
        height: auto;
        padding: 40px 20px;
        margin: 0 10px;
    }

    #center img {
        max-width: 100%;
        height: auto;
    }

    #center h1 {
        font-size: 2.5rem;
    }

    #text h1 {
        font-size: 32px;
    }

    #text p {
        font-size: 16px;
    }

    #Park{
        top: -185px;
    }

    .section-title {
        font-size: 32px;
    }

    .right-card h1, .contact-title {
        font-size: 28px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .map-container {
        height: 300px;
        width: 100%;
        position: relative;
        z-index: 1;
    }
    
    footer {
        font-size: 18px;
        height: 70px;
    }

    .map-direct-link {
        display: block;
        width: 100%;
        padding: 12px;
        background-color: #0b1a30;
        color: #ffffff;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        border-radius: 8px;
        margin-top: 10px;
    }
}

@media (max-width: 400px) {
    #center h1 {
        font-size: 1.8rem;
    }
    
    #container2 {
        padding-top: 200px;
    }

    .left-card, .right-card, .contact-card {
        padding: 25px 15px;
    }

    .product-item h3 {
        font-size: 18px;
    }

    .product-item p {
        font-size: 15px;
    }

    #menu a {
        font-size: 16px;
    }
    
    .btn-more {
        width: 100%;
        text-align: center;
    }
}