header {
    display: flex;
    justify-content: space-between;

    .site-header {
        width: 100%;
        max-width: 1440px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-identity {
        margin-right: 20px;
        display: flex;
        flex-direction: column;
        max-width: 30%;

        h1.site-title {
            margin: 0;
            padding: 0;
            font-size: 1.5rem;

            a {
                color: #333;
                text-decoration: none;

                &:hover,
                &:focus {
                    color: #555;
                }
            }
        }

        p.site-description {
            font-size: 1rem;
            color: #555;
            line-height: 1;
            margin: 0;
        }
    }

    .hamburger-menu {
        display: none;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        min-width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        transition: all 0.5s;

        span {
            width: 100%;
            height: 3px;
            background: #333;
            border-radius: 2px;
            transition: all 0.5s;
        }

        &.open span:nth-child(1) {
            transform: rotate(45deg);
            position: relative;
            top: 8px;
        }

        &.open span:nth-child(2) {
            opacity: 0;
        }

        &.open span:nth-child(3) {
            transform: rotate(-45deg);
            position: relative;
            top: -11px;
        }
    }

    .responsive-navigation {
        display: none;
    }

    .site-navigation {
        flex-grow: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;

        ul.menu {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;

            li.menu-item {
                margin: 0;
                padding: 1rem;
                list-style: none;

                a {
                    color: #333;
                    text-decoration: none;

                    &:hover,
                    &:focus {
                        color: #F66135;
                    }
                }

                &.menu-item-has-children {
                    position: relative;

                    & > a:after {
                        content: '\f140';
                        font-family: dashicons;
                        vertical-align: bottom;
                        margin-left: .25em;
                    }

                    &:hover > ul.sub-menu,
                    &:focus-within > ul.sub-menu {
                        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
                        display: block;
                        width: calc(100% + 1rem);
                    }

                    ul.sub-menu {
                        display: none;
                        position: absolute;
                        top: 100%;
                        left: 0;
                        background-color: #fff;
                        padding: 0;
                        margin: 0;
                        list-style: none;
                        width: 100%;
                        z-index: 999;

                        li.menu-item {
                            padding: 0;
                            margin: 0;
                            position: relative;

                            &.menu-item-has-children {
                                position: relative;

                                & > a:after {
                                    content: '\f139';
                                    font-family: dashicons;
                                    vertical-align: bottom;
                                    margin-left: .25em;
                                }
                            }

                            a {
                                padding: 1rem;
                                display: block;
                                color: #333;
                                text-decoration: none;
                                transition: background-color .3s;

                                &:hover,
                                &:focus {
                                    background-color: #f9f9f9;
                                    color: #F66135;
                                }
                            }

                            &:hover > ul.sub-menu,
                            &:focus-within > ul.sub-menu {
                                display: block;
                                left: 100%;
                                top: 0;
                            }
                        }
                    }
                }
            }
        }
    }

    @media (max-width: 1024px) {
        .site-identity {
            max-width: 75%;
        }
        .site-navigation {
            display: none;
        }

        .hamburger-menu {
            display: flex;
        }

        .responsive-navigation {
            display: block;
            width: 0;

            .drawer-menu {
                /* display: block; */
                position: absolute;
                padding: 3rem 0;
                margin: 0;
                top: 0;
                right: 0;
                height: 100%;
                background-color: #fff;
                z-index: 1000;
                overflow-y: auto;
                transition: all 0.5s ease-in-out;
                transform: translateX(100%);
                width: 0%;
                opacity: 0;

                &.open {
                    padding: 3rem 1rem;
                    display: block;
                    transform: translateX(0);
                    width: 75%;
                    list-style: none;
                    opacity: 1;
                }

                &.menu {
                    list-style: none;
                    li.menu-item {
                        padding: 1rem;
                        border-bottom: 1px solid #ddd;

                        &:last-child {
                            border-bottom: none;
                        }

                        a {
                            color: #333;
                            text-decoration: none;
                        }

                        a:hover,
                        a:focus {
                            color: #555;
                        }

                        &.menu-item-has-children {
                            position: relative;

                            > a:after {
                                content: '\f347';
                                font-family: dashicons;
                                vertical-align: bottom;
                                margin-left: .25em;
                            }

                            ul.sub-menu {
                                display: none;
                                position: relative;
                                background-color: #fff;
                                padding: 0;
                                margin: 0;
                                list-style: none;
                                width: 100%;
                                z-index: 999;

                                li.menu-item {
                                    padding: 0;
                                    margin: 0;
                                    position: relative;

                                    a {
                                        padding: 1rem;
                                        display: block;
                                        color: #333;
                                        text-decoration: none;
                                        transition: background-color .3s;

                                        &:hover,
                                        &:focus {
                                            background-color: #f9f9f9;
                                        }
                                    }
                                }
                            }

                            &:hover > ul.sub-menu,
                            &:focus-within > ul.sub-menu {
                                display: block;
                            }
                        }
                    }
                }
            }
        }
    }

    @media (max-width: 768px) {
        .drawer-menu {
            width: 75%;
        }
    }
}

.menu-overlay {
    display: none;
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;

    &.open {
        display: block;
        opacity: 1;
    }
}

article {
    .post-thumbnail {
        margin-bottom: 1rem;

        img {
            width: 100%;
            height: auto;
        }
    }
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1440px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

/* Post Card */
.post-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    width: 100%;
    height: 180px; /* Set the max height */
    overflow: hidden; /* Hide overflow */

    a {
        width: 100%;
        height: 100%;
        display: flex;
    }
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the container */
    display: block;
    transition: all 0.1s ease;
}

.post-thumbnail a:focus,
.post-thumbnail a:focus-visible,
.post-thumbnail a:focus-within {
    border: 2px;
    outline-offset: -2px;
}

.post-content {
    flex: 1;
    padding: 0 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.home, body.blog, body.archive, body.search-results {
    .post-content {
        padding: 1rem;
    }
}

.post-meta {
    padding-bottom: 1rem;

    span {
        display: inline-block;
        margin-right: 1rem;

        a {
            margin-left: 0.25rem;

            &:first-child {
                margin-left: 0;
            }
        }
    }
}

.post-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    min-height: 72px;
}

.post-title a {
    color: #333;
    text-decoration: none;
    -ms-word-wrap: break-word;
    word-wrap: break-word;
}

.post-title a:hover {
    color: rgb(246,97,53);
}

.post-excerpt {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.read-more {
    margin-top: auto;
    padding: 0.5rem 1rem;
    background-color: rgb(246,97,53);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.read-more:hover {
    background-color: rgb(214,84,46);
    color: #fff;
}

.single-post {
    display: flex;
    flex-direction: column;
    background-color: #fff;

    aside .widget {
        background-color: #f9f9f9;
    }

    .post-thumbnail-container {
        width: 90%;
        margin: 0 auto 1.5rem auto;
        overflow: hidden;
        position: relative;
        padding-top: 28.125%; /* 32:9 aspect ratio */
    }
    
    .post-thumbnail {
        position: absolute;
        top: 0;
        left: 50%;
        width: 100%;
        height: 100%;
        transform: translateX(-50%);
    }
    
    .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .post-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        color: #333;
        -ms-word-wrap: break-word;
        word-wrap: break-word;
    }
    
    .post-meta {
        font-size: 0.875rem;
        color: #555;
        margin-bottom: 1.5rem;
    }
    
    .post-meta span {
        display: inline-block;
        margin-right: 1rem;
    }
    
    .post-body {
        font-size: 1rem;
        line-height: 1.6;
        color: #333;
        a {
            color: --var(--blue-600);
            text-decoration: underline;

            &:hover,
            &:focus {
                color: var(--blue-600);
                text-decoration: none;
            }
        }
    }
    
    @media (max-width: 768px) {
        .post-content {
            padding: 1rem;
        }
    
        .post-title {
            font-size: 1.5rem;
        }
    }
}