/* ==========================================================================
   OVERLAND MINERALS - BLOG STYLES
   overlandminerals.com
   
   Contents:
   1. Variables
   2. Theme Wrapper Overrides (gap fix)
   3. Hero Image
   4. Content + Sidebar Layout
   5. Article Body
   6. Sidebar
   7. More Articles Section
   8. Article Cards
   9. Blog Archive (Resources Page)
   10. How to Get Started Block (Resources Page)
   11. Responsive (Tablet - matches header breakpoints)
   12. Responsive (Mobile)
   ========================================================================== */


/* ==========================================================================
   1. Variables
   ========================================================================== */

:root {
    --om-navy: #1D3F7E;
    --om-blue: #1C73B6;
    --om-blue-hover: #155d94;
    --om-blue-light: #2E8FC9;
    --om-body-text: #181B1C;
    --om-body-light: #555555;
    --om-border: #dddddd;
    --om-bg-white: #ffffff;
    --om-content-max-width: 1040px;
    --om-tablet-max-width: 720px;
    --om-side-padding: 20px;
    --om-font-family: "Open Sans", Arial, Helvetica, sans-serif;
}


/* ==========================================================================
   2. Theme Wrapper Overrides
   
   The Omega theme adds margin/padding on #main, #zone-content,
   and .zone-content-wrapper that creates a gap between the nav
   bar and the blog hero image. These overrides zero that out on
   blog post and archive pages so the hero sits flush under the nav.
   ========================================================================== */

body.single-post #zone-content,
body.single-post #zone-content .zone-content-wrapper,
body.single-post #zone-content .zone,
body.single-post #zone-content .region,
body.single-post #zone-content .region-inner,
body.single-post #main,
body.blog #zone-content,
body.blog #zone-content .zone-content-wrapper,
body.blog #zone-content .zone,
body.blog #zone-content .region,
body.blog #zone-content .region-inner,
body.blog #main {
    margin-top: 0;
    padding-top: 0;
}

.om-blog-post,
.om-blog-archive-page {
    margin-top: 0;
    padding-top: 0;
}


/* ==========================================================================
   3. Hero Image
   
   Uses the same max-width AND side padding as the header's
   .hdr-top (1040px with 20px padding on each side). This
   ensures the image edges align with the logo and CTA button.
   ========================================================================== */

.om-blog-hero {
    width: 100%;
    max-width: var(--om-content-max-width);
    margin: 0 auto;
    padding: 0 var(--om-side-padding);
    overflow: hidden;
    line-height: 0;
    box-sizing: border-box;
}

.om-blog-hero__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* ==========================================================================
   4. Content + Sidebar Layout
   ========================================================================== */

.om-blog-content {
    display: flex;
    gap: 40px;
    max-width: var(--om-content-max-width);
    margin: 0 auto;
    padding: 40px var(--om-side-padding) 20px;
    font-family: var(--om-font-family);
    box-sizing: border-box;
}

.om-blog-content__main {
    flex: 1;
    min-width: 0;
}

.om-blog-sidebar {
    width: 260px;
    flex-shrink: 0;
}


/* ==========================================================================
   5. Article Body
   ========================================================================== */

.om-blog-content__title {
    font-family: var(--om-font-family);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--om-navy);
    margin: 0 0 20px 0;
}

.om-blog-content__body {
    font-family: var(--om-font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--om-body-text);
}

.om-blog-content__body p {
    margin: 0 0 18px 0;
}

.om-blog-content__body a {
    color: var(--om-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.om-blog-content__body a:hover,
.om-blog-content__body a:focus {
    color: var(--om-blue-hover);
}

.om-blog-content__body h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--om-navy);
    margin: 30px 0 15px 0;
    line-height: 1.3;
}

.om-blog-content__body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--om-navy);
    margin: 25px 0 12px 0;
    line-height: 1.3;
}

.om-blog-content__body ul,
.om-blog-content__body ol {
    margin: 0 0 18px 20px;
    padding: 0;
}

.om-blog-content__body li {
    margin-bottom: 8px;
}

.om-blog-content__body img {
    max-width: 100%;
    height: auto;
}

.om-blog-content__body blockquote {
    border-left: 4px solid var(--om-blue);
    margin: 20px 0;
    padding: 15px 20px;
    color: var(--om-body-light);
    font-style: italic;
}


/* ==========================================================================
   6. Sidebar
   ========================================================================== */

.om-blog-sidebar__section {
    margin-bottom: 30px;
}

