/* Basic styling for the company sections */
.company-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.company-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 40px;
    justify-items: center; /* Center items in the grid */
}

.company-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Take full width of grid column */
    max-width: 500px; /* Max width for larger screens */
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.company-card img {
    width: 100%;
    height: 300px; /* Increased height for images */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.company-card .card-content {
    padding: 25px; /* Padding for the content area */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to take available space */
}

.company-card h3 {
    font-size: 2em;
    color: #222;
    margin-bottom: 15px; /* Adjusted margin */
}

.company-card p {
    font-size: 1.05em;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px; /* Adjusted margin */
    flex-grow: 1; /* Allow paragraph to take available space */
}

.company-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #a52a2a;
    color: #fff;
    height: 44px; /* Fixed height for exact vertical centering */
    padding: 0 30px; /* Horizontal padding only */
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif; /* Use Latin font for buttons */
    font-size: 0.95rem;
    margin-top: auto; /* Push button to the bottom */
    align-self: flex-start; /* Align button to the left */
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
    line-height: 1; /* Ensure vertical centering across fonts */
    transform: translateY(-1px); /* Optical centering tweak */
}

.company-card .btn:hover {
    background-color: #8b0000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
    }
    .company-section .container {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
}

.hero {
    background-image: url('https://waronwant.org/sites/default/files/2023-07/5.5%20%28iStock%29.jpg'); /* Example background image */
    background-size: cover;
    background-position: center;
    color: #fff; /* White text for better contrast */
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 4em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 1.5em;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Responsive hero text sizing for portrait/mobile */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.2em; }
    .hero p { font-size: 1.05rem; line-height: 1.6; }
}

@media (max-width: 480px) {
    .hero h2 { font-size: 1.8em; }
    .hero p { font-size: 0.98rem; line-height: 1.55; }
}
