/* ===================== RESET I PODSTAWOWE ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    
}



/* ===================== HEADER ===================== */
header, .header-top, .nav-bar {
    max-width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 5px solid #3ba950;
    position: sticky;
    top: 0;
    z-index: 2000;
    background: #fff;
}

.logo img {
    height: 100px;
    width: auto;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 60px;
    color: #3ba950;
    gap: 20px;
    font-weight: bold; 
}

/* ===================== MENU ===================== */
.nav-bar {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-button a {
    color: #3ba950;
    text-decoration: none;
    font-size: 25px;
}

.nav-button a:hover {
    border-bottom: 2px solid #fff;
}

/* ===================== HAMBURGER ===================== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #3ba950;
}

/* ===================== STOPKA ===================== */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 30px 20px;
    gap: 25px;
    background-color: #3ba950;
    color: #fff;
    text-align: center;
}

/* górne logo */
footer .foto img {
    height: 80px;
    width: auto;
}

/* ==== GŁÓWNY UKŁAD ==== */
footer .dane {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: start;
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: 25px;
}

/* logo firmy */
footer .stopka-logo {
    display: flex;
    justify-content: center;
}

footer .stopka-logo img {
    height: 120px;
    width: auto;
}

/* ==== KONTAKT ==== */
footer .dane-kont {
    text-align: left;
    font-size: 15px;
    line-height: 1.7;
}

footer .dane-kont h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

footer .dane-kont span {
    display: block;
    margin-bottom: 8px;
}

/* ==== SOCIAL ==== */
footer .media {
    text-align: left;
}

footer .media p {
    font-weight: 600;
    margin-bottom: 10px;
}

footer .media a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    transition: transform 0.25s ease, opacity 0.25s;
}

footer .media a:hover {
    transform: translateX(5px);
    opacity: 0.9;
}

/* ==== ADMIN ==== */
.admin-login {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.7;
}

.admin-login a {
    color: #fff;
    text-decoration: none;
}

.admin-login a:hover {
    text-decoration: underline;
}

footer::after {
    content: "© 2026 Green PAO";
    font-size: 12px;
    opacity: 0.7;
}


/* ===================== KONTAKT ===================== */
.skon {
    background: linear-gradient(to top right, #3ba950, #014617);
    border-radius: 10px;
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 48px;
    line-height: 1.75;
    color: #fff;
    text-align: left;
    box-shadow: 0 20px 40px #3ba950;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.skon h2 {
    font-size: 36px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: inline-block;
    border-bottom: 3px solid #fff;
}

.skon h4 {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 20px;
}

.skon p {
    font-size: 16px;
    margin: 5px 0;
}

.skon b {
    font-weight: 700;
}

/* ===================== MAPA ===================== */
.mapa {
    margin: 0 10%;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.mapa h2 {
    font-size: 28px;
    color: #014617;
    margin-bottom: 20px;
}

.mapa iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ===================== MAIN / WHY US ===================== */
.whyus {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 48px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f6fff9 0%, #ffffff 100%);
    box-shadow: 0 20px 40px #3ba950;
    line-height: 1.75;
    color: #1f2937;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.whyus h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.whyus b {
    color: #3ba950;
}

.whyus-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.whyus-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.whyus-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #3ba950;
}

.whyus-end {
    margin-top: 30px;
    font-size: 1.3rem;
    color: #0f766e;
}

/* ===================== OFERTY ===================== */
.oferty {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin: 80px auto;
    width: 100%;
    max-width: 1200px;
}

/* WSPÓLNE KARTY OFERTY */
.fotowoltaika, .klimatyzacja, .pompy, .rekuperacja, .wentylacja {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: auto;
    padding: 24px 28px;
    width: 100%;
    max-width: 900px;
    border-radius: 18px;
    flex-wrap: wrap;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(33,32,32,0.38);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fotowoltaika:hover, .klimatyzacja:hover, .pompy:hover, .rekuperacja:hover, .wentylacja:hover {
    transform: translateY(-6px);
     box-shadow: 0 20px 40px #3ba950;
}

/* Zdjęcia */
.zdjecie img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    display: block;
    transition: transform 0.4s ease;
}

.fotowoltaika:hover .zdjecie img,
.klimatyzacja:hover .zdjecie img,
.pompy:hover .zdjecie img,
.rekuperacja:hover .zdjecie img,
.wentylacja:hover .zdjecie img {
    transform: scale(1.06);
}

/* Opis */
.opis {
    flex: 1;
}

.opis h1 {
    color: #014617;
}

.opis h2 {
    color: #c1bfbf;
}

.opis h2:hover {
    color: #014617;
    text-decoration:underline
}

.opis p {
    font-size: 20px;
    font-weight: 600;
    color: #c1bfbf;
}

.opis a {
    text-decoration: none;
}

.opis a:hover {
    text-decoration: underline;
}

/* Co drugi element odwrócony */
.fotowoltaika:nth-child(even),
.klimatyzacja:nth-child(even),
.pompy:nth-child(even),
.rekuperacja:nth-child(even),
.wentylacja:nth-child(even) {
    flex-direction: row-reverse;
}

/* ===================== O NAS ===================== */
.opis_firmy {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 48px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f6fff9 0%, #ffffff 100%);
    box-shadow: 0 20px 40px #3ba950;
    line-height: 1.75;
    color: #1f2937;
    animation: fadeUp 0.8s ease-out both;
}

.opis_firmy h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #01862b;
}

