/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f4f4f4;
    box-sizing: border-box; /* Ensures padding and border are included in the element's total width and height */
}

*, *::before, *::after {
    box-sizing: inherit; /* Inherit box-sizing for all elements */
}

.container {
    width: 90%; /* Adjusted for better responsiveness on smaller screens */
    max-width: 1200px; /* Max width for larger screens */
    margin: auto;
    overflow: hidden;
    padding: 0 15px; /* Adjusted padding */
}

/* Header Styles */
header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 0; /* Adjusted padding */
    min-height: 70px;
    border-bottom: #7f8c8d 3px solid;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Space out title and nav */
    align-items: center; /* Vertically align items */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

header h1 {
    margin: 0;
    padding: 0;
    font-size: 2em; /* Adjusted for RWD */
    flex-shrink: 0; /* Prevent shrinking */
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex; /* Use flexbox for horizontal nav items */
}

header nav li {
    padding: 0 10px; /* Adjusted padding */
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.95em; /* Adjusted for RWD */
    transition: color 0.3s ease;
}

header a:hover {
    color: #ecf0f1;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: #34495e; /* Darker blue */
    color: #fff;
    text-align: center;
    padding: 80px 0; /* Adjusted padding */
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px; /* Minimum height for better visual */
}

.hero-section h2 {
    font-size: 3em; /* Adjusted for RWD */
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1.2em; /* Adjusted for RWD */
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    color: #fff;
    background: #2980b9; /* Blue */
    padding: 10px 20px; /* Adjusted padding */
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-size: 1em;
}

.btn:hover {
    background: #3498db; /* Lighter blue */
}

/* Section Styling */
section {
    padding: 30px 0; /* Adjusted padding */
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}

section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px; /* Adjusted margin */
    font-size: 2.2em; /* Adjusted for RWD */
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section p {
    font-size: 1em; /* Adjusted for RWD */
    text-align: justify;
}

/* Services Section */
.services-section .service-item {
    background: #ecf0f1;
    padding: 20px; /* Adjusted padding */
    margin-bottom: 15px; /* Adjusted margin */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.services-section .service-item h3 {
    color: #2c3e50;
    font-size: 1.6em; /* Adjusted for RWD */
    margin-top: 0;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.services-section .service-item ul {
    list-style: disc inside;
    padding-left: 15px; /* Adjusted padding */
    font-size: 0.95em; /* Adjusted for RWD */
}

.services-section .service-item ul li {
    margin-bottom: 5px;
}

/* Contact Section */
.contact-section p {
    font-size: 1em; /* Adjusted for RWD */
    text-align: center;
}

.contact-section a {
    color: #2980b9;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 15px 0; /* Adjusted padding */
    margin-top: 20px;
}

footer p {
    margin: 0;
    font-size: 0.85em; /* Adjusted for RWD */
}

/* --- Responsive Design --- */

/* Mobile devices (portrait and landscape) and small tablets */
@media (max-width: 768px) {
    .container {
        width: 95%; /* Use more width on smaller screens */
        padding: 0 10px;
    }

    header {
        flex-direction: column; /* Stack items vertically */
        padding: 10px 0;
    }

    header h1 {
        font-size: 1.8em;
        margin-bottom: 10px; /* Add space below title */
    }

    header nav {
        width: 100%; /* Make nav take full width */
        text-align: center;
    }

    header nav ul {
        flex-direction: column; /* Stack nav items vertically */
        align-items: center; /* Center nav items */
    }

    header nav li {
        padding: 8px 0; /* More vertical padding for tap targets */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
        width: 80%; /* Constrain width of nav items */
    }

    header nav li:last-child {
        border-bottom: none; /* No border for the last item */
    }

    .hero-section {
        padding: 60px 0;
        min-height: 300px;
    }

    .hero-section h2 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1em;
    }

    section {
        padding: 25px 0;
    }

    section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .services-section .service-item {
        padding: 15px;
    }

    .services-section .service-item h3 {
        font-size: 1.4em;
    }
}

/* Extra small devices (phones, 480px and below) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.6em;
    }

    header nav li {
        width: 90%; /* Wider nav items for very small screens */
    }

    .hero-section {
        padding: 40px 0;
        min-height: 250px;
    }

    .hero-section h2 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 0.9em;
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.9em;
    }

    section h2 {
        font-size: 1.6em;
    }

    .services-section .service-item h3 {
        font-size: 1.2em;
    }

    .services-section .service-item ul {
        padding-left: 10px;
        font-size: 0.9em;
    }

    .about-section p,
    .contact-section p {
        font-size: 0.9em;
    }

    footer p {
        font-size: 0.8em;
    }
}
/* Contact Section Form Specific Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 30px; /* Space between columns */
    margin-top: 30px;
}

.contact-info,
.contact-form-container {
    background: #ecf0f1;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.contact-info h3,
.contact-form-container h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 10px;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info a {
    word-break: break-all; /* Prevents long emails from breaking layout */
}

.contact-form .form-group {
    margin-bottom: 15px;
}

.contact-form label {
    display: block; /* Make label appear on its own line */
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in width */
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #2980b9;
    outline: none;
    box-shadow: 0 0 5px rgba(41, 128, 185, 0.5);
}

.contact-form .btn {
    width: auto; /* Allow button to fit content */
    display: block; /* Make button full width on small screens */
    text-align: center;
    margin-top: 20px;
}

/* Responsive adjustments for Contact Page */
@media (min-width: 769px) { /* Tablet and Desktop layout */
    .contact-grid {
        grid-template-columns: 1fr 2fr; /* Info on left, Form on right */
        align-items: start; /* Align content to the top */
    }
}

@media (max-width: 480px) { /* Extra small devices */
    .contact-info h3,
    .contact-form-container h3 {
        font-size: 1.5em;
    }

    .contact-form label,
    .contact-form input,
    .contact-form textarea {
        font-size: 0.9em;
    }
}
