body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

section, header, footer {
    width: 100%; 
    overflow-x: hidden; 
}

header {
    background-color: #f4f4f4;
    color: black;
    padding: 1rem;
    text-align: center;
}

header nav {
    display: flex;
    align-items: center; 
    justify-content: space-between; 
    padding: 1rem;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    list-style: none;
}

header nav ul li {
    margin: 0 10px;
}

header nav ul li a {
    text-decoration: none;
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #ddd;
}

header nav ul li.active a {
    background-color: #333;
    color: white;
}

header nav ul li.active a:hover {
    background-color: #555;
}

header nav ul li a.active {
    background-color: #333;
    color: white;
}

header nav ul li a.active:hover {
    background-color: #555;
}

main {
    padding: 1rem;
    /* display: flex; */
    justify-content: center;
    align-items: center; 
    min-height: 80vh; 
}

main h2 {
    text-align: center;
    padding-bottom: 10px;
    padding-top: 10px;
}

main p {
    text-align: center;
    padding-bottom: 10px;
    padding-top: 0px;
}

.logo {
    margin-right: auto;
}

.logo img {
    height: 50px; 
    width: auto; 
    object-fit: contain; 
}

section { 
    margin: 0 auto; /* Center the content */
    margin-bottom: 2rem; /* Add margin at the bottom of each section */
    max-width: 900px; /* Set a maximum width for the content */
    width: 100%; /* Ensure the content takes up the full width */
    /* padding: 2rem; Add padding to the content */
    padding: 2rem 1rem;
    /*background-color: #f9f9f9; /* Add a background color */
    border-radius: 8px; /*Add rounded corners */
}

footer {
    background-color: #f4f4f4;
    color: black;
    text-align: center;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

footer a {
    color: black;
}

.footer-row > div {
    padding: 0; 
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    flex-wrap: wrap;
    padding: 0 3rem; 
    gap: 10px; 
    margin: 0 auto;
    max-width: 900px; 
    align-items: flex-start;
}

.footer-about, .footer-contact, .footer-services, .footer-qlinks {
    max-width: 30%;
    margin-bottom: 0.5rem; /* Reduce margin between sections */
}


.footer-about h2, .footer-contact h2, .footer-services h2, .footer-qlinks h2 {
    margin-bottom: 0.5rem;
    min-height: 2rem;
    text-align: left;
}

.footer-qlinks ul {
    list-style-type: none;
    padding: 0;
    text-align: left; /* Align text to the left */
}

.footer-qlinks ul li {
    display: block;
    margin: 0.5rem 0;
}

.footer-qlinks ul li a {
    color: black;
    text-decoration: none;
}

.footer-contact a {
    color: black;
    text-decoration: none;
}

.footer-contact p {
    text-align: left; 
    margin: 0; 
}

.footer-services ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
    margin: 0; 
}

.footer-services ul li {
    margin: 0.5rem 0;
}

.footer-services ul li a {
    text-decoration: none;
}

.footer-about p {
    text-align: left;
}

.social-media {
    margin-top: 1rem;
    text-align: left; /* Align social media icons to the left */
}

.social-media a {
    color: black;
    margin: 0 0.5rem;
    text-decoration: none;
    font-size: 1.5rem;
}

.social-media a:hover {
    color: #ddd;
}

h1 {
    margin: 0;
}

.container {
    padding: 20px;
}

/* <------portfolio starts here------>  */

#portfolio {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.image-gallery {
    display: flex;
    flex-wrap: wrap; /* Allow images to wrap to the next line */
    justify-content: center; /* Center the images */
    gap: 20px; /* Add spacing between images */
    overflow-x: hidden;
    max-width: 100%; 
}

.image-container {
    text-align: center; /* Center content inside each container */
    position: relative;
}

.image-gallery img {
    width: 100%; /* Make the image fill its container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Add rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
}

.image-gallery .image-container img[src="images/web-22.jpg"] {
    width: auto; /* Reduce the width to 50% of its container */
    height: 300px; /* Maintain aspect ratio */
    margin: 0 auto; /* Center the image if needed */
    display: block; /* Ensure proper centering */
}

