* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f4f4f4;
    color: #333;
}

/* ===== HEADER ===== */
.header {
    background: #000;
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 32px;
}

.header-left span {
    font-size: 14px;
    color: #ccc;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 14px;
    border-radius: 4px;
}

.nav a:hover,
.nav a.active {
    background: #555;
}

/* ===== LAYOUT ===== */
.container {
    background: #fff;
    padding: 40px;
    display: flex;
}

.content {
    flex: 3;
    padding-right: 40px;
}

.sidebar {
    flex: 1;
    padding-left: 30px;
    border-left: 1px solid #ddd;
}

/* ===== CONTENT ===== */
h2 {
    font-size: 32px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.bio {
    display: flex;
    align-items: flex-start;
}

.photo {
    margin-right: 20px;   /* ГАРАНТОВАНИЙ ВІДСТУП */
    flex-shrink: 0;
}

.photo img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}


.text p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.exhibitions {
    margin-top: 40px;
}

.exhibitions h3 {
    margin-bottom: 15px;
}

.exhibitions ul {
    padding-left: 20px;
}

.exhibitions li {
    margin-bottom: 10px;
}

/* ===== SIDEBAR ===== */
.search input {
    width: 100%;
    padding: 10px;
    margin-bottom: 30px;
    border: 1px solid #ccc;
}

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.pages {
    list-style: none;
}

.pages li {
    margin-bottom: 10px;
}

.pages a {
    color: #0073aa;
    text-decoration: none;
}

.pages a:hover {
    text-decoration: underline;
}

/* =========================
   ADAPTIVE (TABLET + MOBILE)
   ========================= */

@media (max-width: 1024px) {
    .container {
        padding: 30px;
    }

    .content {
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .bio {
        flex-direction: column;
    }

    .photo {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .photo img {
        width: 100%;
    }
}

@media (max-width: 480px) {

    /* Navigation */
    .nav a {
        display: block;
        margin: 8px 0;
    }

    /* Text */
    body {
        font-size: 16px;
    }

    .text p {
        line-height: 1.7;
    }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 по горизонталі */
    grid-template-rows: repeat(3, auto);  /* 3 по вертикалі */
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery .item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery .item img {
    width: 100%;
    max-width: 225px;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
form {
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input, form textarea {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

form button {
    padding: 10px;
    font-size: 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover {
    background: #005f80;
}

.message {
    max-width: 500px;
    margin: 10px auto;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}
