/* Loading screen */
.wf-loading body,
html:not(.wf-active) body {
    visibility: hidden;
}

/* Root variables */
:root {
    --primary-color: #0370c2;
    --primary-color-text: #ffffff;
    --primary-color-rgb: 3,112,194;
    --hover-underline-color: rgba(var(--primary-color-rgb), 0.3);
}

/* Body */
body {
    color: #000;
}

/* Superscript */
sup {
    font-size: .9em;
}

/* Headings and nav links */
h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
div.navigation.section.no-padding.bg-dark a,
.main-navigation a {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    text-transform: none !important; /* Ensure sentence case */
}

/* Content links */
.post-content a:not(.wp-block-button__link):not(.wp-element-button):not(.is-style-outline):not(.is-style-outline--1),
.entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.is-style-outline):not(.is-style-outline--1) {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    transition: text-decoration-color .2s ease;
}

/* Content link hover */
.post-content a:not(.wp-block-button__link):not(.wp-element-button):not(.is-style-outline):not(.is-style-outline--1):hover,
.entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.is-style-outline):not(.is-style-outline--1):hover {
    text-decoration-color: var(--hover-underline-color);
}

/* General link hover */
.posts .format-link .link-header h2 a:hover,
.single .post-meta p a:hover,
.post-navigation .nav-previous a:hover,
.single .post-navigation .nav-next a:hover,
a.jp-relatedposts-post-a:hover,
a.author-link:hover,
#footer.footer a:hover,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
div.navigation.section.no-padding.bg-dark a:hover,
.main-navigation a:hover {
    color: rgba(255,255,255,.6);
    text-decoration: underline !important;
}

/* Infinite scroll button */

/* Outer button */
#infinite-handle span {
    background-color: transparent !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    outline: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    font-weight: normal !important;
    font-family: 'Gelasio', 'Arial', sans-serif !important;
    font-size: 16px !important;
    padding: 12px 24px !important;
    border-radius: 0 !important;
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Inner button */
#infinite-handle span button,
#infinite-handle button {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Button hover */
#infinite-handle span:hover {
    background-color: #047edb !important;
    color: #ffffff !important;
    border-color: #047edb !important;
}

/* End infinite scroll */

/* Post meta */
.post-meta.clear,
.post-meta.clear * {
    font-weight: normal !important;
}

/* Buttons */
button,
input[type="button"],
input[type="submit"],
.wp-block-button__link,
.wp-element-button {
    background-color: transparent !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

/* Button hover */
button:hover,
input[type=button]:hover,
input[type=submit]:hover,
.wp-element-button:hover {
    background-color: var(--primary-color) !important;
    color: var(--primary-color-text) !important;
    border-color: var(--primary-color) !important;
    outline: none;
}

/* Button focus */
button:focus, button:active,
input[type=button]:focus, input[type=button]:active,
input[type=submit]:focus, input[type=submit]:active,
.wp-element-button:focus, .wp-element-button:active {
    background-color: #047edb !important;
    color: var(--primary-color-text) !important;
    border-color: #047edb !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Button fonts */
.wp-block-button__link.wp-element-button {
    font-family: 'Gelasio', 'Arial', sans-serif !important;
}

/* Navigation container */
.navigation.section.no-padding.bg-dark {
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: none;
}

/* Navigation link size */
.navigation.section.no-padding.bg-dark a,
.main-navigation a {
    font-size: 20px;
    text-transform: none;
}

/* Navigation font */
.navigation.section.no-padding.bg-dark a,
.main-navigation a {
    font-weight: normal;
    font-family: "Geared Slab", "geared-slab", serif !important;
}

/* Sub-menu indicators */
.main-navigation a::after,
.main-navigation .menu-item-has-children > a::after,
.main-navigation .page_item_has_children > a::after,
.main-navigation li > a::after {
    color: #ffffff !important;
    border-color: transparent !important;
    border-top-color: #ffffff !important;
    opacity: 1 !important;
    background-color: transparent !important;
    border-right-color: transparent !important;
    border-bottom-color: transparent !important;
    border-left-color: transparent !important;
}

/* Sub-menu hover */
.main-navigation a:hover::after,
.main-navigation li:hover > a::after,
.main-navigation .menu-item-has-children:hover > a::after,
.main-navigation .page_item_has_children:hover > a::after {
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: transparent !important;
    border-top-color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.6 !important;
}

/* Mobile menu toggle */
.nav-toggle,
button.nav-toggle.fleft {
    font-family: "Geared Slab", "geared-slab", serif !important;
    font-weight: normal;
    text-transform: none !important;
}

/* Search icon */
.navigation .search-toggle.search-icon.fright,
.navigation .search-toggle.search-icon.fright::before {
    color: #fff !important;
    opacity: 1 !important;
}

/* Search icon toggled */
.navigation .search-toggle.search-icon.fright.toggled-on,
.navigation .search-toggle.search-icon.fright.active,
.navigation .search-toggle.search-icon.fright[aria-expanded=true],
.navigation .search-toggle.search-icon.fright.toggled-on::before,
.navigation .search-toggle.search-icon.fright.active::before,
.navigation .search-toggle.search-icon.fright[aria-expanded=true]::before {
    opacity: .6 !important;
}

/* Footer text */
#footer.footer {
    color: #fff;
}

/* Footer links */
#footer.footer a, a.jp-relatedposts-post-a, a.author-link {
    color: #fff;
    text-decoration: none;
}

