/* Reset some default styles in the browser */
body, h1, h2, p {
    margin: 0;
    padding: 0;
}

/* Add a class for page content */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('background.jpg');
    background-size: cover;
    background-attachment: fixed;
}

/* Container for center alignment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Style the header */
header {
    background: #35424a;
    color: #ffffff;
    text-align: center;
    padding: 1em 0;
    width: 100%;
}

/* Style the navigation menu */
nav ul {
    padding: 0;
    list-style: none;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

/* Style the main content */
main {
    padding: 20px;
}

/* Style the footer */
footer {
    text-align: center;
    padding: 0px;
    width: 100%;
    margin-top: 20px; /* or whatever value you prefer */
}

/* Form styles */
form div {
    margin-bottom: 10px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
}

input[type="submit"] {
    background: #333;
    color: #fff;
    cursor: pointer;
}

input[type="submit"]:hover {
    background: #444;
}

/* Headings */
h1, h2 {
    color: #35424a;
    text-align: center;
}

h2 {
    margin-bottom: 20px;
}

/* Paragraphs */
p {
    margin-bottom: 20px;
    text-align: left;
}

/* Section styles */
section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Background image for the Dienstleistungen section */
.services-background {
    background-image: url('section_background.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 50px 0;
}

/* Styles for profile picture in Über uns section */
.profile-picture {
    width: 400px;
    height: auto; /* Adjust this to display the image as a square */
    margin-right: 20px;
}

/* Styles for the content in Über uns section */
.about-content {
    display: flex;
    align-items: center;
}

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

/* Styles for the content in Dienstleistungen section */
.services-content {
    display: flex;
    align-items: center;
}

.services-picture {
    width: 400px; /* You can adjust this to make the image bigger or smaller */
    height: auto;
    margin-left: 20px; /* Add left margin to the image */
}

.services-text {
    text-align: left;
    flex: 1; /* Allow the text to take up the remaining space */
}
/* Headings */
h1, h2 {
    color: #35424a;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em; /* Increase the size of h1 and h2 headings */
}

/* Style for h3 headings */
h3 {
    font-size: 1.5em; /* Adjust this value to make the h3 headings bigger or smaller */
}

/* Paragraphs */
p {
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.2em; /* Increase the size of normal text */
}
/* Styles for the content in Dienstleistungen section */
.services-content {
    display: flex;
    align-items: center;
    padding: 20px; /* Add padding to the container */
}

.services-picture {
    width: 400px;
    height: auto;
    margin-left: 40px; /* Increase left margin to the image */
}

.services-text {
    text-align: left;
    flex: 1;
    margin-right: 40px; /* Increase right margin to the text */
}

/* Styles for the content in Über uns section */
.about-content {
    display: flex;
    align-items: center;
    padding: 20px; /* Add padding to the container */
}

.profile-picture {
    width: 400px;
    height: auto;
    margin-right: 40px; /* Increase right margin to the image */
}

.about-text {
    text-align: left;
    margin-left: 40px; /* Increase left margin to the text */
}
/* Styles for the section content */
.section-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.section-heading {
    margin-bottom: 20px;
    align-self: center; /* Center the heading horizontally */
}
/* Styles for the contact section */
#contact {
    padding: 40px; /* Add padding around the text in the contact section */
}

/* Form styles */
form div {
    margin-bottom: 20px; /* Increase space between input fields */
}

input, textarea {
    width: 100%;
    padding: 15px; /* Increase padding inside input fields */
    margin-bottom: 10px; /* Add space below input fields */
    border: 1px solid #ccc;
}

input[type="submit"] {
    background: #333;
    color: #fff;
    cursor: pointer;
}

input[type="submit"]:hover {
    background: #444;
}
/* Style the header content */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center; /* Horizontally center the content */
    padding: 5px 10px; /* Reduce the vertical padding */
    width: 100%;
    position: fixed; /* Fix the position of the header */
    top: 0; /* Align the header to the top of the page */
    z-index: 1000; /* Ensure the header stays above other content */
}

