/* Resetowanie domyślnych styli */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Arial', sans-serif;
    color: #fff;
    background-image: url('images/tlo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

/* Półprzezroczyste tło dla lepszej czytelności */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh; 
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* Przycisk Zadzwoń teraz! */
.call-btn {
    position: fixed;
    bottom: 70px; /* Odległość od dołu */
    left: 50%; /* Ustawiamy przycisk na środku ekranu */
    transform: translateX(-50%); /* Dokładne wyśrodkowanie przycisku */
    background-color: #FFD700; /* Żółty kolor */
    color: black;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 220px; /* Minimalna szerokość */
    max-width: 300px; /* Maksymalna szerokość */
    text-align: center;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out; /* Przejście koloru i transformacji */
}

/* Po najechaniu na przycisk - przesunięcie w górę */
.call-btn:hover {
    background-color: #f1c40f; /* Zmiana koloru na ciemniejszy żółty */
    transform: translate(-50%, -20px); /* Przesunięcie w górę o 20px */
    animation: none;
}

/* Animacja potrząsania w poziomie - nie wpłynie na pozycję po zakończeniu */
@keyframes shake {
    0% { transform: translateX(-50%); } /* Zaczynamy od pozycji wyśrodkowanej */
    25% { transform: translateX(-45%); } /* Delikatne przesunięcie w lewo */
    50% { transform: translateX(-55%); } /* Delikatne przesunięcie w prawo */
    75% { transform: translateX(-45%); } /* Delikatne przesunięcie w lewo */
    100% { transform: translateX(-50%); } /* Kończymy w pozycji wyśrodkowanej */
}

/* Klasa shake aktywująca animację potrząsania */
.shake {
    animation: shake 0.5s ease-in-out infinite; /* Przytrzymuje animację "shake" w nieskończoność */
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1abc9c; /* Pomarańczowy przycisk */
    color: white !important;
    text-decoration: none !important;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 20px; /* Przesuwa przycisk w dół */
}

.btn:hover {
    background-color: #0d9e81;
    transform: scale(1.00);
}

.btn:active {
    transform: scale(0.98);
}

/* Główny kontener */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 80px; /* Odsunięcie treści od nagłówka */
}

/* Nagłówek */
header {
    background: rgba(44, 62, 80, 0.95);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

/* Tekst w nagłówku */
header h1 {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Nawigacja */
nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 12px;
    transition: background 0.3s, color 0.3s;
    border-radius: 5px;
}

nav ul li a:hover {
    background: #1abc9c;
    color: #fff;
}

/* Menu hamburgerowe */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.menu-toggle .bar {
    width: 25px;
    height: 5px;
    margin: 5px;
    background-color: #1abc9c;
    border-radius: 10px;
}

/* Zmiana odstępu między kreskami */
.menu-toggle .bar:nth-child(1) {
    margin-bottom: 1px; /* Zwiększa odstęp między pierwszą a drugą kreską */
}

.menu-toggle .bar:nth-child(2) {
    margin-bottom: 1px; /* Zwiększa odstęp między drugą a trzecią kreską */
}

/* Menu nawigacyjne dla telefonów */
.mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
}

.mobile-nav a {
    text-decoration: none;
    color: #1abc9c;
    font-size: 16px;
    margin: 8px 0;
    transition: background-color 0.3s;
}

.mobile-nav a:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.mobile-nav.active {
    display: flex;
}

/* Przycisk Zaloguj */
.login-btn {
    background-color: #27ae60;
    color: white;
    font-size: 14px;
    border: none;
    position: relative;
    margin-top: -7px;
    margin-right: 30px;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #2ecc71;
}

/* Sekcja Usług */
section {
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    margin: 80px auto;
    border-radius: 10px;
    width: auto; /* Dostosowanie szerokości */
    max-width: 1000px;
}

section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Kontener na karty usług */
.service-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* Styl dla pojedynczej karty usługi */
.service-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease-in-out, background 0.3s;
}

.service-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* Ikona w karcie */
.service-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

/* Styl nagłówka usługi */
.service-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Styl opisu */
.service-card p {
    font-size: 14px;
    color: #ddd;
}

/* Stopka zawsze na dole */
footer {
    background: rgba(44, 62, 80, 0.95);
    text-align: center;
    padding: 15px;
    width: 100%;
    font-size: 14px;
    margin-top: auto;
}

/* Media Queries */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .service-container {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 12px;
    }

    section h2 {
        font-size: 22px;
    }

    .login-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .call-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 180px;
        max-width: 250px;
    }
}

/* Media Queries dla laptopów i mniejszych ekranów */
@media (max-width: 1024px) {
    nav ul {
        gap: 10px;
    }

    .btn {
        font-size: 16px;
        padding: 10px 16px;
        min-width: 120px;
        max-width: 220px;
    }

    .call-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 180px;
        max-width: 250px;
    }

    .service-container {
        grid-template-columns: 1fr;
    }
}
