/* General Reset & Modern Basics */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: #CCC;
    color: #000;
    font-family: "Segoe UI", Arial, sans-serif; /* Modernized font stack */
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; border: 0; }
.bottom { clear: both; }

/* Layout Containers */
#topCont, #headerCont, #mainCont, #footerCont { width: 100%; background: #FFF; }
#topCont { background-color: #f1f1f1; }

#top, #header, #main, #footer {
    max-width: 1000px; /* Increased from 900px for modern screens */
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

/* Top Bar */
#top { padding: 10px 20px; align-items: center; justify-content: space-between; }
#topleft { flex: 1; font-weight: bold; }
#topright { flex: 1; text-align: right; font-size: 1.2rem; }
span.word, span.number { font-weight: bold; color: #af1010; }
#topright a { text-decoration: none; color: inherit; }

/* Header Area */
#header { background-color: #545353; color: #FFF; padding: 20px; align-items: center; }
#headerleft { flex: 0 0 300px; }
#headerright { flex: 1; text-align: right; }
#headerright h1 { font-size: 2.5rem; color: #F1F1F1; margin: 0; letter-spacing: -1px; }
#headerright h2 { font-size: 1.5rem; color: #FC0; font-weight: normal; }

/* Main Content Area */
#main { background: #FFF; border-left: 1px solid #ddd; border-right: 1px solid #ddd; }
#mainmenu { flex: 0 0 280px; background-color: #F1F1F1; padding: 20px; }
#maincontent { flex: 1; padding: 30px; min-width: 300px; }

/* Sidebar Navigation */
#mainmenu ul { list-style: none; margin-bottom: 25px; }
#mainmenu a { 
    display: block; 
    padding: 10px 15px; 
    text-decoration: none; 
    color: #333; 
    border-bottom: 1px solid #ddd;
}
#mainmenu a.active { background-color: #545353; color: #FFF; }
#mainmenu a:hover:not(.active) { background-color: #e2e2e2; }

/* Typography */
h1, h2, h3 { color: #af1010; margin-bottom: 15px; }
p { margin-bottom: 15px; }
blockquote {
    margin: 20px 0;
    padding: 15px;
    border-left: 5px solid #FC0;
    background: #f9f9f9;
    font-style: italic;
}

/* Footer */
#footer { padding: 20px; border-top: 1px solid #CCC; justify-content: space-between; }
#footerleft { flex: 1; }
#footerright { flex: 1; text-align: right; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    #top, #header, #main, #footer { flex-direction: column; text-align: center; }
    #headerright, #topright { text-align: center; margin-top: 10px; }
    #mainmenu { flex: 1 1 100%; border-bottom: 2px solid #ddd; }
    #headerleft { margin: 0 auto; }
}

#mainmenu p {
    margin: 0 10px 15px 15px; /* Reduced side margins from 20px to 10-15px */
    color: #222;
    line-height: 160%;
    font-size: 110%; /* If it still bumps, try changing this to 100% */
    font-weight: normal;
    word-wrap: normal; /* Prevents the browser from forcing a wrap */
}