/**
 * 🎨 HAUPTSTYLESHEET - Elektro Consulting Schaffrick
 * 
 * Zentrale CSS-Datei mit Designrichtlinien:
 * - Farben: Anthrazit + Gelb/Orange
 * - UI: Klar, technisch, aufgeräumt
 * - Responsive Design (Mobile First)
 * 
 * @package MS-EC
 * @version 1.0
 * @author Elektro Consulting Schaffrick
 */

/* ===== CSS VARIABLES ===== */
:root {
    /* Hauptfarben */
    --primary-color: #ffc107; /* Bootstrap Warning (Gelb) */
    --primary-dark: #e0a800;
    --primary-light: #ffca2c;
    
    /* Anthrazit Farben */
    --dark-color: #212529; /* Bootstrap Dark */
    --dark-light: #343a40;
    --dark-lighter: #495057;
    
    /* Akzentfarben */
    --accent-orange: #fd7e14; /* Bootstrap Orange */
    --accent-orange-dark: #e55a00;
    
    /* Neutrale Farben */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #495057;
    
    /* Schatten */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Abstände */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Schriftgrößen */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-xxl: 1.5rem;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
    margin: 0;
    padding: 0;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--dark-color);
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
    line-height: 1.1;
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: 400;
    line-height: 1.6;
}

.text-muted {
    color: var(--gray) !important;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-warning {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
}

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

.btn-outline-warning {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-warning:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-lg);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-sm);
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

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

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

/* ===== NAVIGATION ===== */
.navbar {
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease-in-out;
}

.navbar-brand {
    font-weight: 700;
    font-size: var(--font-size-xl);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--dark-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    min-height: 75vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,193,7,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.hero-image {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== SERVICE ICONS ===== */
.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-orange));
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease-in-out;
}

.service-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

/* ===== SECTIONS ===== */
section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--light-gray) !important;
}

.bg-dark {
    background-color: var(--dark-color) !important;
}

/* ===== FORMS ===== */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: var(--spacing-md);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--dark-color);
    border-left: 4px solid var(--primary-color);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: var(--dark-color);
    border-left: 4px solid #0dcaf0;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--dark-color);
    border-left: 4px solid #198754;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--dark-color);
    border-left: 4px solid #dc3545;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge.bg-warning {
    color: var(--dark-color);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
}

footer h5, footer h6 {
    color: var(--white);
}

footer a {
    transition: color 0.2s ease-in-out;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    transition: all 0.2s ease-in-out;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ===== UTILITIES ===== */
.text-warning {
    color: var(--primary-color) !important;
}

.bg-warning {
    background-color: var(--primary-color) !important;
}

.border-warning {
    border-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-in-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-in-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem !important;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-base);
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: var(--font-size-lg);
    }
    
    .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top,
    .cookie-consent {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

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

/* Focus styles für bessere Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ff8c00;
        --dark-color: #000000;
    }
}

/* ===== CUSTOM COMPONENTS ===== */

/* Progress Bar */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: var(--light-gray);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 0.25rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* Stats Cards */
.stats-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-orange));
    color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.stats-label {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

/* Testimonial Cards */
.testimonial-card {
    background-color: var(--white);
    border-radius: 0.5rem;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    font-family: serif;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.testimonial-author {
    font-weight: 600;
    color: var(--dark-color);
}

.testimonial-company {
    font-size: var(--font-size-sm);
    color: var(--gray);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--light-gray);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== TOOLTIPS ===== */
.tooltip {
    font-size: var(--font-size-sm);
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 0.25rem;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--dark-color);
}

/* ===== MODALS ===== */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--light-gray);
    padding: var(--spacing-lg);
}

.modal-footer {
    border-top: 1px solid var(--light-gray);
    padding: var(--spacing-lg);
}

/* ===== TABLES ===== */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--light-gray);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.05);
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    color: var(--dark-color);
    border: 1px solid var(--light-gray);
    margin: 0 2px;
    border-radius: 0.25rem;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
}

/* ===== BREADCRUMBS ===== */
.breadcrumb {
    background-color: transparent;
    padding: var(--spacing-md) 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--gray);
}

.breadcrumb-item.active {
    color: var(--gray);
}

/* ===== SIDEBAR ===== */
.sidebar {
    background-color: var(--light-gray);
    border-radius: 0.5rem;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
}

/* ===== SEARCH ===== */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-right: 3rem;
}

.search-box .btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--gray);
}

.search-box .btn:hover {
    color: var(--primary-color);
}

/* ===== NOTIFICATIONS ===== */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-orange);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== BACK TO TOP ===== */
#backToTop {
    transition: all 0.3s ease-in-out;
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===== COOKIE CONSENT ===== */
#cookieConsent {
    box-shadow: var(--shadow-lg);
}

/* ===== PRINT FRIENDLY ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    .print-break-avoid {
        page-break-inside: avoid;
    }
} 

/* ===== STATS CARDS ===== */
.stats-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
}

.stats-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.stats-content {
    flex: 1;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.stats-label {
    font-size: var(--font-size-sm);
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stats-detail {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 400;
}

/* ===== PAGE HEADERS ===== */
.page-header {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0;
    margin-top: 76px; /* Für fixed navbar */
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ===== FILTER SECTIONS ===== */
.filter-section {
    background-color: var(--light-gray);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-section .form-control,
.filter-section .form-select {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
}

.filter-section .form-control:focus,
.filter-section .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-md) var(--spacing-lg);
}

.card-header.bg-warning {
    background-color: var(--primary-color) !important;
    color: var(--dark-color);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--dark-color);
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-warning {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
}

.btn-warning:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--dark-color);
    transform: translateY(-1px);
}

.btn-outline-warning {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-warning:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
}

.btn-outline-light {
    color: var(--white);
    border-color: var(--white);
}

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

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge.bg-warning {
    background-color: var(--primary-color) !important;
    color: var(--dark-color);
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* ===== TABLES ===== */
.table {
    background-color: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--light-gray);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: var(--dark-color);
    padding: var(--spacing-md);
}

.table tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.05);
}

.table tbody td {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--dark-color);
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
} 