/* Projects Custom Post Type Styling */

/* taxonomy-project_category.php */
.projects-list .category-title {
    margin-bottom: 40px;
}

.projects-list .project-col {
    margin-bottom: 30px;
}

.projects-list .project-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.projects-list .project-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.projects-list .project-card-img {
    width: 100%;
    height: 250px;
    border-radius: 4px;
    margin-bottom: 15px;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.projects-list .project-card-no-img {
    width: 100%;
    height: 250px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 4px;
    color: #888;
}

.projects-list .project-card-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.projects-list .project-card-title a {
    color: #000e1b;
}

.projects-list .project-card-excerpt {
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pushes the read more button to the bottom */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-list .project-card .readmore {
    align-self: flex-start;
    margin-top: auto;
    /* Aligns button to the bottom */
}

/* single-projects.php */
.project-single .right-blog {
    position: relative;
}

.project-single .back-to-projects {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f4f7fa;
    color: #0155A2;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ef;
    position: absolute;
    top: -12px;
    right: 0;
}

.project-single .back-to-projects::before {
    content: "\f060";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.project-single .back-to-projects:hover {
    background-color: #0155A2;
    color: #fff;
    border-color: #0155A2;
}

.project-single .back-to-projects:hover::before {
    transform: translateX(-5px);
}

.project-single .partner {
    font-weight: bold;
    margin-bottom: 20px;
    padding: 0;
}

.project-single .project-details {
    margin-top: 40px;
}

.project-single .project-characteristics-list {
    list-style: none;
    padding-left: 0;
}

.project-single .project-characteristics-list li {
    margin-bottom: 10px;
}

.project-single .download-pdf-btn {
    margin-bottom: 30px;
    display: inline-block;
}

.project-single .related-products-list {
    list-style: none;
    padding-left: 0;
}

.project-single .related-products-list li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f4f8;
    padding-bottom: 15px;
    transition: all 0.3s ease;
}

.project-single .related-products-list li:hover {
    padding-left: 5px;
    border-color: #0155A2;
}

.project-single .related-products-list li a {
    color: #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}

.project-single .related-products-list li a::after {
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #0155A2;
    transition: 0.3s;
}

.project-single .related-products-list li a:hover {
    color: #0155A2;
}

.project-single .related-products-list li a:hover::after {
    transform: translateX(5px);
}

.project-single .application-images-title {
    margin-top: 30px;
    margin-bottom: 15px;
}

.project-single .project-slider {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-single .project-slider a {
    flex: 0 0 calc(50% - 7.5px);
    overflow: hidden;
    border-radius: 8px;
    display: block;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.project-single .project-slider a::after {
    content: "\f00e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #fff;
    font-size: 20px;
    background: rgba(1, 85, 162, 0.85);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.project-single .project-slider a:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.project-single .project-slider img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease;
    display: block;
}

.project-single .project-slider a:hover img {
    transform: scale(1.08);
}

/* Responsive Styling for Projects */
@media (max-width: 991px) {
    .project-single .right-blog {
        margin-top: 40px;
    }
}

@media (max-width: 767px) {
    .projects-list .category-title {
        margin-bottom: 25px;
        font-size: 28px;
    }

    .projects-list .project-card {
        padding: 10px;
    }

    .project-single .project-slider {
        flex-direction: column;
        gap: 15px;
    }

    .project-single .project-slider a {
        flex: 0 0 100%;
    }
}

/* WYSIWYG Styling for Instruments */
.project-single .instruments-wysiwyg {
    display: block;
    margin-top: 5px;
}

.project-single .instruments-content {
    margin-top: 5px;
    padding-left: 15px;
    /* Indent the content slightly */
}

.project-single .instruments-content ul {
    list-style-type: disc;
    margin-bottom: 15px;
    padding: 0;
    flex-wrap: wrap;
    display: flex;
    gap: 10px;
}

.project-single .instruments-content ul li {
    margin-bottom: 5px;
    flex: 0 0 calc(33% - 5px);
}

.project-single .instruments-content ul li a {
    color: #0155A2;
    /* Adjust to match your theme link colors */
    text-decoration: underline;
}

.project-single .instruments-content ul li a:hover {
    text-decoration: none;
}

/* Beautiful Download PDF UI inspired by MBConfig Software Page */
.mbconfig-software-right-item {
    background: #fcfdfe;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f0f4f8;
    transition: 0.3s;
}

.pdf-download-card {
    margin-bottom: 30px;
}

.project-categories {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.project-categories a {
    color: #0155A2;
}

.mbconfig-software-right-item:hover {
    box-shadow: 0 5px 20px rgba(1, 85, 162, 0.05);
    border-color: #e1e8ef;
}

.download-entry {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none !important;
}

.download-icon-circle {
    width: 50px;
    height: 50px;
    border: 1.5px solid #0155A2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0155A2;
    font-size: 20px;
    flex-shrink: 0;
    background: #fff;
    transition: 0.3s;
}

.download-entry:hover .download-icon-circle {
    background: #0155A2;
    color: #fff;
}

.download-text {
    display: flex;
    flex-direction: column;
}

.download-title {
    font-size: 18px;
    color: #0155A2;
    font-weight: 500;
    line-height: 1.2;
}

.download-size {
    font-size: 14px;
    color: #555;
    margin-top: 2px;
}