/* =========================================
   1. RESET I USTAIWENIA BAZOWE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. NAWIGACJA I STOPKA (Layout)
   ========================================= */
header {
    background-color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease;
    text-align: center;
    line-height: 1.2;
    display: block;
}

nav a:hover {
    color: #1abc9c;
}

footer {
    text-align: center;
    padding: 1.5rem 0;
    background-color: #2c3e50;
    color: #fff;
    margin-top: auto;
}

/* =========================================
   3. KONTENER GŁÓWNY I TYPOGRAFIA
   ========================================= */
main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 20px;
    flex: 1;
}

main h1 {
    text-align: center;
    color: #2980b9;
    margin-bottom: 25px;
    font-size: 2.2rem;
}

/* Klasa dla języka włoskiego */
.it {
    font-style: italic;
    color: #666;
    font-weight: normal;
    display: block;
    margin-top: 2px;
    font-size: 0.9em;
}

/* =========================================
   4. KOMPONENTY (Karty, Info unijne)
   ========================================= */

/* Blok informacyjny UE na stronie głównej */
.eu-info {
    text-align: center;
    background-color: #ffffff;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid #2c3e50;
}

.eu-info p {
    margin-bottom: 10px;
}

.eu-info .project-number {
    font-weight: bold;
    color: #1abc9c;
    letter-spacing: 1px;
}

/* SIATKA (Grid) - używana w postacie.html i edukacja.html */
.grid-2 {
    display: grid;
    /* Tworzy 2 równe kolumny na komputerze, 1 na telefonie */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* KARTA (Card) - pojedynczy kafelek postaci */
.card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 5px solid #2980b9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* ZDJĘCIA W KARTACH - Wszystkie równe! */
.card img {
    width: 100%;
    height: 280px; /* Stała wysokość */
    object-fit: cover; /* Idealne docięcie zdjęcia */
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.4rem;
}

/* =========================================
   5. MULTIMEDIA I PROFILE (Inne strony)
   ========================================= */
video {
    width: 100%;
    max-width: 800px;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.person-profile {
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* Responsywność dla małych ekranów (telefony) */
@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr; /* Na telefonie tylko jedna kolumna */
    }
    
    main h1 {
        font-size: 1.6rem;
    }
}
/* Stylizacja bloków tematycznych w Kulturze */
.culture-topic {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.culture-topic h3 {
    color: #2980b9;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.culture-topic p {
    margin-bottom: 10px;
}
/* Nowoczesna, responsywna galeria dla podstrony Edukacja */
.gallery-container {
    margin-top: 50px;
    text-align: center;
}

.gallery-title {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.gallery-grid {
    display: grid;
    /* Automatyczne dopasowanie kolumn: min 220px, max rozciągnięcie */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.gallery-grid img {
    width: 100%;
    height: 180px; /* Stała wysokość zapewnia idealne wyrównanie w rzędzie */
    object-fit: cover; /* Profesjonalne kadrowanie bez rozciągania obrazu */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efekt najechania myszką (lekki ruch do góry i cień dla dynamiki) */
.gallery-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}