:root {
    --primary-color: #6d8b74; /* Soft Sage Green */
    --secondary-color: #e3dcd2; /* Warm Beige */
    --accent-color: #d68c45; /* Muted Orange/Terra Cotta */
    --text-color: #333333; /* Dark Gray */
    --bg-color: #f9f7f2; /* Off-white */
    --white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;
    --spacing-unit: 1rem;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* Header & Nav */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.masthead {
    height: 250px;
    background-image: url('../images/masthead-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.masthead::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.masthead h1 {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease-out;
}

nav {
    background-color: var(--primary-color);
    padding: 0.5rem 0;
}

.topnav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.topnav a {
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.topnav a:hover, .topnav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

.topnav .icon {
    display: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    flex: 1;
}

/* Sidebar */
aside {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
    animation: fadeInLeft 1s ease-out;
}

aside h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

aside ul {
    list-style: none;
}

aside li {
    margin-bottom: 0.5rem;
}

aside li a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--text-color);
}

aside li a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding-left: 1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icons img {
    width: 32px;
    height: 32px;
    transition: var(--transition);
}

.social-icons img:hover {
    transform: scale(1.1);
}

/* Main Content */
main {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: fadeInUp 1s ease-out;
}

main h1, main h2, main h3 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

main p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.img-float-right {
    float: right;
    margin: 0 0 1rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 40%;
}

.img-float-left {
    float: left;
    margin: 0 1rem 1rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 40%;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

footer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

footer a:hover {
    color: var(--white);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .topnav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .masthead h1 {
        font-size: 2rem;
    }
}
