:root {
    --primary: #E30613;
    --secondary: #1A1A1A;
    --light: #F5F5F5;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: var(--transition);
}

.navbar.visible {
    transform: translateY(0);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--light);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--light);
    margin: 5px 0;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--secondary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(26,26,26,0.9) 0%, rgba(26,26,26,0.6) 100%);
    color: var(--light);
}

.company-name {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.company-name-main {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(45deg, var(--primary), #ff4d4d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.company-name-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--light);
    opacity: 0.9;
}

.hero h1 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 2rem;
    text-transform: uppercase;
    line-height: 1.2;
    max-width: 800px;
}

.cta-button {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2rem;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Welcome Section */
.welcome {
    padding: 5rem 10%;
    background-color: #f9f9f9;
    text-align: center;
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
}

.welcome h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.welcome p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #333;
}

/* Services Section */
.services {
    padding: 5rem 10%;
    background-color: #fff;
}

.services h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.services > p {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #f9f9f9;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.1);
}

.service-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Gallery Section */
.gallery {
    padding: 5rem 10%;
    background: white;
}

.masonry {
    display: none; /* Hide masonry on mobile */
}

/* Desktop Slideshow */
@media (min-width: 769px) {
    .masonry {
        display: block;
        position: relative;
        max-width: 1200px;
        margin: 2rem auto;
        overflow: hidden;
    }

    .gallery-carousel {
        display: flex;
        transition: transform 0.3s ease-in-out;
        gap: 1rem;
    }

    .gallery-item {
        flex: 0 0 calc(33.333% - 1rem); /* Show 3 items at once */
        aspect-ratio: 4/3;
        cursor: pointer;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        transition: transform 0.3s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

    .carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: rgba(26, 26, 26, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        z-index: 2;
        transition: var(--transition);
        font-size: 1.5rem;
    }

    .carousel-nav:hover {
        background: var(--primary);
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }
}

/* Mobile Carousel */
@media (max-width: 768px) {
    .masonry {
        display: block;
        position: relative;
        overflow: hidden;
        margin: 2rem -10%;
        padding: 0 10%;
    }

    .gallery-carousel {
        display: flex;
        transition: transform 0.3s ease-in-out;
        gap: 1rem;
    }

    .gallery-item {
        flex: 0 0 85%;
        margin-right: 1rem;
        cursor: pointer;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    .carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(26, 26, 26, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        z-index: 2;
        transition: var(--transition);
    }

    .carousel-nav:hover {
        background: var(--primary);
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }
}

.no-images, .error {
    text-align: center;
    padding: 2rem;
    color: var(--secondary);
    font-size: 1.1rem;
}

.error {
    color: var(--primary);
}

/* Loading animation */
.gallery-loading {
    text-align: center;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--secondary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Contact Form */
.contact {
    padding: 5rem 10%;
    background: var(--light);
}

.contact h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.contact-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-intro p {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .masonry {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
        text-align: center;
        align-items: center;
    }
    
    .hero h1 {
        font-size: clamp(1rem, 2.5vw, 1.8rem);
        padding: 0 0.5rem;
        width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .masonry {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: clamp(0.9rem, 2vw, 1.5rem);
        padding: 0 0.25rem;
    }
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 4px;
    background: var(--secondary);
    color: var(--light);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Allow text selection in specific areas */
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* Contact Bar */
.contact-bar {
    background: var(--secondary);
    color: var(--light);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.contact-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 2rem;
}

.contact-item {
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--primary);
}

.contact-icon {
    font-size: 1.1rem;
}

.opening-hours {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--light);
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section address {
    font-style: normal;
}

.footer-section p {
    margin: 0.5rem 0;
}

.footer-section a {
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Responsive adjustments for contact and footer */
@media (max-width: 768px) {
    .contact-bar-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-item {
        justify-content: center;
    }

    .opening-hours {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .footer-section:last-child {
        border-bottom: none;
    }
}

/* Responsive adjustments for services */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .service-content {
        padding: 1.25rem;
    }
    
    .service-content h3 {
        font-size: 1.3rem;
    }
    
    .welcome {
        padding: 3rem 5%;
    }
    
    .welcome h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .service-content {
        padding: 1rem;
    }
    
    .service-content h3 {
        font-size: 1.2rem;
    }
    
    .welcome h2 {
        font-size: 1.6rem;
    }
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.95);
    color: #fff;
    padding: 1rem;
    z-index: 1000;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.cookie-button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.cookie-button.accept {
    background-color: var(--primary);
    color: white;
}

.cookie-button.reject {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-button {
        width: 100%;
        padding: 0.75rem;
    }
}
