/* --- 1. Global & Base Styles --- */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    color: #3D352A;
    background-color: #D3C4B3;
    background-image: linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

.background-image {
    display: none;
}


/* --- 2. Main Container Style --- */
.book {
    max-width: 850px;
    margin: 50px auto;
    padding: 50px 60px;
    background-color: #FDFCF7;
    border: 1px solid #D1C7B8;
    border-radius: 3px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(0,0,0,0.1);
}


/* --- 3. Top Navigation --- */
.navigation {
    width: 100%;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #EAE6E0;
}

.navigation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation-list a {
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
    color: #8A795D;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.9em;
    border-radius: 3px;
    transition: background-color 0.3s, color 0.3s;
}

.navigation-list a:hover {
    background-color: #F9F6F0;
    color: #5C4033;
}


/* --- 4. Header & Typography --- */
.nation-header {
    text-align: center;
    margin-bottom: 40px;
}

.nation-header h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: #3D352A;
    line-height: 1.3;
}

.nation-header h2 {
    font-size: 1.3em;
    color: #8A795D;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 10px;
}

.nation-image {
    margin: 30px 0;
}

.nation-image img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    border: 1px solid #EAE6E0;
    padding: 8px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.country-intro h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: #5C4033;
    border-bottom: 1px solid #D1C7B8;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.country-intro p {
    font-size: 1.1em;
    line-height: 1.9;
    color: #3D352A;
    margin-bottom: 1.5em;
    text-align: justify;
}


/* --- 5. Gender Links Section --- */
.gender-links {
    text-align: center;
    margin: 50px 0;
    padding: 30px;
    background-color: #F9F6F0;
    border: 1px solid #EAE6E0;
    border-radius: 3px;
}

.gender-links h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: #5C4033;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gender-links h4 {
    font-size: 1.2em;
    color: #8A795D;
    font-style: italic;
    font-weight: 400;
    margin: 0 auto 30px auto;
    max-width: 600px;
}

.gender-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.gender-menu a {
    font-family: 'Open Sans', sans-serif;
    display: inline-block;
    background-color: #5C4033;
    color: #FDFCF7;
    padding: 12px 30px;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.gender-menu a:hover {
    background-color: #3D352A;
    transform: translateY(-1px);
}


/* --- 6. Footer Styles --- */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #EAE6E0;
    font-family: 'Open Sans', sans-serif;
}

.footer a, .footer p {
    font-size: 0.9em;
    color: #8A795D;
    text-decoration: none;
    margin: 5px 0;
}

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

.footer ul { list-style: none; padding: 0; margin: 10px 0 0 0; }
.footer ul li { display: inline-block; margin: 0 10px; }


/* --- 7. Responsive Design --- */
@media (max-width: 768px) {
    .book {
        margin: 20px;
        padding: 20px 25px;
    }
    .nation-header h1 { font-size: 2em; }
    .country-intro p { font-size: 1em; }
    .gender-menu { flex-direction: column; gap: 10px; }
}