:root {
    --primary-color: #dd4021;
    --dark-color: #0f172a;
    --white-color: #ffffff;
    --text-color: #f8fafc; /* Lighter than pure white for better readability on dark bg */
    --background-color: #f1f5f9;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--dark-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 900;
    line-height: 1.2;
    color: var(--dark-color);
}

h1 {
    font-size: 4rem;
    letter-spacing: -2px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

section {
    padding: 6rem 2rem;
}

/* Modern Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    z-index: 1000;
    height: 90px;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.main-logo {
    max-height: 55px;
    width: auto;
    transition: transform 0.3s ease;
    opacity: 0; /* Logo invisible as requested */
}

.logo-link:hover .main-logo {
    transform: scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-cta {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(221, 64, 33, 0.2);
}

.nav-cta:hover {
    background-color: #b8341a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(221, 64, 33, 0.3);
    color: white;
}


/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('https://as-betontechnik.de/wp-content/uploads/2018/03/IMG_8786-2-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    color: var(--white-color);
    font-weight: 900;
}

.hero-content p {
    font-size: 1.25rem;
    margin-top: 1rem;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2.5rem;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #b8341a;
    transform: translateY(-3px);
}

/* Story Section */
.story-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-content {
    flex: 1;
}

.story-content h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.story-image {
    flex: 1;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

/* Trust Section */
.trust-section {
    background-color: #e2e8f0;
}

.partner-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.partner-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.partner-name:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Services Section */
.services-section {
    max-width: none;
    background-color: #ffffff;
    padding: 6rem 2rem;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}

.services-section-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.services-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    width: 100%;
}

.services-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-item {
    background-color: #f8fafc;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
    border-top: 5px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.grid-item:hover {
    transform: translateY(-10px) scale(1.02); /* Gentle lift */
    background-color: #ffffff;
    box-shadow: 0 20px 40px rgba(221, 64, 33, 0.25); /* Elegant red glow */
    border-top: 5px solid #dd4021;
    z-index: 50;
    outline: none; /* Removed harsh outline */
}

.grid-item h4 {
    transition: color 0.3s ease;
}

.grid-item:hover h4 {
    color: var(--primary-color);
    transform: scale(1.05); /* Subtle text scale */
    transform-origin: left;
}

.grid-item.highlight {
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    transform: scale(1.05);
}

.grid-item.highlight:hover {
    transform: translateY(-12px) scale(1.07); /* Slightly more lift than others */
    box-shadow: 0 30px 60px rgba(221, 64, 33, 0.4); /* Stronger but controlled glow */
    background: #fff;
    outline: none;
}

/* Shimmer Effect for Highlight Cards */
.grid-item.highlight::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: shimmer 6s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.grid-item.highlight::before {
    content: "SPEZIALGEBIET";
    position: absolute;
    top: 25px;
    right: -35px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    letter-spacing: 1px;
    z-index: 2;
    border: 1px solid white;
}

/* Impressions Section */
.impressions-section {
    padding-top: 0;
    max-width: 1400px;
    margin: 0 auto;
}
.impressions-section h2 {
    margin-bottom: 2rem;
}
.grid-container-impressions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-container-impressions img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Contact Form */
.contact-form-section {
    padding: 6rem 2rem;
    background-color: #f1f5f9;
}

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.contact-form-container h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.contact-form-container p {
    text-align: center;
    margin: 0 auto 3rem;
    color: #64748b;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(221, 64, 33, 0.1);
}

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

.submit-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #b8341a;
    transform: translateY(-2px);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 4rem 2rem;
}

.footer-content {
    margin-bottom: 2rem;
}

.footer-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--white-color);
}

.footer-content p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: none;
}

.footer-content i {
    color: var(--primary-color);
}

.footer-content a {
    color: var(--white-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--white-color);
    text-decoration: none;
    margin: 0 5px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}


/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Chat Toggle Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(221, 64, 33, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-toggle-btn i {
    font-size: 24px;
    margin-bottom: 2px;
}

.chat-btn-text {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(221, 64, 33, 0.6);
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.chat-window.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

/* Chat Header */
.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e; /* Green online dot */
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
    text-align: left;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close-btn:hover {
    opacity: 1;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.bot-message {
    align-self: flex-start;
    background-color: white;
    color: var(--dark-color);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-message {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(221, 64, 33, 0.2);
}

/* Typing Indicator */
.message.typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #cbd5e1;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}

.message.typing span:nth-child(1) { animation-delay: -0.32s; }
.message.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
.chat-input-area {
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: var(--primary-color);
}

#chat-send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#chat-send-btn:hover {
    background-color: #b8341a;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    section {
        padding: 4rem 1rem;
    }
    .story-section {
        flex-direction: column;
    }
    .chat-window {
        width: 90%;
        right: 5%;
        bottom: 90px;
    }
}

/* Fix for text under banner */
.grid-item.highlight h4 {
    padding-top: 25px;
}

