/* =========================================================
   1. GENERAL WEBSITE STYLING
   ========================================================= */

/* Image captions */
.wp-block-image figcaption {
    font-size: 20px;
    font-style: italic;
    text-align: center;
    line-height: 1.2;
}

/* Footer text */
footer {
    font-size: 17px;
    line-height: 1.2;
}

/* Remove unwanted link underlines */
a:where(:not(.wp-element-button)) {
    text-decoration: none;
}

/* Custom border */
.custom-border {
    border: 1px solid #000000;
    padding: 10px;
    width: 900px;
    border-radius: 5px;
    justify-content: center;
}

/* Remove bottom spacing */
.no-space {
    margin-bottom: 0 !important;
}

/* Text indentation */
.text-indent {
    text-indent: 40px;
}


/* =========================================================
   2. FOOTER STYLING
   ========================================================= */

/* Stack footer menu above copyright */
.site-info .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer navigation */
.footer-menu-container {
    order: 1;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* Copyright */
.copyright-container {
    order: 2;
    width: 100%;
    text-align: center;
}

/* Center footer navigation */
.footer-menu-container,
.menu-footer-menu-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Footer menu links */
#footer-menu {
    width: 100%;
    display: flex;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
}

/* Footer link styling */
#footer-menu a {
    font-size: 18px;
    font-weight: 500;
}


/* =========================================================
   3. BUTTON STYLING
   ========================================================= */

/* Older Posts button */
#infinite-handle > span {
    background-color: #6ab9c1 !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
}

/* Older Posts button text */
#infinite-handle > span button {
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 16px !important;
}

/* Button hover */
#infinite-handle > span:hover {
    background-color: #4d9da5 !important;
}


/* =========================================================
   4. LIST AND PARAGRAPH SPACING
   ========================================================= */

/* Remove extra space above selected lists */
.wp-block-list.nospace {
    margin-top: .5 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 1em !important;
}

/* Bam widget title spacing */
.is-style-bam-widget-title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom-color: #6ab9c1 !important;
    padding-left: .5rem;
    margin-left: .5rem;
}

/* Tighten selected paragraph before a list */
p.tight-before-list {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Tighten selected list */
.wp-block-list.tight-list {
    margin-block-start: -2px !important;
}


/* =========================================================
   5. BAM PRO IMAGE STYLING
   ========================================================= */

/* White outlines around featured images */
.bam-block .bm-featured-style-2 .bmfs2b-post,
.bam-block .bm-featured-style-2 .bmfs2s-post {
    outline: 3px solid white !important;
}

/* Square images in Bam Pro Category Posts widgets */
.widget_bam_grid_category_posts .bm-grid-thumb {
    width: 100%;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
}

/* Center images inside square containers */
.widget_bam_grid_category_posts .bm-grid-thumb a {
    display: flex !important;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Image sizing */
.widget_bam_grid_category_posts .bm-grid-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block;
}

/* Article details spacing */
.widget_bam_grid_category_posts .bm-grid-details {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.widget_bam_grid_category_posts .bm-grid-details .cat-links {
    margin-bottom: 3px !important;
}

.widget_bam_grid_category_posts .bm-grid-details .entry-title {
    margin-top: 0 !important;
}


/* =========================================================
   6. BAM PRO CATEGORY POST GRIDS
   ========================================================= */

/* Desktop: Four columns */
.widget_bam_grid_category_posts .bam-grid-category-posts {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px;
}

/* Individual article cards */
.widget_bam_grid_category_posts .bmw-grid-post {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* Seasonal Articles: Three columns */
#bam_grid_category_posts-9 .bam-grid-category-posts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Tablet: Two columns */
@media (max-width: 900px) {
    .widget_bam_grid_category_posts .bam-grid-category-posts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    /* Seasonal Favorites: Individual articles */
    #bam_grid_category_posts-9 .bam-grid-category-posts {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile: Two columns */
@media (max-width: 550px) {

    .widget_bam_grid_category_posts .bam-grid-category-posts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

}

/* Prevent first homepage article title from clipping */
body.home .bam-grid-category-posts .bmw-grid-post:first-child .entry-title {
    padding-left: 10px !important;
    box-sizing: border-box;
}


/* =========================================================
   7. BAM PRO WIDGET HEADINGS
   ========================================================= */

/* Teal separator above widget headings */
.widget_bam_grid_category_posts .bm-widget-header {
    border-top: 2px solid #6ab9c1 !important;
    border-bottom: none !important;
    padding-top: 15px !important;
    margin-top: 20px !important;
    display: flex;
    align-items: center !important;
    justify-content: space-between;
}

/* Heading container */
.widget_bam_grid_category_posts .bwt-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Heading styling */
.widget_bam_grid_category_posts .widget-title {
    margin: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    line-height: 1.3 !important;
}

/* Remove gray decorative lines */
.widget_bam_grid_category_posts .widget-title:before,
.widget_bam_grid_category_posts .widget-title:after {
    display: none !important;
    content: none !important;
}

/* View All alignment */
.widget_bam_grid_category_posts .bm-viewall {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    align-self: center !important;
}

/* Homepage category heading text */
body.home .bm-widget-header .widget-title {
    font-size: 28px !important;
    color: #6ab9c1 !important;
    font-weight: 400 !important;
}

body.home .bm-widget-header .widget-title a {
    color: #353535 !important;
}

/* View All links */
body.home .bm-widget-header .bm-viewall {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #6ab9c1 !important;
}

body.home .bm-widget-header .bm-viewall a,
body.home .bm-widget-header .bm-viewall span {
    color: #353535 !important;
}

/* Homepage article title hover colors */
body.home .widget_bam_grid_category_posts .entry-title a:hover,
body.front-page .widget_bam_grid_category_posts .entry-title a:hover {
    color: #6ab9c1 !important;
}

/* Popular Seasonal Articles heading color */
#bam_grid_category_posts-9 .widget-title {
    color: #333333 !important;
}


/* =========================================================
   8. HOMEPAGE LAYOUT
   ========================================================= */

/* Hide sidebar on homepage */
body.home #secondary {
    display: none !important;
}

/* Expand homepage main content */
body.home #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Hide default homepage page content */
.home article#post-20929 .entry-header,
.home article#post-20929 .entry-content,
.home article#post-20929 .entry-footer {
    display: none;
}

/* Reduce space between intro and Popular Seasonal Articles */
#block-66 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

#bam_grid_category_posts-9 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* =========================================================
   9. HOMEPAGE TOP CATEGORY SECTION
   ========================================================= */

/* Adjust image and title spacing */
.bm-magazine-featured .wp-block-group.is-vertical {
    gap: 4px !important;
}

.bm-magazine-featured .wp-block-image,
.bm-magazine-featured .wp-block-image + p {
    margin-block: 0 !important;
}

/* Space below category names */
.bm-magazine-featured .wp-block-image + p {
    margin-bottom: 12px !important;
}

/* Two columns on mobile */
@media (max-width: 767px) {
    .bm-magazine-featured .wp-block-group-is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* =========================================================
   10. HOMEPAGE FEATURED SECTION
   ========================================================= */

/* Desktop: Vertical divider */
@media (min-width: 901px) {
    .bm-magazine-featured #block-66 .wp-block-column:first-child {
        border-right: 2px solid #cccccc;
        padding-right: 25px;
    }

    .bm-magazine-featured #block-66 .wp-block-column:nth-child(2) {
        padding-left: 25px;
    }
}

