/* || Global */

:root {
    font-family: "Karla", sans-serif;
    --colour-light-grey: #f1f1f1;
    --colour-mid-grey: #acacac;
    --colour-dark-grey: #464646;
    --theme-line: 1px solid var(--colour-mid-grey);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-size: 3rem;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

ul {
    list-style-type: none;
}

li {
    cursor: pointer;
}

pre {
    background-color: var(--colour-light-grey);
    border: var(--theme-line);
    border-left: none;
    border-right: none;
    padding: 1rem;
    margin-bottom: 2rem;
    overflow: auto;
}

/* || Links */

.title-link:hover,
.title-link:focus,
.dates a:hover,
.dates a:focus {
    text-decoration: underline;
}

.link-previous:hover,
.link-previous:focus,
.link-next:hover,
.link-next:focus,
.text-link:hover,
.text-link:focus {
    color: var(--colour-dark-grey);
}

/* || Typography */

.overlay-text.lower {
    font-size: 1.5rem;
}

@media screen and (min-width: 37.5rem) {
    .overlay-text.lower {
        font-size: 2rem;
    }
}

.pub-date {
    color: var(--colour-mid-grey);
    font-size: 1rem;
    font-weight: normal;
}

.post-title,
.result-title,
.empty-listing {
    margin: 1rem 0;
    font-size: 1.75rem;
    font-weight: bold;
    overflow-wrap: break-word;
}

.post-dir {
    font-weight: bold;
    text-transform: uppercase;
}

code {
    font-size: 0.75rem;
}

/* || Forms */

form {
    display: flex;
    height: 2rem;
}

form div {
    flex: 1;
}

form input {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border-color: var(--colour-mid-grey);
    outline: none;
}

form input:focus {
    border-color: #000;
}

form button {
    width: 33%;
    max-width: 6rem;
    border: 0;
    background-color: #292929;
    font-size: 90%;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
}

form button:hover,
form button:focus {
    background-color: var(--colour-dark-grey);
}

/* || Layouts */

/* Banner */

.page-header {
    height: 20rem;
}

.header-banner,
.banner-image {
    height: 100%;
}

.banner-image {
    z-index: 0;
    width: 100%;
    background-image: url("images/sky-royalty-free-1200w.95302d8cc958.png");
    background-attachment: fixed;
    background-position: top;
    background-size: cover;
}

@media screen and (max-width: 30rem) {
    .banner-image {
        background-image: url("images/sky-royalty-free-480w.240be80ce4f5.png");
    }
}

@media screen and (min-width: 30rem) and (max-width: 48rem) {
    .banner-image {
        background-image: url("images/sky-royalty-free-768w.f1f24b84861d.png");
    }
}

.header-banner,
.text-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.text-link {
    position: absolute;
    z-index: 1;
}

.overlay-text {
    padding: 1rem;
    line-height: 1.33;
    text-align: center;
}

@media screen and (min-width: 37.5rem) {
    .overlay-text {
        line-height: 1;
    }
}

.menu-container {
    display: flex;
    position: fixed;
    align-items: center;
    z-index: 2;
    width: 100%;
    height: 5rem;
}

@media screen and (min-width: 48rem) {
    .menu-container {
        display: none;
    }
}

.menu-button {
    position: absolute;
    right: 2rem;
    z-index: 1;
    width: 4rem;
    height: 66%;
    background-color: transparent;
    border: 2px solid;
    border-image-slice: 1;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-button span {
    position: absolute;
    width: 75%;
    height: 0.5rem;
    transform: translate(-50%, -50%);
    transition: 0.1s ease;
}

.menu-button span:nth-child(1) {
    top: 23%;
}

.menu-button span:nth-child(3) {
    top: 77%;
}

.menu-button.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu-button.active span:nth-child(2) {
    opacity: 0;
}

.menu-button.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.header-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: -500px;
    top: 0;
    align-items: flex-start;
    z-index: 0;
    width: 25%;
    height: 100vh;
    min-width: 20rem;
    border: var(--theme-line);
    padding: 3rem 2rem;
    background-color: #fff;
    opacity: 0;
    transition: opacity 0.1s cubic-bezier(0, 0.47, 0.745, 0.715),
        right 0.2s cubic-bezier(1, 0, 1, 1);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.header.menu::-webkit-scrollbar {
    display: none;
}

.header-menu.active {
    right: 0;
    opacity: 1;
    transition: opacity 0.3s cubic-bezier(0.47, 0, 0.745, 0.715),
        right 0.3s cubic-bezier(0, 0, 0, 1);
}

/* Content */

.main-wrapper {
    display: flex;
    flex: 1 0 auto;
    padding-top: 2.5rem;
}

.content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: 75rem;
    border: var(--theme-line);
    border-radius: 2rem;
    margin: 0 auto;
    padding: 1rem;
}

@media screen and (min-width: 37.5rem) {
    .content {
        width: 90%;
    }
}

@media screen and (min-width: 48rem) {
    .content {
        width: 85%;
    }
}

@media screen and (min-width: 64rem) {
    .content {
        width: 80%;
    }
}

/* Main Body */

.main-body {
    width: 100%;
}

@media screen and (min-width: 48rem) {
    .main-body {
        width: 63%;
    }
}

.empty-results {
    padding-top: 0.5rem;
}

.blog-post,
.empty-results {
    padding-bottom: 1.5rem;
}

.post-body {
    overflow: auto;
    overflow-wrap: break-word;
}

.post-body p {
    margin-bottom: 2rem;
}

.post-body img {
    max-width: 100%;
    height: auto !important;
}

@media screen and (max-width: 30rem) {
    .post-body img {
        width: 100% !important;
    }
}

.post-body img:not(.img-centre) {
    margin: 0 0 2rem 0;
}

@media screen and (min-width: 30rem) {
    .post-body img.img-left {
        margin: 0 1rem 0 0;
    }
    .post-body img.img-right {
        margin: 0 0 0 1rem;
    }
}

p:has(> .img-centre) {
    text-align: center;
}

@media screen and (min-width: 30rem) {
    img.img-centre {
        max-width: 75%;
    }
}

.blog-post footer {
    border-bottom: var(--theme-line);
}

.clear {
    clear: both;
}

/* Sidebar */

.sidebar {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 30%;
}

@media screen and (min-width: 48rem) {
    .sidebar {
        display: flex;
    }
}

.sbar-section {
    width: 100%;
    margin-bottom: 1rem;
}

.sbar-section h2 {
    padding-bottom: 0.5rem;
    margin-top: 1rem;
}

.sidebar h2 {
    border-bottom: var(--theme-line);
}

/* Post Tree */

.post-tree ul {
    transition: opacity 0.1s cubic-bezier(0.4, 0, 1, 1);
}

.post-tree ul ul {
    padding: 0 0 0 2.5rem;
}

.post-tree li {
    margin: 0.5rem 0;
}

.post-tree li::before {
    content: "\25BC";
    display: inline-block;
    margin-right: 0.5rem;
    font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
    transform: rotate(-90deg);
    transition: 0.05s linear;
}

.post-tree li:not(:has(ul)) {
    margin: 0.75rem 0;
}

.post-tree li:not(:has(ul)):before {
    content: none;
}

.post-tree li.reveal::before {
    transform: rotate(0);
}

.post-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
}