.image-gallery .image-container img[src="images/hs_main.jpg"] {
    height: 300px; 
    width: auto; /* Adjust the width automatically */
    display: block; /* Ensure proper centering */
    margin: 0 auto; /* Center the image if needed */
}

.image-gallery img:hover {
    transform: scale(1.05); /* Slightly enlarge the image on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Enhance shadow on hover */
}

.overlay {
    position: absolute; /* Position the overlay over the image */
    top: 0;
    left: 0;
    width: 100%; /* Cover the entire image */
    height: 100%; /* Cover the entire image */
    background-color: rgba(0, 0, 0, 0.5); /* Add a semi-transparent black background */
    color: #fff; /* Set text color to white */
    display: flex; /* Use flexbox to center the text */
    justify-content: center; /* Center text horizontally */
    align-items: center; /* Center text vertically */
    opacity: 0; /* Hide the overlay by default */
    transition: opacity 0.3s ease; /* Smooth transition for hover effect */
    font-size: 1.2rem; /* Adjust text size */
    border-radius: 8px; /* Match the image's rounded corners */
}

.image-container:hover .overlay {
    opacity: 1; /* Show the overlay on hover */
}

/* portfolio ends */

.portrait {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.portrait-item {
    box-sizing: border-box;
}

.portrait-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.hamburger {
    display: none; /* Hide by default */
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

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

footer p {
    margin: 1rem 0 0; /* Add margin to the top and remove margin from the bottom */
}

footer p a {
    color: black;
    text-decoration: none;
}

footer p a:hover {
    text-decoration: underline;
}

/* About Me Styles */
#about-me {
    display: flex;
    align-items: flex-start;
    justify-content: center; /* Center align the content */
    padding: 1rem 2rem; /* Add padding to move content away from the edge */ 
    margin-top: 4rem;
    flex-wrap: wrap; 
}

#about-me div {
    width: 50%; /* Set the width of the paragraph container to 50% */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center the content vertically */
    text-align: left;
}

#about-me img {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    margin-left: 2rem; /* Add margin to the left of the image */
    object-fit: cover; /* Ensure the image covers the container */
}

#about-me p {
    text-align: left; /* Align text to the left */
    margin-bottom: 1rem; /* Add margin below paragraphs */
    margin-top: auto;
}

/* Terms of Service Styles */
#terms-of-service {
    max-width: 800px; /* Set a maximum width for the content */
    width: 100%; /* Ensure the content takes up the full width */
    padding: 2rem; /* Add padding to the content */
    margin: 0 auto; /* Center the content */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#terms-of-service p {
    font-size: 1rem; /* Adjust font size */
    line-height: 1.6; /* Improve readability */
    color: #555; /* Set text color */
    margin-bottom: 0.1rem;
    margin-top: 1rem;
    text-align: left;
}   
#terms-of-service h3 {
    font-size: 1.5rem; /* Adjust heading size */
    color: #333; /* Set heading color */
    margin-top: 0; /* Add spacing above the heading */
    margin-bottom: 0; 
}   

/* Contact Page Styles */
#contact {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 0;
}

#contact h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#contact p {
    text-align: center; /* Center align the paragraph */
    margin-bottom: 1rem;
}

#contact form {
    display: flex;
    flex-direction: column;
    width: 70%; /* Set the width of the form to 70% */
    margin: 0 auto; /* Center the form */
    margin-top: 0; 
}

#contact label {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

#contact input,
#contact select,
#contact textarea {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem; /* Increase font size for better readability */
}

#contact select {
    font-size: 1rem; /* Increase font size for the select element */
}

#contact option {
    font-size: 1rem; /* Increase font size for the options */
}

#contact button {
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

#contact button:hover {
    background-color: #555;
}

.contact-details {
    margin-top: 2rem;
    text-align: center;
}

