:root {
    color-scheme: light;
    --Aksent1Color: #D9B8A3;
    --mainBackground: #EDF1F4;

    --feedWidth: 100%;
    --feedHight: 8rem;

    --featureWidth: 20rem;
    --userTextPaddingTop: 1rem;
    --mainFont: "Montserrat", "Gotham", Arial, sans-serif;
    --commentFont: "Montserrat", "Gotham", Arial, sans-serif;

    button,
    input,
    .likeBtn {
        color: #000;
    }
}

body {
    background-color: var(--mainBackground);
    margin: 0 0 0.5rem auto;
}

.rightTextBox {
    width: var(--feedWidth);
    margin-left: auto;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.skole {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 1rem;
}


nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 1rem;
}

nav li a:hover {
  background: white;
  color: #333;
}


nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 15%;
    height: 100vh;
    background-color: var(--Aksent1Color);
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.innhold {
    margin-left: 15%;
    width: 85%;
    padding: 2rem;
    box-sizing: border-box;
}

.post:nth-child(5n+2) .komment { background-color: #cfe3e8; }
.post:nth-child(5n+1) .komment { background-color: #f4d6cc; }
.post:nth-child(5n+3) .komment { background-color: #d9e8d0; }
.post:nth-child(5n+4) .komment { background-color: #e6d9ef; }
.post:nth-child(5n+5) .komment { background-color: #f7e6c4; }

.komment {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: var(--feedWidth);
    min-height: var(--feedHight);
    padding: 1rem 1.5rem;
    color: black;
    border-radius: 1rem;
}



.komment > p {
    margin: 0;
    font-size: 1.1rem;
    color: black;
    font-family: var(--commentFont);
}

.feedFeature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.kommentarForm label {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
}

.feedFeature p {
    margin: 0;
}

.person {
    display: flex;
    gap: 1.5rem; 
    font-family: var(--commentFont);
    font-weight: bold;
}

.rightTextBox h1 {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
}

.forslag {
    display: flex;
    flex-direction: column;
}

.forslag label {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin-bottom: 0.3rem;
}

.forslag input {
    border: 1px solid black;
    width: 30rem;
    padding: 10px;
}

form button {
    margin-top: 1rem;
    padding: 10px;
    border: 1px solid black;
    border-radius: 10px;
    background-color: white;
    width: 7%;
    font-size: 15px;
    font-family: var(--commentFont);
    transition: 0.4s;
}

form button:hover {
    scale: 1.05;
}

.kommentarListe ul {
    list-style: none;
}

.post.aapen .komment {
    border-radius: 1.5rem 1.5rem 0 0;
}

.kommenterBtn {
    background: none;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 0.8rem;
    font-family: var(--commentFont);
    text-align: left;
}

.kommenterBtn:hover {
    background: rgba(255, 255, 255, 0.6);
}

.commentSection {
    background: white;
    border-radius: 0 0 1rem 1rem;
    padding: 1rem 1.5rem;
    font-family: var(--commentFont);
}

.kommentarListe {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kommentarListe li {
    background: var(--mainBackground);
    padding: 0.5rem 0.8rem;
    border-radius: 0.8rem;
    font-size: 0.9rem;
}

.kommentarForm {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.kommentarForm input {
    padding: 1rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 1rem;
    font-family: var(--commentFont);
    width: 55%;
}

.kommentarForm button {
    padding: 0.6rem 1.2rem;
    border: 1px solid black;
    border-radius: 1rem;
    background: white;
    width: 40%;
}

.icon {
    display: none;
    background: none;
    border: none;
    padding: 0.75rem 1rem; 
    font-size: 1.2rem;
    color: #333;
    transition: 0.3s;
}

.forslagBtn {
    min-width: 9ch;
}

.likeBtn {
   border: 1px solid white; 
   background-color: white;
   border-radius: 5px;
}

.fa-bars span {
    visibility: hidden;
}

@media (max-width: 1100px) {
    form {
        display: flex;
    }

    form button {
        margin-left: 2rem;
        width: 5rem;
    }

    .forslag input {
        width: 20rem;
    }
}

@media (max-width: 1000px) {
    nav {
        overflow: hidden;
        position: relative;
        width: 100%;
        height: auto;
    }

    .innhold {
        margin-left: 0;
        width: 100%;
    }

    .icon {
        display: block;
    }

    #myLinks {
        display: none;
    }




}

.admin-main {
    max-width: 1100px;
}

.admin-header {
    margin: 2rem 0;
}

.admin-eyebrow {
    margin-bottom: 0.5rem;
    color: #755642;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.admin-header > p:last-child {
    max-width: 38rem;
    color: #555;
}

.admin-list {
    display: grid;
    gap: 1.25rem;
}

.admin-suggestion,
.admin-empty {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e1e4e7;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1.5rem rgb(35 45 55 / 5%);
}

.admin-suggestion h2,
.admin-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.admin-post-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-post-heading h2,
.admin-post-heading .admin-comment-author {
    margin-bottom: 0.25rem;
}

.admin-post-heading form {
    flex: 0 0 auto;
}

.admin-comments-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.admin-no-comments {
    margin: 0 0 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.admin-suggestion-text {
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem;
    background: var(--mainBackground);
    border-radius: 0.75rem;
}

.admin-comments {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-comment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e7e9eb;
    border-radius: 0.75rem;
}

.admin-comment-content {
    min-width: 0;
}

.admin-comment-author {
    margin: 0 0 0.35rem;
    color: #555;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-comment-author span {
    font-weight: 400;
}

.admin-comment-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-comment form {
    flex: 0 0 auto;
}

.admin-delete {
    width: auto;
    margin: 0;
    padding: 0.6rem 0.9rem;
    color: #8f2222;
    border: 1px solid #e3b8b8;
    background: #fff7f7;
    font-size: 0.85rem;
}

.admin-delete:hover {
    background: #ffe8e8;
}

@media (max-width: 600px) {
    .admin-comment {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    form {
        display: flex;
        flex-direction: column;
    }

    form button {
        margin-left: 0;
        width: 30%;
    }

    .forslag input {
        width: 20rem;
    }

    .komment > p {
        font-size: 0.9rem;
    }

    .rightTextBox {
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .rightTextBox h1 {
        font-size: 1.5rem
    }

    form button {
        padding: 5px;
    }
}

@media (max-width: 550px) {
   .wrapper {
     display: flex;
     min-height: 100vh;
   }
   .nav {
     width: 75px;  
     flex-shrink: 0;
   }
   .main {
     width: 80%;     
   }

    .feedFeature {
        grid-template-columns: 1fr auto auto;
        gap: 1rem;
        width: 100%;
    }



}