body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.home, body.about, body.products {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

header {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1em 0;
    text-align: center;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

.hero {
    padding: 4em 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    flex: 1;
}

.hero .content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 5px;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 1em;
}

main {
    flex: 1;
    padding: 2em;
    width: 100%;
}

.intro {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2em;
    max-width: 800px;
    margin: 0 auto;
}

.button-section {
    text-align: center;
    margin-bottom: 2em;
}

.button-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1em;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    background-color: #007BFF;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2em;
}

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

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto;
}

.product-service {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 2em;
    display: flex;
    align-items: center;
    gap: 1em;
}

.product-service.left {
    flex-direction: row;
}

.product-service.right {
    flex-direction: row-reverse;
}

.product-service .product-description {
    flex: 1;
}

.product-service .product-img {
    width: 150px;
    height: auto;
    border-radius: 5px;
}

.about-section {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 2em;
}

.about-text-img {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.about-text-img img {
    width: 120px;
    height: auto;
    border-radius: 5px;
    margin-right: 20px;
}

.about-text-img.img-right img {
    margin-left: 20px;
    margin-right: 0;
}

.about-text-img p {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
}

.about-section h3 {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
}

footer {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 1em 0;
    width: 100%;
    position: relative;
    margin-top: auto;
}

@supports not (background-image: url('background.webp')) {
    body.home, body.about, body.products {
        background-image: url('background.jpg');
    }
}

body.news {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.news-posts {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 2em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.news-post {
    margin-bottom: 2em;
}

.news-post h3 {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 0.5em;
}

.news-post p {
    margin: 0;
    padding: 1em;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
}

body.contact {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.contact-form {
    max-width: 600px;
    margin: 2em auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 2em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1em;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form button {
    width: 100%;
    padding: 0.75em;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
}

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

.contact-form .thank-you-message {
    text-align: center;
    color: green;
    font-weight: bold;
    margin-top: 1em;
}
