/* Kritische CSS-Variablen */
:root {
    --primary-color: #FFB300;
    --secondary-color: #FF6D00;
    --accent-color: #795548;
    --text-color: #212121;
    --light-color: #FFF3E0;
    --white-color: #f8f4b5;
    --highlight-color: #FFA000;
    --gradient-primary: linear-gradient(135deg, #FFB300, #FF6D00);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

/* Basis-Optimierungen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white-color);
    font-display: swap;
}

/* Performance: will-change nur bei Bedarf */
html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul { list-style: none; }

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Button mit GPU-Beschleunigung */
.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white-color);
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    will-change: transform;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--secondary-color);
    transition: 0.5s ease;
    z-index: -1;
    border-radius: 30px;
}

.btn:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn:hover:before { width: 100%; }

/* Header mit GPU-Beschleunigung */
header {
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    border-bottom: 3px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

header.hide-on-scroll {
    transform: translate3d(0, -120%, 0);
    box-shadow: none;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    position: relative;
}

.logo .site-logo {
    height: 70px;
    width: auto;
    display: block;
}

.tagline {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 1000;
    letter-spacing: 0.5px;
}

nav ul { display: flex; }
nav ul li { margin-left: 30px; }

nav ul li a {
    font-weight: 600;
    position: relative;
    padding: 8px 0;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.5px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 10px;
    border: none;
    background: none;
    z-index: 1001;
}

/* Hero mit optimiertem Background */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/dji_fly_20240528_074730_0522_1744375330363_photo.jpg') no-repeat center center/cover;
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-attachment: scroll; /* Bessere Performance als fixed */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.7), rgba(255, 111, 0, 0.486));
    opacity: 0.6;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 25px;
    color: var(--white-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--white-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 400;
    line-height: 1.8;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text { flex: 1; }

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-text p { margin-bottom: 20px; }

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Features mit GPU-Optimierung */
.features {
    padding: 100px 0;
    text-align: center;
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: var(--white-color);
    clip-path: ellipse(50% 50% at 50% 50%);
}

.features h2 {
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.features h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.feature-cards {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 30px;
}

.feature-card {
    flex: 1;
    background: linear-gradient(145deg, #fff8e1, #ffe0b2);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(255, 179, 0, 0.3);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    border-left: 8px solid var(--secondary-color);
    will-change: transform;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient-primary);
    opacity: 0.15;
    transition: height 0.5s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translate3d(0, -15px, 0);
    box-shadow: 0 12px 30px rgba(255, 109, 0, 0.4);
    border-bottom: 4px solid var(--secondary-color);
    background: linear-gradient(145deg, #fff8e1, #ffcc80);
}

.feature-card:hover::before { height: 100%; }

.feature-card i {
    font-size: 50px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-card:hover i { transform: scale(1.2); }

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.feature-card p {
    color: var(--accent-color);
    line-height: 1.7;
    font-size: 16px;
}

/* Gallery optimiert */
.gallery {
    padding: 100px 0;
    background-color: var(--white-color);
    position: relative;
}

.gallery::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: var(--light-color);
    clip-path: ellipse(50% 50% at 50% 50%);
    z-index: 1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    position: relative;
    z-index: 2;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
    will-change: transform;
}

.gallery-item:hover {
    transform: translate3d(0, -10px, 0);
    box-shadow: var(--shadow-hover);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    will-change: transform;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white-color);
    padding: 30px;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    transform: translate3d(0, 0, 0);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.15);
}

.gallery-overlay h3 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-overlay p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Contact optimiert */
.contact {
    padding: 100px 0;
    background-color: var(--white-color);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/dji_fly_20240528_075108_0526_1744375205959_photo.JPEG') no-repeat;
    background-size: cover;
    background-attachment: scroll;
    opacity: 0.05;
    z-index: 0;
}

.contact-content {
    display: flex;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.contact-info,
.contact-form {
    flex: 1;
}

.contact-info {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--primary-color);
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.1), transparent);
    z-index: -1;
}

.contact-form {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-info h3,
.contact-form h3 {
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.contact-info h3::after,
.contact-form h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.contact-details { margin: 40px 0; }

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.contact-item:hover {
    transform: translate3d(10px, 0, 0);
}

.contact-item i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item h4 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--white-color);
    box-shadow: var(--shadow);
    will-change: transform;
}

.social-link:hover {
    transform: translate3d(0, -5px, 0) rotate(10deg);
    box-shadow: var(--shadow-hover);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.2);
    background-color: var(--white-color);
}

/* Footer optimiert */
footer {
    background: linear-gradient(to bottom, var(--text-color), #1a1a1a);
    color: var(--white-color);
    padding: 80px 0 20px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/dji_fly_20240528_075108_0526_1744375205959_photo.JPEG') no-repeat center;
    background-size: cover;
    background-attachment: scroll;
    opacity: 0.05;
    z-index: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.footer-logo .site-logo {
    height: 34px;
    width: auto;
    display: block;
    margin-bottom: 15px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
    color: var(--white-color);
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.footer-links ul li {
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.footer-links ul li:hover {
    transform: translate3d(8px, 0, 0);
}

.footer-links ul li a {
    color: #e0e0e0;
    opacity: 0.9;
    position: relative;
    padding-left: 15px;
}

.footer-links ul li a::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-links ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    will-change: transform;
}

.footer-contact p:hover {
    transform: translate3d(8px, 0, 0);
}

.footer-contact p i {
    margin-right: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    opacity: 0.8;
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

/* Video Controls ausblenden - KORRIGIERT */
.gallery-item video {
    pointer-events: auto;
    cursor: pointer;
}

.gallery-item video::-webkit-media-controls {
    display: none !important;
}

.gallery-item video::-webkit-media-controls-enclosure {
    display: none !important;
}

.gallery-item video::-webkit-media-controls-panel {
    display: none !important;
}

/* Mobile Navigation */
nav ul.mobile {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: -20px;
    right: -20px;
    flex-direction: column;
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 1000;
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 0, 0.2);
}

nav ul.mobile.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav ul.mobile li {
    margin: 15px 0;
    text-align: center;
}

nav ul.mobile li a {
    display: block;
    padding: 15px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav ul.mobile li a:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
}

/* Responsive mit optimierten Breakpoints */
@media (max-width: 992px) {
    .about-content,
    .contact-content { flex-direction: column; }
    .feature-cards { flex-direction: column; }
}

@media (max-width: 768px) {
    nav ul { display: none; }
    .mobile-menu { display: block; }

    .hero h2 { font-size: 32px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .footer-content { flex-direction: column; }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 0;
        background-attachment: scroll;
    }
    .hero h2 { font-size: 28px; }
    .about, .features, .gallery, .contact { padding: 50px 0; }
}

/* Performance: Reduziere Animationen bei Bedarf */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto; }
}