:root {
    --primary-color: #fff; /* Główny kolor tła (biały) */
    --secondary-color: #000; /* Kolor tekstu (czarny) */
    --accent-color: #D39FD5; /* Nowy wrzosowy kolor dla przycisków i akcentów */
    --text-light: #555; /* Ciemniejszy tekst dla stopki itp. */
    --font-family: 'Arial', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--primary-color); /* Białe tło */
    color: var(--secondary-color); /* Czarny tekst */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--secondary-color); /* Czarne linki */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color); /* Wrzosowy hover dla linków */
}

/* Nagłówek (Header) */
header {
    background-color: var(--primary-color); /* Białe tło nagłówka */
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Ciemniejsza linia pod nagłówkiem */
    position: relative;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5em; 
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--secondary-color);
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.site-logo {
    max-height: 40px; 
    width: auto; 
    display: block; 
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul a {
    font-weight: bold;
    font-size: 0.95em;
    text-transform: uppercase;
    padding: 5px 0;
    color: var(--secondary-color); 
}

/* Przycisk menu mobilnego */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color); 
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
}

/* --- */
/* Sekcja Bohatera (Hero Section) - DOMYŚLNE STYLE */
.hero-section {
    min-height: 80vh;
    position: relative; /* Ważne, aby dzieci absolutne pozycjonowały się względem niego */
    overflow: hidden;   /* Ukrywa wideo, które wychodzi poza granice sekcji */
    background-color: var(--primary-color); /* Fallback color */
    /* Domyślny fallback obrazek, jeśli wideo się nie załaduje lub jest ukryte.
       Wideo będzie miało priorytet nad tym obrazem, jeśli jest obecne i widoczne. */
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/bckgd.png'); 
    background-size: cover;
    background-position: center 50%;
    background-repeat: no-repeat;
    /* Usunięto tutaj display: flex, justify-content, align-items, text-align, padding
       te style są teraz na .hero-content-overlay */
}

/* Wideo w tle */
.hero-section .background-video {
    position: absolute; /* Ustawia pozycję absolutną względem rodzica (hero-section) */
    top: 0;             /* Przyczepia do góry */
    left: 0;            /* Przyczepia do lewej */
    width: 100%;        /* Rozciąga na całą szerokość */
    height: 100%;       /* Rozciąga na całą wysokość */
    object-fit: cover;  /* Dopasowuje wideo, aby pokryło cały obszar, przycinając jeśli trzeba */
    z-index: 0;         /* Upewnia się, że wideo jest pod treścią overlay'a (hero-content-overlay ma z-index: 1) */
}


/* Kontener dla treści nad wideo */
.hero-content-overlay {
    position: absolute; /* Zmień na absolute, aby pokrywało całą sekcję */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;         /* Upewnia się, że treść jest widoczna nad wideo */
    display: flex;      /* Użyj flexboxa, aby wyśrodkować treść wewnątrz overlay'a */
    flex-direction: column; /* Ułóż elementy pionowo */
    justify-content: center; /* Wyśrodkuj w pionie */
    align-items: center; /* Wyśrodkuj w poziomie */
    text-align: center; /* Centruj tekst wewnątrz overlay */
    background: rgba(0, 0, 0, 0.4); /* Ciemniejszy gradient dla lepszej czytelności tekstu */
    padding: 80px 20px; /* Dodaj padding do treści */
    box-sizing: border-box; /* Upewnij się, że padding nie zwiększa rozmiaru */
    color: var(--primary-color); /* Ustaw kolor tekstu w overlay (np. biały) */
}


/* --- */
/* Specyficzne tła dla każdej strony (jako fallbacki lub jeśli nie ma wideo) */
/* Te style będą działać jako fallback, jeśli wideo jest ukryte lub nie załadowane */
#main-index-section {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/main-bckgd.png'); 
}

#main-mfctg-section {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/proj.png'); 
}

#main-contact-section {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/contact-bckgd.png');
}
#main-about-section {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/about-bckgd.png');
}
.hero-section h1 {
    font-size: 4.5em;
    margin-bottom: 20px;
    line-height: 1.1;
    max-width: 900px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Ciemniejszy cień dla lepszej czytelności */
    color: inherit; /* Dziedziczy kolor z .hero-content-overlay */
}

.hero-section p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: inherit; /* Dziedziczy kolor z .hero-content-overlay */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Przyciski */
.btn {
    display: inline-block;
    background-color: var(--accent-color); 
    color: var(--primary-color); 
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #B27FC4; /* Ciemniejszy odcień wrzosowego przy najechaniu */
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: #542F55; 
    color: var(--primary-color); 
    border: 2px solid #542F55; 
}

.btn.secondary:hover {
    background-color: #9B719D; 
    border-color: #9B719D; 
    color: var(--primary-color); 
    transform: translateY(-2px); 
}

/* Sekcje treści (Content Sections) */
.content-section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--primary-color);
    min-height: 450px; 
}

.content-section .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center; 
    gap: 40px;
    position: relative;
    z-index: 2;
    color: var(--secondary-color); 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2); 
    width: 100%; 
}

