html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 140px; /* Adjusted for taller header */
}
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f4f4; 
    color: #333; 
}

/* --- FIX APPLIED HERE ---
  The sticky styles were moved from .header-container
  to this ID, which is the placeholder div.
*/
#main-header-placeholder { 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
}

/* This class is now just for structure inside the component */
.header-container { 
    /* position: sticky; <-- This was removed */
    /* top: 0; <-- This was removed */
    /* z-index: 1000; <-- This was removed */
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.2); <-- This was removed */
}

.header { 
    background-color: #002855; 
    color: #fff; 
    padding: 1rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.header h1 { 
    margin: 0; 
    font-size: 2rem; 
}
.header h1 a {
    text-decoration: none;
    color: #FFD700;
}
.dropdown { 
    position: relative; 
    display: inline-block; 
    cursor: pointer; 
}
.dropdown-content { 
    display: none; 
    position: absolute; 
    right: 0; 
    background-color: #f9f9f9; 
    color: #333; 
    min-width: 300px; 
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 
    padding: 12px 16px; 
    z-index: 1; 
    border-radius: 4px; 
    text-align: left; 
}
.dropdown-content p { 
    margin: 10px 0; 
}
.dropdown:hover .dropdown-content { 
    display: block; 
}
/* Main Nav Row (Row 1) */
.nav { 
    background-color: #333; 
    overflow: hidden; 
    display: flex; 
    justify-content: flex-start; 
    align-items: center; 
}
.nav a { 
    float: left; 
    display: block; 
    color: #f2f2f2; 
    text-align: center; 
    padding: 14px 16px; 
    text-decoration: none; 
    font-weight: bold;
}
/* Sub Nav Row (Row 2 for page-specific links) */
.nav-sub {
    background-color: #444;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.nav-sub a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 0.9em;
}
.nav a:hover, .nav-sub a:hover { 
    background-color: #ddd; 
    color: black; 
}
#live-time { 
    color: #fff; 
    margin-left: auto; 
    padding-right: 20px; 
    font-size: 0.9em; 
}
.hero-banner { 
    position: relative; 
    height: 280px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: white; 
}
.hero-banner::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-image: url('https://i.imgur.com/WbyVk7a.jpeg'); 
    background-size: cover; 
    background-position: center; 
    filter: brightness(0.6); 
    z-index: -1; 
}
.hero-banner h2 { 
    font-size: 2.5rem; 
    text-shadow: 2px 2px 4px #000; 
    margin: 0; 
}
.hero-banner p { 
    font-size: 1.2rem; 
    text-shadow: 1px 1px 2px #000; 
}
.container { 
    padding: 2rem; 
}
.section { 
    background-color: #fff; 
    padding: 2rem; 
    margin-bottom: 1.5rem; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}
.section h2 { 
    color: #002855; 
    border-bottom: 2px solid #ddd; 
    padding-bottom: 0.5rem; 
    margin-top: 0; 
}
.section h3 {
    margin-top: 2rem;
}
.topics-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 1rem; 
}
.topic-box { 
    border: 1px solid #ddd; 
    padding: 1.5rem; 
    border-radius: 8px; 
    text-decoration: none; 
    color: #333; 
    transition: box-shadow 0.3s ease, border-color 0.3s ease; 
    display: flex; 
    flex-direction: column; 
}
.topic-box:hover { 
    border-color: #0056b3; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}
.topic-box h3 { 
    margin-top: 0; 
    color: #0056b3; 
}
.topic-box p { 
    flex-grow: 1; 
}
.footnotes { 
    background-color: #e9ecef; 
    padding: 1.5rem 2rem; 
    font-size: 0.9rem; 
    border-radius: 8px; 
    margin-top: 2rem; 
}
.footnotes ol { 
    padding-left: 20px; 
}
.footnotes li { 
    margin-bottom: 0.5rem; 
}
.footer { 
    background-color: #333; 
    color: #fff; 
    text-align: center; 
    padding: 2rem; 
    margin-top: 2rem; 
}
.footer a { 
    color: #FFD700; 
    text-decoration: none; 
    margin: 0 10px; 
}
.footer p { 
    margin: 10px 0; 
}
sup a { 
    text-decoration: none; 
    color: #0056b3; 
}