/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* All Companies Page */
.all-companies-page {
    padding: 5px 5px; /* Reduced padding for mobile-first */
    max-width: 100%; /* Allow full width on mobile */
    margin: 10px auto;
}

/* Company Card */
.company-card {
    display: flex;
    flex-direction: column; /* Stack image and text vertically for small screens */
    align-items: center; /* Center content */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px; /* Increase bottom margin for spacing */
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

.company-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Company Image */
.company-image {
    margin: 10px;
    flex-shrink: 0; /* Prevent shrinking of the image */
    display: flex; /* Keep the container a flex box */
    align-items: center; /* Center image vertically */
    justify-content: center; /* Center image horizontally */
}

.company-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f1f1;
}

/* Company Details */
.company-details {
    flex: 1;
    text-align: center; /* Align text to the center for readability */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center the text */
    margin-left: 15px; /* Add some space between the image and text */
}

.company-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
    line-height: 1.3;
}

.company-title a {
    text-decoration: none;
    color: #007bff;
}

.company-title a:hover {
    text-decoration: underline;
}

.short-description {
    margin-top: 8px;
    color: #555;
    font-size: 0.95em;
    line-height: 1.4;
}

/* Responsive Design for Smaller Screens (less than 480px) */
@media (max-width: 480px) {
    .company-card {
        flex-direction: column; /* Stack image and text vertically for small screens */
        align-items: center; /* Center all content */
        text-align: center; /* Center text for better readability */
        padding: 10px; /* Reduce padding for smaller screens */
    }

    .company-image {
        margin-bottom: 10px; /* Add some space between image and text */
    }

    .company-image img {
        width: 90px; /* Reduce image size on smaller screens */
        height: 90px;
    }

    .company-details {
        margin-left: 0; /* Remove left margin for smaller screens */
    }
}

/* Responsive Design for Larger Screens */
@media (min-width: 768px) {
    .all-companies-page {
        max-width: 1200px;
    }

    .company-card {
        flex-direction: row; /* Use row layout for medium and larger screens */
        align-items: center; /* Vertically center content for larger screens */
        padding: 25px;
    }

    .company-image {
        flex: 0 0 120px; /* Fixed image container size */
        margin-right: 25px; /* Add right margin for space between image and text */
        margin-bottom: 0; /* Remove bottom margin for row layout */
    }

    .company-image img {
        width: 120px;
        height: 120px;
    }

    .company-details {
        text-align: left; /* Align text to the left for better readability */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .company-title {
        font-size: 1.2em;
    }

    .short-description {
        margin-top: 8px;
        font-size: 1em;
    }
}
