* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: #fff;
    background-image: url('tlo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Górny pasek menu */
.top-menu {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    text-align: center;
    padding: 12px 0;
    font-size: 0.95rem;
}

.top-menu a {
    color: #ddd;
    text-decoration: none;
    margin: 0 18px;
}

.top-menu a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Druga linia menu */
.main-menu {
    background-color: rgba(44, 62, 80, 0.85);
    text-align: center;
    padding: 14px 0;
}

.main-menu a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 22px;
    font-size: 1.05rem;
}

.main-menu a:hover {
    color: #f1c40f;
}

/* Nagłówek – bez białego tła */
.main-header {
    text-align: center;
    padding: 70px 20px 50px;
    background: transparent;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-header h1 {
    font-size: 3.2rem;
    letter-spacing: 4px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.subtitle {
    font-size: 1.3rem;
    color: #fff;
    font-style: italic;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
}

/* Treść – bez białego tła */
.container {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 40px 20px;
    flex: 1;
    text-align: center;
    background: transparent;
}

.container h2,
.container p {
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
}

.container h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

/* Stopka */
footer {
    background-color: rgba(0, 0, 0, 0.85);
    color: #ccc;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.95rem;
    line-height: 1.8;
}

footer a {
    color: #f1c40f;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin: 4px 0;
}

/* Responsywność */
@media (max-width: 700px) {
    .main-header h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    .top-menu a,
    .main-menu a {
        margin: 0 10px;
        font-size: 0.9rem;
    }
}
/* Podstrony sekcji – bez obrazka w tle */
body.page-section {
    background-image: none;
    background-color: #f5f5f5;
    color: #222;
}

body.page-section .main-header h1,
body.page-section .container h2,
body.page-section .container p {
    color: #222;
    text-shadow: none;
}

body.page-section .container {
    background: #fff;
    color: #222;
    border-radius: 8px;
    padding: 30px 20px;
    max-width: 900px;
    margin: 20px auto 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
body.page-section {
    background-image: none;
    background-color: #f5f5f5;
    color: #222;
}

body.page-section .main-header h1,
body.page-section .container h2,
body.page-section .container p {
    color: #222;
    text-shadow: none;
}

body.page-section .container {
    background: #fff;
    color: #222;
    border-radius: 8px;
    padding: 30px 20px;
    max-width: 900px;
    margin: 20px auto 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
body.page-section .container {
    text-align: left;
}

body.page-section .main-header {
    text-align: center; /* tytuł sekcji może zostać na środku */
}

body.page-section .container h2,
body.page-section .container p,
body.page-section .container article {
    text-align: left;
}
.philosophers {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    flex-wrap: nowrap;
    margin: 20px auto 30px;
    max-width: 1100px;
    padding: 0 15px;
}

.philosophers img {
    width: 30%;
    max-width: 320px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@media (max-width: 800px) {
    .philosophers {
        flex-wrap: wrap;
    }
    .philosophers img {
        width: 45%;
        height: 240px;
    }
}
.sub-menu {
    background-color: #34495e;
    text-align: center;
    padding: 12px 0;
}

.sub-menu a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 16px;
}

.sub-menu a:hover {
    color: #f1c40f;
}

.philosophers figure {
    margin: 0;
    width: 30%;
    max-width: 320px;
    text-align: center;
}

.philosophers figcaption {
    margin-top: 8px;
    font-weight: bold;
    color: #222;
}

body.page-section .main-header {
    flex: 0;
    padding: 30px 20px 10px;
}
.philosophers {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    margin: 20px auto 30px;
    max-width: 1200px;
    padding: 0 15px;
}

.philosophers figure {
    margin: 0;
    width: 32%;
    max-width: 360px;
    text-align: center;
}

.philosophers img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    background: #fff;
}

.philosophers figcaption {
    margin-top: 8px;
    font-weight: bold;
    color: #222;
}

.sub-menu {
    background-color: #34495e;
    text-align: center;
    padding: 12px 0;
}

.sub-menu a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 16px;
}

.sub-menu a:hover {
    color: #f1c40f;
/* ========================================================
   GWARANTOWANE MARGINESY DLA PODSTRONY FILOZOFIA
=========================================================== */

/* Celujemy w kontener, który znajduje się na tej samej stronie co sekcja .philosophers */
.container {
    max-width: 840px !important;    /* Zwężamy całe okno treści, by tekst nie rozlewał się na boki */
    padding: 40px 50px !important;  /* Wymuszamy duże marginesy wewnętrzne od lewej i prawej krawędzi */
    margin: 30px auto !important;   /* Centrujemy blok na środku ekranu */
}

/* Formatowanie akapitów dla idealnej czytelności */
.container p {
    text-align: justify !important; /* Wyrównanie tekstu do obu marginesów (jak w książce) */
    line-height: 1.85 !important;   /* Zwiększenie przestrzeni między linijkami tekstu */
    margin-bottom: 25px !important; /* Odpowiedni odstęp między akapitami */
    font-size: 1.1rem !important;   /* Wygodny rozmiar czcionki do czytania */
}

/* Zabezpieczenie dla urządzeń mobilnych */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px !important; /* Na telefonach marginesy dostosują się do mniejszego ekranu */
    }
}
