/* =========================================================
   SITE BEHAVIOUR
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

.reaction-button.selected {
    font-weight: 700;
    transform: scale(1.08);
}

body {
    font-family: Verdana, 'Courier New', Geneva, sans-serif;
    margin: 0;
    height: 100%;
}

.site-header {
    padding: 0px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================================
   POST BEHAVIOUR
   ========================================================= */

.posts-container {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
}

.posts-container h3 {
    margin-bottom: 20px;
}

.zesty-post {
    border: 1px solid;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.post-description {
    font-size: 1.05rem;
    line-height: 1.6;
    white-space: normal;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid;
    font-size: 0.85rem;
}

.no-posts {
    text-align: center;
    padding: 30px;
}

.description-field {
    width: 100%;
}

.character-count {
    text-align: right;
    margin-top: 5px;
    font-size: 0.8rem;
}

/* =========================================================
   HEADER BEHAVIOUR
   ========================================================= */

.header-content {
    display: flex;
    flex-direction: column;
}

.site-logo {
    display: inline-block;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
}

.site-tagline {
    margin: 4px 0 0 0;
    font-size: 0.95rem;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

/* =========================================================
   ZESTY LINE BEHAVIOUR
   ========================================================= */

.zesty-line {
    height: 10px;
    background-size: 4000px 100%;
    animation: zestyMove 15s linear infinite;
    border-top: 2px solid;
    border-bottom: 2px solid;
}

@keyframes zestyMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 4000px 0;
    }
}

/* =========================================================
   PAGE BEHAVIOUR
   ========================================================= */

nav a {
    font-weight: bold;
    margin-left: 20px;
}

.header-inner {
    padding: 0 40px;
}

main {
    flex: 1;
    padding: 0px 40px 0px 40px;
    display: block;
    flex-wrap: wrap;
    align-items: flex-start;
}

.intro {
    max-width: 100%;
}

.intro h5 {
    padding: 0px 0px 0px 40px !important;
    margin: 10px;
}

.intro p {
    padding: 0px 0px 0px 40px !important;
}

.intro p,
.intro ul {
    padding: 20px 40px !important;
}

.background-box {
    border: 1px solid;
    border-radius: 15px;
    height: auto;
    width: auto;
    padding: 25px;
}

/* =========================================================
   BUTTON BEHAVIOUR
   ========================================================= */

.cta-button {
    position: relative;
    display: inline-block;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 35px;
    /* The border is created by the pseudo-element */
    border: 4px solid;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-1px);
}

/* Moving gradient border */
.cta-button::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 35px;
    background-size: 2000px 100%;
    animation: buttonZesty 15s linear infinite;
    z-index: -2;
}

/* White center of button */
.cta-button::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 35px;
    z-index: -1;
}

@keyframes buttonZesty {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 4000px 0;
    }
}

/* =========================================================
   FOOTER BEHAVIOUR
   ========================================================= */

/* Flex container to push footer to the bottom */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

footer {
    text-align: right;
    padding: 0px 40px;
}

/* =========================================================
   SUCCESS or ERROR MESSAGE BEHAVIOUR
   ========================================================= */

.success-message {
    font-weight: 600;
    padding: 15px 20px;
    border: 3px solid;
    border-radius: 12px;
    text-align: center;
    margin: 20px auto;
    max-width: 500px;
}

/* Error message */

.error-message {
    border: 1px solid;
    border-color: var(--color-error-border);
}

a.active {
    opacity: 0.3;
}

/* =========================================================
   ACCORDION BEHAVIOUR
   ========================================================= */

.intro-faq {
    padding: 25px;
}

.faq-accordion {
    width: 100%;
    margin-top: 25px;
}

.faq-item {
    border-top: 1px solid;
}

.faq-item:last-child {
    border-bottom: 1px solid;
}

.faq-item summary {
    position: relative;
    padding: 18px 40px 18px 5px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}

/* Remove Firefox's default marker */
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Our own arrow */
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 300;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item summary:hover {
}

.faq-answer {
    padding: 0 40px 18px 5px;
    line-height: 1.6;
}

.faq-answer p {
    margin: 0 0 12px 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   SUBMIT POST FORM
   ========================================================= */

.submit-post .post-description {
    width: 100%;
}

.submit-post form {
    width: 100%;
}

.submit-post .form-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.submit-post .form-group label {
    text-align: right;
    font-weight: 600;
}

.submit-post input,
.submit-post select,
.submit-post textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid;
    border-radius: 6px;
}

.submit-post textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-post button {
    display: block;
    margin-left: 200px;
    margin-top: 10px;
}

/* =========================================================
   MOBILE BEHAVIOUR
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       PAGE SPACING
       ----------------------------------------------------- */

    main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-inner {
        padding-left: 12px;
        padding-right: 12px;
    }

    footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .site-header {
        padding: 10px 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-content {
        align-items: center;
        text-align: center;
    }

    .site-tagline {
        font-size: 0.85rem;
    }

    nav {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    nav a {
        margin-left: 0;
    }

    /* -----------------------------------------------------
       POSTS CONTAINER
       ----------------------------------------------------- */

    .posts-container {
        width: 100%;
        max-width: none;
        margin: 20px auto;
    }

    .posts-container h3 {
        margin-bottom: 15px;
    }

    /* -----------------------------------------------------
       ZESTY POSTS
       ----------------------------------------------------- */

    .zesty-post {
        width: 100%;
        padding: 18px;
        margin-bottom: 20px;
    }

    .post-description {
        font-size: 1rem;
        line-height: 1.5;
        text-align: left;
    }

    /* -----------------------------------------------------
       POST META
       ----------------------------------------------------- */

    .post-meta {
        gap: 6px;
        margin-top: 15px;
        padding-top: 10px;
        font-size: 0.8rem;
    }

    /* -----------------------------------------------------
       SUBMIT POST FORM
       ----------------------------------------------------- */

    .submit-post .form-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 16px;
    }

    .submit-post .form-group label {
        text-align: left;
    }

    .submit-post input,
    .submit-post select,
    .submit-post textarea {
        width: 100%;
        max-width: 100%;
    }

    .submit-post textarea {
        min-height: 140px;
    }

    .submit-post button {
        margin-left: 0;
        margin-right: auto;
        margin-top: 5px;
    }

    /* -----------------------------------------------------
       SUCCESS MESSAGE
       ----------------------------------------------------- */

    .success-message {
        width: 100%;
        max-width: none;
        margin: 15px 0 20px 0;
    }

    /* -----------------------------------------------------
       FAQ
       ----------------------------------------------------- */

    .intro-faq {
        padding: 15px;
    }

    .faq-item summary {
        padding: 16px 35px 16px 0;
    }

    .faq-answer {
        padding: 0 20px 16px 0;
    }

    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    footer {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .intro p,
    .intro ul {
        padding: 15px 10px !important;
    }
}