/**
 * Theme Name: Midland
 * Description: Midland Express is a modern and responsive WordPress theme designed for news and magazine websites.
 * Version: 1.0.7
 */

/* Reset and base styles */
html,
body {
    box-sizing: border-box;
}

html>*,
body * {
    box-sizing: inherit;
}

/* Layout */
.site-main {
    max-width: 1480px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.15;
}

/* Transitions */
a,
img,
.wp-element-button {
    transition: 0.3s;
}

/* Utility Classes */
.fullwidth,
.full-width {
    width: 100%;
}

.flex-grow {
    flex-grow: 1;
}

.flex-shrink {
    flex-shrink: 1;
}


/* Layout */
.site-header {
    display: flex;
    flex-flow: column;
}

@media (max-width: 599px) {
    .site-header--container {
        border-bottom: 2px solid var(--wp--preset--color--primary);
    }

    .site-header .wp-block-site-logo {
        width: 150px;
        flex: 0 0 auto;
        /* order: 1; */
    }

    .site-header--container>div {
        justify-content: space-between;
        gap: 1rem;
    }

    .site-header--container>div>* {
        width: 50%;
        flex: 0 0 auto;
        /* order: 3; */
        justify-content: flex-end;
    }

    .site-header .wp-block-buttons {
        /* order: 2; */
        width: 100%;
    }

    .site-header--nav {
        order: -1;
    }
}

.sidebar {
    flex-basis: 325px;
    max-width: 480px;
}

/* Responsive */
@media (max-width: 768px) {
    .site-main {
        padding: 1rem;
    }
}

/* Navigation */
.wp-block-navigation__responsive-container-close svg,
.wp-block-navigation__responsive-container-open svg {
    --size: 3em;
    padding: .25em;
    width: var(--size);
    height: var(--size);
}

@media (max-width: 600px) {
    .wp-block-navigation.items-justified-space-between {
        justify-content: flex-end;
    }
}

.wp-block-navigation__responsive-container.is-menu-open {
    min-height: 100vh;
    z-index: 100000;
    position: fixed;
}

.wp-block-navigation__responsive-container.is-menu-open {
    padding-left: var(--wp--style--root--padding-left);
    padding-right: var(--wp--style--root--padding-right);
}

/* One-Up grid */
.wp-block-post .wp-block-post-title {
    font-size: var(--wp--preset--font-size--large);
}


@media (min-width: 800px) {
    .one-up .wp-block-post:first-child {
        grid-column: 1 / -1;
    }

    .one-up .wp-block-group {
        row-gap: 0;
    }

    .one-up .wp-block-post>.wp-block-group {
        row-gap: 1em;
    }

    .one-up .wp-block-post:first-child>.wp-block-group {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
    }

    .one-up .wp-block-post:first-child>.wp-block-group .wp-block-post-featured-image {
        grid-column: span 2;
    }

    .one-up .wp-block-post:first-child .wp-block-post-title {
        font-size: var(--wp--preset--font-size--x-large);
    }

    .one-up .wp-block-post-featured-image a {
        display: flex;
    }

    .one-up .wp-block-post-featured-image img {
        display: block;
        aspect-ratio: 6 / 4;
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
        max-width: none;
        contain-intrinsic-size: none;
    }
}

@media (max-width: 799px) {
    .one-up .is-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Heading Style */
.is-style-divider {
    display: flex;
    font-weight: bold;
    gap: .5em;
    font-size: var(--wp--preset--font-size--large);
    text-transform: uppercase;
}

.is-style-divider::before {
    content: "";
    height: 1em;
    width: .125em;
    background-color: var(--wp--preset--color--primary);
    align-self: center;
}

.is-style-divider::after {
    content: "";
    flex-grow: 1;
    height: .05em;
    background-color: var(--wp--preset--color--black);
    align-self: center;
}

.has-background .is-style-divider::before,
.has-background .is-style-divider::after {
    background-color: var(--wp--preset--color--light);
}

.is-style-side-line {
    display: flex;
    gap: .5em;
}

.is-style-side-line::before {
    content: "";
    height: 1em;
    width: .125em;
    background-color: var(--wp--preset--color--primary);
    align-self: center;
}

.has-background .is-style-side-line::before {
    background-color: var(--wp--preset--color--light);
}

/* Post Terms Divider Style */
.wp-block-post-terms.is-style-divider a {
    text-decoration: none;
    color: var(--wp--preset--color--primary);
}

.wp-block-navigation-item__content {
    position: relative;
}

.wp-block-navigation-item__content:hover {
    text-decoration: none;
}

.wp-block-navigation-item__content::after {
    background-color: transparent;
    content: '';
    width: 0;
    height: 3px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-transition: width 0.2s ease;
    transition: width 0.2s ease;
}

.wp-block-navigation-item__content:hover::after {
    background-color: var(--wp--preset--color--white);
    width: 100%;
}

/* Post Tile */

.post-tile {}

.post-tile__text {
    gap: 0;
    flex-grow: 1;
}

/* Buttons */
.wp-block-button__link.has-contrast-background-color:hover {
    --wp--preset--color--contrast: var(--wp--preset--color--light);
}

.site-header .wp-block-button__link.has-contrast-background-color:hover {
    --wp--preset--color--contrast: var(--wp--preset--color--primary);
}

.wp-block-button__link.has-base-color:hover {
    --wp--preset--color--base: var(--wp--preset--color--primary);
}

/* Featured Image */
.wp-block-post-featured-image a:hover img {
    opacity: 0.8;
}


/* Latest Posts */
.wp-block-latest-posts {
    max-width: 325px;
    gap: 1em;
}

.wp-block-latest-posts.is-grid li {
    margin: 0;
    text-align: center;
}

.wp-block-latest-posts .wp-block-latest-posts__featured-image {
    margin-bottom: .25em;
}

.wp-block-latest-posts__post-title {
    font-size: var(--wp--preset--font-size--small);
    font-family: var(--wp--preset--font-family--spectral);
    font-weight: bold;
    text-decoration: none;
    line-height: 1.2;
    display: block;
    margin-bottom: .25em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Set the number of lines here */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
    font-size: .75em;
    line-height: 1.2;
}


/* Footer */
.nav-footer ul {
    border-left: 1px solid var(--wp--preset--color--primary);
    padding-left: var(--wp--preset--spacing--30);
    flex-grow: 0 !important;
    margin-bottom: auto;
    gap: 1rem;
}

.nav-footer ul li a {
    padding: 0;
    margin: 0;
    font-size: 14px;
}

html {
    position: relative;
    min-height: 100%;
}

html::after {
    /* content: ''; */
    background-image: url('assets/images/homepage-v2.jpg');
    background-image: url('assets/images/homepage-v3.jpg');
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center top;
    max-width: 1800px;
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    opacity: 0.65;
    pointer-events: none;
}

/* Ads */
.midla-entity-placement {
    display: flex;
    flex-flow: column;
    gap: 2em;
    align-items: center;
}

.midla-entity-placement>div {
    width: 100%;
}

.midla-entity-placement a {
    display: flex;
}

.midla-entity-placement img {
    max-width: 100%;
    height: auto;
    width: 100%;
}


/* Forms */
.entry-content #mc_embed_signup {
    width: 100%;
    max-width: 600px;
}
