/* Resets some basic elements for consistent styling */
*, *::before, *::after {
    box-sizing: border-box;
}

body, h1, h2, h3, p {
    margin: 0;
    padding: 0;
}

/* Styles for the header */
.page-header {
    background-color: #fff; /* Change as needed */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 20px;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none; /* Removes underline */
    color: inherit; /* Keeps the text color the same as its surroundings, or you can set a specific color */
    display: flex; /* To align items if needed, depending on your design */
    align-items: center; /* Centers items vertically */
}

.logo {
    width: 50px; /* Adjust based on your actual logo size */
    height: auto;
    margin-right: 10px;
}

.company-name {
    font-size: 24px;
    font-weight: bold;
    color: #333; /* Change as needed */
}

.button {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.navigation {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.navigation .button {
    margin-right: 10px; /* Space between navigation buttons */
    margin-bottom: 10px; /* Space between rows of buttons */
}

.contact-us {
    font-weight: bold;
}

/* Modal, contact us start */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px; /* Maximum width */
}

/* The Close Button */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
/* Modal, contact us end */

/* Contact us grid start */
.hours-info .grid {
    display: grid;
    grid-template-columns: auto auto auto;
    margin-left: 20px; /* Adjust as needed */
    gap: 10px 20px; /* Row gap then column gap */
}

.hours-info .grid span:first-child {
    grid-column: 1 / span 3; /* Span the first item across all columns for alignment */
}
/* Contact us grid end */

/* Main page box grid styling */
/* Grid container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

/* Topic boxes */
.topic-box {
    border-radius: 10px;
    padding: 20px;
    color: rgb(0, 0, 0);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer; /* Indicates the box is clickable */
    height: 100%; /* Set a fixed height or make it responsive */
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background for text visibility */
    z-index: 2; /* Ensures the text is above the background image */
}

.topic-box h2 {
    margin-top: 0;
}

.topic-box .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    opacity: 0.3;
}

/* Close button for modal */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Media queries for mobile responsiveness */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr; /* Single column layout */
        padding: 10px;
    }

    .navigation {
        flex-direction: column;
        align-items: flex-start;
    }

    .navigation .button {
        margin-bottom: 10px; /* Space between rows of buttons */
    }

    .logo {
        width: 40px; /* Adjust logo size for smaller screens */
    }

    .company-name {
        font-size: 20px; /* Adjust font size for smaller screens */
    }

    .top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .button {
        padding: 8px 16px; /* Adjust padding for smaller screens */
    }

    .modal-content {
        width: 90%; /* Adjust modal width for smaller screens */
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 10px;
        padding: 10px;
    }

    .button {
        padding: 6px 12px; /* Further adjust padding for smaller screens */
    }

    .topic-box {
        padding: 15px;
    }
}
