/* FerienMelder - Custom Styles */
/* Mobile-first, clean, professional design */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    background-color: var(--light);
}

/* Brand */
.brand-icon {
    font-size: 1.5rem;
}

.brand-icon-large {
    font-size: 3rem;
}

.brand-text {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.85;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 12px;
}

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

/* Event Cards */
.event-card {
    border-left: 4px solid var(--primary);
}

.event-card.urgent {
    border-left-color: var(--danger);
}

.event-card.soon {
    border-left-color: var(--warning);
}

.event-card.available {
    border-left-color: var(--success);
}

/* Deadline Cards */
.deadline-card {
    position: relative;
    overflow: hidden;
}

.deadline-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.deadline-card.urgent::before {
    background-color: var(--danger);
}

.deadline-card.soon::before {
    background-color: var(--warning);
}

.deadline-card.ok::before {
    background-color: var(--success);
}

/* Countdown Badge */
.countdown-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.countdown-badge.urgent {
    background-color: #fef2f2;
    color: var(--danger);
}

.countdown-badge.soon {
    background-color: #fffbeb;
    color: #b45309;
}

.countdown-badge.ok {
    background-color: #f0fdf4;
    color: #15803d;
}

/* Age Badge */
.age-badge {
    background-color: #e0e7ff;
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* District Badge */
.district-badge {
    background-color: var(--light);
    color: var(--secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Availability Badge */
.availability-badge {
    font-size: 0.75rem;
}

.availability-badge.available {
    background-color: #dcfce7;
    color: #15803d;
}

.availability-badge.limited {
    background-color: #fef3c7;
    color: #b45309;
}

.availability-badge.full {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Filters Section */
.filters {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-tag {
    background-color: #e0e7ff;
    color: var(--primary);
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-tag .remove {
    cursor: pointer;
    opacity: 0.7;
}

.filter-tag .remove:hover {
    opacity: 1;
}

/* Deadline Banner */
.deadline-banner {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Event List Item */
.event-list-item {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.event-list-item:hover {
    background-color: #f8fafc;
}

.event-list-item:last-child {
    border-bottom: none;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e5e7eb;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

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

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

.btn-outline-primary:hover, .btn-outline-primary.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Info Cards */
.info-section .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-section .card:hover {
    transform: translateY(-4px);
}

/* Footer */
.footer {
    border-top: 1px solid #e5e7eb;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .brand-text {
        font-size: 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p.lead {
        font-size: 1rem;
    }
    
    .filters {
        position: relative;
        top: 0;
    }
    
    .event-list-item {
        padding: 1rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        margin-bottom: 0.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Utilities */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .filters, .btn {
        display: none;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Accessibility */
.btn:focus, .form-control:focus, .form-select:focus, a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1e293b;
        --dark: #f8fafc;
    }
}