h1 {
  display: block;
  margin: .67em 0;
  color: #343a40;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 25px;
  text-align:left !important;
  text-transform: uppercase;
  font-weight: 700;
}

h2 {
  display: block;
  color: #343a40;
  margin: .75em 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 20px;
  text-align:left !important;
  text-transform: uppercase;
  font-weight: 700;
} 

h3 {
  display: block;
  color: #343a40;
  margin: .10em 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 18px;
  text-align:left !important;
  text-transform: uppercase;
  font-weight: 700;
}

h4 {
  display: block;
  color: #343a40;
  margin: 0 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 14px;
  text-align:left !important;
  text-transform: uppercase;
  font-weight: 700;
}

h1.noupper {
  display: block;
  margin: .67em 0;
  color: #343a40;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 25px;
  text-align:left !important;
  text-transform:  none !important;
  font-weight: 700;
}

h2.noupper {
  display: block;
  color: #343a40;
  margin: .75em 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 20px;
  text-transform:  none !important;
  text-align:left !important;
  font-weight: 700;
} 

h3.noupper {
  display: block;
  color: #343a40;
  margin: .10em 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 18px;
  text-transform:  none !important;
  text-align:left !important;
  font-weight: 700;
}

h4.noupper {
  display: block;
  color: #343a40;
  margin: 0 0;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-feature-settings: "liga";
  font-size: 14px;
  text-transform:  none !important;
  text-align:left !important;
  font-weight: 700;
}

a {
	color: #0056b3;
}

a:hover {
	color: #006FE6;
	text-decoration: none;
}

/*
a img {
	border: solid 2px transparent;	
}

a:hover img {
	color: darkslateblue;
	background-color: #e3e4fa;
	text-decoration: none;
border: solid 2px #e3e4fa;
}
*/

a.icon {
	color: #4C535D !important;
	background-color: transparent !important;
}

a.icon:hover, a.icon:active {
	/*color: #636D79 !important;*/
	opacity: 0.7;
	background-color: transparent !important;
}

papertitle {
	/*font-family: 'Lato', Verdana, Helvetica, sans-serif;*/
	font-size: 16px;
	line-height: 1px;
	color: #343a40;
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
	font-feature-settings: "liga";
	font-weight: 800
}

b{
	color: #343a40 !important;
}

/* year expansion/minimization icons */
i.minimize {
    color: inherit;
    display: inline-block;
}

i.expand {
    color: inherit;
    display: inline-block;
	transform: rotate(90deg)!important;
}

@media (hover: hover) and (pointer: fine) {
	i.minimize:hover {
		color: inherit;
		text-decoration: none;
		background-color: transparent;
		transform: translateY(3px) !important;
	}

	i.expand:hover {
		color: inherit;
		text-decoration: none;
		background-color: transparent;
		transform: rotate(90deg) translateY(3px) !important;
	}
}

/* Body and HTML for sticky footer */
html {
    height: 100%;
    overflow-y: scroll; /* Force scrollbar to always show */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Remove any gaps around navbar */
#topheader {
    margin: 0;
    padding: 0;
}

.navbar {
    margin-bottom: 0 !important;
    border: 0 !important;
}

.navbar-dark {
    border-bottom: none !important;
}

/* Desktop styles - restore original navbar appearance */
@media (min-width: 992px) {
    /* Position navbar collapse inside topheader for desktop */
    #topheader {
        display: block;
        background-color: #343a40;
    }
    
    #navbarSupportedContent {
        display: flex !important;
        flex-basis: auto;
    }
    
    /* Hide mobile hamburger on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Show desktop hamburger (though it should be hidden by default with navbar-expand-lg) */
    .desktop-menu-toggle {
        display: block;
    }
}

/* Mobile menu scrolling fix */
@media (max-width: 991px) {
    /* Hide the navbar bar on mobile (save space) but keep it in DOM */
    #topheader {
        height: 0;
        overflow: visible; /* Important: allows child to escape with fixed positioning */
        visibility: hidden; /* Hide it but keep in DOM */
    }
    
    /* Make navbar-collapse visible even though parent is hidden */
    #navbarSupportedContent {
        visibility: visible !important; /* Override parent's visibility:hidden */
        position: fixed !important;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #343a40;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        z-index: 1030;
        width: 100% !important;
        padding: 1rem;
        flex-direction: column;
    }
    
    /* Mobile hamburger menu in title bar - LEFT SIDE */
    .mobile-menu-toggle {
        display: block !important;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        border: 1px solid rgba(255, 255, 255, 0.5);
        background: transparent;
        padding: 0.25rem 0.5rem;
        color: white;
        z-index: 10;
    }
    
    /* Make hamburger icon lines visible - white lines */
    .mobile-menu-toggle .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Hide desktop menu toggle */
    .desktop-menu-toggle {
        display: none;
    }
    
    /* Mobile menu items should be stacked vertically */
    #navbarSupportedContent .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    /* Show collapse when it has the show class */
    #navbarSupportedContent.show {
        display: flex !important;
    }
    
    /* Hide by default */
    #navbarSupportedContent:not(.show) {
        display: none !important;
    }
    
    /* Prevent body scroll when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Adjust body padding since navbar is hidden */
    body {
        padding-top: 70px !important; /* Only title header */
    }
}

/* Desktop: hide mobile menu toggle */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .desktop-menu-toggle {
        display: none; /* Hide on desktop too since menu is always visible */
    }
}

/* Remove padding from container after navbar */
.container {
    padding-top: 0;
}

.container > .row:first-child {
    margin-top: 0;
}

/* Main content wrapper - grows to fill available space */
.container {
    flex: 1 0 auto;
    margin-bottom: 1.5rem; /* Same as mt-4 spacing used at top */
}

/* Footer styles - fixed at bottom */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    flex-shrink: 0;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    background-color: #424951;
    border-top: 1px solid #2c3138;
    z-index: 1010;
}

.footer .container-fluid {
    margin-bottom: 0;
}

.footer span {
    margin: 0;
    padding: 0;
    line-height: 1;
    color: #fff;
}

.footer-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.footer-icon {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.footer-icon:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    /* Hide copyright info on mobile, keep login/logout */
    .footer-desktop-info {
        display: none;
    }
    
    /* Remove the leading "|" separator on mobile since copyright is hidden */
    .footer-auth-info {
        margin-left: 0 !important;
    }
    
    .footer-auth-info::before {
        content: none !important;
    }
    
    /* Adjust "Logged in as" text on mobile - keep it simple */
    .footer-auth-info {
        font-size: 0.85rem;
    }
    
    /* Reduce margins on mobile */
    .footer .text-muted {
        margin-left: 0.5rem !important;
    }
    
    .footer-icons {
        margin-right: 0.5rem !important;
        gap: 0.5rem;
    }
    
    /* Slightly smaller icon size on mobile */
    .footer-icon {
        font-size: 1.1rem;
    }
}

/* Add padding to body to prevent content from going under fixed footer */
body {
    padding-bottom: 40px; /* Thin footer height */
}

/* Fixed header styles */
.title-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

#topheader {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 1020;
}

/* Add padding to body to prevent content from going under fixed header */
body {
    padding-top: 124px; /* 70px title header + 54px navbar (approximate) */
}

/* On mobile, only need padding for title header (navbar bar is hidden) */
@media (max-width: 991px) {
    body {
        padding-top: 70px; /* Only title header height */
    }
}
