/* ============================================================
   FUNKCJA: Płynne przewijanie
============================================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================================
 PANEL STEROWANIA WIDOCZNOŚCIĄ
============================================================ */
:root {
    /* --- Panel dla WIDOCZNOŚCI SEKCJI --- */
    --show-section-o-nas: none;
    --show-section-galeria: block;
    --show-section-oferta: block;
    --show-section-dlaczego-my: none;
    --show-section-kontakt: block;

    /* --- Panel dla WIDOCZNOŚCI PRZYCISKÓW W MENU --- */
    --show-nav-o-nas: none;
    --show-nav-galeria: inline-block;
    --show-nav-oferta: inline-block;
    --show-nav-dlaczego-my: none;
    --show-nav-kontakt: inline-block;
}

/* --- Główne Ustawienia --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Nagłówek i Logo --- */
header {
    background-color: #2E7D32;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

/* --- Nawigacja --- */
nav {
    background-color: #4CAF50;
    padding: 10px 0;
    text-align: center;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #45a049;
    border-radius: 4px;
}

/* --- Główna treść --- */
main {
    background-color: #ffffff;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #2E7D32;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

h3 {
    color: #4CAF50;
    margin-top: 25px;
}

/* --- Style dla Galerii (Horyzontalne przewijanie) --- */
.gallery-container {
    display: flex;
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 20px; 
    justify-content: flex-start; 
    margin-top: 20px;
    padding-bottom: 10px;
}

.gallery-item {
    flex-basis: 280px; 
    flex-grow: 0;
    flex-shrink: 0;
    
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    background-color: #fff;
    overflow: hidden; 
}

.gallery-item a {
    display: block;
    overflow: hidden;
    cursor: pointer;
    background-color: #f0f0f0; 
    aspect-ratio: 3 / 4; /* Proporcje 3:4 */
}

.gallery-item a:hover img {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%; 
    height: 100%; 
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover; 
}

.gallery-item p {
    margin: 0;
    padding: 10px;
    font-size: 0.9em;
    color: #555;
    background-color: #fcfcfc;
}

/* --- Style dla Tabel --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-size: 0.95em;
    border-radius: 5px; 
    overflow: hidden; 
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    border-left: none;
    border-right: none;
}

th {
    background-color: #616161; 
    color: #ffffff; 
    font-weight: 600;
    border-top: none; 
}

tbody tr {
     background-color: #f1f8e9;
}

tbody tr:nth-child(even) { 
    background-color: #e8f5e9;
}

tbody tr:hover {
    background-color: #dcedc8;
}

td i {
    color: #555;
    font-style: italic;
    margin-left: 5px;
}

/* Adnotacja pod tabelą */
.tabela-adnotacja {
    font-size: 0.9em;
    font-style: italic;
    color: #555;
    text-align: left;
    margin-top: 8px;
    margin-bottom: 30px;
    padding-left: 5px;
}

/* --- Lista (np. dlaczego my) --- */
.zalety-list {
    list-style-type: '🌿';
    padding-left: 25px;
}

.zalety-list li {
    padding-left: 10px;
    margin-bottom: 10px;
}

/* --- Kontakt (STYL DLA LINKU MAPY) --- */
#kontakt a {
    color: #2E7D32;
    text-decoration: none;
    border-bottom: 1px dashed #2E7D32;
    transition: color 0.3s, border-bottom 0.3s;
}

#kontakt a:hover {
    color: #4CAF50;
    border-bottom: 1px solid #4CAF50;
}


/* --- Stopka --- */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    font-size: 0.9em;
    color: #777;
    border-top: 1px solid #eee;
}

/* ============================================================
 REGUŁY - PRZYPISANIE NOWYCH ZMIENNYCH
============================================================ */
#o-nas { display: var(--show-section-o-nas); }
#galeria { display: var(--show-section-galeria); }
#oferta { display: var(--show-section-oferta); }
#dlaczego-my { display: var(--show-section-dlaczego-my); }
#kontakt { display: var(--show-section-kontakt); }

nav a[href="#o-nas"] { display: var(--show-nav-o-nas); }
nav a[href="#galeria"] { display: var(--show-nav-galeria); }
nav a[href="#oferta"] { display: var(--show-nav-oferta); }
nav a[href="#dlaczego-my"] { display: var(--show-nav-dlaczego-my); }
nav a[href="#kontakt"] { display: var(--show-nav-kontakt); }


/* ============================================================
 STYLE: LIGHTBOX
============================================================ */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.4s;
    
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.4s;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px; 
    color: #f1f1f1;
    font-size: 30px; 
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%; 
    width: 40px;
    height: 40px;
    display: flex; 
    align-items: center;
    justify-content: center;
    line-height: 1; 
}

.lightbox-close:hover {
    color: #fff;
    background-color: rgba(0, 0, 0, 1);
}

/* Style strzałek nawigacji */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 10px;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 10px;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 1.0);
}


@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes zoomIn {
    from {transform: scale(0.8);}
    to {transform: scale(1);}
}

/* ============================================================
 STYLE: PRZYCISK "WRÓĆ NA GÓRĘ"
============================================================ */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 18px;
    opacity: 0.8;
    transition: background-color 0.3s, opacity 0.3s;
}

#scrollTopBtn:hover {
    background-color: #2E7D32;
    opacity: 1;
}

/* ============================================================
  NOWE STYLE: Przyciski CTA i sekcja Kontakt
 ============================================================ */
.kontakt-item {
    display: flex;
    justify-content: space-between; /* Tekst po lewej, przycisk po prawej */
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0; /* Delikatny separator */
}
.kontakt-item:last-child {
    border-bottom: none; /* Usuń separator przy ostatnim elemencie */
}

.kontakt-item p {
    margin: 0; /* Usuń domyślny margines paragrafu */
}

.cta-button {
    background-color: #4CAF50;
    color: white !important; /* Ważne, aby nadpisać styl linku #kontakt a */
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    border-bottom: none !important; /* Ważne, aby nadpisać styl linku #kontakt a */
    white-space: nowrap; /* Zapobiega łamaniu tekstu w przycisku */
    margin-left: 15px; /* Odstęp od tekstu po lewej */
}

.cta-button:hover {
    background-color: #45a049;
    color: white !important;
    border-bottom: none !important;
}


/* ============================================================
 SEKCJA: RESPONSIVE STYLES (Mobile)
============================================================ */
@media (max-width: 600px) {
    .container {
        padding: 0 8px;
        margin-top: 10px;
    }

    main {
        padding: 12px;
    }

    header h1 {
        font-size: 2em;
    }

    th, td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    #scrollTopBtn {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    nav a {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    
    .gallery-container {
        gap: 10px; 
    }
    
    .gallery-item {
        flex-basis: 37.5%; /* 2 i 2/3 zdjęcia */
        flex-shrink: 0; 
        
        flex-grow: 0; 
        box-sizing: border-box; 
    }
    
    .gallery-item p {
        font-size: 0.8em;
        padding: 8px;
    }
    
    /* Poprawka CTA na mobilkach */
    .kontakt-item {
        flex-wrap: wrap; /* Pozwól przyciskowi spaść niżej, jeśli się nie mieści */
    }
    
    .cta-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}