.content-section .text-content {
    flex: 0 0 auto; 
    width: 500px; 
    max-width: 90%; 
    padding: 20px; 
    background-color: rgba(255, 255, 255, 0.8); 
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.content-section.space-launch .text-content {
    margin-right: auto; 
    margin-left: 5%; 
}

.content-section.reverse-order .text-content {
    margin-left: auto; 
    margin-right: 5%; 
}

.about-image-container {
    flex: 0 0 auto; 
    width: 500px; 
    max-width: 90%; 
    display: flex; 
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.about-image {
    width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}

.content-section.reverse-order .container {
    flex-direction: row-reverse;
}

.content-section h2 {
    font-size: 3em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.content-section p {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-light); 
}

.content-section .image-content { 
    /* Te style już nie mają zastosowania, ale pozostawiamy klasę image-content dla czytelności */
}

.content-section img.parallax-img {
    display: none; 
}

/* Style dla formularza kontaktowego i informacji (contact.html) */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin-right: auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--secondary-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical; /* Pozwala na pionowe skalowanie */
}

.contact-form .btn {
    align-self: flex-start; /* Przycisk wyrównany do lewej */
    margin-top: 10px;
}

.contact-info {
    max-width: 500px;
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-info h2 {
    margin-top: 0;
}

.contact-info p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.map-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.map-container iframe {
    display: block; /* Usuwa białą przestrzeń pod iframe */
}


/* Stopka (Footer) */
footer {
    background-color: var(--secondary-color); 
    color: var(--text-light); 
    padding: 60px 0;
    font-size: 0.9em;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 30px;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light); 
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color); 
}

.copyright {
    margin-top: 20px;
}

/* --- */
/* Style dla sekcji Członkowie Zarządu (z zdjęciami) */
.team-members-container {
    flex-direction: column;
    text-align: center;
}

.board-members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.board-member-card {
    flex: 0 0 280px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.board-member-card:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-color);
}

.board-member-card h3 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 1.5em;
    color: var(--secondary-color);
}

.board-member-card p {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.board-member-card .btn.secondary {
    width: 100%;
    padding: 10px 15px;
    font-size: 0.9em;
}


/* --- */
/* Responsywność */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3.5em;
    }
    .content-section h2 {
        font-size: 2.5em;
    }
    .content-section .text-content,
    .about-image-container { 
        width: 70%; 
        max-width: 45%; 
        flex: 1 1 45%; 
    }
    /* Kontakt: zmiana układu na kolumnowy */
    .content-section .container {
        flex-direction: column;
        align-items: center;
    }
    .contact-form,
    .contact-info {
        max-width: 90%;
        margin: 0 auto;
        width: 100%; 
    }
    .contact-info {
        margin-top: 40px; 
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .logo {
        width: 100%;
        margin-bottom: 20px;
    }

    .site-logo {
        max-height: 35px; 
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--primary-color); 
        position: absolute;
        top: 100%;
        left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1); 
        padding: 20px 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 15px 0;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .hero-section h1 {
        font-size: 2.8em;
    }

    .hero-section p {
        font-size: 1.2em;
    }

    .content-section .container {
        flex-direction: column;
        text-align: center;
    }

    .content-section .text-content {
        padding: 0;
        margin-bottom: 40px;
        width: 90%; 
        margin-left: auto; 
        margin-right: auto; 
        background-color: rgba(255, 255, 255, 0.9); 
    }

    /* Zresetowanie stylów paralaksy na mobilnych dla sekcji treści */
    .content-section {
        background-position: center center !important; 
        background-attachment: scroll !important; 
        background-image: none !important; 
        background-color: var(--primary-color) !important; 
        min-height: auto; 
    }

    /* Układ obrazu i tekstu w sekcji "O nas" na mobilnych */
    .content-section.reverse-order .container {
        flex-direction: column; 
    }

    .content-section .text-content,
    .about-image-container {
        max-width: 100%; 
        width: 90%; 
        margin-left: auto;
        margin-right: auto;
    }
    .about-image-container {
        height: auto; 
        margin-top: 20px; 
    }
    
    .board-members-grid {
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center; 
    }

    .board-member-card {
        flex: 0 0 45%; 
        max-width: 350px; 
        margin-bottom: 20px; 
    }

    /* Ukryj wideo na mniejszych ekranach dla lepszej wydajności */
    .hero-section .background-video { 
        display: none; 
    }

    .hero-section {
        /* Przywróć obrazek tła dla mobilnych, jeśli wideo jest wyłączone */
        background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/bckgd.png'); 
        background-position: center center !important; 
        background-attachment: scroll !important; 
        background-repeat: no-repeat;
    }
    #main-about-section {
        background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/about-bckgd.png'); 
    }
    #main-contact-section {
        background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('img/contact-bckgd.png'); 
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .content-section h2 {
        font-size: 2em;
    }
    .btn {
        padding: 12px 25px;
    }
    .footer-links ul {
        text-align: center;
    }

    .board-members-grid {
        flex-direction: column; 
        align-items: center; 
    }

    .board-member-card {
        flex: 0 0 90%; 
        max-width: 350px; 
        margin-bottom: 20px; 
    }
}