/*
 * Datei: shared/assets/css/zentral.css
 * Zweck: Zentrale CSS-Datei für alle Projekte
 * Funktion: Einheitliches Design und Styling
 * Stand: 2024-06-09
 */

/* ===== GRUNDLEGENDE STYLES ===== */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* ===== NAVIGATION ===== */
/* Nur Startseite (index.php) – nicht Admin/Projekt-Navbars (.gt-projekt-navbar) */
.navbar.navbar-zentral-home {
    background: linear-gradient(135deg, #ff8c00 0%, #ffa500 100%) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar.navbar-zentral-home .navbar-brand {
    color: #fff !important;
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar.navbar-zentral-home .navbar-brand:hover {
    color: #ffc107 !important;
}

.navbar.navbar-zentral-home .nav-link:hover {
    color: #ffc107 !important;
}

.nav-link {
    transition: color 0.15s ease-in-out;
    font-weight: 500;
}

.dropdown-menu {
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* ===== KARTEN UND COMPONENTS ===== */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.125);
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ===== FORMULARE ===== */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
}

/* ===== TABELLEN ===== */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #343a40;
    color: #fff;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.075);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

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

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

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

/* ===== PROJEKT-KARTEN (Startseite) ===== */
.project-tiles-row {
    --bs-gutter-x: 0.35rem;
    --bs-gutter-y: 0.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.project-tiles-col {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

.project-card-body {
    padding: 0.35rem 0.25rem 0.4rem !important;
}

.project-card-icon {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-card-clickable:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.project-card-clickable:hover .card-title {
    color: #007bff !important;
}

.project-card-clickable:hover .project-card-name-bar {
    transform: scale(1.03);
}

.project-card-name-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.3rem !important;
    line-height: 1.15;
    pointer-events: none;
    --bs-btn-padding-x: 0.3rem;
    --bs-btn-padding-y: 0.2rem;
}

.project-card-name-bar__text {
    color: #fff;
    font-size: clamp(0.62rem, 2.6vw, 0.8125rem);
    font-weight: 600;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== MOBILE OPTIMIERUNG ===== */
@media (max-width: 575.98px) {
    .project-tiles-row {
        --bs-gutter-x: 0.25rem;
    }

    .project-card-body {
        padding: 0.3rem 0.15rem 0.35rem !important;
    }

    .project-card-name-bar {
        padding: 0.18rem 0.2rem !important;
    }

    .col-6 {
        padding: 0.25rem;
    }
    
    .card-body:not(.project-card-body) {
        padding: 0.75rem !important;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    .h6 {
        font-size: 0.875rem;
    }
    
    .small {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

@media (min-width: 576px) {
    .btn-lg-sm {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .h-sm-5 {
        font-size: 1.5rem;
    }
}

/* ===== FEHLERSEITEN ===== */
.error-page {
    padding: 2rem 0;
}

.error-page .display-1 {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ===== UTILITY CLASSES ===== */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.rounded {
    border-radius: 0.375rem !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}







