:root {
    --primary-color: #0073aa;
    --secondary-color: #005177;
    --background-color: #f8f8f8;
    --border-radius: 8px;
}

.entry-header img {
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.tag-container {
    margin-bottom: 90px;
    text-align: center;
}

#tag-filter {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#tag-filter:hover,
#tag-filter:focus,
#training-search:hover,
#training-search:focus {
    border-color: #888;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

#material-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-width: 1080px;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    justify-items: center;   
}

.material-card {
    display: flex;
    overflow: hidden;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 600px;
    max-height: 300px;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    transition: transform 0.1s ease-out;
    text-decoration: none;
    border: 1px solid #000;
}

.material-card:hover {
    transform: translateY(-10px);
    transition: 0.3s ease-in-out;

    & .card-title-container {

        padding: 100% 0;
        transition: 0.3s ease;
    }

}

.material-card .entry-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #252525;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    width: 100%;
    min-height: inherit;
    min-width: inherit;
    overflow: hidden;
    object-fit: cover;
    object-position: center;
    position: relative;
}

.material-card .card-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 200;

    color: white;
    padding: 1rem;
    width: 100%;
    text-align: center;

}

.card-title-container {

    position: absolute;
    display: flex;
    align-items: center;
    max-width: 100%;
    z-index: 1;
    text-align: left;
    justify-content: center;
    background-color: rgb(0 0 0 / 50%);
    width: 100%;



}
/* Content area of the card */
.material-card .card-content {
    flex: 1;
    width: 100%;
    min-width: 490px;
    min-height: 300px;
}


/* Links in the content */
.material-card .card-content a {
    color: #0073e6;
    text-decoration: none;
    font-weight: bold;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 5px;
}

/* Footer of the card */
.material-card .entry-footer {
    padding: 5px;
    justify-content: center;
    max-height: 75px;
    background-color: #f8f8f8;
    border-top: 1px solid #eaeaea;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.material-card .card-tags {
    max-height: 85px;
    margin-top: 0;
}

.material-card .card-tags a {
    text-decoration: none;
    color: #0073e6;
    background-color: #f0f0f0;
    padding: 3px 7px;
    border-radius: 5px;
}

.modal-description-training{
    align-self: unset !important;
}

.modal-date {
    display: none;
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: small;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 5px;
}


.modal-contact.entry-header {
    background-color: var(--background-color);
    border-bottom: 1px solid #eaeaea;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    height: 110px;
    overflow: hidden;
    object-fit: cover;
    object-position: center;
}

.modal-content h2{
    font-family: 'inter';
    font-weight: 200;
    z-index: 1;
    position: absolute;

    top: 5vh;
    left: 20px;
    right: 20px;
    padding: 20px;

    background-color: rgba(255, 255, 255, 0.59);
    border-radius: 7px;
    text-align: left;

}

/* Modal Description */
.modal-content .modal-description {
    background-color: #ffffff;
    padding: 0 20px;
    max-height: 100%;
    overflow-y: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    word-break: break-word;
}

.modal-content .modal-authors, .modal-investors{
    margin-top: 10px;
    width: -moz-fit-content;
    width: fit-content;
    padding: 5px;
    background-color: lightslategrey;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 24px;
}

.modal-content .modal-contact{
    width: -moz-fit-content;
    width: fit-content;
    padding: 5px;
    background-color: lightslategrey;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 24px;
}

.modal-content img {
    width: 100%;
    height: 100%;
   object-fit: cover;
   object-position: center;
   overflow: hidden;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.skeleton-card {
    background: #0000005e;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    min-width: 450px;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.skeleton-image {
    height: 200px;
    background: #1f1f1f5d;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}


/* ========== Empty State Message ========== */
.no-results-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    grid-column: 1 / -1;
}

.empty-state {
    text-align: center;
    padding: 40px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #ccc;
    max-width: 400px;
}

.empty-state p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.empty-state p:first-child {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.empty-state-hint {
    color: #666;
    font-size: 14px;
}


@media (max-width: 1200px){
    #material-container {
        min-width: 800px;
        max-width: 100%;
        min-height: 700px;
        grid-template-columns: repeat(auto-fit, minmax(400px, 2fr));

    }
}

@media (max-width: 980px){
    #material-container {
        min-width: 600px;
        min-height: 700px;
        grid-template-columns: repeat(auto-fit, minmax(320px, 2fr));

    }
}

@media (max-width: 780px){
    #material-container {
        min-width: 400px;
        min-height: 700px;
        grid-template-columns: repeat(auto-fit, minmax(250px, 2fr));
    }

}

@media (max-width: 480px){
    #material-container {
        min-width: 300px;
        min-height: 400px;
        grid-template-columns: repeat(auto-fill, minmax(200px, 2fr));
    }

}
