* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #d6c29a;
    color: #222;
    line-height: 1.5;
}

a {
    color: #40596a;
}

.site-header {
    max-width: 1000px;
    margin: 1rem auto 0;
    border: none;
    background: none;
}

.login-header {
    margin: 1rem auto 0;
    width: 100%;
    max-width: 1000px;
    height: clamp(140px, 26vw, 280px);
}

.site-hero {
    display: block;
    height: clamp(140px, 26vw, 280px);
    background: #40515b url('/photos/background.jpg') center / cover no-repeat;
    border: 3px solid #2c3e50;
    border-radius: 7px;
}

.site-title {
    margin-top: 7px;
    padding: 1.25rem 1rem;
    text-align: center;
    border: 3px solid #2c3e50;
    border-radius: 7px;
    background: #f7f2e8;
}

.site-title p {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.5;
}

.site-title p.site-title-notice {
    margin-top: 1rem;
}

.site-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-top: 7px;
    border: none;
    background: #d6c29a;
}

.site-nav-scrollbar {
    display: none;
}

.site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem .5rem;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    color: #222;
    border: 3px solid #2c3e50;
    border-radius: 7px;
    background: #f7f2e8;
}

.site-nav a:hover {
    background: #eee6d5;
}

@media (max-width: 700px) {
    .login-header {
        margin: 7px 7px 0;
        width: auto;
    }

    .site-nav {
        grid-auto-columns: 245px;
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: scroll;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav-scrollbar {
        display: block;
        position: relative;
        height: 4px;
        margin-top: 7px;
        overflow: hidden;
        border-radius: 4px;
        background: #f7f2e8;
    }

    .site-nav-scrollbar-thumb {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 25%;
        border-radius: inherit;
        background: #40596a;
    }

    .site-header {
        margin: 7px 7px 0;
    }

}

@media (max-width: 380px) {
    .site-header {
        margin: 7px 7px 0;
    }
}

.banner {
    background: #40515b;
    color: #fff;
    text-align: center;
    padding: 3.5rem 1rem;
}

.banner h1 {
    margin: 0 0 .5rem;
    font-size: 2.2rem;
}

.banner p {
    margin: 0;
    opacity: .85;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.home-title {
    font-size: 2rem;
}

.container.narrow {
    max-width: 600px;
}

.app-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    width: 100%;
}

.center {
    text-align: center;
    margin-top: 2rem;
}

.static-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.box {
    flex: 1 1 280px;
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.box h2 {
    margin-top: 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.posts-empty {
    display: grid;
    place-items: center;
    min-height: 320px;
}

.posts-empty p {
    margin: 0;
}

.not-found-empty {
    min-height: 400px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.post-card h3 {
    margin: 0 0 .25rem;
    font-size: 1.1rem;
}

.post-card time,
.meta {
    color: #777;
    font-size: .85rem;
}

.btn {
    display: inline-block;
    background: #40515b;
    color: #fff;
    border: 0;
    padding: .6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn.secondary {
    background: #786b54;
}

.pagination {
    display: flex;
    gap: .4rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    padding: .4rem .8rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
}

.pagination .current {
    background: #40515b;
    color: #fff;
    border-color: #40515b;
}

.article h1 {
    margin-bottom: .25rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-weight: 600;
}

.form input,
.form textarea {
    padding: .6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
}

.error {
    background: #fde8e8;
    color: #9b1c1c;
    padding: .6rem .9rem;
    border-radius: 6px;
}

.success {
    background: #e3f6e8;
    color: #1e6b34;
    padding: .6rem .9rem;
    border-radius: 6px;
}

.actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: .6rem .8rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.row-actions {
    display: flex;
    gap: .8rem;
    align-items: center;
}

.row-actions form {
    margin: 0;
}

.link-danger {
    background: none;
    border: 0;
    color: #b42318;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.footer {
    margin-top: 2rem;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    text-align: center;
    color: #fff;
    background: #40515b;
    padding: 1rem;
    width: 100%;
}

.footer p {
    margin: 0;
}

.footer-contact {
    padding-bottom: .75rem;
}

.footer-contact a {
    display: inline-block;
    margin-top: 5px;
    color: #fff;
    text-decoration: underline;
}

.footer-contact+p {
    width: 40%;
    margin: .75rem auto 0;
    padding-top: .75rem;
    border-top: 1px solid #fff;
}

.post-card h3 a {
    color: #000;
    text-decoration: none;
}

.post-card h3 a:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .container {
        width: calc(100% - 14px);
        margin-left: auto;
        margin-right: auto;
    }

    .footer-contact+p {
        width: 80vw;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        white-space: nowrap;
    }
}