/* Style the logo */
.logo {
    height: 120px; /* Adjust to your desired size */
    width: auto;  /* It will keep the aspect ratio of the logo */
}

}
/* Blog articles */
article {
    margin-bottom: 40px;
}

article h3 {
    margin-bottom: 10px;
}

/* Add padding to the top of the container */
.container {
    padding-top: 110px; /* Adjust this value based on the height of your header */
}
/* Style for the active navigation link */
nav ul li a.active {
    color: #3498db; /* Change the color for the active link */
    border-bottom: 2px solid #3498db; /* Add an underline for the active link */
}
/* Highlight Automation link when on Automation page */
.automation-page nav ul li a[href="automation.html"] {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

/* Highlight Blog link when on Blog page */
.blog-page nav ul li a[href="blog.html"] {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}
/* Add padding to the top of each section */
.section-content {
    padding-top: 80px; /* Adjust this value based on the height of your header */
    margin-top: -80px; /* Negative margin equal to the padding */
}
/* Add additional padding to the top of the main element on Automation and Blog pages */
.automation-page main, .blog-page main {
    padding-top: 150px; /* Adjust this value to add more space */
}
/* Add a separating line between articles on Automation and Blog pages */
.automation-page article, .blog-page article {
    border-bottom: 1px solid #cccccc; /* Adjust color and thickness as needed */
    padding-bottom: 20px; /* Add some padding to the bottom of each article */
    margin-bottom: 20px; /* Add some margin to the bottom of each article */
}
/* Style for the blog image */
.blog-image {
    float: right; /* Align the image to the right */
    margin-left: 20px; /* Add some space between the image and the text */
    margin-bottom: 20px; /* Add some space below the image */
    width: 500px; /* Set the width of the image */
}

/* Style for footer navigation links */
.footer-content nav ul {
    list-style: none;
    padding: 0;
}

.footer-content nav ul li {
    display: inline;
    margin-right: 20px;
}
.impressum-page main.container {
    margin-top: 50px; /* Adjust this value to your preference */
}
.contact-info {
    text-align: center;
}
.service-card {
    flex: 1 1 calc(33.33% - 2rem);
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

.service-card h3 {
    margin-bottom: 15px;
    color: #35424a;
    font-weight: bold;
}

.service-card p {
    margin-bottom: 0;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

/* Spacing utilities */
.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.p-4 {
    padding: 1rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Typography utilities */
.text-2xl {
    font-size: 1.5rem;
}

.font-semibold {
    font-weight: 600;
}

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

.text-gray-700 {
    color: #4a5568;
}

.text-gray-800 {
    color: #2d3748;
}

.text-white {
    color: #fff;
}

.hover\:text-gray-400:hover {
    color: #cbd5e0;
}

/* Background utilities */
.bg-gray-100:hover {
    background-color: #f7fafc;
}

.bg-gray-800 {
    background-color: #2d3748;
}

.bg-white {
    background-color: #fff;
}

/* Border, shadow, and rounded utilities */
.border {
    border: 1px solid #e2e8f0;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Transition utilities */
.transition {
    transition: all 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    background-color: #f5f5f5;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

nav a {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

nav a:hover {
    background-color: #2d3748;
}

nav a.active {
    background-color: #1a202c;
    font-weight: bold;
}

#services > div {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.service-card {
    flex: 1 1 calc(33.33% - 2rem);
    flex-basis: calc(33.33% - 1rem);
    padding: 1rem;
    box-sizing: border-box;
}

#services > div {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

#services > div > div {
    flex: 1 1 calc(33.33% - 2rem);
}

#services > div > div {
    flex: 1 1 calc(30% - 2rem);  /* Adjusted the width slightly */
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;  /* Regular weight */
}

/* Enhanced Navigation */
nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}
nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
}
nav a:hover {
    background-color: #666;
    color: #fff;
}

/* Icons */
img {
    width: 24px;
    height: 24px;
}

/* Contact Info Styling */
.contact-info div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    margin-bottom: 1rem;
}
.contact-info img {
    margin-bottom: 0.5rem;
}

/* Contact Info Styling */
.contact-info div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: #f5f5f5;
    transition: background-color 0.2s;
}
.contact-info div:hover {
    background-color: #e5e5e5;
}
.contact-info img.contact-icon {
    margin-bottom: 0.5rem;
}
.card-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.card-container .flex-1 {
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    margin-right: 3rem;  /* Add a right margin to the card */
}

