/* ============================================
   HENX3D - Layout Styles
   ============================================ */

/* Main Content Area - Full Height für konsistenten Hintergrund */
main {
    flex: 1;
    min-height: 100%;
    background-color: transparent;
    position: relative;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 19, 27, 0.65);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    transition: filter 0.25s ease;
}

.logo:hover {
    filter: drop-shadow(0 6px 16px rgba(79,134,255,.35));
}

.logo-text {
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 1.2rem;
}

.logo-img {
    width: 36px;
    height: 36px;
}

/* Logo-Positionierung auf Desktop - weiter nach links */
@media (min-width: 1024px) {
    .logo {
        margin-left: -1.5rem;
    }
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: 600;
    color: var(--text);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    opacity: 0.95;
    background: transparent;
    transition: 0.25s ease;
    box-shadow: 0 0 0 rgba(79,134,255,0);
    white-space: nowrap;
}

.nav-link:hover {
    box-shadow: 0 4px 12px rgba(79,134,255,.25);
    border-color: rgba(134,182,255,.35);
}

.nav-link.active {
    color: var(--glow);
    border-color: var(--glow);
    box-shadow: 0 0 0 rgba(0,0,0,0), 0 10px 30px rgba(103,232,249,.55), 0 0 24px rgba(103,232,249,.45);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
    display: flex; /* Visible on desktop for Calculator button */
    align-items: center;
    gap: var(--space-md);
}

