/* ===== Variablen ===== */
:root {
    --primary: #00c2cb;
    --primary-dark: #00a3ab;
    --secondary: #007a80;
    --gradient: linear-gradient(135deg, #00c2cb 0%, #007a80 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --header-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: #ffffff;
    --dropdown-bg: #ffffff;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-heading: #ffffff;
    --footer-border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --partner-logo-bg: #f8f9fa;
    --partner-border: #eee;
    --form-border: #e2e8f0;
    --accent-color: #0066cc;
    --link-hover-bg: #f8fafc;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.95);
    --nav-bg: #0f172a;
    --dropdown-bg: #1e293b;
    --footer-bg: #020617;
    --footer-text: #64748b;
    --footer-heading: #e2e8f0;
    --footer-border: #1e293b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --partner-logo-bg: #1e293b;
    --partner-border: #334155;
    --form-border: #334155;
    --accent-color: #00c2cb;
    --link-hover-bg: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

.nav-theme-toggle-item {
    list-style: none;
    display: flex;
    align-items: center;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link:not(.btn-nav):hover::after {
    width: 100%;
}

.btn-nav {
    background: var(--gradient);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

.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(5px, -5px);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 194, 203, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 194, 203, 0.5);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

#matrixCanvas, #circuitCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#circuitCanvas {
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 800px;
    width: 100%;
    padding: 0 24px;
}

.hero-title {
    display: block;
    min-height: 1.2em;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #00c2cb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    display: block;
    min-height: 1.2em;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid white;
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ===== Stats Section ===== */
.stats-section {
    background: var(--bg-secondary);
    padding: 5rem 0;
    transition: background 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Services Section ===== */
.services-section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--text);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--secondary);
}

/* ===== Process Section ===== */
.process-section {
    background: var(--bg-secondary);
    padding: 6rem 0;
    transition: background 0.3s ease;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-5px);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.process-step h3 {
    margin-bottom: 0.8rem;
    color: var(--text);
}

.process-step p {
    color: var(--text-secondary);
}

/* ===== Testimonials ===== */
.testimonials-section {
    padding: 6rem 0;
    background: #0f172a;
    color: white;
}

.testimonials-section .section-title {
    color: white;
}

.testimonial-slider {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.testimonial-track {
    position: relative;
    min-height: 250px;
}

.testimonial-card {
    display: none;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.6s ease;
}

.testimonial-card.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quote-icon {
    font-size: 4rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.testimonial-card p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.testimonial-author strong {
    display: block;
    color: white;
}

.testimonial-author span {
    color: var(--primary);
    font-size: 0.9rem;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

/* ===== CTA Section ===== */
.cta-section {
    background: var(--gradient);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-section .btn-primary:hover {
    background: var(--text);
    color: white;
}

/* ===== Page Hero (Unterseiten) ===== */
.page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 10rem 0 4rem;
    text-align: center;
}

.page-hero.small {
    padding: 8rem 0 3rem;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #ffffff 0%, #00c2cb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    color: #94a3b8;
    font-size: 1.2rem;
}

/* ===== Detail Sections (Leistungen) ===== */
.detail-section {
    padding: 5rem 0;
}

.detail-section.alt-bg {
    background: var(--bg-secondary);
    transition: background 0.3s ease;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.detail-grid.reverse {
    direction: rtl;
}

.detail-grid.reverse .detail-content {
    direction: ltr;
}

.detail-tag {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.detail-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.detail-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-list li {
    color: var(--text);
    font-weight: 500;
}

.detail-visual {
    display: flex;
    justify-content: center;
    direction: ltr;
}

.visual-box {
    width: 250px;
    height: 250px;
    background: var(--gradient);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.visual-box:hover {
    transform: rotate(5deg) scale(1.05);
}

.visual-box.large {
    width: 300px;
    height: 300px;
}

/* ===== About Section ===== */
.about-section {
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.about-content .lead {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.about-visual {
    display: flex;
    justify-content: center;
}

/* ===== Values Section ===== */
.values-section {
    background: var(--bg-secondary);
    padding: 6rem 0;
    transition: background 0.3s ease;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.value-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.value-card p {
    color: var(--text-secondary);
}

/* ===== Referenzen Section ===== */
.referenzen-section {
    padding: 5rem 0;
}

.referenzen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.referenz-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.referenz-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.referenz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.referenz-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.referenz-header strong {
    display: block;
    color: var(--text);
}

.referenz-header span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.referenz-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

/* ===== Kontakt Section ===== */
.kontakt-section {
    padding: 5rem 0;
}

.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
}

.kontakt-info h2,
.kontakt-form-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.info-item p {
    color: var(--text-secondary);
}

.info-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.opening-hours {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 2rem;
    transition: background 0.3s ease;
}

.opening-hours h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.hours-row:last-child {
    border-bottom: none;
}

.kontakt-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid var(--form-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox-group input {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-group a {
    color: var(--primary);
}

.form-success {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* ===== Map Section ===== */
.map-section {
    padding: 0 0 5rem;
}

.map-placeholder {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ===== Legal Pages ===== */
.legal-section {
    padding: 4rem 0 6rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    font-size: 1.4rem;
}

.legal-content h3 {
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.1rem;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 1.5rem;
    transition: background 0.3s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 40px;
}

.footer-column h4 {
    color: var(--footer-heading);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

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

.footer-column a:hover {
    color: var(--primary);
}

.footer-column li {
    color: var(--footer-text);
}

.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-logo-col p {
    color: var(--footer-text) !important;
}

/* ===== Theme Toggle in Footer ===== */
.footer-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.footer-theme-toggle .theme-toggle {
    width: 36px;
    height: 36px;
}

.footer-theme-toggle .theme-toggle-label {
    font-size: 0.85rem;
    color: var(--footer-text);
}

/* ===== Clickable Service Cards ===== */
.service-card-link {
    text-decoration: none;
    display: block;
}

.service-card-link .service-card {
    cursor: pointer;
    height: 100%;
}

/* ===== Nav Dropdown (Multi-Level) ===== */
.nav-dropdown {
    position: relative;
}

.dropdown-category {
    position: relative;
}

.dropdown-category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 700;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-category-title:hover {
    background: var(--link-hover-bg);
}

/* Basisoptik, breitenunabhängig — Positionierung/Sichtbarkeit folgt je
   Breakpoint weiter unten (Desktop-Flyout ab 969px bzw. Mobil-Akkordeon
   in @media (max-width: 968px)). */
.dropdown-caret {
    font-size: 0.7rem;
    margin-left: 2px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-caret-right {
    font-size: 0.65rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown-menu,
.dropdown-submenu {
    background: var(--dropdown-bg);
    border-radius: 12px;
    list-style: none;
}

/* Desktop-Flyout: Hover-basiertes Aufklappen (Leistungen rechts/darunter).
   Nur ab 969px aktiv, damit auf Mobilgeräten keine seitliche/absolute
   Positionierung (z. B. durch touch-"sticky" :hover) durchschlagen kann —
   dort übernimmt der Akkordeon-Block in @media (max-width: 968px). */
@media (min-width: 969px) {
    .nav-dropdown:hover .dropdown-caret {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
        min-width: 220px;
        padding: 0.75rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
    }

    .nav-dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-category:hover .dropdown-caret-right {
        transform: rotate(90deg);
    }

    .dropdown-submenu {
        position: absolute;
        top: 0;
        left: 100%;
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        padding: 0.75rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1101;
    }

    .dropdown-category:hover > .dropdown-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

.dropdown-submenu li a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-submenu li a:hover {
    background: var(--link-hover-bg);
    color: var(--primary);
}

/* ===== IT-Infrastruktur Page ===== */
.infra-intro-section {
    padding: 80px 0;
}

.infra-intro {
    max-width: 800px;
    margin: 0 auto;
}

.infra-intro h2 {
    margin-bottom: 2rem;
}

.infra-intro p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.infra-features-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    transition: background 0.3s ease;
}

.infra-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.infra-feature-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.infra-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.infra-feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.infra-feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.infra-feature-card p {
    color: var(--text-secondary);
}

/* ===== Breadcrumb ===== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.breadcrumb-nav a:hover {
    color: white;
}

.breadcrumb-sep {
    color: #64748b;
}

.breadcrumb-current {
    color: #94a3b8;
}

.breadcrumbs-nav {
    margin-bottom: 1.5rem;
}

.breadcrumbs-nav .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumbs-nav .breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs-nav .breadcrumbs li:not(:last-child)::after {
    content: '›';
    color: #64748b;
}

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

.breadcrumbs-nav a:hover {
    color: white;
}

.breadcrumbs-nav [aria-current="page"] {
    color: #94a3b8;
}

/* ===== Partners Section (Home) ===== */
.partners-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background 0.3s ease;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.partner-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.partner-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.partner-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
}

.partner-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text);
}

.partner-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.partners-cta {
    text-align: center;
    margin-top: 50px;
}

/* ===== Partners Detail Section ===== */
.partners-detail-section {
    padding: 80px 0;
}

.partner-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 80px;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--partner-border);
}

.partner-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.partner-detail.reverse {
    grid-template-columns: 1fr 300px;
}

.partner-detail.reverse .partner-detail-logo {
    order: 2;
}

.partner-detail-logo {
    background: var(--partner-logo-bg);
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    position: sticky;
    top: 100px;
    transition: background 0.3s ease;
}

.partner-detail-logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.partner-detail-logo-unifi {
    background: #005edd !important;
}

.partner-tagline {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.partner-detail-content h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.partner-detail-content p {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.partner-features {
    list-style: none;
    padding: 0;
    margin-top: 25px;
}

.partner-features li {
    padding: 10px 0 10px 30px;
    position: relative;
    color: var(--text);
}

.partner-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .partner-detail,
    .partner-detail.reverse {
        grid-template-columns: 1fr;
    }
    .partner-detail.reverse .partner-detail-logo {
        order: 0;
    }
    .partner-detail-logo {
        position: static;
        height: auto;
    }
}

/* ===== Contact Form Section ===== */
.contact-form-section {
    padding: 60px 0;
}

.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

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

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--form-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text);
}

.contact-form-wrapper input[type="vorname"],
.contact-form-wrapper input[type="nachname"]  {
    width: 50%;
    padding: 12px 15px;
    border: 1px solid var(--form-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text);
}

.contact-form-wrapper textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form-wrapper label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}

/* ===== Scramble ===== */
.scramble-char {
    color: var(--primary);
    opacity: 0.8;
}

[data-scramble] {
    display: block;
    width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 76px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    /* .nav-menu zentriert Items standardmäßig über align-items:center mit
       Breite nach Inhalt. Das versteckte (max-height:0) .dropdown-menu
       zählt dabei trotzdem mit voller Inhaltsbreite mit (z. B. Breite von
       "IT-Infrastruktur"), wodurch "Leistungen" nach links verschoben
       wirkt statt zentriert wie die übrigen Links. Fix: Zeile auf volle
       Breite strecken und den Link-Text selbst zentrieren. */
    .nav-dropdown {
        align-self: stretch;
    }

    .nav-dropdown > .nav-link {
        display: block;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-dropdown.open > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 0.5rem 0 0.5rem 1rem;
    }

    .dropdown-submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .dropdown-category.open > .dropdown-submenu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 0.5rem 0 0.5rem 1rem;
    }

    .nav-dropdown:hover .dropdown-caret,
    .dropdown-category:hover .dropdown-caret-right {
        transform: none;
    }

    .nav-dropdown.open .dropdown-caret {
        transform: rotate(180deg);
    }

    .dropdown-category.open .dropdown-caret-right {
        transform: rotate(90deg);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid,
    .detail-grid.reverse,
    .about-grid,
    .kontakt-grid {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .detail-visual {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
}