@charset "UTF-8";

/* --- General Body --- */
body {
    margin: 0;
    padding: 0;
    background-color: #050505; /* Deep Black */
    font-family: "Merriweather", "Georgia", serif;
    color: #E0C090; /* Light Gold */
    line-height: 1.6;
}

/* --- Main Wrapper --- */
#wrapper {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px;
    box-sizing: border-box;
    
    /* Dark Rust/Green/Gold Gradient at 135 deg */
    background: linear-gradient(135deg, 
        rgba(40, 20, 10, 0.95) 0%, 
        rgba(60, 40, 20, 0.95) 25%, 
        rgba(30, 50, 30, 0.95) 50%, 
        rgba(80, 50, 20, 0.95) 75%, 
        rgba(40, 30, 10, 0.95) 100%);
    
    border: 1px solid #8B5A2B;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

/* --- Top Navigation Area --- */
.top-bar {
    display: flex;
    justify-content: flex-end; /* Pushes link to right since image is gone */
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 90, 43, 0.3);
}

.top-nav-link {
    font-family: "Lato", "Arial", sans-serif;
    font-size: 11pt;
    text-decoration: none;
    color: #D4AF37; /* Gold */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-weight: 700;
}

.top-nav-link:hover {
    color: #FFFFFF; /* White Hover */
    text-decoration: underline;
}

/* --- Content Sections (The Floating Boxes) --- */
.content-box {
    background: linear-gradient(135deg, 
        rgba(20, 10, 5, 0.8) 0%, 
        rgba(40, 25, 10, 0.8) 100%);
    border: 1px solid #5C4033;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    align-items: center; /* Vertically center image and text */
    gap: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.content-box.reverse {
    flex-direction: row-reverse; /* Image Right, Text Left */
}

.content-box.centered {
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

/* --- IMAGE STYLING (FIXED) --- */
.content-box img {
    /* Remove fixed width to allow max-width/height to work */
    width: auto; 
    height: auto;
    
    /* Set your requested maximums */
    max-width: 400px;
    max-height: 400px;
    
    /* Ensure it doesn't shrink below a reasonable size */
    min-width: 200px; 
    
    border: 1px solid #8B5A2B;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    flex-shrink: 0; /* Prevent image from squishing */
    object-fit: contain; /* Ensures whole image is visible within max dims */
}

/* Specific override for the centered image (Image #2) to ensure it goes full 400px wide */
.content-box.centered img {
    width: 100%; /* Fill available space up to max-width */
    max-width: 400px;
    max-height: none; /* Remove height restriction for the main banner image */
    margin-top: 20px;
}

.text-content {
    flex: 1;
    font-size: 13pt;
    color: #F0E68C; /* Khaki/Light Gold */
}

.text-content h1 {
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 2.2rem;
    color: #FFD700; /* Bright Gold */
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px #000;
    line-height: 1.2;
}

.text-content p {
    margin-bottom: 15px;
    text-shadow: 1px 1px 1px #000;
}

.text-content .highlight {
    font-size: 1.1em;
    font-style: italic;
    color: #FFF8DC; /* Cornsilk */
    border-left: 3px solid #D4AF37;
    padding-left: 15px;
    margin: 20px 0;
}

/* --- Bottom Navigation (OVERRIDING JS STYLES) --- */
#bottomnav {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 90, 43, 0.3);
}

/* Force the JS-generated .link1 to match our theme */
#bottomnav a.link1 {
    font-family: "Lato", "Arial", sans-serif;
    font-size: 10pt; /* Slightly larger as requested previously */
    text-decoration: none;
    color: #D4AF37 !important; /* Gold - !important overrides inline/JS styles */
    margin: 0 10px;
    transition: color 0.3s ease;
}

#bottomnav a.link1:hover {
    color: #FFFFFF !important; /* White Hover */
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media screen and (max-width: 768px) {
    #wrapper {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .content-box, .content-box.reverse {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .content-box img {
        /* On mobile, allow images to be full width of container */
        max-width: 100%; 
        height: auto;
        margin: 0 auto;
    }

    .text-content h1 {
        font-size: 1.8rem;
    }

    .top-bar {
        justify-content: center;
    }
    
    /* Stack bottom nav links on very small screens if needed */
    #bottomnav a.link1 {
        display: inline-block;
        margin: 5px 5px;
    }
}