.opis_firmy p {
    margin-bottom: 24px;
    font-size: 1rem;
}

.opis_firmy b {
    color: #3ba950;
}
.opis_firmy img {
    width: 180px; /* małe zdjęcia */
    height: auto;
    margin: 10px; /* odstęp między logotypami */
    vertical-align: middle;
    border-radius: 8px; /* lekko zaokrąglone rogi, jeśli chcesz */
}
/* ===================== KARTY Z TŁEM ===================== */
.card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 95%;         
    max-width: 1200px;   
    margin: 0 auto;
}

.card > div {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    color: white;
    min-height: 600px;      
    max-height: 800px;      
    width: 100%;            
    display: flex;
    align-items: center;
    justify-content: center; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 20px 40px #3ba94fce;
    margin-top: 60px;
}




.card .content {
    position: relative;
    z-index: 2;
    padding: 25px;
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
}

.card h2 {
    font-size: 28px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.card p {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #e3e3e3;
}
.card b {
    color: #3ba950;
}

.fotowolatika_main {
    background: url('foto/fotowoltaika.jpg') center/cover no-repeat;
    scroll-margin-top: 180px;
}
.klimatyzacja_main {
    background: url('foto/klimatyzacja.jpg') center/cover no-repeat;
    scroll-margin-top: 180px;
}
.pompy_main {
    background: url('foto/pompy.png') center/cover no-repeat;
    scroll-margin-top: 180px;
}
.rekuperacja_main {
    background: url('foto/rekuperacja.jpg') center/cover no-repeat;
    scroll-margin-top: 180px;
}
.wentylacja_main {
    background: url('foto/wentylacja.jpg') center/cover no-repeat;
    scroll-margin-top: 180px;
    margin-bottom: 40px;
}

/* === realizacja ===*/
/* ================= FILTRY ================= */
.filtry {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.filtry button {
    padding: 10px 22px;
    border-radius: 25px;
    border: 2px solid #3ba950;
    background: transparent;
    color: #3ba950;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtry button.active,
.filtry button:hover {
    background: #3ba950;
    color: #fff;
}


/* ================= WRAPPER ================= */
.realizacje-wrapper {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
}

/* po kliknięciu filtra */
.realizacje-wrapper.expanded {
    grid-template-columns: 1fr;
}


/* ================= FIELDSET ================= */
.realizacja {
    border: 2px solid #3ba950;
    border-radius: 18px;
    padding: 30px 25px 25px;
    background: #f6fff9;
    box-shadow: 0 15px 35px #3ba94faa;
    margin-bottom: 50px;
    width: 70%;            
    display: flex;
    flex-direction: column;
    align-items: flex-start;      /* legenda i galeria od góry */
    justify-content: flex-start;  /* nie centrować w pionie */
}


.realizacja legend {
    padding: 0 15px;
    font-weight: 700;
    color: #3ba950;
    font-size: 22px;
    margin-left: 10px;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
    width: 100%;
}

.realizacje-wrapper.expanded .galeria {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.galeria img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
}

.realizacja.hidden {
    display: none;
}

/* overlay na całym ekranie */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

/* obraz w powiększeniu */
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/*=== PANEL ADMINA ===*/
/* --- Panel admina --- */
.panel {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* --- Link wyloguj --- */
.panel a[href*="logout"] {
    display: inline-block;
    margin-bottom: 20px;
    color: #fff;
    background-color: #e74c3c;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}
.panel a[href*="logout"]:hover {
    background-color: #c0392b;
}

/* --- Formularze --- */
.panel form {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.panel form label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.panel form input[type="file"],
.panel form select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.panel form button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    background-color: #27ae60;
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.panel form button:hover {
    background-color: #1e8449;
}

/* --- Galeria zdjęć --- */
.panel .galeria {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.panel .galeria div {
    position: relative;
    display: inline-block;
}

.panel .galeria img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.panel .galeria img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- Przycisk usuń --- */
.panel .delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px; /* kwadratowy przycisk */
    width: 28px;
    height: 28px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.panel .delete-btn:hover {
    background: #c0392b;
}


/* --- Nagłówki --- */
.panel h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.panel h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #34495e;
}

/* ==== panel logowania */
.login-panel {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.login-panel h1 {
    margin-bottom: 25px;
    font-size: 28px;
    color: #2c3e50;
}

.login-panel form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 18px;
}

.login-panel button {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: #27ae60;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-panel button:hover {
    background-color: #1e8449;
}

.login-panel .error {
    color: red;
    font-weight: bold;
    font-size: 16px;
}

/* ===================== ANIMACJE ===================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

@keyframes ofertaFadeUp {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}


/* ===================== RESPONSYWNOŚĆ ===================== */
@media (max-width: 768px) {
    /* === HEADER === */
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        position: sticky;
        top: 0;
        z-index: 2000;
        background: #fff;
    }

    .logo img {
        height: 40px;
    }

    .logo a {
        font-size: 24px;
        gap: 10px;
    }

    /* === MENU MOBILNE === */
    .nav-bar {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        display: none;
        background: rgba(15,61,46,0.9);
        padding: 10px 0;
        z-index: 1000;
    }

    .nav-bar.active {
        display: flex;
    }

    .nav-button {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #fff;
    }

    .nav-button a {
        display: block;
        width: 100%;
        padding: 12px 0;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #3ba950;
    }

    /* === STOPKA === */
     footer {
        padding: 25px 20px;
        gap: 20px;
    }

    /* wrapper stopki */
    footer .stopka {
        width: 100%;
    }

    /* logo góra */
    footer .foto img {
        height: 50px;
        margin-bottom: 10px;
    }

    /* główny układ */
    footer .dane {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        width: 100%;
    }

    /* logo firmy */
    footer .stopka-logo img {
        height: 70px;
    }

    /* kontakt */
    footer .dane-kont {
        text-align: center;
        font-size: 14px;
        line-height: 1.6;
    }

    footer .dane-kont h3 {
        margin-bottom: 10px;
        font-size: 18px;
    }

    /* social */
    footer .media {
        text-align: center;
    }

    footer .media p {
        margin-bottom: 6px;
        font-weight: 600;
    }

    footer .media a {
        display: inline-block;
        margin: 0 8px;
        font-size: 15px;
    }

    /* admin */
    .admin-login {
        margin-top: 10px;
        font-size: 13px;
        opacity: 0.8;
    }

    /* === KONTAKT === */
    .skon {
        padding: 30px 5%;
        text-align: center;
    }

    .skon h2 {
        font-size: 28px;
        width: 80%;
        margin: 0 auto 15px auto;
        border-bottom: 2px solid #fff;
    }

    .skon h4 {
        font-size: 16px;
    }

    .skon p {
        font-size: 14px;
    }

    .mapa {
        margin: 0 5%;
    }

    .mapa h2 {
        font-size: 22px;
    }

    .mapa iframe {
        height: 300px;
    }

    /* === OFERTY / KAFELKI === */
    .card > div {
        width: 95%;
        max-width: 100%;
        min-height: 300px;
        max-height: none;
        margin: 20px auto;
        flex-direction: col
    }

    .realizacje-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .galeria {
        grid-template-columns: repeat(2, 1fr);
    }

    .realizacje-wrapper.expanded .galeria {
        grid-template-columns: repeat(2, 1fr);
    }

    .galeria img {
        height: 120px;
    }

    .panel {
        margin: 30px 10px;
        padding: 15px;
    }
    .panel .galeria img {
        width: 100px;
        height: 70px;
    }
    .panel form button, .panel a[href*="logout"] {
        width: 100%;
        text-align: center;
    }
/*=== Panel logowania mobile===*/
    .login-panel {
        max-width: 90%;
        margin: 50px auto;
        padding: 35px;
    }

    .login-panel h1 {
        font-size: 26px;
    }

    .login-panel input[type="text"],
    .login-panel input[type="password"] {
        font-size: 20px;
        padding: 18px;
    }

    .login-panel button {
        font-size: 20px;
        padding: 18px;
    }

    .login-panel .error {
        font-size: 18px;
    }
    }


