.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.menu-button:hover {
    color: var(--primary-color);
}

.titlebar.collapsed {
    position: fixed;
    top: 0;
    left: 0;
}

.titlebar.collapsed .nav{
    padding: 0 3px;
    background-color: var(--primary-color-light);
    margin-top: 0px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.titlebar.collapsed .logo {
    font-size: 18px;
}
.titlebar.collapsed .logo img {
    max-width: 100%;
    /* max-height: 25px; /* Smaller height when collapsed */
}

.menu-modal{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0,0,0,.5);
    display: none;
    z-index: 1001;
    overflow-y: auto;
}

.search-item p {
    margin-top: 0px;
}
.search-header {
    text-transform:uppercase;
    color: #757575;
    font-size: smaller;
}
.menu {
    width: max( min(300px,100vw), 45vw);
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1002;
}

/* Close button at the top left */
.close-modal {
    position: absolute;
    top: 10px;
    left: 10px; /* Move close button to top left */
    background: none;
    border: none;
    font-size: 1.5em;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

.close-modal:focus {
    outline: none; /* Removes default focus outline */
}

.search-modal {
    max-width: min(100vw, 1050px);
    margin: auto;
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.search-modal .search-box {
    width:100%;
    margin: 0 auto;
    padding: 0 30px;
}
.search-modal .search-box button {
    margin-left: 0;
}


.search-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

form {
    width: 100%;
}

.search-box input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 1.5rem;
    width:100%;
}

.search-box button {
    padding: 10px 20px;
    background-color: #ccc;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

.search-box button:hover {
    background-color: #bbb;
}

.menu-modal.active, .search-modal.active {
    display: flex;
}

.menu-modal ul {
    margin-top: 50px;
    padding: 20px;
    padding-bottom: 50px;
    list-style: none;
    background-color: white;
}

.menu-modal ul hr {
    border: 1px solid var(--primary-color-light);
}

.menu-modal ul li {
    margin: 10px 0;
    font-size: 1.3em;
    cursor: pointer;
    text-transform: uppercase;
}

.menu-modal a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.menu-modal a {
    color: var(--primary-color);
    text-decoration: none;
}

.search-modal input {
    width: 80%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-modal button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #444;
    color: #fff;
    margin-left: 10px;
    cursor: pointer;
}

.content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.content p {
    margin-top: 20px;
}

footer {
    margin-top: 30px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 10px 60px 10px;
    bottom: 0;
    width: 100%;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    padding: 10px;
}

.footer-section h4 {
    margin-bottom: 10px;
    text-align: center;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin: 5px 0;
    text-align: center;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.footer-search input {
    width: 80%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.footer-search button {
    padding: 5px 10px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.loading {
    text-align: center;
    margin: 20px 0;
    color: #555;
}


.meta-info {
    margin: 20px auto 0px auto;
    max-width: 816px;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
}

.meta-info time {
    font-size: smaller;
}

.social-share-icons {
    margin: 20px auto;
    max-width: 816px;
    list-style-type: none;
    padding: 0;
    display: none;
    gap: 20px;
}
.social-share-icons svg {
    width: 1em; /* Makes the icon size relative to the font-size of the button */
    height: 1em; /* Maintains the aspect ratio */
    fill: currentColor; /* Inherits the button's text color */
    vertical-align: middle; /* Aligns the icon with any text or content */
}
.social-share-icons li {
    display: inline-block;
}
.social-share-icons a {
    text-decoration: none;
    color: #bdbdbd;
    font-size: 24px;
    transition: color 0.3s;
}
.social-share-icons a:hover {
    color: var(--primary-color);
}


.page-container {
    font-family: "Adelle W01 Regular";
    max-width: 816px;
    padding: 0px var(--padding);
}


.article-img {
    margin: 0 auto;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 0;
    background-color: #f9f9f9;
}

.article-body {
    padding: 0 0 0 var(--padding);
    margin: 0 0 0 auto;
    flex: 1;
}

.article-body > * {
    margin-left: 92px;
}

@media (max-width: 768px) {
    .article-body > * {
        margin-left: 0;
    }
}

.article-body blockquote {
    font-style: italic;
    margin: 20px 0;
    font-size: x-large;
    padding: 10px 20px;
    background: #f4f4f4;
    border-left: 4px solid var(--primary-color);
}

.article-body li {
    margin-bottom: 15px;
}

.highlight {
    background-color: #fffbe0;
    padding: 5px 0;
}

.callout {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
}

.footer {
    text-align: center;
    font-size: 0.9em;
    color: #777;
    margin-top: 40px;
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

a:hover {
    text-decoration: underline;
}

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
}

.right-nav {
    flex: 0 0 300px;
    position: relative;
}

.right-nav .floating-div {
    margin: 0px auto;
    text-align: center;
    position: sticky;
    top: 89px;
    max-height: 1000px;
    margin-bottom: 20px;
    min-width: 300px;
    width: 100%;
}

.fixed-div {
    margin: auto;
    width: 300px;
}
.fixed-div ins {
    margin-bottom:10px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .search-box {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {

    figcaption {
        padding-right: 8px;
    }
    .article-container {
        flex-direction: column;
        gap: 0px;
    }

    .right-nav {
        flex: 1;
        order: 1; /* Place below article body */
        padding: 0;
    }

    .homepage-container {
        max-width: 816px;
        padding: 0 var(--padding);
    }

    .article-body {
        max-width: 816px;
        padding: 0 var(--padding);
        order: 0; /* Keep article body above */
    }

    .right-nav .floating-div {
        position: relative; /* Reset floating behavior for small screens */
        top: auto;
    }

    .right-nav .fixed-div {
        margin-bottom: 20px;
    }

    .menu-modal ul li {
        font-size: 1.1rem;
        line-height: 1.2;
        padding: 10px;
        padding-left: 0px;
    }
    
    .related-container{
        gap: 10px;
    }

    .related-article-wrapper {
        width:180px;
        max-width: 180px;
        padding-right: 0px;
    }
    .related-article-wrapper img {
        max-width: 33vw;
        max-height: 33vw;
    }
}

/* Hide scrollbar for Chrome, Safari and Opera */
.related-container::-webkit-scrollbar {
    display: none;
}

.related-container {
    padding: 0 var(--padding);
    max-width: 816px;
    overflow-x: auto;
    white-space: nowrap;
    margin: 0 auto;
    gap: 20px;
    display: flex;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.related-article-wrapper {
    max-width: 180px;
    display: inline-block;
    text-align: center;
    white-space: normal;
    font-family: Arial, Helvetica, sans-serif;
}

.related-article-wrapper p {
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 0.9em;
    line-height: 1.4em;
    font-family: Arial, Helvetica, sans-serif;
}

.related-article-wrapper img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    background-color: #f9f9f9;
}

.related-article-wrapper a {
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    display: block;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

.related-article-wrapper a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.affiliate-disclosure {
    max-width: 816px;
    padding: 0px var(--padding);
    color: #555;
    margin: auto;
    font-size: small;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.affiliate-disclosure a {
    color: #555;
    text-decoration: underline;
}


figcaption {
    font-size: 0.75em;
    line-height: 1.4;
    margin: 0 0 25px 0;
    color: #555;
    text-align: right;
}

.image-caption {
    margin: 0;
}

figcaption p {
    margin: 0px;
}

.image-source {
    font-size: 0.72em;
    color: #555;
    margin: 0;
    white-space: nowrap;
    text-transform: uppercase;
}

.image-source a {
    text-decoration: none;
    color: #555;
    text-decoration: underline;
}

.content-container {
    padding: 0 var(--padding);
}

.contact-section {
    margin-top: 20px;
    display: flex;
    gap: 2em;
}

.contact-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-body {
    margin-bottom: 20px;
}

.row {
    display: flex;
    gap: 10px;
}

.col {
    flex: 1;
}

.input-box {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea.form-control {
    resize: vertical;
}

.contact-button {
    background: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

.contact-button:hover {
    background: #0056b3;
}

.contact-section p {
    margin: 10px 0;
}

@media (max-width: 700px) {
    .row {
        display: block;
    }
    .contact-section {
        margin-top: 20px;
        display: block;
        gap: 0;
    }
}


footer .copyright {
    text-transform: uppercase;
    font-size: 0.7em;
    color: #bdbdbd;
}

footer hr {
    background-color: #444;
    border: 0;
    max-width: 200px;
    margin: auto;
    height: 2px;
}

.resultExcerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.search-item img {
    max-width: 100px;
    margin-right: 20px;
    flex-shrink: 0;
}

.search-item .search-text {
    flex-grow: 1;
}

.search-text a {
    font-weight:300;
    font-size:larger;
    line-height:0ch;
}

@media (max-width: 600px) {
    .search-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-item img {
        margin-right: 0;
        margin-bottom: 10px;
        max-width: 100%;
    }
}

.category-pages {
    display: flex;
    flex-wrap: wrap;
    flex: 1 2;
    gap: 20px;
    margin-bottom: 20px;
}

.category-page {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    line-height: 1.2em;
}

.category-page img {
    background-color: #757575;
    max-width: 150px;
    height: auto;
    flex-shrink: 0;
}

.category-page div {
    flex-grow: 1;
}

.category-page a {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.category-page p {
    color: #555;
    font-size: 0.9em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sitemap ul:first-child {
    padding-left: 0px;
}


.pull-quote-small {
    font-size: 1rem;
    line-height: 1;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    display: block;
    position: relative;
    clear: both;
    float: left;
    padding: 0;
    max-width: 18rem;
    width: 18rem;
    margin: 4.5rem 3rem 6.0rem 0rem;
}


.pull-related-small {
    font-size: 1rem;
    line-height: 1;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    display: block;
    position: relative;
    clear: both;
    float: left;
    padding: 0;
    max-width: 14rem;
    width: 14rem;
    margin: 0.5rem 2.6rem 4.0rem 0rem;
}


@media (max-width: 768px) {
    .pull-quote-small, .pull-related-small {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.pull-related-small h2 {
    color:rgb(89 88 86);
    text-transform: uppercase;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size:0.9em;
    font-weight:200;
    margin-bottom: 20px;
}

.aside-related-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aside-related-article {
    display: flex;
    align-items: center;
}

.aside-related-article img {
    max-width: 70px;
    height: auto;
    margin-right: 10px;
}

.aside-related-article a {
    text-decoration: none;
    font-size: 0.9em;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    line-height: 1.4em;
}

.aside-related-article a:hover {
    text-decoration:underline;
}

h2, h3, h4 {
    font-family: Arial, Helvetica, sans-serif;
}

.extra-large-quote {
    font-size: 3.4em;
    line-height: 0;
    font-family:'Gilda Display', Times, 'Times New Roman', serif;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    display: block;
    margin: 0;
    color: var(--primary-color);
}

.shareable-quote {
    font-size: xx-large;
    font-family:'Gilda Display', Times, 'Times New Roman', serif;
    line-height: 1.4em;
}

.article-body table {
    border-collapse: collapse;
    font-size: 1em;
    background-color: #fff;
}

.article-body th,
.article-body td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
}

.article-body th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background-color: #fafafa;
}

.article-body tr:hover {
    background-color: #f0f0f0;
}

/* Article header excerpt styling */
.article-header p {
    font-family: Arial, Helvetica, sans-serif !important;
}

.text-warning {
    color: #ff6600;
}

.text-positive {
    color: #339900;
}

.text-primary {
    color: blue
}

pre, code {
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    box-sizing: border-box;
}

pre, code {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'Fira Mono', 'Consolas', 'Monaco', monospace;
    font-size: 1em;
    color: #24292e;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

pre {
    margin: 24px 0;
    overflow-x: auto;
}

code {
    background-color: #f6f8fa;
    padding: 2px 6px;
    border-radius: 4px;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}