.url {
    text-decoration: underline;
}

.resource-container {
    display: flex;
}

.resource-wrapper {
    display: flex;
    flex-direction: column;
    width: 25%;
}

.resource-info-box, .resource-back {
    position: relative;
    text-align: center;
    background-color: #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
    margin-right: 20px;
}

.resource-back {
    margin-bottom: 20px;
    cursor: pointer;
}

.resource-box {
    position: relative;
    text-align: center;
    background-color: #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
    width: 75%;
    height: auto;
}

.user-info-box {
    text-align: center;
    justify-content: center;
}

.insert-content {
    margin-top: 20px;
    text-align: center;
}

.resource-info-box .resource-image {
    position: relative;
    text-align: center;
    background-color: #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: -15px;
    width: 100%;
    height: auto;
}

button {
    background-color: #161616;
    color: #FFF;
    padding: 10px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 0.5px solid black;
}

.login-container {
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
    text-align: right;
    width: 100%;
    margin: 0 auto;
}



.banner {
    position: relative;
    text-align: center;
    background-color: #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
}

.banner-image {
    vertical-align: middle;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    border: 0.5px solid black;
}

.search-bar {
    margin: 20px;
    /* Add margin to create space between the image and search bar */
    width: 80%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: center;
}

.resource-item {
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    /* Use flexbox for consistent alignment */
    flex-direction: column;
    /* Stack image and details vertically */
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Add transition for opacity and transform */
    opacity: 1;
    /* Initial opacity */

    background-color: #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

.resource-item.removing {
    opacity: 0;
    /* Fade out items */
    transform: scale(0.9);
    /* Shrink items */
}

@keyframes add-animation {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fadeOut {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.fadeIn {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.resource-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.single-item .resource-item {
    max-width: 400px;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-image {
    width: 100%;
    border-radius: 10px;
    background-color: white;
}

.resource-details {
    padding: 10px;
    flex-grow: 1;
    /* Allow details to expand to fill remaining space */
}

.resource-title {
    font-weight: bold;
    margin-bottom: 5px;
    /* Add margin bottom for spacing */
}

.description {
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 100px;
    transition: max-height 0.5s ease;
    /* Add transition for smooth dropdown */
}

.description.expanded {
    -webkit-line-clamp: initial;
    max-height: 1000px;
    /* Set a large value to ensure it expands fully */
}

.more-details {
    cursor: pointer;
    color: blue;
}

.arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
    /* Add transition for arrow rotation */
}

.resource-item.expanded {
    margin-bottom: 20px;
    /* Adjust margin to push down rows */
}

.more-details.expanded .arrow {
    transform: rotate(180deg);
    /* Rotate arrow when details expanded */
}

a {
    color: inherit;
}