body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    background-color: #f0f4f7;
    color: #333;
}

header {
    background: #008c61; /* Brighter green */
    color: #fff;
    padding: 15px 0; /* 25% smaller */
    text-align: center;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 1.875em; /* 25% smaller */
    position: relative;
    z-index: 1;
}

header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 140, 97, 0.5);
    z-index: 0;
    transform: skewY(-5deg);
}

nav {
    background: #00a877; /* Brighter green */
    color: #fff;
    text-align: center;
    padding: 15px 0;
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 15px; /* Changed to left */
}

.nav-toggle span {
    background: #000; /* Changed to black */
    height: 3px;
    width: 25px;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

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

nav ul li {
    margin: 5px; /* Reduce margin for better spacing on small screens */
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

nav ul li a:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 30px;
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    position: relative;
}

main .content {
    grid-column: 1 / 2;
}

main .sidebar {
    grid-column: 2 / 3;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.flex-container img {
    max-width: 40%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.flex-container div {
    flex: 1;
}

.flex-container.reverse {
    flex-direction: row-reverse;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form label {
    margin-top: 10px;
    font-weight: bold;
}

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

form textarea {
    resize: vertical;
    min-height: 150px;
}

form input[type="submit"] {
    background: #008c61;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.2em;
    transition: background 0.3s ease-in-out;
    border-radius: 5px;
}

form input[type="submit"]:hover {
    background: #00754b;
}

.success {
    color: green;
    font-weight: bold;
    text-align: center;
}

.error {
    color: red;
    font-weight: bold;
    text-align: center;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #008c61;
    color: #fff;
    position: relative;
    width: 100%;
    bottom: 0;
}

footer p {
    margin: 0;
}

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

footer nav ul li {
    margin-right: 15px;
}

footer nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
}

footer nav ul li a:hover {
    background: #00754b;
    transition: background 0.3s ease-in-out;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }

    .nav-toggle {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        display: none; /* Hide menu initially */
    }

    nav ul.active {
        display: flex; /* Show menu when active */
    }

    nav ul li {
        margin: 0;
        padding: 10px 0;
        width: 100%;
    }

    nav ul li a {
        padding: 10px;
        display: block;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    main {
        display: block;
        padding: 15px;
    }

    main .content,
    main .sidebar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }

    nav ul li {
        margin-bottom: 8px;
    }

    form {
        padding: 10px;
    }

    form input, form textarea {
        padding: 10px;
    }

    form input[type="submit"] {
        padding: 10px;
        font-size: 0.9em;
    }

    .flex-container {
        flex-direction: column;
    }
}
