/* Ultra Responsive Design - Perfect Mobile & Desktop Experience */

/* Logo Enhancement - Even Bigger */
.logo {
    height: 16rem !important; /* Noch größer: von 12rem auf 16rem */
    width: auto !important;
    max-width: none !important;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
    filter: drop-shadow(0 10px 25px rgba(16, 185, 129, 0.3)) !important;
    display: block !important;
    object-fit: contain !important;
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 15px 35px rgba(16, 185, 129, 0.4));
}

/* Ultra Responsive Navigation */
.navbar {
    padding: 0.5rem 0;
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Navigation Enhancement */
.nav-logo {
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    z-index: 1000 !important;
}

.nav-logo a {
    display: block !important;
    line-height: 0 !important;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 2rem;
    min-height: auto !important;
}

.nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-600);
    transform: translateY(-2px);
}

.nav-link i {
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Hamburger Menu Enhancement */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.hamburger:hover {
    background: rgba(16, 185, 129, 0.1);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-600);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Ultra Responsive Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Ultra Responsive Grid Systems */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Enhanced Form Responsiveness */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Container Queries for Advanced Responsiveness */
@container (max-width: 768px) {
    .service-card {
        grid-column: 1 / -1;
    }
}

/* Advanced Mobile Responsiveness */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .logo {
        height: 14rem !important; /* Angepasst für Tablets */
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .logo {
        height: 12rem !important; /* Angepasst für kleinere Tablets */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
        border-left: 1px solid rgba(16, 185, 129, 0.1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        opacity: 0;
        transform: translateX(50px);
        animation: slideInNav 0.5s ease forwards;
    }
    
    .nav-menu.active .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active .nav-item:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu.active .nav-item:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu.active .nav-item:nth-child(4) { animation-delay: 0.4s; }
    .nav-menu.active .nav-item:nth-child(5) { animation-delay: 0.5s; }
    .nav-menu.active .nav-item:nth-child(6) { animation-delay: 0.6s; }
    .nav-menu.active .nav-item:nth-child(7) { animation-delay: 0.7s; }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        border-radius: 15px;
        width: 80%;
        text-align: center;
        background: rgba(16, 185, 129, 0.05);
        border: 1px solid rgba(16, 185, 129, 0.1);
    }
    
    .nav-link:hover {
        background: rgba(16, 185, 129, 0.15);
        transform: translateY(-2px) scale(1.02);
    }
    
    .logo {
        height: 10rem !important; /* Größer auf Mobile */
    }
    
    .hero {
        padding: 6rem 0 2rem;
        min-height: auto;
    }
    
    .hero-content {
        padding: 0 1rem;
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-feature {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        background: rgba(16, 185, 129, 0.05);
        border-radius: 12px;
        border: 1px solid rgba(16, 185, 129, 0.1);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
}

@media (max-width: 576px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo {
        height: 8rem !important; /* Angepasst für sehr kleine Screens */
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .hero-stat {
        padding: 1rem;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 12px;
        border: 1px solid rgba(16, 185, 129, 0.1);
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-filter {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .contact-methods {
        gap: 1rem;
    }
    
    .contact-item {
        padding: 1.5rem;
        border-radius: 12px;
        background: rgba(16, 185, 129, 0.05);
        border: 1px solid rgba(16, 185, 129, 0.1);
    }
    
    .service-areas {
        gap: 0.5rem;
    }
    
    .area-tag {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Ultra Small Devices (unter 400px) */
@media (max-width: 400px) {
    .logo {
        height: 7rem !important; /* Minimal aber immer noch groß */
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .service-card,
    .gallery-item {
        margin: 0 0.5rem;
    }
    
    .hero-features {
        gap: 0.75rem;
    }
    
    .hero-feature {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Animation für Navigation */
@keyframes slideInNav {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Hover Effects für Desktop */
@media (hover: hover) and (pointer: fine) {
    .service-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
    }
    
    .gallery-item:hover .gallery-img {
        transform: scale(1.1);
    }
    
    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3);
    }
    
    .nav-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none !important;
    }
    
    .particle-canvas {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .navbar {
        background: #ffffff;
        border-bottom: 2px solid #000000;
    }
    
    .nav-link {
        color: #000000;
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background: #000000;
        color: #ffffff;
        border-color: #000000;
    }
    
    .btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }
    
    .btn-secondary {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
    }
    
    .navbar {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(16, 185, 129, 0.2);
    }
    
    .nav-menu {
        background: rgba(15, 23, 42, 0.98);
    }
    
    .hero {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    
    .service-card,
    .gallery-item,
    .contact-item {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(16, 185, 129, 0.2);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .floating-element,
    .particle-canvas,
    .back-to-top {
        display: none !important;
    }
    
    .hero,
    .services,
    .about,
    .contact {
        page-break-inside: avoid;
    }
    
    .logo {
        height: 4rem !important;
    }
}

/* Ultra High Resolution Screens */
@media (min-width: 1400px) {
    .logo {
        height: 18rem !important; /* Noch größer für große Screens */
    }
    
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        max-width: 1400px;
    }
    
    .nav-container {
        max-width: 1400px;
    }
}

@media (min-width: 1600px) {
    .logo {
        height: 20rem !important; /* Maximum Größe für sehr große Screens */
    }
}

/* Smooth scrolling for all */
html {
    scroll-behavior: smooth;
}

/* Focus management for accessibility */
.nav-link:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(16, 185, 129, 0.6);
    outline-offset: 2px;
}

/* Loading state improvements */
.logo {
    opacity: 0;
    animation: fadeInLogo 1s ease 0.5s forwards;
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