.contact-details p {
    margin: 0.5rem 0;
}

.contact-intro {
    text-align: center; 
    padding: 1rem; 
    max-width: 600px; 
    color: #555; 
    line-height: 1.6; 
    margin-bottom: 0;
}

/* Navigation buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: black;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.services {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.service-items {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    overflow-x: hidden;
    max-width: 100%;
}

.service-items .service-item img[src="images/hs_main.jpg"] {
    height: 300px;
    width: auto; /* Adjust the width automatically */
    object-fit: cover; /* Ensure the image covers the container while maintaining aspect ratio */
    display: block; /* Ensure proper centering */
    margin: 0 auto; /* Center the image if needed */
    flex-shrink: 0;
    margin-left: 4rem;
}

.service-items .service-item img[src="images/web-22.jpg"] {
    width: auto; /* Reduce the width to 50% of its container */
    height: 300px; /* Maintain aspect ratio */
    margin: 0 auto; /* Center the image if needed */
    display: block; /* Ensure proper centering */
    margin-right: 4rem;
}

.service-description {
    flex: 1;
    text-align: left;
    margin-left: 4rem;
}

.service-description h2 {
    text-align: left; /* Ensure both h2 and p are aligned to the left */
    margin-left: 0; /* Remove any extra left margin */
    margin-bottom: 0.1rem;
}

.service-description2 h2 {
    text-align: left; /* Ensure both h2 and p are aligned to the left */
    margin-left: 0; /* Remove any extra left margin */
    margin-bottom: 0.1rem;
}

.service-description p {
    text-align: left; /* Ensure both h2 and p are aligned to the left */
    margin-left: 0; /* Remove any extra left margin */
    margin-top: 0;
    margin-bottom: 0.2rem
}

.service-description2 p {
    text-align: left; /* Ensure both h2 and p are aligned to the left */
    margin-left: 0; /* Remove any extra left margin */
    margin-top: 0;
    margin-bottom: 0.2rem
}

.service-description2 ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 0;
    text-align: left;
}

.service-description ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 0;
    text-align: left;
}

.service-description button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.service-description button:hover {
    background-color: #555;
}

.service-item button {
    font-size: 1.2rem; /* Increase font size */
    padding: 10px 20px; /* Increase padding */
    background-color: #333; /* Button background color */
    color: white; /* Button text color */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    margin-top: 10px; /* Add some margin on top */
    display: block; /* Make button a block element */
    text-align: left; /* Align text to the left */
}

.service-item button:hover {
    background-color: #555; /* Darker background on hover */
}


.carousel {
    width: 100%;
    padding-top: 1rem;
}

.carousel-item {
    padding: 0;
    margin: 0;
}

.carousel-item img {
    display: block;
    object-fit: cover;
    height: 450px;
    max-width: 100%; /* Set a maximum width for the images */
}

.centered-heading {
    text-align: center;
}

.headshot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.headshot-item {
    flex: 1 1 calc(25% - 20px); /* Adjust the width of the items */
    box-sizing: border-box;
    margin-bottom: 20px;
}

.headshot-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.headshot-item img:hover {
    transform: scale(1.05);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    flex: 1 1 calc(33.33% - 20px); /* Set the width to one-third of the container, minus the gap */
    box-sizing: border-box;
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%; /* Ensure the image takes up the full width of the container */
    height: auto; /* Maintain the original height */
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Call to Action Section */
.call-to-action {
    text-align: center;
    background-color: #f4f4f4;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-radius: 8px;
}

.call-to-action h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 0;
    padding-top: 5px;
}

.call-to-action p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
    color: #555;

}

.call-to-action .cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.call-to-action .cta-button:hover {
    background-color: #555;
}

/* Check My Work Section */
.check-my-work {
    text-align: center;
    background-color: #f4f4f4;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-radius: 8px;
}

.check-my-work h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 0px;
    color: #333;
}

