/* Resetowanie podstawowych stylów */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stylizacja tła i fontu */
body {
    font-family: Arial, sans-serif;
    background-color: #ffffff; 
    color: #333;
    padding: 20px;
}

/* Tytuł strony */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5em;
    color: #000000;
    padding: 10px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Kontener na kafelki */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; 
    justify-content: center;
    max-width: 1400px; 
    margin: 0 auto;
}

/* Styl kafelka (Level 1 i Level 2 - produktowe) */
.project-card {
    background: linear-gradient(135deg, #333333 0%, #222222 60%, #555555 100%);
    border-radius: 15px;
    color: #ffffff;
    text-decoration: none; 
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative; 
    
    display: flex; 
    align-items: center; 
    justify-content: center; 
    
    min-height: 250px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center; 
}

/* Zawartość kafelka */
.card-content {
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Styl nagłówka */
.card-content h2 {
    font-size: 1.8em; 
    margin-bottom: 25px; 
    text-transform: uppercase;
    line-height: 1.2;
    font-weight: 600;
}

/* Styl przycisku "ZOBACZ" */
.btn-zobacz {
    display: block;
    width: 70%;
    max-width: 200px;
    margin: 0 auto; 
    padding: 10px 20px;
    border: 2px solid #ffffff; 
    background: none;
    color: #ffffff;
    font-size: 0.9em;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    letter-spacing: 1px;
}

.project-card:hover .btn-zobacz {
    background-color: #ffffff;
    color: #222222;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* NOWY STYL: Przycisk POWRÓT (Ultra-minimalistyczny, jak na ostatnim zdjęciu) */
.btn-back {
    /* Ustawienia układu */
    order: -1; 
    width: auto; 
    max-width: 90%;
    margin: 0 auto 40px auto; 
    
    /* Stylizacja - najbardziej surowa wersja */
    background: #ffffff; 
    color: #000000; 
    border: 1px solid #333333; 
    
    padding: 5px 15px; 
    font-size: 1em; 
    text-transform: uppercase;
    border-radius: 2px; 
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
    letter-spacing: 0.5px; 
    font-weight: normal;
    text-align: center;
    
    display: block; 
    box-shadow: none; 
}

.btn-back:hover {
    background-color: #f8f8f8; 
    opacity: 0.9;
}


/* ============================================== */
/* RESPONSYWNOŚĆ */
/* ============================================== */

@media (max-width: 768px) {
    .project-card {
        width: 100%; 
        max-width: 450px; 
        min-height: 200px;
    }
    .gallery-container {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
    }
    h1 {
        font-size: 2em;
    }
    .btn-back {
        font-size: 0.9em;
        padding: 4px 10px;
        margin: 0 auto 30px auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .project-card {
        width: calc(50% - 13px); 
    }
    #productGallery .project-card {
        width: calc(33.333% - 17px); 
        min-height: 200px;
    }
}

@media (min-width: 1025px) {
    .project-card {
        width: calc(33.333% - 17px); 
    }
}