/* Hero Section */
.hero {
    position: relative;
    background: transparent;
    color: var(--text);
    padding: 2rem 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(1200px 200px at 10% -20%, rgba(0,229,255,.08), transparent),
        radial-gradient(1000px 200px at 90% -20%, rgba(0,229,255,.06), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    color: var(--text);
    margin-bottom: var(--space-sm);
    font-size: clamp(1.5rem, 3vw, 2rem);
    background: linear-gradient(90deg, var(--text), #bfe0ff, #b3d8ff, var(--text));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: manual;
    line-height: 1.4;
    display: block;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    color: var(--muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.hero-image {
    margin-top: var(--space-2xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.two-column .column-content p {
    color: rgba(230, 237, 243, 0.85);
}

.two-column-reverse {
    grid-template-columns: 1fr 1fr;
}

.two-column-reverse .column-image {
    order: 2;
}

.column-content h2 {
    margin-bottom: var(--space-md);
}

.column-content p {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.column-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
    padding: var(--space-3xl) 0;
}

.section-compact {
    padding: var(--space-xl) 0;
}

/* Footer */
/* FOOTER - Erweitert & Kompakt */
.site-footer {
    background-color: var(--bg);
    color: var(--muted);
    border-top: 1px solid var(--line);
}

/* ERWEITERTES LAYOUT (ALT) */
.site-footer-extended {
    padding: var(--space-3xl) 0 var(--space-lg);
}

.site-footer-extended .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

/* KOMPAKTES LAYOUT (NEU - Standard) */
.site-footer-compact {
    padding: var(--space-lg) 0;
}

.site-footer-compact .footer-content {
    display: none; /* Verstecke alte Content-Spalten */
}

.site-footer-compact .footer-bottom {
    border-top: none;
    padding-top: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-2xl);
}

.footer-company-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.footer-company-info strong {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 400px;
}

.footer-social-compact {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.625rem;
    text-align: right;
}

/* Gemeinsame Footer Elemente */
.footer-section h3 {
    color: var(--text);
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.footer-section p,
.footer-section li {
    color: var(--muted);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

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

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 400;
}

.footer-legal {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.footer-legal a {
    color: var(--muted);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 999px;
    transition: all var(--transition-base);
}

.social-link:hover {
    background-color: rgba(0, 229, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.25);
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .site-footer-compact .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-md);
    }

    .footer-company-info {
        align-items: center;
        text-align: center;
    }

    .footer-right {
        align-items: center;
    }

    .footer-tagline {
        max-width: 100%;
    }
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: var(--text);
    padding: var(--space-3xl) 0;
    text-align: center;
    border-radius: var(--radius);
    margin: var(--space-3xl) 0;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.cta-section h2 {
    color: var(--text);
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: var(--muted);
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
}

/* Responsive Design */

/* Tablet Breakpoint (768px - 1024px) - Edge & Firefox optimiert */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Container Anpassungen */
    .container {
        padding: 0 2rem;
    }

    /* Navigation - Tablet-optimiert */
    .nav-list {
        gap: 0.3rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }

    /* Hero Section */
    .hero {
        padding: 1.75rem 0;
    }

    .hero-title {
        font-size: clamp(1.75rem, 4vw, 2.25rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Grid Systems für Tablet */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    /* Two Column Layout */
    .two-column,
    .two-column-reverse {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .two-column-reverse .column-image {
        order: 1;
    }

    /* Section Spacing */
    section {
        padding: var(--space-xl) 0;
    }

    .section-compact {
        padding: var(--space-lg) 0;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    /* CTA Section */
    .cta-section {
        padding: var(--space-2xl) 0;
    }

    /* Machines Grid - Bleibt 2-spaltig auf Tablet */
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

/* Mobile Breakpoint (max 767px) */
@media (max-width: 767px) {
    /* Mobile Overlay Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(13, 19, 27, 0.98);
        backdrop-filter: blur(10px);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .main-nav.active {
        right: 0;
    }

    /* Sofort-Kalkulation Button im Mobile Menu */
    .main-nav .header-actions {
        display: flex;
        order: -1;
        margin-bottom: 2rem;
        width: 100%;
    }

    .main-nav .header-actions .btn {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(103, 232, 249, 0.3);
        background: var(--glow);
        color: var(--dark);
        border: none;
    }

    .main-nav .header-actions .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(103, 232, 249, 0.4);
    }

    /* Navigation Links */
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        font-weight: 600;
        font-size: 1.05rem;
        transition: all 0.2s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
        text-decoration: none;
        cursor: pointer;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(103, 232, 249, 0.3);
        transform: translateX(8px);
    }

    .nav-link.active {
        background: rgba(103, 232, 249, 0.15);
        color: var(--glow);
        border-color: var(--glow);
        font-weight: 700;
    }

    /* Menu Toggle Button */
    .menu-toggle {
        display: flex;
        z-index: 1001;
        background: transparent;
        border: 1px solid var(--line);
        padding: 0.5rem;
        border-radius: 6px;
    }

    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--glow);
    }

    .menu-toggle span {
        background: var(--text);
        height: 2px;
        width: 22px;
        border-radius: 1px;
    }

    /* Hero bleibt kompakt auf Mobile */
    .hero {
        padding: 1.5rem 0;
    }

    .hero-title {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
        margin-bottom: var(--space-xs);
    }

    .hero-subtitle {
        font-size: clamp(0.875rem, 3vw, 1rem);
        margin-bottom: var(--space-sm);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Grid-Anpassungen */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Two Column Layout auf Mobile */
    .two-column,
    .two-column-reverse {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .two-column-reverse .column-image {
        order: 1;
    }

    /* Section Spacing */
    .section {
        padding: var(--space-2xl) 0;
    }

    .section-compact {
        padding: var(--space-xl) 0;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    /* Stats Grid - Zentriert untereinander */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Process Timeline - Zentriert untereinander */
    .process-timeline {
        flex-direction: column;
        gap: var(--space-xl);
        align-items: center;
    }

    .process-step {
        max-width: 350px;
        width: 100%;
    }

    .process-connector {
        display: none;
    }

    /* Tech Highlights - Zentriert untereinander */
    .tech-highlights {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }

    .highlight-item {
        max-width: 350px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    /* Hero noch kompakter auf sehr kleinen Geräten */
    .hero {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
    }

    /* Service Cards */
    .service-card {
        padding: var(--space-lg);
    }

    /* Section Header */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1.5rem;
        letter-spacing: 0.05em;
    }

    .service-card-title {
        font-size: 1.25rem;
        min-height: auto;
    }
}

/* Maschinen-Grid (2-Spalten auf Desktop, 1-Spalte auf Mobile) */
.machines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 768px) {
    .machines-grid {
        grid-template-columns: 1fr;
    }
}
