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

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #2b2b2b;
    padding: 15px;
    border: 3px solid #4aa3df;
}

header {
    border: 2px solid #c0392b;
    padding: 6px 12px;
    margin-bottom: 12px;
}

header h1 {
    font-size: 1.1em;
    font-weight: bold;
}

main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    border: 2px solid #f39c12;
    padding: 15px;
    background-color: #aedfe8;
    min-height: 600px;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.thumbnails figure {
    border: 3px solid #ff5fa2;
    padding: 4px;
    background-color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.thumbnails figure:hover,
.thumbnails figure:focus {
    transform: scale(1.03);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.thumbnails figure.active {
    border-color: #c0392b;
}

.thumbnails img {
    display: block;
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.big-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    min-height: 0;
}

.big-view figcaption {
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.4;
    color: #2b2b2b;
    align-self: stretch;
}

.big-view img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: #ffffff;
}

nav {
    margin-top: 15px;
}

nav a {
    color: #2b2b2b;
    text-decoration: underline;
}

footer {
    margin-top: 15px;
    font-size: 0.85em;
    color: #555;
}

@media (max-width: 600px) {
    main {
        grid-template-columns: 1fr;
    }

    .thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
}
