:root {
    --primary-color: #1c5f9a;
    --secondary-color: #e7b12d;
    --dark-color: #1e2a3a;
    --light-color: #f5f7fa;
    --grey-color: #718096;
    --white-color: #ffffff;
    --section-padding: 100px 0;
    --transition: all 0.3s ease-in-out;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

.section {
    padding: var(--section-padding);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 36px;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-title p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

/* Fix for horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    animation: loader-spin 1.5s linear infinite;
}

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

/* Header */
.header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    z-index: 997;
    padding: 15px 0;
}

.header.header-scrolled {
    padding: 10px 0;
    background-color: var(--white-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.logo-link img {
    max-height: 60px;
    transition: var(--transition);
}

.header-scrolled .logo-link img {
    max-height: 50px;
}

.nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: block;
    position: relative;
    color: var(--dark-color);
    font-weight: 500;
    padding: 10px 15px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu */
.navbar-toggler {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
}

.navbar-toggler-icon {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--dark-color);
    position: relative;
    transition: var(--transition);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

.mobile-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 996;
}

.mobile-menu.active {
    top: 79px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 10px 0;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white-color);
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fade-up 1s ease-out forwards;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fade-up 1s ease-out 0.3s forwards;
}

.hero-text {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fade-up 1s ease-out 0.6s forwards;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 500;
    text-align: center;
    border-radius: 50px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--white-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--white-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--white-color);
    border: 2px solid var(--white-color);
}

.btn-outline:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

/* About Section */
.about {
    opacity: 1 !important;
    visibility: visible !important;
}

.about .about-img,
.about .about-content,
.about [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
}

.about img {
    display: block !important;
    visibility: visible !important;
}

.about-img {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-img img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.about-img:hover img {
    transform: scale(1.05);
}

.about-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.about-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.about-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-content ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.about-content ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
}

/* Services Section */
.services {
    background-color: var(--light-color);
}

.service-item {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

.service-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-item:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
}

.service-content h4 {
    font-size: 22px;
    margin-bottom: 15px;
}

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

.service-icon {
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-item:hover .service-icon {
    background-color: var(--secondary-color);
}

/* References Section */
.references-item {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.references-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

.references-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.references-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.references-item:hover .references-img img {
    transform: scale(1.1);
}

.references-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    transition: var(--transition);
}

.references-title {
    color: var(--white-color);
    margin-bottom: 0;
    transition: var(--transition);
}

.references-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 20px;
    background-color: var(--white-color);
    transition: var(--transition);
    opacity: 0;
}

.references-item:hover .references-info {
    bottom: 0;
    opacity: 1;
}

.references-info p {
    margin-bottom: 0;
}

/* Contact Section */
.contact-info {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.contact-info-item {
    display: flex;
    margin-bottom: 20px;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-info-text p {
    margin-bottom: 0;
}

.contact-form {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 50px;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

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

.honeypot {
    display: none;
}

/* Map */
.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Counter Section */
.counter-section {
    padding: 80px 0;
    position: relative;
}

.counter-item {
    margin-bottom: 30px;
}

.counter-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.counter-text {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Responsive styles for counter section */
@media (max-width: 767px) {
    .counter-item {
        margin-bottom: 20px;
    }
    
    .counter-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .counter-number {
        font-size: 2.5rem;
        margin-bottom: 5px;
    }
    
    .counter-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .counter-item {
        padding: 0 5px;
    }
    
    .counter-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .counter-number {
        font-size: 2rem;
        margin-bottom: 3px;
    }
    
    .counter-text {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding-top: 80px;
}

.footer-heading {
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-color);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
}

.footer-contact li i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
    transform: translateY(-5px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    margin-top: 60px;
}

.copyright {
    font-size: 14px;
}

.credits a {
    color: var(--secondary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

/* Animations */
[data-aos] {
    opacity: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .section {
        padding: 70px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero {
        height: 80vh;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .about-img {
        margin-bottom: 30px;
    }
    
    .col-lg-6, .col-md-6, .col-sm-12, .col-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 767px) {
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-text {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    /* Hide "Unsere Leistungen" button on small devices */
    .hero-btn .btn-primary.me-3 {
        display: none;
    }
    
    /* Make the contact button full width on small devices */
    .hero-btn .btn-outline {
        display: block;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    /* Fix padding for smaller screens */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-text {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    /* Additional fixes for very small devices */
    .container-fluid,
    .container {
        padding-left: 10px;
        padding-right: 10px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix any potential Bootstrap issues */
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Ensure no horizontal overflow */
    .section,
    .hero,
    .about,
    .services,
    .projects,
    .counter-section,
    .testimonials,
    .cta {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}