.om-blog-sidebar__heading {
    font-family: var(--om-font-family);
    font-size: 16px;
    font-weight: 700;
    color: var(--om-body-text);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.om-blog-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.om-blog-sidebar__item {
    margin-bottom: 6px;
    line-height: 1.4;
}

.om-blog-sidebar__link {
    font-family: var(--om-font-family);
    font-size: 14px;
    color: var(--om-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.om-blog-sidebar__link:hover,
.om-blog-sidebar__link:focus {
    color: var(--om-blue-hover);
    text-decoration: underline;
}


/* ==========================================================================
   7. More Articles Section
   ========================================================================== */

.om-blog-more {
    max-width: var(--om-content-max-width);
    margin: 0 auto;
    padding: 20px var(--om-side-padding) 40px;
    box-sizing: border-box;
}

.om-blog-more__heading {
    font-family: var(--om-font-family);
    font-size: 24px;
    font-weight: 700;
    color: var(--om-navy);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.om-blog-more__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}


/* ==========================================================================
   8. Article Cards
   ========================================================================== */

.om-blog-card {
    border: 1px solid var(--om-border);
    border-radius: 2px;
    overflow: hidden;
    background: var(--om-bg-white);
    transition: box-shadow 0.2s ease;
}

.om-blog-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.om-blog-card__image-link {
    display: block;
    line-height: 0;
    overflow: hidden;
}

.om-blog-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.om-blog-card:hover .om-blog-card__img {
    transform: scale(1.03);
}

.om-blog-card__content {
    padding: 20px;
}

.om-blog-card__title {
    font-family: var(--om-font-family);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.om-blog-card__title a {
    color: var(--om-body-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.om-blog-card__title a:hover,
.om-blog-card__title a:focus {
    color: var(--om-navy);
}

.om-blog-card__excerpt {
    font-family: var(--om-font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--om-body-light);
    margin: 0 0 15px 0;
}

.om-blog-card__read-more {
    font-family: var(--om-font-family);
    font-size: 14px;
    font-weight: 700;
    color: var(--om-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.om-blog-card__read-more:hover,
.om-blog-card__read-more:focus {
    color: var(--om-blue-hover);
}


/* ==========================================================================
   9. Blog Archive (Resources Page)
   ========================================================================== */

.om-blog-archive {
    max-width: var(--om-content-max-width);
    margin: 0 auto;
    font-family: var(--om-font-family);
    box-sizing: border-box;
}

.om-blog-archive__header {
    padding: 40px var(--om-side-padding) 30px;
    text-align: center;
}

.om-blog-archive__title {
    font-family: var(--om-font-family);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--om-navy);
    margin: 0;
}

.om-blog-archive__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 var(--om-side-padding) 40px;
}

.om-blog-archive__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--om-body-light);
}

/* Pagination */
.om-blog-archive__pagination {
    padding: 0 var(--om-side-padding) 50px;
    text-align: center;
}

.om-blog-archive__pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.om-blog-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-family: var(--om-font-family);
    font-size: 14px;
    font-weight: 600;
    color: var(--om-navy);
    text-decoration: none;
    border: 1px solid var(--om-border);
    border-radius: 2px;
    background: var(--om-bg-white);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.om-blog-archive__pagination .page-numbers:hover {
    background: var(--om-navy);
    color: #ffffff;
    border-color: var(--om-navy);
}

.om-blog-archive__pagination .page-numbers.current {
    background: var(--om-navy);
    color: #ffffff;
    border-color: var(--om-navy);
}

.om-blog-archive__pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
}

.om-blog-archive__pagination .page-numbers.dots:hover {
    background: none;
    color: var(--om-navy);
}


/* ==========================================================================
   10. How to Get Started Block (Resources Page)
   
   Mirrors the homepage #how-to-get-started block structure and
   behavior, but uses a lighter blue so the Resources page has its
   own visual identity. Uses the same viewport-width trick on
   desktop to break out of the .om-blog-archive container and
   render edge-to-edge like the homepage version.
   ========================================================================== */

.om-blog-archive .home__how-to-get-started {
    background: var(--om-blue-light);
    color: #ffffff;
    margin-top: 8%;
    margin-bottom: 0;
    padding: 5% 0 4%;
    position: relative;
    box-sizing: border-box;
}

.om-blog-archive .home__how-to-get-started .wp-block-group__inner-container {
    margin: 0 auto;
}

.om-blog-archive .home__how-to-get-started h2 {
    color: #ffffff;
    font-size: 1.9rem;
}

.om-blog-archive .home__how-to-get-started h2 .heading__medium {
    font-size: 1.2rem;
    font-weight: 600;
}

.om-blog-archive .home__how-to-get-started p {
    color: #ffffff;
}

.om-blog-archive .home__how-to-get-started .wp-block-buttons {
    margin: 4% 0 1%;
}

.om-blog-archive .home__how-to-get-started .wp-block-buttons .wp-block-button:first-child {
    margin-right: 2.5%;
}

.om-blog-archive .home__how-to-get-started .wp-block-buttons .btn__blue .wp-block-button__link:hover {
    background-color: #0066ff;
}


/* ==========================================================================
   11. Responsive (Tablet - aligned to site-header.php breakpoints)
   
   Header breakpoints:
     Tablet: 740px-979px  ->  max-width: 720px, padding: 0 10px
     Desktop: 980px+      ->  max-width: 1040px, padding: 0 20px
   ========================================================================== */

/* --- Tablet: 740px-979px --- */
@media (max-device-width:800px) and (min-width:740px) and (orientation:landscape),
       (min-width:740px) and (min-device-width:740px) and (max-width:979px) {

    :root {
        --om-side-padding: 10px;
    }

    .om-blog-hero {
        max-width: var(--om-tablet-max-width);
    }

    .om-blog-content {
        max-width: var(--om-tablet-max-width);
        gap: 30px;
        padding-top: 30px;
        padding-bottom: 15px;
    }

    .om-blog-sidebar {
        width: 220px;
    }

    .om-blog-more {
        max-width: var(--om-tablet-max-width);
        padding-top: 15px;
        padding-bottom: 30px;
    }

    .om-blog-more__grid {
        gap: 20px;
    }

    .om-blog-card__img {
        height: 180px;
    }

    .om-blog-content__title {
        font-size: 26px;
    }

    /* Archive */
    .om-blog-archive {
        max-width: var(--om-tablet-max-width);
    }

    .om-blog-archive__header {
        padding-top: 30px;
        padding-bottom: 20px;
    }

    .om-blog-archive__title {
        font-size: 28px;
    }

    .om-blog-archive__grid {
        gap: 20px;
    }

    .om-blog-archive__pagination {
        padding-bottom: 40px;
    }

    /* How to Get Started - tablet padding */
    .om-blog-archive .home__how-to-get-started {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* --- Desktop: 980px+ - edge-to-edge viewport width for How to Get Started --- */
@media (min-width: 980px) and (min-device-width: 980px),
       (max-device-width: 1024px) and (min-width: 1024px) and (orientation: landscape) {

    .om-blog-archive .home__how-to-get-started {
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .om-blog-archive .home__how-to-get-started .wp-block-group__inner-container {
        width: 1040px;
    }
}

/* --- Below 740px: sidebar stacks, matches header mobile --- */
@media (max-width: 739px) {

    .om-blog-content {
        flex-direction: column;
        gap: 30px;
    }

    .om-blog-sidebar {
        width: 100%;
        border-top: 1px solid var(--om-border);
        padding-top: 25px;
    }

    .om-blog-content__title {
        font-size: 26px;
    }

    .om-blog-more__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .om-blog-card__img {
        height: 180px;
    }

    /* Archive */
    .om-blog-archive__header {
        padding: 30px var(--om-side-padding) 20px;
    }

    .om-blog-archive__title {
        font-size: 28px;
    }

    .om-blog-archive__grid {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    /* How to Get Started - mobile padding */
    .om-blog-archive .home__how-to-get-started {
        padding-left: 20px;
        padding-right: 20px;
    }
}


/* ==========================================================================
   12. Responsive (Mobile - 480px and below)
   ========================================================================== */

@media (max-width: 480px) {

    :root {
        --om-side-padding: 15px;
    }

    .om-blog-content {
        padding-top: 20px;
        padding-bottom: 10px;
    }

    .om-blog-content__title {
        font-size: 22px;
    }

    .om-blog-content__body {
        font-size: 15px;
    }

    .om-blog-more {
        padding-top: 15px;
        padding-bottom: 30px;
    }

    .om-blog-more__heading {
        font-size: 20px;
    }

    .om-blog-more__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .om-blog-card__img {
        height: 200px;
    }

    .om-blog-card__title {
        font-size: 18px;
    }

    /* Archive */
    .om-blog-archive__header {
        padding-top: 20px;
        padding-bottom: 15px;
    }

    .om-blog-archive__title {
        font-size: 22px;
    }

    .om-blog-archive__grid {
        grid-template-columns: 1fr;
    }
}