.card-container .flex-1:last-child {
    margin-right: 0;  /* Ensure the last card does not have a right margin */
}

.card-container .flex-1:hover {
    background-color: #f7fafc;
}

.centered-heading {
    text-align: center;
    width: 100%;
}

.centered-heading h2 {
    margin-bottom: 10px; /* Adjust this value based on your preference. */
}

#services {
    margin-top: 10px; /* Adjust this value based on your preference. */
}
body {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;  /* Light weight */
}

.flex-1 {
    transition: background-color 0.3s ease-in-out;  /* 0.3s is the duration; you can adjust as needed */
}

.flex-1:hover {
    background-color: #f7fafc;  /* This is the color for bg-gray-100 */
}


/* Chatbot Styles */
.chat-interface {
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: calc(100% - 32px); /* Subtract double the padding to avoid overflow */
    min-height: 500px;
    margin: 0 auto 20px auto; 
    overflow: hidden;
    position: relative;
    padding: 16px;
}

.chat-messages {
    max-height: 430px; /* Adjusting to leave space for chat input */
    overflow-y: auto;
    padding-right: 5px; /* Padding to avoid scrollbar overlap */
}

.chat-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 5px 0; /* Reduce vertical padding */
}

.chat-input input[type="text"] {
    padding: 10px; /* Adjust as needed */
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px; /* Rounded on the left */
    width: 80%; /* Adjust width as needed */
    height: 40px; /* Explicit height */
    line-height: 1.5; /* Adjust line height as needed */
    box-sizing: border-box; /* Make sure padding and border are included in the element's total width and height */
    margin-top: 9px; /* This will increase the space between the chat output and the input section */

}

.chat-input button {
    padding: 10px 20px; 
    font-size: 1.2em;
    background-color: #333;
    color: #ffffff;
    border: none;
    border-radius: 5px; /* Rounded on the right */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    height: 50px; /* Explicit height */
    line-height: 1.5; /* Adjust line height as needed */

}


.chat-output {
    height: 400px;
    overflow-y: auto;
    padding: 10px 20px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f5f5f5;
}

.chat-output p {
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #e2e8f0;
    position: relative;
}

.chat-output p.user {
    background-color: #3498db;
    color: #ffffff;
    align-self: flex-end;
    order: 2;
}


.chat-input input[type="text"] {
    flex: 1;
    margin-right: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}


.chat-input button:hover {
    background-color: #444;
}

.message {
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
}

.user {
    background-color: #e2e8f0;  /* Light blue-ish color for user's messages */
    align-self: flex-end;
}

.ai {
    background-color: #f7fafc;  /* Lighter color for AI's messages */
}
.chat-loading {
    display: none; /* Hidden by default */
    position: absolute; 
    bottom: 110px; /* Positioning it at the bottom right of chat-interface */
    right: 30px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #000;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {
    /* Adjust the container padding for smaller screens */
    .container {
        padding: 10px;
    }

    /* Adjust the navigation menu for smaller screens */
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    /* Adjust the main content padding for smaller screens */
    main {
        padding: 10px;
    }

    /* Adjust form input fields and textarea for smaller screens */
    input, textarea {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }
    
    /* Adjust the footer for smaller screens */
    footer {
        padding: 10px 0;
    }
}

