/* Box-Sizing for Consistent Layouts */
* {
    box-sizing: border-box;
}

/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    
    /* Background Image Properties */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
        url('background.jpg'); /* Adjust the path as necessary */
    background-size: cover; /* Ensures the image covers the entire background */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center center; /* Centers the image */
    background-attachment: fixed; /* Keeps the background fixed during scrolling */
    background-color: #f9f9f9; /* Fallback color */
}

a {
    color: #007BFF;
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    color: #222;
    font-weight: bold; /* Consistent font weight for headings */
}

section {
    padding: 40px 15px;
    max-width: 1200px;
    margin: auto;
}

img.logo {
    width: 90px; /* Reduced size by approx 10% */
    height: auto;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky; /* Makes the header sticky */
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px; /* Adjusted padding for better balance */
}

nav {
    /* Hidden by default on mobile */
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 200px;
}

nav.active {
    display: block;
}

nav ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

nav a {
    font-weight: bold;
    font-size: 1em;
    padding: 10px 20px;
    display: block;
}

nav a:hover, nav a:focus {
    background-color: #f0f0f0;
}

.hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.5em;
    color: #333;
}

.hamburger:focus {
    outline: 2px solid #007BFF;
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, #007BFF, #0056b3);
    color: #fff;
    text-align: center;
    padding: 20px 10px;
}

.hero-content {
    max-width: 800px;
    margin: auto;
}

.hero-content h1 {
    font-size: 2em; /* Adjusted for better scaling */
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Removed the "Get in Touch" button styling as it's no longer present */

/* About Section */
#about h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    margin-bottom: 20px;
}

#about p {
    font-size: 1em;
    line-height: 1.8;
    padding: 0 10px;
}

/* Services Section */
#services h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    margin-bottom: 20px;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover, .service-item:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 2em;
    color: #007BFF;
    margin-bottom: 15px;
}

/* Portfolio Section */
#portfolio h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    margin-bottom: 20px;
}

.portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portfolio-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Testimonials Section */
#testimonials h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    margin-bottom: 20px;
}

.testimonials-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonial-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 10px;
}

.testimonial-item h4 {
    text-align: right;
    font-weight: normal;
    color: #555;
}

/* Contact Section */
#contact h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: auto;
}

form label {
    font-weight: bold;
}

form input, form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

form button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover, form button:focus {
    background-color: #0056b3;
}

.contact-details {
    margin-top: 15px;
    font-size: 0.9em;
    text-align: center;
}

.contact-details a {
    color: #007BFF;
}

.contact-details a:hover, .contact-details a:focus {
    text-decoration: underline;
}

/* Footer Styles */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 15px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 0.9em;
}

.footer-links a:hover, .footer-links a:focus {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black with opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Adjusted for mobile */
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: 5px;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
}

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

body.modal-open {
    overflow: hidden;
}

/* Desktop Styles */
@media (min-width: 769px) {
    /* Header */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    img.logo {
        width: 135px; /* Increased size by approx 10% for desktop */
    }

    nav {
        position: static;
        display: block !important;
        width: auto;
        border: none;
        box-shadow: none;
    }

    nav ul {
        flex-direction: row;
        gap: 20px;
    }

    nav a {
        padding: 10px 0;
    }

    .hamburger {
        display: none; /* Hide hamburger on desktop */
    }

    /* Hero Content */
    .hero {
        padding: 40px 20px;
    }

    .hero-content {
        max-width: 1000px;
    }

    .hero-content h1 {
        font-size: 2.5em;
        margin-bottom: 20px;
    }

    .hero-content p {
        font-size: 1.2em;
        margin-bottom: 30px;
    }

    /* Services, Portfolio, Testimonials Containers */
    .services-container, .portfolio-container, .testimonials-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: space-between;
    }

    .service-item, .portfolio-item, .testimonial-item {
        flex: 1 1 30%;
    }

    .service-item {
        text-align: left;
    }

    .service-icon {
        margin-bottom: 10px;
    }

    /* Modal Content */
    .modal-content {
        width: 70%; /* Adjusted for desktop */
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Adjust navigation for mobile */
    nav {
        top: 50px;
    }

    /* Adjust hero text size on mobile */
    .hero-content h1 {
        font-size: 1.8em;
    }

    .hero-content p {
        font-size: 1em;
    }

    /* Ensure service icons are centered on mobile */
    .service-item {
        text-align: center;
    }
}

/* Feedback Messages */
.success-message {
    color: green;
    background-color: #e6ffe6;
    padding: 10px;
    border: 1px solid green;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    color: red;
    background-color: #ffe6e6;
    padding: 10px;
    border: 1px solid red;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}
