@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&display=swap');

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

html, body { overflow-x: hidden; }

body {
    font-family: "Fjalla One", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #2b2b2b;
    background-color: #faf8f2;
    line-height: 1.8;
    letter-spacing: 0.03em;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(15px, 3vw, 30px) clamp(10px, 3vw, 20px);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 10px;
    margin: 0 0 30px 0;
    background-color: #ede7dc;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav a {
    text-decoration: none;
    color: #4a3f35;
    padding: 8px 14px;
    font-size: clamp(0.9rem, 2.5vw, 1.1em);
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav a:hover, nav a:focus {
    color: #faf8f2;
    background-color: #8c7355;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: clamp(20px, 4vw, 30px) clamp(15px, 3vw, 20px);
    background-color: #ede7dc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

h1 {
    color: #5c3a21;
    font-size: clamp(1.8rem, 6vw, 3em);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

h2 {
    color: #5c3a21;
    font-size: clamp(1.4rem, 4.5vw, 2.2em);
    margin-bottom: 15px;
    line-height: 1.3;
}

p {
    margin-bottom: 25px;
    font-size: clamp(1rem, 2.4vw, 1.1em);
}

.intro {
    text-align: center;
    margin-bottom: 30px;
}

main {
    border: 4px solid #2b2b2b;
    border-radius: 8px;
    background-image: url(../images/books.jpg);
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: clamp(15px, 4vw, 40px);
    margin-bottom: 40px;
}

main section {
    background-color: rgba(253, 251, 247, 0.95);
    padding: clamp(18px, 4vw, 35px);
    margin-bottom: 30px;
    font-size: clamp(1rem, 2.4vw, 1.15em);
    line-height: 1.8;
    color: #2c2825;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

main section:last-child {
    margin-bottom: 0;
}

main section.section-split {
    display: flex;
    align-items: center;
    gap: clamp(15px, 3vw, 30px);
    flex-wrap: wrap;
}

main section.section-split.reverse {
    flex-direction: row-reverse;
}

main section.section-split img {
    width: 40%;
    min-width: 200px;
    margin-bottom: 0;
    flex-shrink: 0;
    flex-grow: 1;
}

main section.section-split p {
    margin-bottom: 0;
    flex: 1 1 250px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 25px;
    display: block;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: clamp(18px, 3vw, 25px) clamp(15px, 3vw, 20px);
    background-color: #5c3a21;
    color: #faf8f2;
    border-radius: 8px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    font-size: clamp(0.85rem, 2.2vw, 0.95em);
    letter-spacing: 0.02em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: clamp(0.95rem, 2.3vw, 1.1em);
    background-color: #faf8f2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    padding: clamp(10px, 2vw, 16px);
    border-bottom: 1px solid #d6cdbd;
    text-align: left;
}

th {
    background-color: #5c3a21;
    color: #faf8f2;
    letter-spacing: 0.04em;
}

th:nth-child(1), td:nth-child(1) { width: 28%; }
th:nth-child(2), td:nth-child(2) { width: 22%; }
th:nth-child(3), td:nth-child(3) { width: 14%; }
th:nth-child(4), td:nth-child(4) { width: 24%; }
th:nth-child(5), td:nth-child(5) { width: 12%; }

tbody tr:nth-child(even) {
    background-color: #ede7dc;
}

tbody tr:hover {
    background-color: #d6cdbd;
}

@media (max-width: 600px) {
    main section.section-split,
    main section.section-split.reverse {
        flex-direction: column;
    }

    main section.section-split img {
        width: 100%;
        margin-bottom: 20px;
    }
}
