/* Filterknappar för News Feed */
.aiko-filter-button {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #58ad6e;
    background-color: transparent;
    color: #58ad6e;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    font-family: "Source Sans 3", sans-serif;
    margin-right: 10px;
}

/* Inaktiv ikon för filterknappar */
.aiko-filter-button:not(.aiko-selected)::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 400; /* Regular för ej ifylld cirkel */
    content: "\f111"; /* Regular cirkel */
    margin-right: 8px;
    color: #58ad6e;
    display: inline-block;
}

/* Hover-effekt för inaktiva knappar */
.aiko-filter-button:not(.aiko-selected):hover::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* Solid för ifylld cirkel */
    content: "\f111"; /* Ifylld cirkel */
    color: #58ad6e;
}

/* Aktiv stil för filterknappar */
.aiko-filter-button.aiko-selected {
    background-color: transparent;
    color: #58ad6e;
}

.aiko-filter-button.aiko-selected::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* Solid för ifylld cirkel */
    content: "\f111"; /* Ifylld cirkel */
    color: #58ad6e;
    margin-right: 8px;
    display: inline-block;
}

/* Sökfält och clear-knapp */
.aiko-search-wrapper {
    margin: 20px 0;
    text-align: left;
    display: inline-block;
    position: relative;
    width: 300px;
}

#aiko-search-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-block;
}

#aiko-clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #999;
}

/* Gridlayout för inlägg */
.aiko-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolumner på stor skärm */
    gap: 20px;
    margin-top: 20px;
}

.aiko-post-item {
    position: relative;
    overflow: hidden;
    text-align: left;
}

.aiko-post-item img {
    width: 100%;
    height: auto;
    transition: opacity 1s, transform 1s;
}

/* Hover-effekt för bilder */
.aiko-post-item a.aiko-hover-type-zoomin:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Rubrik och utdrag för inlägg */
.aiko-post-title {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    color: black;
    margin: 10px 0;
}

.aiko-post-title a {
    text-decoration: none;
    color: black;
}

.aiko-post-title a:hover {
    text-decoration: underline;
    color: black;
}

.aiko-post-excerpt {
    font-size: 16px;
    line-height: 1.3;
    color: black;
}

.aiko-post-item .aiko-post-date {
    font-size: 13px;
    color: #8f8f8f; /* Korrigerad färg */
    font-family: "Source Sans 3", sans-serif;
    font-weight: 400 !important;
    margin-bottom: 8px;
}

/* Responsiv design */

/* Stor skärm: Original layout */
#post-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px !important; /* Avstånd mellan knappar */
}

/* Medium screens: Tre kolumner */
@media screen and (max-width: 1024px) {
    #post-filter {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Tre kolumner */
        gap: 16px; /* Mellanrum mellan knappar */
    }

    .aiko-post-grid {
        grid-template-columns: repeat(2, 1fr); /* Två kolumner för medium skärm */
    }
}

/* Small screens: Två kolumner */
@media screen and (max-width: 768px) {
    #post-filter {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Två kolumner */
        gap: 12px; /* Mellanrum mellan knappar */
    }

    .aiko-filter-button {
        font-size: 11px; /* Minska fontstorlek för små skärmar */
    }

    .aiko-post-grid {
        grid-template-columns: 1fr; /* En kolumn för small skärm */
    }
}