.check-my-work p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.check-my-work .cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.check-my-work .cta-button:hover {
    background-color: #555;
}

/* Welcome Section */
.welcome {
    text-align: center;
    background-color: #f4f4f4;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
    border-radius: 8px;
}

.welcome h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.welcome p {
    font-size: 1.2rem;
    color: #555;
}

.close-menu {
    display: none; /* Hide by default */
}

.welcome h2 {
    text-align: center;
    /*margin-top: 0; /* Remove the top margin to move it closer to the nav */
    padding-top: 10px; /*Add some padding to the top if needed */
}

/* Responsive Styles */
@media (max-width: 768px) {

    .footer-about, .footer-contact, .footer-services {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .footer-qlinks {
        max-width: 100%;
    }

    .footer-qlinks ul li {
        display: block;
        margin: 0.5rem 0;
    }

    footer {
        position: static;
        overflow-x: hidden;
        max-width: 100%;
        padding: 1rem;
    }

    .footer-contact h2 {
        text-align: left; /* Align heading to the left */
    }

    .footer-contact p {
        text-align: left; /* Align text to the left */
        margin: 0; /* Remove default margin */
    }

    .footer-qlinks h2 {
        text-align: left; /* Align heading to the left */
    }

    .footer-qlinks ul {
        text-align: left; /* Align text to the left */
    }

    .footer-about h2, .footer-about p {
        text-align: left; /* Align heading and paragraph to the left */
    }

    .social-media {
        text-align: left; /* Align social media icons to the left */
    }

    main {
        padding: 1rem;
        display: block; /* Reset display to block for smaller screens */
        min-height: auto; /* Reset min-height for smaller screens */
    }

    #about-me {
        flex-direction: column; /* Stack content vertically */
        align-items: center; /* Center align content */
        text-align: center; /* Center align text */
    }

    #about-me div {
        width: 100%; /* Full width for mobile devices */
        margin-bottom: 1rem; /* Add spacing between text and image */
    }

    #about-me img {
        margin-left: 0; /* Remove left margin for mobile devices */
        margin-bottom: 1rem; /* Add spacing below the image */
    }
    .service-items {
        flex-direction: column;
        gap: 1.5rem;
    }

    .service-item {
        flex: 1 1 100%;
        text-align: center;
    }

    .service-items .service-item img[src="images/web-22.jpg"] {
        height: auto;
        width: 100%; 
        max-width: 100%; 
        margin: 0;
    }

    .service-items .service-item img[src="images/hs_main.jpg"] {
        height: 300px;
        width: auto; 
        object-fit: cover; 
        display: block; 
        margin: 0 auto;
        margin-left: 0;
    }

    .service-description {
        flex: 1;
        text-align: left;
        margin-left: 0;
    }


    .hamburger .line {
        width: 25px;
        height: 3px;
        background-color: black;
        border-radius: 2px;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: fixed; 
        top: 0;
        right: 0; 
        height: 100vh;
        width: 250px; 
        background-color: #f4f4f4; 
        padding: 1rem;
        border-right: 1px solid #ddd; 
        box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
        text-align: right; 
        z-index: 2;
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex;
        justify-content: flex-start;
        align-items: flex-end;
    }
    
    .nav-links a {
        text-decoration: none;
        color: black;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        transition: background-color 0.3s ease;
        text-align: right;
    }
    
    .nav-links a:hover {
        background-color: #ddd;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        position: absolute;
        top: 20px;
        right: 20px; 
        z-index: 1100; 
    }

    .hamburger.hidden {
        display: none; 
    }

    body.no-scroll {
        overflow: hidden; /* Disable scrolling */
        height: 100%; /* Prevent content from scrolling */
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 10px;
        left: 10px;
        background: none;
        border: none;
        font-size: 2rem;
        color: black;
        cursor: pointer;
        z-index: 1100; /* Ensure it appears above other elements */
    }
    
    .close-menu:hover {
        color: #555; /* Optional: Add a hover effect */
    }
    
}