.card {
    width: 300px; /* Increase card width */
    height: 300px; /* Increase card height */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    top: -90px;
    margin-top: 0px;
    margin-bottom: 20px;
    max-height: 750px;
    padding: 20px; /* Increase padding for better spacing */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    margin-bottom: 15px; /* Add spacing between rows of cards */
    overflow: hidden; /* Prevent content overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    white-space: nowrap; /* Prevent text wrapping */
}

.card-photo {
    width: 100%; /* Ensure photo fits the card width */
    height: 150px; /* Adjust photo height */
    object-fit: cover; /* Maintain aspect ratio and crop if necessary */
    border-radius: 4px;
    margin-bottom: 15px; /* Add spacing below the photo */
    background-color: #f0f0f0; /* Add a placeholder background color */
    display: flex; /* Ensure consistent size */
    align-items: center; /* Center placeholder content vertically */
    justify-content: center; /* Center placeholder content horizontally */
}

.card-content {
    text-align: left; /* Align text to the left */
}

.card-title {
    font-size: 20px; /* Increase title font size */
    font-weight: bold;
    margin-bottom: 10px;
}

.card-snippet {
    font-size: 16px; /* Increase snippet font size */
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.btn-more {
    padding: 10px 15px; /* Increase button size */
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: center; /* Center the button horizontally */
}

.btn-more:hover {
    background-color: #0056b3;
}

#cardContainer {
    display: grid; /* Use grid layout */
    grid-template-columns: repeat(
        auto-fit,
        minmax(300px, 1fr)
    ); /* Responsive columns */
    gap: 20px; /* Add spacing between items */
    margin-top: -90px; /* Move container upwards */
    padding: 10px; /* Add padding for better spacing */
}

.companyImageContainer {
    position: relative;
    margin-bottom: 10px; /* Add spacing below the image */
}

.edit-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background-color: rgba(255, 178, 0, 0.7); /* warna orange, transparansi 70% */
    padding: 8px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    opacity: 1;
    display: block;
    backdrop-filter: blur(2px); /* efek blur latar belakang dikit, elegan */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* bayangan halus */
    transition: background-color 0.3s, transform 0.3s;
}

.edit-icon:hover {
    background-color: rgba(255, 178, 0, 0.9); /* saat hover, lebih solid */
    transform: scale(1.1); /* saat hover, sedikit membesar */
}

.companyCard {
    height: 350px; /* Fixed height for all company cards */
    box-shadow: 0 5px 10px 0.3px rgb(231, 231, 231);
    margin: 0; /* Remove unnecessary margins */
    border-radius: 10px;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden; /* Prevent content overflow */
    display: flex; /* Ensure consistent layout */
    flex-direction: column; /* Align content vertically */
    justify-content: flex-start; /* Align content to the top */
}

.companyCard:hover {
    box-shadow: 0 10px 20px 0.3px rgb(207, 207, 207);
    transform: scale(1.01) translateY(-5px); /* Slightly enlarge on hover */
    cursor: pointer;
}

.companyImage {
    width: 100%;
    height: 150px; /* Maintain consistent height */
    border-radius: 10px 10px 0 0;
    object-fit: cover;
    background-color: #f0f0f0; /* Placeholder background color */
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 768px) {
    #cardContainer {
        grid-template-columns: repeat(
            1,
            1fr
        ); /* One card per row on small screens */
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    #cardContainer {
        grid-template-columns: repeat(
            2,
            1fr
        ); /* Two cards per row on medium screens */
    }
}

@media screen and (min-width: 1024px) and (max-width: 1280px) {
    #cardContainer {
        grid-template-columns: repeat(
            3,
            1fr
        ); /* Three cards per row on large screens */
    }
}

@media screen and (min-width: 1280px) and (max-width: 1440px) {
    #cardContainer {
        grid-template-columns: repeat(
            3,
            1fr
        ); /* Three cards per row on extra-large screens */
    }
}

@media screen and (min-width: 1440px) {
    #cardContainer {
        grid-template-columns: repeat(
            4,
            1fr
        ); /* Four cards per row on ultra-wide screens */
    }
}

.companyTitle {
    text-align: left; /* Align title to the left */
    font-weight: bold;
    margin-top: 0; /* Remove unnecessary top margin */
    margin-bottom: 5px; /* Add small spacing below the title */
    border: none; /* Remove any separator line */
    margin-left: 2%;
}

.companyDesk {
    margin-left: 0; /* Remove left margin */
    margin-right: 0; /* Remove right margin */
    text-align: left; /* Align description to the left */
    overflow: hidden; /* Prevent overflow for descriptions */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    display: -webkit-box; /* Use webkit box for multiline ellipsis */
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical; /* Set box orientation to vertical */
    margin: 0; /* Remove all margins */
    margin-left: 2%;
}

.readMoreBtn {
    display: block;
    margin: 10px auto;
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.readMoreBtn:hover {
    background-color: #0056b3;
}
