/* ================= ZÁKLAD ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url('one-piece-logo-stylized-mmrmmo7qbip99uqi.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 40px;
    text-align: center;
}

/* ================= MENU ================= */
header {
    background-color: #111;
    padding: 20px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

.menu {
    list-style: none;
    display: flex;
    justify-content: center;
}

.menu li {
    margin: 0 15px;
}

.menu a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.menu a:hover {
    color: #f39c12;
    border-bottom: 2px solid #f39c12;
}

/* ================= NADPIS ================= */
h1 {
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 5px black;
}

/* ================= GALERIE ================= */
.galerie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    color: white;
}
h2 {
    color: white;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px black;
}

/* Každá karta postavy */
.postava {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.postava:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Obrázek */
.postava img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Jméno postavy */
.postava p {
    margin-top: 12px;
    font-weight: bold;
    font-size: 18px;
    color: #111;
}

/* Zruší podtržení odkazu u obrázků */
.postava a {
    text-decoration: none;
}

/* ================= RESPONSIVE ================= */

/* -------- MOBIL (max 768px) -------- */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }

    .menu li {
        margin: 10px 0;
    }

    .galerie {
        grid-template-columns: repeat(1, 1fr); /* 1 sloupec na malé obrazovce */
        gap: 15px;
    }

    .postava img {
        height: 180px;
    }

    .postava p {
        font-size: 16px;
    }
}

/* -------- TABLET (769px až 1024px) -------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .menu li {
        margin: 0 12px;
    }

    .galerie {
        grid-template-columns: repeat(2, 1fr); /* 2 sloupce na tabletu */
        gap: 20px;
    }

    .postava img {
        height: 190px;
    }

    .postava p {
        font-size: 17px;
    }
}

/* -------- DESKTOP (1025px a více) -------- */
@media (min-width: 1025px) {
    .menu li {
        margin: 0 15px;
    }

    .galerie {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }

    .postava img {
        height: 200px;
    }

    .postava p {
        font-size: 18px;
    }
}