/* Footer widgets */
.footer .widget-content p {
    color: #fff;
}

/* Footer buttons */
#footer.footer button,
#footer.footer input[type="button"],
#footer.footer input[type="submit"],
#footer.footer .wp-block-button__link,
#footer.footer .wp-element-button {
    color: #fff !important;
    border-color: #fff !important;
    border-radius: 5px !important;
}

/* Footer background */
#footer.footer.bg-graphite, footer.bg-graphite {
    background-color: #012a40 !important;
}

/* Widget titles */
h3.widget-title {
    font-weight: 400;
    font-size: 20px !important;
    text-transform: none !important;
}

/* Sharedaddy titles */
div.sharedaddy h3.sd-title {
    font-weight: 400;
    font-size: 22.5px;
    text-transform: none !important;
    color: var(--primary-color);
}

/* Related posts headline */
.single div#jp-relatedposts h3.jp-relatedposts-headline,
.single div#jp-relatedposts h3.jp-relatedposts-headline * {
    font-family: "Geared Slab", "geared-slab", serif !important;
    font-size: 22.5px;
    font-weight: normal !important;
    color: var(--primary-color) !important;
    text-transform: none !important;
    line-height: 1.2;
    margin: -35px 0 10px;
    display: inline-block;
}

/* Related posts image */
.jp-relatedposts-post-img {
    display: block;
    margin-bottom: 10px !important;
}

/* Related posts link */
.jp-relatedposts-post-a {
    font-size: 16px !important;
    margin-top: 20px;
}

/* Page titles */
body.category h1.page-title,
body.tag h1.page-title,
.page-title {
    font-weight: 400;
    font-size: 22.5px;
    text-transform: none !important;
    margin-bottom: 10px;
}

/* Tag archive meta */
.tag-archive-meta {
    color: #000;
}

/* Dark background */
.bg-dark {
    background-color: #012a40;
}

/* Credits section */
.credits.bg-dark.small-padding {
    display: none !important;
}

/* Gallery captions */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
h2.jp-carousel-photo-caption {
    font-size: 22px !important;
    color: #fff !important;
}

/* Post text */
.posts .post-content p {
    color: #000 !important;
}

/* Citations */
.wf-active .post-content cite,
blockquote cite,
.wp-block-quote cite {
    font-family: 'Gelasio', 'Arial', sans-serif !important;
    font-size: 17px;
    font-style: normal !important;
    text-transform: none;
}

