/* Custom CSS for Skilzo */

/* Skilzo Color Variables */
:root {
  --skilzo-primary: #5B63FF;  /* Główny Indygo */
  --skilzo-accent: #22D3EE;   /* Akcent Turkusowy */
  --skilzo-dark: #0E1020;     /* Ciemny tekst i tła */
  --skilzo-light: #FFFFFF;    /* Biały */
  --skilzo-bg: #F7F8FF;       /* Tło strony (lekko niebieskawe) */
  
  /* Gradient combinations */
  --skilzo-gradient: linear-gradient(135deg, var(--skilzo-primary), var(--skilzo-accent));
  --skilzo-gradient-light: linear-gradient(135deg, rgba(91, 99, 255, 0.1), rgba(34, 211, 238, 0.1));
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Category cards hover effects */
.category-card {
    transition: all 0.3s ease;
    background: var(--skilzo-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(91, 99, 255, 0.15), 0 10px 10px -5px rgba(34, 211, 238, 0.1);
    border-color: var(--skilzo-primary);
}

.category-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.category-card:hover .icon-wrapper {
    transform: scale(1.1);
}

/* Training cards */
.training-card {
    background: var(--skilzo-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(91, 99, 255, 0.1), 0 2px 4px -1px rgba(34, 211, 238, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.training-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(91, 99, 255, 0.15), 0 10px 10px -5px rgba(34, 211, 238, 0.1);
}

.training-card .image-placeholder {
    height: 200px;
    background: var(--skilzo-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--skilzo-light);
    font-size: 2rem;
}

.training-card .content {
    padding: 1.5rem;
}

.training-card .title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--skilzo-dark);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.training-card .description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.training-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.training-card .meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.training-card .footer {
    display: flex;
    justify-content: between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.training-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.training-card .instructor {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-blue {
    background-color: rgba(91, 99, 255, 0.1);
    color: var(--skilzo-primary);
}

.badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-yellow {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background-color: rgba(34, 211, 238, 0.1);
    color: var(--skilzo-accent);
}

/* Difficulty level badges */
.difficulty-beginner {
    background-color: #d1fae5;
    color: #065f46;
}

.difficulty-intermediate {
    background-color: #fef3c7;
    color: #92400e;
}

.difficulty-advanced {
    background-color: #fee2e2;
    color: #991b1b;
}

.difficulty-expert {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

.modal-exit {
    animation: modalExit 0.3s ease-in;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Modal Z-Index Fix - Ensure modals appear above Leaflet maps */
[id$="Modal"]:not(.hidden) {
    z-index: 10000 !important;
}

.modal-overlay {
    z-index: 10000 !important;
}

.modal-content {
    z-index: 10001 !important;
}

/* Leaflet Map Z-Index Control - Ensure maps don't interfere with modals */
.leaflet-container {
    z-index: 1 !important;
}

.leaflet-control-container {
    z-index: 10 !important;
}

/* When modal is open, lower all map elements */
body:has([id$="Modal"]:not(.hidden)) .leaflet-container {
    z-index: 1 !important;
}

body:has([id$="Modal"]:not(.hidden)) .leaflet-control-container {
    z-index: 2 !important;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Filter buttons */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--skilzo-gradient) !important;
    color: var(--skilzo-light) !important;
}

.filter-btn:not(.active):hover {
    background-color: #d1d5db;
    transform: translateY(-1px);
}

/* Search section */
.search-section {
    position: relative;
    z-index: 10;
}

/* Stats counter animation */
.stats-counter {
    font-weight: 700;
    color: white;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--skilzo-dark);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: var(--skilzo-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--skilzo-primary);
    box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success/Error messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: rgba(91, 99, 255, 0.1);
    color: var(--skilzo-primary);
    border: 1px solid rgba(91, 99, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-card {
        text-align: center;
    }
    
    .training-card .footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .training-card, .category-card {
        border: 2px solid #000;
    }
    
    .badge {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}