@media screen and (max-width: 768px) {
    /* Adjust the container padding for smaller screens */
    .container {
        padding: 10px;
    }

    /* Adjust the navigation menu for smaller screens */
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    /* Adjust the main content padding for smaller screens */
    main {
        padding: 10px;
    }

    /* Adjust form input fields and textarea for smaller screens */
    input, textarea {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }
    
    /* Adjust the footer for smaller screens */
    footer {
        padding: 10px 0;
    }
}

@media screen and (max-width: 768px) {
    /* Adjust the layout of the About Me section for smaller screens */
    #about .flex {
        flex-direction: column;
        align-items: center;
    }

    #about .profile-picture {
        max-width: 90%; /* Adjust the image width to fit smaller screens */
        margin-bottom: 20px; /* Add some space between the image and the text */
    }
}

/* Mobile specific styles */

@media (max-width: 768px) {
    /* About Me section */
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-picture {
        max-width: 80%;
        margin-bottom: 20px;
    }
    
    .about-text {
        text-align: center;
        padding: 0 10px;  /* Some padding to ensure text doesn't touch the screen edges */
    }
    
    /* Resetting margins and paddings to ensure no unexpected spaces */
    body, h1, h2, p, ul, li {
        margin: 0;
        padding: 0;
    }

    /* Assuming the container might have some inherent margin/padding which needs to be addressed */
    .container {
        margin: 0;
        padding: 0;
    }
}

/* Handling centering and overflow for mobile views */

body {
    box-sizing: border-box;
    overflow-x: hidden; /* This will prevent horizontal scrolling if any element overflows */
}

/* Ensuring all elements consider padding and border in their total width */
*, *:before, *:after {
    box-sizing: inherit;
}

@media (max-width: 768px) {
    /* Resetting margins and paddings for potential problematic elements */
    body, h1, h2, p, ul, li, img, div {
        margin: 0;
        padding: 0;
    }

    /* Assuming the container might have some inherent margin/padding which needs to be addressed */
    .container {
        margin: 0 auto; /* This will center the container */
        padding: 0 10px; /* Adding some padding to ensure content doesn't touch the edges */
    }
}

@media (max-width: 768px) {
    /* Adjusting the container width and padding for mobile views */
    .container {
        width: 95%; /* Increase the width to 95% of the viewport */
        padding: 0 2.5%; /* Adjust the padding to 2.5% on both sides */
    }
    
    /* Adjusting the About Me section padding for better spacing */
    .about-text {
        padding: 0 5%;  /* Some padding to ensure text doesn't touch the screen edges */
    }
}

@media (max-width: 768px) {
    /* Maximizing the container width and minimizing padding for mobile views */
    .container {
        width: 100%; /* Set the width to 100% of the viewport */
        padding: 0 1%; /* Minimal padding of 1% on both sides */
    }
    
    /* Adjusting the About Me section padding for even wider content display */
    .about-text {
        padding: 0 2%;  /* Slightly more padding than the container to ensure content doesn't touch the screen edges */
    }

    /* Addressing any other elements that might be restricting width */
    img, div, p, h1, h2, main {
        max-width: 100%; /* Ensure these elements don't exceed the screen width */
        padding: 0;
        margin: 0;
    }
}

@media (max-width: 768px) {
    /* Handling service cards for mobile views */
    .section-content .flex > .flex-1 {
        margin: 0;
        padding-left: 1%;  /* Minimal padding to ensure content doesn't touch the screen edges */
        padding-right: 1%; /* Minimal padding to ensure content doesn't touch the screen edges */
    }

    /* Handling contact info containers for mobile views */
    .card-container .flex > .flex-1 {
        margin: 0;
        padding-left: 1%;  /* Minimal padding to ensure content doesn't touch the screen edges */
        padding-right: 1%; /* Minimal padding to ensure content doesn't touch the screen edges */
    }
}

@media (max-width: 768px) {
    /* Handling the About Me section */
    .about-content, .about-text {
        padding-left: 1%;  /* Minimal padding to ensure content doesn't touch the screen edges */
        padding-right: 1%; /* Minimal padding to ensure content doesn't touch the screen edges */
        margin: 0;         /* Resetting any margins */
    }
}