/* Blockquote container */
.post-content blockquote,
blockquote,
.wp-block-quote {
    border: none !important;
    border-left: 4px solid #047edb !important;
    background-color: #f4f4f4;
    font-size: inherit !important;
    padding: 0 15px !important;
    margin-top: 15px !important;
    margin-right: 20px !important;
    margin-bottom: 15px !important;
    margin-left: 20px !important;
    border-radius: 0 5px 5px 0;
    width: auto;
    box-shadow: none !important;
}

/* Blockquote text */
.post-content blockquote p,
blockquote p {
    font-size: inherit !important;
    font-weight: 400 !important;
    font-style: normal;
    color: #000 !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    line-height: 1.4;
    text-align: center !important;
}

/* Blockquote bold */
blockquote b, blockquote strong {
    font-weight: 700 !important;
}

/* File block font */
.wp-block-file {
    font-size: 16px !important;
}

/* Post title alignment */
body.single-post h1.post-title.entry-title,
body.page h1.post-title.entry-title {
    text-align: center !important;
    font-weight: 400;
}

/* 404 alignment */
body.error404 h1.post-title.entry-title,
body.error404 h1.page-title,
body.error404 .post-header h1,
body.error404 .page-header h1 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Archive padding */
body.search .medium-padding,
body.category .medium-padding,
body.tag .medium-padding {
    padding: 40px 0 !important;
}

/* Page header margins */
.page-header {
    margin-bottom: 75px;
    text-align: center;
    word-wrap: break-word;
}

/* Archive header margins */
body.category .page-header,
body.tag .page-header,
body.search .page-header {
    margin-bottom: 30px;
    margin-top: -10px;
    text-align: center;
    word-wrap: break-word;
}