/* Mobile and tablet: Horizontal divider */
@media (max-width: 900px) {
    .bm-magazine-featured #block-66 .wp-block-column:first-child {
        border-right: none;
        border-bottom: 2px solid #cccccc;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 0;
    }

    .bm-magazine-featured #block-66 .wp-block-column:nth-child(2) {
        padding-left: 0;
    }

    /* Stack columns on mobile and tablet */
    .bm-magazine-featured .wp-block-columns {
        flex-wrap: wrap !important;
    }

    .bm-magazine-featured .wp-block-columns > .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    .bm-magazine-featured .wp-block-columns > .wp-block-column:first-child {
        margin-bottom: 20px;
    }
}


/* =========================================================
   11. HOMEPAGE INTRODUCTORY HEADING
   ========================================================= */

/* Desktop heading */
.bm-magazine-featured h3.wp-block-heading {
    font-size: 38px !important;
    line-height: 1.2 !important;
    color: #6ab9c1 !important;
}

.bm-magazine-featured h3.wp-block-heading strong {
    color: inherit !important;
}

/* Mobile heading */
@media (max-width: 767px) {
    .bm-magazine-featured h3.wp-block-heading {
        font-size: 30px !important;
    }
}


/* =========================================================
   12. HOMEPAGE ABOUT ME SECTION
   ========================================================= */

/* Center and size homepage About Me photo */
body.home img.wp-image-20892 {
    width: 270px !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Tighten space below photo */
#block-73 .wp-block-image {
    margin-bottom: -10px !important;
}

/* Reduce space below text */
#block-73 .wp-block-column:last-child p {
    margin-bottom: 4px !important;
}

/* Reduce space below entire section */
#block-73 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Mobile About Me spacing */
@media (max-width: 767px) {
    #block-73 .wp-block-columns {
        margin-bottom: 0 !important;
    }

    #block-73 .wp-block-column:last-child p {
        margin-bottom: 0 !important;
    }
}

/* =========================================================
   13. SIDEBAR ABOUT ME SECTION
   ========================================================= */

/* Tighten spacing throughout sidebar profile section */
#secondary #block-69,
#secondary #block-70,
#secondary #block-71,
#secondary #block-72 {
    margin-top: 0;
    margin-bottom: 5px;
}

/* Desktop profile image spacing */
#secondary #block-69 figure {
    margin-bottom: 5px;
}

/* Desktop bio paragraph spacing */
#secondary #block-70 p {
    margin-bottom: 5px;
}

/* Desktop logo spacing */
#secondary #block-71 figure {
    margin-top: 0;
    margin-bottom: 0;
}

/* Desktop social media spacing */
#secondary #block-72 ul {
    margin-top: 0;
    margin-bottom: 0;
}

/* Mobile sidebar spacing and alignment */
@media screen and (max-width: 767px) {

    /* Center profile photo */
    #secondary #block-69 figure {
        display: flex;
        justify-content: center;
    }

    #secondary #block-69 img {
        display: block;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Profile image spacing */
    #secondary #block-69 figure {
        margin-bottom: 12px;
    }

    /* Bio paragraph spacing */
    #secondary #block-70 p {
        margin-bottom: 12px;
    }

    /* Logo spacing */
    #secondary #block-71 figure {
        margin-top: 0;
        margin-bottom: 8px;
    }

    /* Social media spacing */
    #secondary #block-72 ul {
        margin-top: 8px;
        margin-bottom: 0;
    }

    /* Space above sidebar profile */
    #secondary {
        margin-top: 30px;
    }

    /* Space below Older Posts button */
    #infinite-handle {
        margin-bottom: 30px;
    }
}