/* ===========================
   Basis-Einstellungen
   =========================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
}

/* ===========================
   Accessibility - Skip Link
   =========================== */
.skip-link {
    position: absolute;
    top: 0;
    transform: translateY(-100%);
    left: 0;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 16px;
    z-index: 9999;
    transition: transform 0.3s ease;
    text-decoration: none;
    font-weight: bold;
    border-bottom-right-radius: var(--radius);
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--bg-light);
}

.section-dark {
    background-color: var(--bg-dark);
    color: #ffffff;
}

/* ===========================
   Typografie
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 700;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.navbar-toggle:active {
    transform: scale(0.98);
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.navbar-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        gap: 0;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-menu a {
        display: block;
        padding: 1rem;
    }
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-white {
    background-color: #ffffff;
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: var(--bg-light);
}

/* ===========================
   Cards
   =========================== */
.card {
    background-color: #ffffff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-title {
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-light);
}

/* ===========================
   Grid System
   =========================== */
.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===========================
   Service Cards
   =========================== */
.service-card {
    background-color: #ffffff;
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-color);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-title {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

/* ===========================
   Forms
   =========================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.form-group:focus-within .form-label {
    color: var(--primary-color);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px; /* Make room for the custom arrow */
}

.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-select:hover:not(:focus) {
    border-color: var(--border-hover);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-select:hover:not(:focus) {
    border-color: var(--text-light);
}




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

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
    opacity: 1; /* Override Firefox's default opacity */
}

/* ===========================
   Alerts
   =========================== */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin: 20px 0;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: var(--bg-dark);
    color: #ffffff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-heading {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   Features Section
   =========================== */
.feature-box {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ===========================
   Stats
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-box {
    padding: 2rem;
}

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

.stat-label {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===========================
   Utility Classes
   =========================== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }
.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain; /* Ensures the logo fits within the 40x40 box without distortion */
    border-radius: var(--radius); /* Matches the border radius of the default icon */
}

/* ===========================
   Profile Image
   =========================== */
.profile-image {
    width: 100%;
    height: auto;
    max-width: 400px; /* Prevent it from getting too huge on large screens */
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* ===========================
   Dark Mode
   =========================== */
[data-theme="dark"] {
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --bg-dark: #020617;
    --border-color: #334155;
    --border-hover: #475569;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .navbar {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar-menu a {
    color: var(--text-color);
}

[data-theme="dark"] .navbar-menu a:hover,
[data-theme="dark"] .navbar-menu a.active {
    color: var(--primary-color);
}

[data-theme="dark"] .card,
[data-theme="dark"] .service-card {
    background-color: var(--bg-light);
}

[data-theme="dark"] .navbar-toggle span {
    background-color: var(--text-color);
}

[data-theme="dark"] .btn-white {
    background-color: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] .btn-white:hover {
    background-color: var(--bg-dark);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
    background-color: var(--bg-dark);
    color: var(--text-color);
    border-color: var(--border-color);
}


[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}
[data-theme="dark"] .form-input:hover:not(:focus),
[data-theme="dark"] .form-textarea:hover:not(:focus),
[data-theme="dark"] .form-select:hover:not(:focus) {
    border-color: var(--text-light);
}




[data-theme="dark"] .form-group:focus-within .form-label {
    color: var(--accent-color);
}

[data-theme="dark"] .alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399; /* emerald-400 */
}

[data-theme="dark"] .alert-error {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171; /* red-400 */
}

/* Theme Toggle Button */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
    margin-left: 10px;
}

#theme-toggle:active {
    transform: scale(0.98);
}

#theme-toggle:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Theme Toggle Icons */
#theme-toggle .moon-icon {
    display: block !important;
}
#theme-toggle .sun-icon {
    display: none !important;
}

[data-theme="dark"] #theme-toggle .moon-icon {
    display: none !important;
}
[data-theme="dark"] #theme-toggle .sun-icon {
    display: block !important;
}

[data-theme="dark"] #theme-toggle:hover {
    background-color: var(--bg-dark);
}

/* Mobile Toggle Alignment */
@media (max-width: 768px) {
    #theme-toggle {
        margin-left: 0;
        justify-content: flex-start;
        padding: 1rem;
        width: 100%;
        border-radius: 0;
    }
}

/* Dark Mode override for Mobile Menu - Force Override */
@media (max-width: 768px) {
    html[data-theme="dark"] .navbar-menu {
        background-color: #1e293b !important;
        border-bottom: 1px solid #334155;
    }
    html[data-theme="dark"] .navbar-menu a {
        color: #f1f5f9 !important;
    }
    html[data-theme="dark"] .navbar-menu a:hover,
    html[data-theme="dark"] .navbar-menu a.active {
        color: #2563eb !important;
    }
}

/* ===========================
   Partner & Certifications
   =========================== */
.partner-logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.partner-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: var(--transition);
}

.partner-logo:hover {
    transform: scale(1.1);
}

.partner-logo-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

[data-theme="dark"] .partner-logo-placeholder {
    background-color: var(--bg-dark);
}

/* ===========================
   Accessibility & Reduced Motion
   =========================== */
/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Accessible Focus Indicators */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Specific focus styles for interactive elements to match form inputs */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
#theme-toggle:focus-visible {
    outline: none; /* Reset default browser outline */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4); /* Consistent focus ring */
    border-color: var(--primary-color); /* Ensure border contrast */
    z-index: 10; /* Bring to front */
}

/* ===========================
   Loading State Logic
   =========================== */
.loading-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5em;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

/* ===========================
   Scroll to Top Button
   =========================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background-color 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible:hover {
    transform: translateY(-2px);
}

.scroll-to-top.visible:active {
    transform: scale(0.98);
}

/* Ensure focus styles override defaults but maintain positioning */
.scroll-to-top:focus-visible {
    transform: translateY(0);
}

.scroll-to-top.visible:focus-visible {
    transform: translateY(-2px);
}

[data-theme="dark"] .scroll-to-top {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Remove focus outline on main content section when accessed via skip link */
#main-content:focus {
    outline: none;
}

/* ===========================
   Accessibility & Visual Orientation
   =========================== */
/* Highlight targeted elements briefly when linked via anchor */
:target {
    animation: target-highlight 2s ease-out;
}

@keyframes target-highlight {
    0% { background-color: rgba(37, 99, 235, 0.2); /* var(--primary-color) with opacity */ }
    100% { background-color: transparent; }
}

[data-theme="dark"] :target {
    animation: target-highlight-dark 2s ease-out;
}

@keyframes target-highlight-dark {
    0% { background-color: rgba(14, 165, 233, 0.3); /* var(--accent-color) with opacity */ }
    100% { background-color: transparent; }
}

/* Ensure skip link target highlight isn't confusing, as it's the whole page body usually */
#main-content:target {
    animation: none;
}