/* Archive section padding */
body.category .wrapper.section.medium-padding,
body.tag .wrapper.section.medium-padding,
body.search .wrapper.section.medium-padding {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* Archive section width */
body.category .wrapper.section.medium-padding,
body.tag .wrapper.section.medium-padding,
body.search .wrapper.section.medium-padding {
    max-width: none !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* Archive inner width */
body.category .wrapper.section.medium-padding .section-inner,
body.tag .wrapper.section.medium-padding .section-inner,
body.search .wrapper.section.medium-padding .section-inner {
    max-width: none !important;
    width: 100% !important;
}

/* Section wrapper padding */
.wrapper.section {
    padding-top: 35px;
    padding-bottom: 35px;
}

/* Post header borders */
body.single .post-header,
body.page .post-header {
    border-bottom: 1px solid #eee;
    position: relative;
    padding-top: 45px;
    padding-bottom: 30px;
}

/* Category wrapper margin */
body.category .wrapper.section.medium-padding {
    margin-bottom: -130px !important;
    overflow: hidden;
    width: 100%;
}

/* Breadcrumb positioning */
breadcrumb {
    margin-left: 0 !important;
    padding-left: 30px !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    display: block;
}

/* Breadcrumb links */
breadcrumb a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    transition: text-decoration-color .2s ease;
}

/* Breadcrumb hover */
breadcrumb a:hover {
    text-decoration: underline;
    text-decoration-color: var(--hover-underline-color);
}

/* Petition form centering */
.dk-speakout-petition-wrap {
    display: block;
    margin: 0 auto;
    width: fit-content;
    text-align: center;
}

/* Petition submit button */
.dk-speakout-submit,
input.dk-speakout-submit,
button.dk-speakout-submit {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Petition submit hover */
.dk-speakout-submit:hover,
input.dk-speakout-submit:hover,
button.dk-speakout-submit:hover {
    color: #fff !important;
}

/* Contact form fonts */
.wpcf7-form,
.wpcf7-form * {
    font-family: 'Gelasio', 'Arial', sans-serif !important;
    font-weight: 700 !important;
}

/* Universal font family (CLEANED) */
.wp-block-button__link,
.wp-element-button,
button,
input[type="submit"],
.subscribe-field-label,
label.subscribe-field-label,
#subscribe-field,
input#subscribe-field,
input.no-border-radius {
    font-family: 'Gelasio', 'Arial', sans-serif !important;
}

/* Editor visibility - body */
.editor-styles-wrapper,
.editor-styles-wrapper p,
.editor-styles-wrapper li {
    color: #000 !important;
}

/* Editor visibility - headings */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
    color: #000 !important;
}

/* Content images - Borders & Transitions */
.post-content img,
.post-content .wp-block-image img,
.post-content figure,
.entry-content img,
.post-content a img {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    transition: transform 0.3s ease !important;
}

/* Content images - Hover Animation */
.post-content img:hover,
.post-content .wp-block-image img:hover,
.entry-content img:hover,
.post-content a img:hover {
    transform: scale(1.02) !important;
}

/* Search sort options */
.jetpack-instant-search__search-sort-option,
.jetpack-instant-search__search-sort-option.is-selected {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Selected sort option */
.jetpack-instant-search__search-sort-option.is-selected {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

/* Overlay close (Search Button) - Default State */
.jetpack-instant-search__search-results-controls .jetpack-instant-search__overlay-close,
button.jetpack-instant-search__overlay-close {
    transition: all 0.2s ease !important;
    background-color: transparent !important;
    border: 2px solid #000 !important; /* Black outline */
    box-shadow: none !important;
    outline: none !important;
    opacity: 1 !important;
}

/* Overlay close - Hover State */
.jetpack-instant-search__search-results-controls .jetpack-instant-search__overlay-close:hover,
button.jetpack-instant-search__overlay-close:hover {
    background-color: #047edb !important;
    border-color: #047edb !important; /* "No outline" relative to background */
    opacity: 1 !important;
}

/* Overlay close icon hover - turn white */
.jetpack-instant-search__overlay-close:hover svg,
.jetpack-instant-search__overlay-close:hover path,
button.jetpack-instant-search__overlay-close:hover svg,
button.jetpack-instant-search__overlay-close:hover path {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* Blog comment dates */
.comment-metadata a,
.comment-metadata time {
    color: #000 !important;
    opacity: 1 !important;
}

/* Blog comment date hover */
.comment-metadata a:hover,
.comment-metadata time:hover {
    color: #000 !important;
    text-decoration: none !important;
}

/* Mobile under 480px */
@media(max-width: 480px) {
    /* Adjusted body font size */
    body {
        font-size: 17px;
    }

    /* Mobile heading sizes (adjusted) */
    h1 { font-size: 24px !important; }
    h2 { font-size: 24px !important; }
    h3 { font-size: 22px !important; }
    h4 { font-size: 20px !important; }
    h5 { font-size: 18px !important; }
    h6 { font-size: 16px !important; }

    .page-header {
        margin-bottom: 20px;
        margin-top: 10px;
    }
    div#posts.posts {
        margin-top: -20px;
    }
    .wrapper.section {
        padding-bottom: 60px;
    }
    .page-header.section-inner {
        margin-bottom: -30px;
        margin-top: -10px;
    }
    body.category div#posts.posts,
    body.tag div#posts.posts {
        margin-top: -20px !important;
        margin-bottom: 25px !important;
    }
    body.single .wrapper.section {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Mobile under 600px */
@media(max-width: 600px) {
    body.category .post-header,
    body.tag .post-header {
        padding-top: 20px;
        padding-bottom: 15px;
    }
    breadcrumb {
        padding-left: 15px !important;
        margin-left: 0 !important;
    }
    body.blog .wrapper.section {
        padding-top: 15px !important;
    }
}

/* Tablet under 768px */
@media(max-width: 768px) {
    .post-content blockquote p,
    .post-content blockquote,
    blockquote,
    .wp-block-quote {
        font-size: inherit !important;
    }

    .post-content blockquote,
    blockquote,
    .wp-block-quote {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
    }

    .navigation.section.no-padding.bg-dark a,
    .main-navigation a {
        font-size: 18.5px !important;
    }

    button.nav-toggle.fleft {
        font-size: 20px !important;
    }

    .wf-active .post-content cite {
        font-size: 16px;
    }
    .wp-block-file__button.wp-element-button {
        font-size: 16px !important;
        padding: 8px 16px;
        width: auto;
    }
    body.single .post-header,
    body.page .post-header {
        padding-top: 20px;
        padding-bottom: 15px;
    }
    body.category .page-header,
    body.tag .page-header,
    body.search .page-header {
        margin-bottom: 25px;
    }
    body.category .credits.bg-dark.small-padding {
        display: none !important;
    }
    body.category #footer.footer.bg-graphite,
    body.category footer.bg-graphite,
    body.tag #footer.footer.bg-graphite,
    body.tag footer.bg-graphite {
        margin-top: 45px !important;
    }
    .alignfull, .alignwide {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Medium screen padding */
@media(min-width: 601px) and (max-width: 1023px) {
    .wrapper.section {
        padding-top: clamp(25px,4vw,35px);
        padding-bottom: clamp(25px,4vw,35px);
    }
    .wrapper.section.medium-padding {
        padding-left: clamp(25px,4vw,40px);
        padding-right: clamp(25px,4vw,40px);
    }
    body.page:not(.home) .wrapper.section.medium-padding,
    body.single .wrapper.section.medium-padding {
        padding-top: clamp(25px,4vw,35px);
        padding-bottom: clamp(25px,4vw,35px);
    }
}

/* Portrait tablet spacing */
@media(min-width: 601px) and (max-width: 1023px) and (orientation: portrait) {
    body.category .page-header,
    body.tag .page-header,
    body.search .page-header {
        margin-bottom: 60px !important;
        margin-top: -10px;
    }
    breadcrumb {
        padding-left: 15px !important;
        margin-left: 0 !important;
    }
    button.nav-toggle.fleft {
        font-size: 22px !important;
    }
    .post-content blockquote,
    blockquote,
    .wp-block-quote {
        margin-left: 10px !important;
        margin-right: 10px !important;
        width: auto !important;
    }
    /* Adjusted infinite handle positioning */
    #infinite-handle {
        bottom: -50px !important;
    }
}

/* Desktop nav toggle */
@media(max-width: 1024px) {
    button.nav-toggle.fleft {
        display: inline-block;
        margin-left: 10px;
        z-index: 999;
    }
    .navigation.section.no-padding.bg-dark {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .navigation-inner .main-navigation {
        width: 100%;
        text-align: center;
    }

    button.nav-toggle.fleft,
    button.nav-toggle.fleft:focus,
    button.nav-toggle.fleft:active,
    button.nav-toggle.fleft:focus-visible,
    button.nav-toggle.fleft[aria-expanded=true],
    button.nav-toggle.fleft.toggled-on {
        background-color: #012a40 !important;
        border: none !important;
        box-shadow: none !important;
        color: #fff !important;
        opacity: 1 !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    button.nav-toggle.fleft:hover,
    button.nav-toggle.fleft:active,
    button.nav-toggle.fleft[aria-expanded=true],
    button.nav-toggle.fleft.toggled-on {
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }
}

/* Nav center alignment */
@media(min-width: 768px) {
    .navigation-inner {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .navigation-inner .main-navigation {
        text-align: center;
    }
    .nav-toggle {
        margin: 0 auto;
    }
}

/* Desktop styles (CLEANED) */
@media(min-width: 1024px) {
    /* Desktop body font */
    body {
        font-size: 17.5px; /* Reduced from 18px */
    }

    /* Contact form font size */
    .wpcf7-form input,
    .wpcf7-form select,
    .wpcf7-form textarea,
    .wpcf7-form label {
        font-size: inherit !important;
    }

    .post-content.clear {
        width: 100% !important;
        max-width: none !important;
        padding: 50px !important;
        margin: 0 auto !important;
    }
    /* Adjusted infinite handle positioning */
    #infinite-handle {
        bottom: -50px !important;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
    body {
        font-size: 18px !important;
    }
}

/* Captcha badge hiding */
.grecaptcha-badge {
    display: none !important;
}

/* Notification bar font */
@media screen and (min-width: 768px) {
    .wpfront-notification-bar div.wpfront-div {
        font-size: 20px;
    }
}