body, html {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    scroll-behavior: smooth;
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-width: 100%; /* Ensure body fits within the viewport */
}

header {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    padding: 10px;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
}

.header-content .logo {
    height: 2em; /* Adjust this value to match the font size of the h1 */
    margin-right: 10px; /* Optional: Add some space between the image and the text */
}

#company_name {
    font-size: 2em; /* Ensure this matches the height of the image */
}

.menu-button {
    justify-self: start; /* Align the button to the left */
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative; /* Ensure positioning works with the menu */
    z-index: 1100; /* Ensure button stays above the menu */
}

.menu-button .bar1, .menu-button .bar2, .menu-button .bar3 {
    width: 100%;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    position: absolute;
    top: 40px; /* Position menu slightly below the button */
    right: 10px; /* Align menu to the right of the screen or button */
    width: 200px; /* Set a fixed width for the menu */
    padding: 10px; /* Add padding inside the menu */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px; /* Add rounded corners for a cleaner look */
}

.menu-item {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #000;
    width: 100%;
    text-align: center;
}

.menu-item:hover {
    background-color: #f0f0f0;
}

/* Sections */
section {
    padding: 60px 20px;
    margin-top: 50px;
    text-align: center;
}

#home {
    background-color: #34495e;
    color: white;
}

#about, #services, #quote, #contact {
    background-color: #ecf0f1;
}

h1, h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h3 {
    color: white;
    margin-bottom: 20px;
}

#services p {
    font-size: 18px;
}

/* Slideshow */
.slideshow-container {
    position: relative;
    max-width: 50vw;
    height: 100%;
    margin: auto;
    overflow: hidden;
}

.slide {
    display: none;
    height: 100%;
}

.slide img {
    width: 100%; /* Ensures the image takes the full width of the container */
    height: auto; /* Maintains the aspect ratio of the image */
    display: block; /* Removes bottom space/gap */
    max-height: 100%; /* Ensures the image does not exceed the height of the container */
}

/* Customer Feedback */
.feedback-section {
    background-color: #2c3e50;
    color: white;
    padding: 60px 20px;
    width: 100%;
}

.feedback {
    font-size: 24px;
    font-style: italic;
    margin: 0 auto;
    max-width: 800px;
}

/* Services Section */
.services-section {
    padding: 40px 20px;
    text-align: center;
}

.services-section h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.service-card {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    overflow: hidden; /* Hide any overflow content */
    word-wrap: break-word; /* Break long words to fit within the card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Ensure the card takes full width on mobile */
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.service-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.service-card .service-title {
    padding: 10px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
    /* text-align: center; */
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Show ellipsis for overflow text */
    white-space: nowrap; /* Prevent line break */
}

.service-card .service-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px; /* Keep existing padding for top and bottom */
}

/* Show the hover text on hover or click */
.service-card:hover .service-hover,
.service-card.clicked .service-hover {
    opacity: 1; /* Show on hover or when clicked */
}

.service-card.clicked {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Updated styles for the View More link */
.view-more {
    color: #f1c40f; /* Bright yellow color for visibility */
    text-decoration: underline; /* Underline for links */
}

.view-more:hover {
    color: #e67e22; /* Change to a darker shade on hover */
}

.service-hover p {
    font-size: 0.9rem; /* Adjust the size as needed */
    line-height: 1.5;
    max-height: 60px; /* Limit height to prevent overflow */
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Show ellipsis for overflow text */
    display: -webkit-box; /* Required for multi-line ellipsis */
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical; /* Required for Firefox */
    margin: 0; /* Remove default margin */
    padding: 10px 10px 10px 0; /* Add padding for top, bottom, and right, but none for left */
    overflow-wrap: break-word; /* Break long words to fit within the card */
    word-break: break-word; /* Ensure long words break to the next line */
    max-width: 90%; /* Ensure text wraps before reaching the full width of the card */
    text-align: left; /* Ensure text is aligned to the left */
}

@media (max-width: 768px) {
    .service-card img {
        height: 120px;
    }

    .service-card .service-title {
        font-size: 1rem;
    }

    .service-hover p {
        font-size: 0.9rem; /* Adjust the size as needed */
        line-height: 1.5;
        max-height: 60px; /* Limit height to prevent overflow */
        overflow: hidden; /* Prevent overflow */
        text-overflow: ellipsis; /* Show ellipsis for overflow text */
        display: -webkit-box; /* Required for multi-line ellipsis */
        -webkit-line-clamp: 3; /* Limit to 3 lines */
        -webkit-box-orient: vertical; /* Required for Firefox */
        margin: 0; /* Remove default margin */
        padding: 10px 10px 10px 0; /* Add padding for top, bottom, and right, but none for left */
        overflow-wrap: break-word; /* Break long words to fit within the card */
        word-break: break-word; /* Ensure long words break to the next line */
        max-width: 90%; /* Ensure text wraps before reaching the full width of the card */
        text-align: left; /* Ensure text is aligned to the left */
    }
}

/* Why choose us */
.why-choose-section {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
    text-align: center;
}
.why-choose-section h2 {
    margin-bottom: 20px;
}
.why-choose-us-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    justify-content: center; /* Center the items */
}
.why-choose-us-item i {
    font-size: 24px; /* Icon size */
    margin-right: 10px;
    color: #2980b9; /* Icon color */
}

.why-choose-us-item div {
    text-align: left; /* Keep text left aligned while the container is centered */
}

/* Contact Form */
form {
    display: flex;
    flex-direction: column;
    max-width: 100%; /* Ensure the form does not exceed the viewport */
    margin: 20px auto;
    padding: 0 10px; /* Add some padding */
}

form input, form textarea, form button {
    margin: 10px 0;
    padding: 10px;
    font-size: 16px;
    width: 100%; /* Full width */
    box-sizing: border-box; /* Include padding in width */
}

form textarea {
    resize: vertical; /* Allow vertical resizing only */
}

iframe {
    pointer-events: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
}

footer p a {
    color: #4fbb74; /* Change default link color */
    text-decoration: none; /* Optional: Remove underline */
}

footer p a:hover {
    color: #3498db; /* Change default link color */
}