* { box-sizing: border-box; margin: 0; padding: 0; }

html { 
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth;
    height: 100%;
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background: #FFFFFF; 
    color: #000000; 
    overflow-x: hidden;
    height: 100%;
}

body, .navbar, .modal-content, .nav-menu, .galeria-link, .rich-text, .charity-box, .details-box {
    transition: background-color 0.4s ease-in-out, color 0.4s ease-in-out, opacity 0.2s ease, border-color 0.4s ease-in-out;
}

body.dark-mode { background: #000000; color: #FFFFFF; }

.lang-fade { 
    opacity: 0 !important; 
    transition: opacity 0.2s ease-in-out !important; 
}

.section { 
    height: 100vh; 
    width: 100vw;
    scroll-snap-align: start; 
    scroll-snap-stop: always;
    position: relative; 
}

/* Navbar - Nowe, precyzyjne wyśrodkowanie */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 2vh 5vw; 
    background: #000000; 
    color: #FFFFFF; 
    z-index: 20; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    height: 8vh; /* Zdefiniowana wysokość paska dla łatwiejszej kontroli */
}
body.dark-mode .navbar { background: #FFFFFF; color: #000000; }

.social-icons { 
    display: flex; 
    gap: 1.5rem; 
    align-items: center;
    flex: 1; /* Wymusza zajęcie 1/3 miejsca po lewej */
}
.social-icons a { color: inherit; font-size: 1.8rem; text-decoration: none; transition: opacity 0.3s ease; }
.social-icons a:hover { opacity: 0.7; }

.nav-menu {
    flex: 2; /* Daje więcej miejsca dla linków w centrum */
    display: flex;
    justify-content: center;
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 2vw; 
    white-space: nowrap;
}
.nav-links a { text-decoration: none; color: inherit; font-weight: 400; font-size: 1.1rem; transition: opacity 0.3s ease; }
.nav-links a:hover { opacity: 0.7; }

.nav-actions { 
    display: flex; 
    gap: 1vw;
    flex: 1; /* Wymusza zajęcie 1/3 miejsca po prawej */
    justify-content: flex-end; /* Przykleja przyciski do prawej krawędzi swojej sekcji */
}

.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 0.3rem; }
.hamburger span { width: 2rem; height: 0.2rem; background: #FFFFFF; }
body.dark-mode .hamburger span { background: #000000; }

/* Content */
.main-content { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 5vmin; }
.logo-image { width: clamp(12rem, 50vmin, 50rem); height: auto; transition: opacity 0.2s ease-in-out; }

.bottom-btn { 
    position: absolute; bottom: 5vh; left: 50%; transform: translateX(-50%); 
    background: transparent; border: none; color: inherit; font-family: 'Montserrat', sans-serif; 
    font-weight: 900; font-size: clamp(1.5rem, 8vmin, 4rem); cursor: pointer; white-space: nowrap; z-index: 10;
}

.pill-btn { 
    background-color: #FFFFFF; color: #000000; border: none;
    padding: 0.5rem 1.2rem; cursor: pointer; font-family: 'Montserrat', sans-serif; 
    font-weight: 500; font-size: 0.9rem; border-radius: 3rem; 
    transition: all 0.3s ease;
}
body.dark-mode .pill-btn { background-color: #000000; color: #FFFFFF; }
.pill-btn:hover { opacity: 0.8; transform: scale(1.05); }

/* Sekcja 3 - Filozofia */
.text-section { display: flex; align-items: center; justify-content: center; padding: 5vw; padding-top: 10vh; }
.content-wrapper { max-width: 80rem; width: 90%; text-align: center; }
.rich-text { line-height: 1.6; font-size: clamp(1.1rem, 1.4vw, 1.4rem); font-weight: 500; }
.rich-text p { margin-bottom: 2.5rem; }
.rich-text a { color: #007bff; text-decoration: none; font-weight: 600; }
.rich-text strong { display: block; margin-top: 1.5rem; font-weight: 900; }

/* Sekcja 5 - Kontakt */
.contact-section { 
    display: flex; 
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center;
    padding: 5vw; 
    padding-bottom: 8vh; 
    padding-top: 10vh;
}

.contact-grid { 
    display: flex; 
    width: 90%; 
    max-width: 80rem; 
    gap: 4vw; 
    align-items: flex-end; 
}

.charity-box { 
    flex: 2; 
    text-align: center; 
    line-height: 1.8; 
    font-size: clamp(0.95rem, 1.1vw, 1.15rem); 
    padding-right: 2vw; 
}

.details-box { 
    flex: 1; 
    border-left: 0.15rem solid #000; 
    padding-left: 4vw; 
    line-height: 1.5; 
    font-size: clamp(0.9rem, 1vw, 1.05rem); 
    text-align: left;
}
body.dark-mode .details-box { border-left-color: #fff; }

.details-box h3 { margin-bottom: 1rem; font-weight: 900; letter-spacing: 0.05rem; }
.details-box p { margin-bottom: 0.3rem; }

/* Modale */
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.modal.active { opacity: 1; visibility: visible; }
.modal-content { background: #000; width: 85vw; max-width: 50rem; max-height: 85vh; overflow-y: auto; color: #fff; text-align: center; padding: 5vmin; border-radius: 1rem; transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal.active .modal-content { transform: scale(1); }
body.dark-mode .modal-content { background: #fff; color: #000; }
.close-btn { cursor: pointer; font-size: 2rem; display: block; text-align: right; margin-bottom: 1.2rem; }

/* Oferta Paski */
.oferta-container { 
    display: flex; 
    width: 100vw; 
    height: 100vh; 
    flex-direction: row !important; 
    padding-top: 8vh; /* Przesunięcie zawartości poniżej paska menu */
}
.oferta-pasek { flex: 1; height: 100%; background-size: cover; background-position: center; cursor: pointer; transition: flex 0.5s ease; border-right: 0.05rem solid #333; }
.oferta-pasek:hover { flex: 1.5; }

/* Modal Oferty */
.oferta-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.95); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s ease; }
.oferta-modal.active { opacity: 1; visibility: visible; }
.oferta-title-overlay { color: #FFFFFF; font-weight: 900; font-size: clamp(1.2rem, 3vw, 2.5rem); text-align: center; margin-bottom: 2vh; transform: translateY(20px); opacity: 0; transition: all 0.5s ease 0.1s; text-shadow: 0 0 15px rgba(0,0,0,0.5); }
.oferta-modal.active .oferta-title-overlay { transform: translateY(0); opacity: 1; }
.oferta-modal img { max-width: 90vw; max-height: 70vh; object-fit: contain; transform: scale(0.7); opacity: 0; transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease; }
.oferta-modal.active img { transform: scale(1); opacity: 1; }
.more-info-btn { margin-top: 2rem; padding: 1rem 2rem; cursor: pointer; background: #fff; color: #000; border: none; border-radius: 3rem; font-weight: bold; font-family: 'Montserrat', sans-serif; transform: translateY(20px); opacity: 0; transition: all 0.4s ease 0.2s; }
.oferta-modal.active .more-info-btn { transform: translateY(0); opacity: 1; }

/* Galeria */
.galeria-container { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(4, 1fr); 
    gap: 1.5vmin; 
    padding: 1.5vmin; 
    padding-top: calc(8vh + 1.5vmin); /* Przesunięcie poniżej menu (8vh) + zachowanie odstępu (1.5vmin) */
    width: 100vw; 
    height: 100vh; 
}
.galeria-link { display: flex; justify-content: center; align-items: center; background: #fdfdfd; border: 0.05rem solid #eaeaea; border-radius: 0.25rem; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
body.dark-mode .galeria-link { background: #0a0a0a; border-color: #222; }
.galeria-link:hover { transform: scale(1.02); box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.1); z-index: 2; }
.galeria-link img { width: 100%; height: 100%; object-fit: contain; padding: 0.3rem; }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu { display: none; position: fixed; top: 8vh; left: 0; width: 100%; height: 92vh; background: #000; padding-top: 5vh; z-index: 30; }
    body.dark-mode .nav-menu { background: #fff; }
    .nav-menu.active { display: flex; flex-direction: column; justify-content: flex-start; }
    .nav-links { flex-direction: column; align-items: center; gap: 4vh; }
    /* Przywrócenie pełnej szerokości w wersji mobilnej dla menu */
    .social-icons, .nav-actions { flex: none; width: auto; }
    .contact-grid { flex-direction: column; gap: 5vh; text-align: center; align-items: center; }
    .charity-box { padding-right: 0; }
    .details-box { border-left: none; border-top: 0.1rem solid #000; padding-left: 0; padding-top: 5vh; width: 100%; }
    body.dark-mode .details-box { border-top-color: #fff; }
    .galeria-container { 
        grid-template-columns: repeat(2, 1fr); 
        grid-template-rows: repeat(8, 1fr); 
        padding-top: calc(8vh + 1.5vmin);
    }
    .oferta-container { flex-direction: column !important; padding-top: 8vh; }
}