/* Custom Properties (Variables) */
:root {
    --color-pure-black: #000000;          /* Background */
    --color-off-white: #F5F5DC;           /* Main Text */
    --color-earthy-brown: #4F3C2C;        /* Menu Background for dropdowns - Now unused */
    --color-dragon-green: #2F7C2F;        /* Menu Text, Main Link Color */
    --color-warm-bronze: #C49A6E;         /* Heading/Accent, Hover Color */
    --border-color-dark: #333;            /* Dark separator border */
    --color-dark-grey: #666;              /* For subtle text like footer */
}

/* --- GLOBAL STYLES --- */
body {
    font-family: 'Arial', sans-serif;
    background-color: var(--color-pure-black);
    color: var(--color-off-white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Base Link/Transition Styles for DRY Principle */
a {
    transition: color 0.3s, background-color 0.3s, text-decoration 0.3s;
}

/* Base Text Alignment - Apply to content that should be left-aligned */
.main-content h2,
.main-content p,
.accent-heading {
    text-align: left;
}

/* NEW: Apply a base size and weight to all paragraphs in the main content area */
.main-content p {
    font-size: 0.95em; /* Slightly smaller text size */
    font-weight: 300; /* Lighter font weight (if using a font that supports it) */
}


/* --- HEADER AND LOGO --- */
.site-header {
    padding-top: 20px;
    background-color: var(--color-pure-black);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    /* Ensures the logo uses 90% of the screen space (good for mobile shrinking) */
    width: 90%;
    height: auto;
    /* Hard cap the absolute maximum size at 1080px for desktop */
    max-width: 1080px;
    margin-bottom: 20px;
}


/* --- MAIN NAVIGATION STYLING --- */
.main-nav {
    width: 100%;
    padding: 0;
    background-color: var(--color-pure-black);
    border-top: 1px solid var(--border-color-dark);
    border-bottom: 2px solid var(--color-warm-bronze);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* CRUCIAL for future dropdowns: Makes the submenu position relative to the main menu item */
.main-nav li {
    position: relative;
    display: block;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-dragon-green);
    padding: 10px 20px;
    display: block;
    font-size: 1.2em;
    font-weight: bold;
}

.main-nav a:hover,
.main-nav a:focus { /* Added :focus for accessibility */
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-warm-bronze);
}


/* --- MAIN CONTENT STYLING --- */
.main-content {
    padding: 30px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.accent-heading {
    color: var(--color-warm-bronze);
    margin-bottom: 0; /* Remove bottom margin to keep line close */
}

/* Style for the horizontal rule under the main heading */
.news-separator {
    border: none;
    border-top: 1px solid var(--border-color-dark);
    margin-top: 10px; /* Space between heading and line */
    margin-bottom: 20px; /* Creates space between the line and the first article */
}

/* Main Content Link Styles */
.main-content a {
    color: var(--color-dragon-green);
    text-decoration: underline;
}

/* Visited link color: Off-white/cream text color */
.main-content a:visited {
    color: var(--color-off-white);
}

/* Hover/Focus link color: Warm bronze */
.main-content a:hover,
.main-content a:focus {
    color: var(--color-warm-bronze);
    text-decoration: none;
}


/* --- NEWS ITEM STYLING (Two-Column Flexbox Layout) --- */
.news-item {
    /* Enable Flexbox for two-column arrangement */
    display: flex; 
    gap: 20px; /* Space between columns */
    margin-bottom: 35px; 
    
    /* Used to create the line BETWEEN articles */
    border-top: 1px solid var(--border-color-dark);
    padding-top: 20px; /* Space between the top border and content */
}

/* Target the first article to remove the initial top border */
.news-item:first-of-type {
    border-top: none; 
    padding-top: 0;
}

/* Left Column: Date */
.news-date-column {
    flex-shrink: 0; /* Prevents column from shrinking */
    width: 150px;
    text-align: right; /* Aligns date text to the right edge of its column */
}

.news-date-column p {
    color: var(--color-warm-bronze);
    font-weight: bold;
    font-size: 1.1em; /* Keep date text a bit larger and bold for visual importance */
    margin-top: 0; /* Align date with the top of the content */
}

/* Right Column: Content */
.news-content-column {
    flex-grow: 1; /* Allows column to take up remaining space */
}

.news-content-column h4 {
    color: var(--color-off-white); 
    margin-top: 0; /* Align headline with the date */
    margin-bottom: 10px;
    font-size: 1.1em; /* Keep headline size for visual distinction */
}

/* For secondary headlines within the same news item */
.news-content-column .sub-headline {
    color: var(--color-off-white); 
    margin-top: 25px; 
    margin-bottom: 5px;
    font-size: 1.1em;
}

/* For the first paragraph right after the headline */
.news-content-column .summary {
    margin-top: 5px; 
}

/* Media Query: Stack columns on smaller screens */
@media (max-width: 650px) {
    .news-item {
        flex-direction: column; /* Stack the date and content */
        gap: 5px; 
    }
    .news-date-column {
        width: 100%; /* Take full width */
        text-align: left; /* Align date with the body content */
    }
    .news-date-column p {
        margin-bottom: 5px;
    }
    .news-content-column h4 {
        margin-top: 0; 
    }
}


/* --- DROPDOWN STYLES --- */
/* Use a more specific selector to ensure dropdown styles take precedence and are scoped */
.main-nav ul.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: max-content;

    background-color: var(--color-pure-black);

    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-color-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Show the menu when hovering over the parent list item */
.nav-item-dropdown:hover > ul.dropdown-menu { 
    display: block;
}

/* Styles for the links inside the dropdown */
.dropdown-menu a {
    color: var(--color-dragon-green);
    font-size: 1em; /* Ensures font size is reset from 1.2em of main nav links */
    padding: 10px 15px;
    font-weight: normal;
    white-space: nowrap;
    display: block;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus { /* Added :focus */
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-warm-bronze);
}


/* --- SOCIAL LINKS BAR STYLING (Bottom Bar) --- */
.social-links-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    background-color: var(--color-pure-black);
    border-top: 2px solid var(--color-warm-bronze);
}

.social-links-bar .social-link {
    text-decoration: none;
    color: var(--color-dragon-green);
    margin: 0 15px;
    font-size: 0.9em;
    font-weight: normal;
}

.social-links-bar .social-link:hover,
.social-links-bar .social-link:focus { /* Added :focus */
    color: var(--color-warm-bronze);
}


/* --- FOOTER STYLING --- */
.site-footer {
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--border-color-dark);
    font-size: 0.8em;
    color: var(--color-dark-grey); /* Used new variable */
}