/* Footer */

.footer-upper {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 10rem;
    border-top: var(--theme-line);
}

@media screen and (min-width: 30rem) {
    .footer-upper {
        height: 5rem;
    }
}

.footer-lower {
    height: 4rem;
    background-color: var(--colour-mid-grey);
}

@media screen and (min-width: 48rem) {
    .footer-lower {
        height: 5rem;
    }
}

.nav-pages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    margin-top: 0;
    padding: 1rem;
}

@media screen and (min-width: 30rem) {
    .nav-pages {
        flex-direction: row;
        align-items: center;
    }
}

@media screen and (min-width: 37.5rem) {
    .nav-pages {
        width: 33.75rem;
    }
}

@media screen and (min-width: 48rem) {
    .nav-pages {
        width: 37.5rem;
    }
}

.previous-set,
.next-set,
.page-count {
    display: flex;
    align-items: center;
    height: 100%;
}

@media screen and (min-width: 30rem) {
    .previous-set,
    .page-count,
    .next-set {
        width: 100%;
    }
}

.page-count {
    justify-content: center;
}

@media screen and (min-width: 30rem) {
    .next-set {
        justify-content: flex-end;
    }
}

.title-preview {
    max-width: 10rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.link-next,
.link-previous {
    display: flex;
    flex-direction: column;
}

@media screen and (min-width: 30rem) {
    .link-next {
        align-items: flex-end;
    }
}
