.row.resources {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* display: grid;
    gap: 2rem;
    margin: 2rem 0; */
}

/* Responsive grid */
@media (min-width: 576px) {
    .row.resources {
        /* grid-template-columns: repeat(2, 1fr); */
    }
}

@media (min-width: 992px) {
    .row.resources {
        /* grid-template-columns: repeat(3, 1fr); */
    }
}

/* .row.resources::before {
    display: none;
} */

.row.resources .library {
    display: flex;
    flex-direction: row;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    margin: 0;
}

.row.resources .library:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.row.resources p {
    /* padding-bottom: 0; */
}

.library .library-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem;
    background: #fff;
    width: 70%;
}

.library .library-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    /* border-top: 1px solid blue; */
}

.library .library-footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.library .library-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #00833f;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Image container */
.library .library-header {
    /* position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    /* overflow: hidden;
    background: #f5f5f5; */
}

.library .library-header img {
    /* position: absolute; */
    /* top: 0;
    left: 0; */
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
}

/* Library page */
article.library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    gap: 2rem;
}


@media (min-width: 690px) {
    article.library .library-content {
        width: 75%;
        padding: 20px;
    }

    article.library .library-image {
        width: 25%;
    }
}

@media (min-width: 768px) {
    article.library {
        grid-template-columns: 1fr 2fr;
    }

    article.library .library-image {
        position: sticky;
        top: 2rem;
    }
}

article.library .library-content {
    background: #fff;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media only screen and (max-width: 690px) {
    article.library>* {
        width: 100%;
    }
}

.resources-wrapper {
    display: flex;
    gap: 20px;
}


.resources-filter ul {
    margin: 0;
}

.resources-filter li {
    text-transform: uppercase;
    list-style-type: none;
    padding: 10px;
    font-weight: bold;
}

.resources-filter li.active {
    color: #ffa400;
}

.resources-filter {
    display: flex;
    gap: 2rem;
    flex-direction: column;
    margin-bottom: 2rem;
    /* border-top: 1px solid black;
    border-bottom: 1px solid black; */
    /* justify-content: center; */
    width: 50%;
    /* border-right: blue solid 1px; */
}

.resources-filter h3 {
    text-transform: uppercase;
}

.filter-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-section li {
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border-radius: 4px;
}

.filter-section li.active {
    background-color: #007bff;
    color: white;
}

.filtered-results.loading {
    opacity: 0.5;
    position: relative;
    min-height: 200px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


.filter-section {
    margin-bottom: 1.5rem;
    /* flex: 1; */
}

.filter-section p {
    font-weight: bold;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
    text-transform: uppercase;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-direction: column;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    /* padding: 0.25rem 0.5rem; */
    border-radius: 4px;
    /* background-color: #f5f5f5; */
}

/* .checkbox-label:hover {
    background-color: #e9e9e9;
} */

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.checkbox-label span {
    font-size: 0.9rem;
}

.child-categories {
    margin-left: 20px;
}

.library-footer .nectar-button.small.regular.accent-color.has-icon.regular-button.library-download {
    background: #f4be49 !important;
}


.checkbox-group>.checkbox-label span {
    color: #000 !important;
}

article.library-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

article .library-content {
    flex: 1 1 60%;
}

article .library-image {
    flex: 1 1 35%;
    /* text-align: center; */
}

article .library-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    article.library-layout {
        flex-direction: column;
        gap: 1rem;
    }

    article .library-content,
    article .library-image {
        flex: 1 1 100%;
    }
}


.library-content .entry-header .entry-title {
  float: none !important;
}