/* ========================================
   LINGWISH SCHOOL ORANGE BRANDING - CRITICAL CSS
   ======================================== */

/* CRITICAL: This CSS must load to ensure orange branding is visible */
/* Force orange branding immediately - highest priority */
.navbar { background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%) !important; }
.btn-primary { background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%) !important; color: white !important; }
.card-header { background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%) !important; color: white !important; }
footer { background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%) !important; color: white !important; }

/* Lingwish School Custom Styles - Modern Design */
/* CRITICAL: Orange Branding CSS - Must Load First */

:root {
    /* Lingwish Brand Colors - Orange Theme - PRIORITY OVERRIDE */
    --primary-color: #FF6B35 !important;
    --secondary-color: #FF8C42 !important;
    --tertiary-color: #FF4500 !important;
    --accent-blue: #2E5266 !important;
    --accent-light-blue: #87CEEB !important;
    --accent-cream: #FFF8E7 !important;
    --accent-yellow: #FFD700 !important;

    /* Status Colors */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #FF8C42;
    --info-color: #87CEEB;

    /* Neutral Colors */
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #495057;

    /* Gradients - Orange Theme */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
    --gradient-secondary: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    --gradient-hero: linear-gradient(135deg, #FF6B35 0%, #FF8C42 50%, #87CEEB 100%);
    --gradient-orange: linear-gradient(135deg, #FF8C42 0%, #FF6B1A 100%);
    --gradient-yellow: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    --gradient-blue: linear-gradient(135deg, #87CEEB 0%, #2E5266 100%);
}

/* General Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fafbfc;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
}

.display-4 {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.08);
    transition: all 0.3s ease;
    background: white;
}

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

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Special card variants */
.card.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
}

.card.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
}

.card.school-card {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

.card.school-card:hover {
    background: linear-gradient(white, white) padding-box,
                var(--gradient-orange) border-box;
}

/* Forms */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 99, 210, 0.15);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.required-field::after {
    content: " *";
    color: var(--danger-color);
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

/* CRITICAL: Orange branding for primary buttons */
.btn-primary {
    background: linear-gradient(135deg, #0000ff 0%, #003cff 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #426eff 0%, #1a31ff 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4) !important;
    color: white !important;
}

.btn-success {
    background: var(--gradient-primary);
    color: white;
}

.btn-success:hover {
    background: var(--success-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Tables */
.table {
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    border-top: none;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(79, 99, 210, 0.05);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(79, 99, 210, 0.1);
}

/* Status badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: var(--gradient-orange);
    color: white;
}

.status-confirmed {
    background: var(--gradient-primary);
    color: white;
}

.status-attended {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.status-no-show {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.status-cancelled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

/* Dashboard styles */
.dashboard-card {
    border: none;
    border-radius: 20px;
    background: white;
    box-shadow: 0 8px 30px rgba(79, 99, 210, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.dashboard-card.success::before {
    background: var(--gradient-primary);
}

.dashboard-card.warning::before {
    background: var(--gradient-orange);
}

.dashboard-card.info::before {
    background: var(--gradient-yellow);
}

.dashboard-card.danger::before {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(79, 99, 210, 0.2);
}

.dashboard-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-card.warning .dashboard-number {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-card.info .dashboard-number {
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-card.success .dashboard-number {
    color: var(--success-color);
}

/* Registration form styles */
.registration-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

/* School logo */
.school-logo {
    max-height: 80px;
    width: auto;
}

/* Navbar Logo - Clean and Simple */
.navbar-logo-container {
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: none;
}

.navbar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
    /* Original logo colors without filter */
}

/* Language Switcher Flags */
.language-switcher-flags {
    background: rgba(255, 193, 7, 0.9);
    border-radius: 8px;
    padding: 4px 8px;
    margin-left: 8px;
}

.language-flag-link {
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.language-flag-link:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

.language-flag-link.active {
    opacity: 1 !important;
}

.language-flag-link img {
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.language-flag-link:hover img {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Fallback ikona pokud se logo nenačte */
.navbar-logo-container i {
    font-size: 1.5rem;
    color: #FF6B35;
}

/* Utility classes */
.text-orange {
    color: #FF6B35 !important;
}

.bg-orange {
    background-color: #FF6B35 !important;
}

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

/* Modern Homepage Styles */
/* ====================== */

/* Modern Hero Section */
.modern-hero {
    background: white;
    padding: 4rem 0;
    position: static;
    overflow: visible;
}

/* .modern-hero::before removed to fix dropdown z-index issues */

/* .modern-hero::after removed to fix dropdown z-index issues */

/* @keyframes float removed - no longer needed */

.hero-content {
    position: static;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gray-600);
    line-height: 1.6;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.hero-actions .btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero-actions .btn:hover::before {
    left: 100%;
}

.hero-actions .btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    color: white;
}

.hero-actions .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.hero-actions .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.hero-visual {
    position: relative;
}

.hero-logo-container {
    position: relative;
    display: inline-block;
    padding: 2.5rem;
    background: linear-gradient(135deg,
        rgba(255, 107, 53, 0.1) 0%,
        rgba(255, 140, 66, 0.15) 50%,
        rgba(255, 248, 231, 0.2) 100%);
    border-radius: 50%;
    box-shadow:
        0 20px 60px rgba(255, 107, 53, 0.15),
        0 0 0 1px rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
}

.hero-logo-container:hover {
    transform: scale(1.05);
    box-shadow:
        0 25px 80px rgba(255, 107, 53, 0.2),
        0 0 0 1px rgba(255, 107, 53, 0.15);
}

.hero-logo-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg,
        rgba(255, 107, 53, 0.1),
        rgba(255, 140, 66, 0.1),
        rgba(135, 206, 235, 0.1));
    border-radius: 50%;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

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

.hero-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(255, 107, 53, 0.2));
    transition: all 0.3s ease;
}

.hero-logo:hover {
    filter: drop-shadow(0 15px 40px rgba(255, 107, 53, 0.3));
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Features Section */
.features-section {
    position: relative;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(79, 99, 210, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Modern School Cards */
.schools-section {
    background: white;
}

.modern-school-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(79, 99, 210, 0.15);
}

.school-header {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1rem;
    margin-bottom: 1rem !important;
}

.school-logo-wrapper {
    flex-shrink: 0;
}

.school-logo-small {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--light-color);
    padding: 8px;
}

.school-logo-placeholder {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.school-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.3;
}

.school-description {
    font-size: 0.875rem;
    line-height: 1.5;
}

.school-contact {
    background: var(--light-color);
    border-radius: 12px;
    padding: 1rem;
}

.contact-item {
    font-size: 0.875rem;
}

.contact-item i {
    width: 16px;
    text-align: center;
}

.school-actions .btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* No Schools Section */
.no-schools-section {
    background: var(--light-color);
}

.empty-state-icon {
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-logo {
        max-width: 150px;
    }

    .hero-logo-container {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .school-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .school-logo-wrapper {
        align-self: center;
    }

    .navbar-brand-text {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 576px) {
    .navbar-logo-container {
        width: 45px;
        height: 45px;
        padding: 6px;
    }

    .navbar-brand-text {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .modern-school-card .card-body {
        padding: 1.5rem;
    }
}

/* Utility Classes for Better Spacing */
.min-vh-50 {
    min-height: 50vh;
}

/* Improved Button Styles */
.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    border-radius: 12px;
}

/* Card Improvements */
.card {
    border: none;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    transition: all 0.3s ease;
}

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

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

.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.modern-school-card {
    animation: fadeInUp 0.6s ease-out;
}

.modern-school-card:nth-child(1) { animation-delay: 0.1s; }
.modern-school-card:nth-child(2) { animation-delay: 0.2s; }
.modern-school-card:nth-child(3) { animation-delay: 0.3s; }

/* Better Focus States */
.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.25);
}

.card:focus-within {
    box-shadow: 0 8px 40px rgba(79, 99, 210, 0.15);
    transform: translateY(-2px);
}

/* Improved Text Contrast */
.text-primary {
    color: var(--primary-color) !important;
}

/* Better Spacing for Content */
.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .feature-card,
    .modern-school-card {
        animation: none;
    }

    .card:hover,
    .feature-card:hover,
    .modern-school-card:hover,
    .hero-actions .btn:hover,
    .hero-logo-container:hover {
        transform: none;
    }

    .hero-logo-container::before,
    .modern-hero::after {
        animation: none;
    }

    .hero-actions .btn::before {
        display: none;
    }
}

/* Print Styles */
@media print {
    .modern-hero::before,
    .modern-hero::after,
    .hero-logo-container::before {
        display: none;
    }

    .hero-actions .btn::before {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Footer */
footer {
    background: var(--gradient-primary);
    color: white;
    border-top: none;
    margin-top: 5rem;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

/* Enhanced Responsive Design - Mobile First Approach */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-section {
        padding: 1.5rem 1rem !important;
        margin: 0.5rem 0;
        border-radius: 15px;
    }

    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .dashboard-number {
        font-size: 1.5rem;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    /* Touch-friendly navigation */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: 8px;
    }

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

    /* Form improvements for mobile */
    .form-control, .form-select {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-floating > label {
        padding: 1rem 0.75rem;
    }

    /* Table responsive improvements */
    .table-responsive {
        border-radius: 8px;
    }

    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    /* Lesson cards mobile optimization */
    .lesson-card {
        margin-bottom: 1rem;
    }

    .lesson-card .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .lesson-card .card-body {
        padding: 1rem;
    }

    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Toast notifications for mobile */
    .toast {
        min-width: 280px;
        margin-bottom: 0.5rem;
    }

    #toast-container {
        padding: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-section {
        padding: 2rem 1.5rem !important;
        border-radius: 20px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .dashboard-number {
        font-size: 1.75rem;
    }

    .card {
        margin-bottom: 1.25rem;
    }

    .lesson-card .card-header {
        padding: 1rem 1.25rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-section {
        padding: 2.5rem 2rem !important;
        border-radius: 25px;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    .dashboard-number {
        font-size: 2rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    /* Tablet-specific lesson grid */
    .lesson-cards-container .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section {
        padding: 3rem 2.5rem !important;
        border-radius: 30px;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .dashboard-number {
        font-size: 2.25rem;
    }

    /* Desktop-specific lesson grid */
    .lesson-cards-container .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn, .card, .nav-link {
        transition: none; /* Disable hover animations on touch */
    }

    .card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    }

    .lesson-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    }

    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .form-control, .form-select {
        min-height: 44px;
    }
}

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

/* Toast notifikace */
#toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
    margin-bottom: 0.5rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast:not(.show) {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

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

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

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-card {
    padding: 1rem;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced loading states */
.loading-overlay {
    position: relative;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--primary-color);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

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

/* Advanced Progress Indicators */
.progress-ring {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.progress-ring-circle {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.progress-ring-circle.progress {
    stroke: var(--primary-color);
    stroke-dasharray: 0 251.2; /* 2 * PI * 40 */
    animation: progress-ring 2s ease-in-out;
}

@keyframes progress-ring {
    from { stroke-dasharray: 0 251.2; }
    to { stroke-dasharray: var(--progress-value, 0) 251.2; }
}

.progress-bar-animated {
    background: linear-gradient(45deg,
        rgba(255,255,255,0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.2) 75%,
        transparent 75%);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.step-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-200);
    z-index: 1;
}

.step-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
}

.step-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-progress-item.active .step-progress-circle {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step-progress-item.completed .step-progress-circle {
    background: var(--success-color);
    color: white;
}

.step-progress-item.completed .step-progress-circle::before {
    content: '✓';
    font-weight: bold;
}

.step-progress-label {
    font-size: 0.875rem;
    text-align: center;
    color: var(--gray-600);
    font-weight: 500;
}

.step-progress-item.active .step-progress-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Enhanced Skeleton Loading */
.skeleton-container {
    padding: 1rem;
}

.skeleton-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.skeleton-content {
    flex: 1;
}

.skeleton-title {
    height: 1.25rem;
    width: 70%;
    margin-bottom: 0.5rem;
}

.skeleton-subtitle {
    height: 1rem;
    width: 50%;
}

.skeleton-paragraph {
    margin: 1rem 0;
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-line:nth-child(1) { width: 100%; }
.skeleton-line:nth-child(2) { width: 95%; }
.skeleton-line:nth-child(3) { width: 85%; }
.skeleton-line:nth-child(4) { width: 60%; }

.skeleton-button {
    height: 2.5rem;
    width: 120px;
    border-radius: 6px;
    margin-top: 1rem;
}

.skeleton-table {
    width: 100%;
}

.skeleton-table-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.skeleton-table-cell {
    height: 1rem;
    border-radius: 4px;
    flex: 1;
}

.skeleton-table-cell:nth-child(1) { flex: 2; }
.skeleton-table-cell:nth-child(2) { flex: 1; }
.skeleton-table-cell:nth-child(3) { flex: 1; }
.skeleton-table-cell:nth-child(4) { flex: 0.5; }

/* Notification Badges */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge[data-count="0"]::after {
    display: none;
}

/* Loading Dots */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loading-dots 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes loading-dots {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Enhanced Form Validation Styles */
.form-control, .form-select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 99, 210, 0.25);
}

.form-control.is-valid, .form-select.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 2.94 2.94L8.5 6.4l.94.94L6.5 10.27z'/%3e%3c/svg%3e");
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--success-color);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

/* Required field indicator */
.required-indicator {
    color: var(--danger-color);
    font-weight: bold;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Password Strength Indicator */
.password-strength-indicator {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.strength-bar-fill.strength-weak {
    background: var(--danger-color);
}

.strength-bar-fill.strength-fair {
    background: var(--warning-color);
}

.strength-bar-fill.strength-good {
    background: var(--info-color);
}

.strength-bar-fill.strength-strong {
    background: var(--success-color);
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.password-requirements .requirement.met {
    color: var(--success-color);
}

.password-requirements .requirement i {
    width: 12px;
    font-size: 0.75rem;
}

/* Password Toggle */
.password-toggle {
    border-left: none;
    padding: 0.375rem 0.75rem;
}

.password-toggle:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Email Suggestions */
.email-suggestion {
    background: rgba(79, 99, 210, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.email-suggestion .btn-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.email-suggestion .btn-link:hover {
    color: var(--secondary-color);
}

/* Domain Warning */
.domain-warning {
    background: rgba(255, 193, 7, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--warning-color);
    color: #856404;
}

/* Validation Summary */
.validation-summary {
    border-left: 4px solid var(--danger-color);
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-summary h6 {
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.validation-summary ul {
    margin-left: 1rem;
}

.validation-summary li {
    margin-bottom: 0.25rem;
}

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

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

/* Floating Labels Enhancement */
.form-floating > label {
    color: var(--gray-600);
    transition: all 0.15s ease-in-out;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Input Groups */
.input-group .form-control:focus {
    z-index: 3;
}

.input-group .btn {
    z-index: 2;
}

/* Checkbox and Radio Enhancements */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 99, 210, 0.25);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* File Input Styling */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: var(--secondary-color);
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control,
    .form-select {
        border-width: 2px;
    }

    .form-control:focus,
    .form-select:focus {
        border-width: 3px;
    }

    .validation-summary {
        border-left-width: 6px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .form-control,
    .form-select,
    .strength-bar-fill,
    .password-requirements .requirement {
        transition: none;
    }

    .validation-summary {
        animation: none;
    }
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(79, 99, 210, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 99, 210, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

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

/* Enhanced Navigation - CRITICAL BLUE BRANDING */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #4F63D2 0%, #5A6FD8 100%) !important;
}

/* CRITICAL: Force blue branding on navbar - override any conflicts */
.navbar,
.navbar-expand-lg,
.navbar-expand-md,
.navbar-expand-sm,
.navbar-expand-xl {
    background: linear-gradient(135deg, #4F63D2 0%, #5A6FD8 100%) !important;
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav {
    gap: 0.25rem;
}

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.125rem;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Dropdown Enhancements */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    margin-top: 0.5rem;
    animation: dropdownSlide 0.3s ease;
    z-index: 1050 !important;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0.125rem 0.5rem;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 1rem;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Language Switcher Specific Styles */
.language-switcher .dropdown-item:hover {
    background-color: #FF6B35;
    color: white;
}

.language-switcher .dropdown-item.active {
    background-color: #FF6B35;
    color: white;
}

/* Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(79, 99, 210, 0.95);
        margin: 0.5rem -1rem 0;
        padding: 1rem;
        border-radius: 12px;
        backdrop-filter: blur(15px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .navbar-nav .nav-link {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin: 0.125rem 0;
        padding: 0.75rem 1rem;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }

    .dropdown-menu {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.25rem;
        margin-left: 1rem;
    }

    .dropdown-item {
        color: white;
        margin: 0.125rem 0.25rem;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }
}

/* Enhanced Breadcrumbs */
.breadcrumb {
    background: linear-gradient(135deg, rgba(79, 99, 210, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 99, 210, 0.1);
    box-shadow: 0 2px 10px rgba(79, 99, 210, 0.05);
}

.breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.breadcrumb-item a:hover {
    background: rgba(79, 99, 210, 0.1);
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.breadcrumb-item.active {
    color: var(--dark-color);
    font-weight: 600;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(79, 99, 210, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(79, 99, 210, 0.1);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 99, 210, 0.05) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Layout Consistency */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.content-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.section-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
}

.section-description {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Sidebar Layout */
.sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    background: rgba(79, 99, 210, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

.sidebar-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.quick-action {
    flex: 1;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 99, 210, 0.1);
}

.quick-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(79, 99, 210, 0.15);
    color: var(--primary-color);
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.quick-action-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quick-action-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Performance Optimizations */

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded,
img.loaded {
    opacity: 1;
}

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

.image-error-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
}

/* CSS Containment for Performance */
.card,
.lesson-card,
.modal-content {
    contain: layout style paint;
}

/* Optimized Animations */
.reduce-animations *,
.reduce-animations *::before,
.reduce-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.paused-animations * {
    animation-play-state: paused !important;
}

/* Scroll Performance */
.navbar.scrolled {
    background: rgba(79, 99, 210, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 99, 210, 0.3);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 99, 210, 0.4);
}

/* Admin Dashboard Section on Homepage */
.admin-dashboard-section {
    position: relative;
    z-index: 10;
}

.admin-dashboard-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

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

.admin-dashboard-section .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-dashboard-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-dashboard-section .btn-light {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-dashboard-section .btn-light:hover {
    background: white;
    color: var(--primary-color);
}

.admin-dashboard-section .btn-warning {
    background: var(--accent-yellow);
    color: var(--dark-color);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.admin-dashboard-section .btn-warning:hover {
    background: #FFE55C;
    color: var(--dark-color);
}

.admin-dashboard-section .btn-secondary {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.admin-dashboard-section .btn-secondary:hover {
    background: #6c757d;
    color: white;
}

/* Responsive adjustments for admin dashboard */
@media (max-width: 768px) {
    .admin-dashboard-section .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-dashboard-section .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Critical CSS Inlining */
.critical-above-fold {
    /* Critical styles for above-the-fold content */
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Resource Hints */
.preload-hint {
    /* Styles for preloaded content */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.preload-hint.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Efficient Transforms */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.card:hover,
.lesson-card:hover,
.btn:hover {
    will-change: transform;
}

/* Optimized Gradients */
.gradient-optimized {
    background: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Efficient Box Shadows */
.shadow-optimized {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-optimized:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Layout Optimization */
.layout-optimized {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Font Loading Optimization */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
}

/* Critical Path CSS */
.critical-path {
    /* Inline critical CSS for faster rendering */
    background: white;
    color: #333;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Lazy Component Loading */
[data-lazy-component] {
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-lazy-component]::before {
    content: 'Načítám komponentu...';
    color: #6c757d;
    font-size: 0.9rem;
}

/* Performance Monitoring */
.performance-marker {
    /* Hidden elements for performance measurement */
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Efficient Media Queries */
@media (max-width: 767.98px) {
    .mobile-optimized .card {
        contain: layout;
    }

    .mobile-optimized .animation-heavy {
        animation: none !important;
    }
}

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

/* Network-aware Loading */
@media (max-width: 767.98px) and (max-resolution: 1.5dppx) {
    /* Low-resolution mobile optimizations */
    .high-res-only {
        display: none;
    }
}

/* Battery-aware Optimizations */
@media (max-width: 767.98px) {
    .battery-conscious {
        /* Reduce CPU-intensive effects on mobile */
        filter: none !important;
        backdrop-filter: none !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
}

/* Enhanced UI Components */

/* Modal Enhancements */
.modal {
    backdrop-filter: blur(4px);
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
}

/* Tooltip Enhancements */
.tooltip {
    position: absolute;
    z-index: 1070;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.tooltip.show {
    opacity: 1;
}

.tooltip-inner {
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    max-width: 200px;
    text-align: center;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.tooltip-top .tooltip-arrow {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--dark-color);
}

.tooltip-bottom .tooltip-arrow {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--dark-color);
}

.tooltip-left .tooltip-arrow {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--dark-color);
}

.tooltip-right .tooltip-arrow {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid var(--dark-color);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-info {
    border-left-color: var(--info-color);
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-message {
    flex: 1;
    margin-right: 0.5rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Enhanced Form Components */
.form-floating {
    position: relative;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

/* Email Suggestions */
.email-suggestions {
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.email-suggestions > div {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.email-suggestions > div:hover {
    background-color: var(--gray-100);
}

/* Multi-step Form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideInRight 0.3s ease;
}

.form-progress {
    margin-bottom: 2rem;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Custom utilities */
/* Enhanced Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

.animate-slide-in-up {
    animation: slideInUp 0.5s ease;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* Enhanced Transitions */
.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

.transition-opacity {
    transition: opacity 0.2s ease;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 99, 210, 0.15);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(79, 99, 210, 0.3);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

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

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

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Enhanced Buttons */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(79, 99, 210, 0.4);
}

/* Enhanced Responsive Design */

/* Mobile-first breakpoints */
@media (max-width: 575.98px) {
    /* Extra small devices (phones) */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Stack form elements vertically */
    .row.g-3 > .col {
        margin-bottom: 1rem;
    }

    /* Larger touch targets */
    .btn, .form-control, .form-select {
        min-height: 48px;
    }

    /* Simplified navigation */
    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hide complex elements on mobile */
    .d-none-mobile {
        display: none !important;
    }

    /* Simplified tables */
    .table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive-mobile .table {
        margin-bottom: 0;
        font-size: 0.875rem;
    }

    /* Mobile-optimized forms */
    .form-floating {
        margin-bottom: 1.5rem;
    }

    .form-floating .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 767.98px) {
    /* Small devices (landscape phones) */

    /* Responsive typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    /* Responsive spacing */
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }

    /* Responsive cards */
    .card-body {
        padding: 1rem;
    }

    /* Mobile navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }

    /* Responsive buttons */
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }

    /* Mobile-friendly dropdowns */
    .dropdown-menu {
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }

    /* Responsive modals */
    .modal-dialog {
        max-width: calc(100vw - 2rem);
    }

    /* Touch-friendly pagination */
    .pagination .page-link {
        padding: 0.75rem 1rem;
        margin: 0 0.125rem;
    }
}

@media (max-width: 991.98px) {
    /* Medium devices (tablets) */

    /* Responsive grid adjustments */
    .col-lg-3 {
        margin-bottom: 2rem;
    }

    /* Tablet-optimized forms */
    .form-row .col {
        margin-bottom: 1rem;
    }

    /* Responsive tables */
    .table-responsive-md {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    /* Tablet navigation */
    .navbar-expand-lg .navbar-nav {
        flex-direction: column;
        align-items: center;
    }

    .navbar-expand-lg .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */

    /* Larger touch targets */
    .btn, .form-control, .form-select, .nav-link {
        min-height: 44px;
    }

    /* Remove hover effects that don't work on touch */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
    }

    .btn:hover {
        transform: none;
    }

    /* Touch-friendly spacing */
    .btn + .btn {
        margin-left: 0.75rem;
    }

    /* Simplified animations */
    * {
        transition-duration: 0.2s !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Retina displays */

    /* Crisp borders */
    .border {
        border-width: 0.5px;
    }

    /* High-quality shadows */
    .card {
        box-shadow: 0 2px 10px rgba(79, 99, 210, 0.08);
    }

    .btn {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 500px) {
    /* Landscape phones */

    .navbar {
        padding: 0.25rem 1rem;
    }

    .modal-dialog {
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
    }

    .modal-content {
        max-height: 100%;
        overflow-y: auto;
    }

    /* Compact forms */
    .form-floating {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }
}

/* Print styles */
@media print {
    /* Print optimizations */

    .navbar, .footer, .btn, .modal {
        display: none !important;
    }

    .card {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .text-primary {
        color: #000 !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    .container-fluid {
        max-width: none;
        padding: 0;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    /* Reduced motion preferences */

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .carousel {
        scroll-behavior: auto;
    }
}

@media (prefers-contrast: high) {
    /* High contrast mode */

    .card {
        border: 2px solid;
    }

    .btn {
        border: 2px solid;
    }

    .form-control {
        border: 2px solid;
    }
}

/* Dark mode support removed - always use light theme */

/* Pull-to-refresh indicator */
.pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0;
}

.pull-indicator .pull-icon {
    font-size: 1.2rem;
}

.pull-indicator .pull-text {
    font-weight: 500;
}

/* Enhanced responsive utilities */
.responsive-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.sidebar-collapsible {
    transition: all 0.3s ease;
}

.sidebar-collapsible.collapsed {
    transform: translateX(-100%);
}

@media (min-width: 992px) {
    .sidebar-collapsible.collapsed {
        transform: translateX(-250px);
        width: 0;
    }
}

/* Touch device optimizations */
.touch-device .btn {
    min-height: 44px;
    min-width: 44px;
}

.touch-device .form-control {
    min-height: 44px;
}

.touch-device .nav-link {
    padding: 1rem;
}

.touch-device .dropdown-item {
    padding: 0.75rem 1rem;
}

/* Landscape orientation styles */
.landscape .modal-dialog {
    max-height: calc(100vh - 2rem);
}

.landscape .navbar {
    padding: 0.25rem 1rem;
}

.landscape .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Portrait orientation styles */
.portrait .lesson-card {
    margin-bottom: 1rem;
}

.portrait .form-floating {
    margin-bottom: 1.5rem;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 6px;
    color: white;
    text-decoration: none;
}

/* Enhanced breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--gray-500);
    font-weight: 600;
}

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

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Mobile-optimized classes */
.mobile-optimized .btn {
    font-size: 16px;
    padding: 0.75rem 1rem;
}

.mobile-optimized .form-control {
    font-size: 16px;
}

.mobile-optimized .card-body {
    padding: 1rem;
}

.mobile-optimized .modal-dialog {
    margin: 0.5rem;
}

/* Utility classes for responsive design */
.d-none-mobile {
    display: block;
}

@media (max-width: 575.98px) {
    .d-none-mobile {
        display: none !important;
    }
}

.d-block-mobile {
    display: none;
}

@media (max-width: 575.98px) {
    .d-block-mobile {
        display: block !important;
    }
}

.text-truncate-mobile {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 576px) {
    .text-truncate-mobile {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

/* Advanced Progress Tracker */
.progress-tracker {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 1rem;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.progress-step.active {
    border-color: var(--primary-color);
    background: rgba(79, 99, 210, 0.05);
}

.progress-step.completed {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step.active .step-indicator {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed .step-indicator {
    background: var(--success-color);
    color: white;
}

.step-number {
    font-weight: 600;
}

.progress-step.completed .step-number {
    display: none;
}

.step-icon {
    display: none;
}

.progress-step.completed .step-icon {
    display: block;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.step-description {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.step-connector {
    position: absolute;
    left: 19px;
    top: 60px;
    width: 2px;
    height: calc(100% - 40px);
    background: var(--gray-300);
    transition: background-color 0.3s ease;
}

.step-connector.completed {
    background: var(--success-color);
}

/* Advanced Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    z-index: 1000;
    border-radius: inherit;
}

.loading-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-message {
    color: var(--gray-600);
    font-weight: 500;
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.loading-pulse {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-bars {
    display: flex;
    gap: 4px;
    align-items: end;
}

.loading-bars div {
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    animation: loadingBars 1.2s infinite ease-in-out;
}

.loading-bars div:nth-child(1) { animation-delay: -0.24s; }
.loading-bars div:nth-child(2) { animation-delay: -0.12s; }
.loading-bars div:nth-child(3) { animation-delay: 0s; }
.loading-bars div:nth-child(4) { animation-delay: 0.12s; }

@keyframes loadingBars {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

/* Smart Notifications */
.smart-notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 1rem;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
}

.smart-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-header {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.notification-error .notification-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.notification-warning .notification-icon {
    background: rgba(255, 140, 66, 0.1);
    color: var(--warning-color);
}

.notification-info .notification-icon {
    background: rgba(79, 99, 210, 0.1);
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.notification-message {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notification-actions {
    padding: 0 1rem 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.notification-action {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

/* Performance Optimizations */

/* Critical CSS - Above the fold content */
.critical-content {
    /* Inline critical styles for immediate rendering */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* Lazy loading images */
img[data-lazy] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* WebP support */
.webp-supported .fallback-image {
    display: none;
}

.no-webp .webp-image {
    display: none;
}

/* Font loading optimization */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/inter-regular.woff2') format('woff2'),
         url('/static/fonts/inter-regular.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/inter-medium.woff2') format('woff2'),
         url('/static/fonts/inter-medium.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/inter-semibold.woff2') format('woff2'),
         url('/static/fonts/inter-semibold.woff') format('woff');
}

/* Optimize animations for performance */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduce layout thrashing */
.layout-stable {
    contain: layout style;
}

/* Optimize repaints */
.paint-optimized {
    contain: paint;
}

/* Composite layers for smooth animations */
.composite-layer {
    will-change: transform, opacity;
    transform: translateZ(0);
}

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

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

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 12px;
}

/* Optimize scrolling performance */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Reduce motion for accessibility and performance */
@media (prefers-reduced-motion: reduce) {
    .respect-motion * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .skeleton {
        animation: none;
        background: #f0f0f0;
    }
}

/* Network-aware optimizations */
@media (max-width: 767.98px) and (max-resolution: 1.5dppx) {
    /* Low-resolution mobile optimizations */
    .high-quality-shadow {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .complex-gradient {
        background: var(--primary-color) !important;
    }

    .blur-effect {
        backdrop-filter: none !important;
        filter: none !important;
    }
}

/* Battery-conscious optimizations */
@media (max-width: 767.98px) {
    .battery-conscious * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }

    .battery-conscious .complex-animation {
        animation: none !important;
    }

    .battery-conscious .expensive-filter {
        filter: none !important;
        backdrop-filter: none !important;
    }
}

/* Optimize for slow connections */
.slow-connection .non-critical {
    display: none;
}

.slow-connection .heavy-animation {
    animation: none;
}

/* Progressive enhancement */
.no-js .js-only {
    display: none;
}

.js .no-js-only {
    display: none;
}

/* Optimize table rendering */
.optimized-table {
    table-layout: fixed;
    contain: layout;
}

.optimized-table th,
.optimized-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Optimize form rendering */
.optimized-form {
    contain: layout style;
}

.optimized-form .form-control {
    will-change: border-color, box-shadow;
}

/* Critical path CSS utilities */
.above-fold {
    /* Styles for above-the-fold content */
    font-family: system-ui, -apple-system, sans-serif;
}

.below-fold {
    /* Styles for below-the-fold content - can be loaded later */
    font-family: 'Inter', system-ui, sans-serif;
}

/* Custom utilities */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

/* Loading animations */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

/* Animation for form validation */
.was-validated .form-control:invalid {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* School detail page styles */
.school-detail-header {
    background: linear-gradient(135deg, rgba(79, 99, 210, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
}

.lesson-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(79, 99, 210, 0.15);
}

.lesson-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.lesson-card .progress {
    height: 8px;
    border-radius: 10px;
    background-color: var(--gray-200);
}

.lesson-card .progress-bar {
    background: linear-gradient(90deg, var(--success-color), var(--info-color));
    border-radius: 10px;
}

/* Lesson detail page styles */
.lesson-detail-sidebar .card {
    position: sticky;
    top: 20px;
}

/* Lesson card links - dark color for visibility in card body */
.lesson-card .card-title a {
    color: var(--dark-color) !important;
    text-decoration: none;
}

.lesson-card .card-title a:hover {
    color: var(--accent-yellow) !important;
    text-decoration: none;
}

/* Lesson card links in header - white color for visibility on blue background */
.lesson-card .card-header a,
.lesson-card .card-header h5 a,
.card-header a,
.card .card-header a {
    color: white !important;
    text-decoration: none !important;
}

.lesson-card .card-header a:hover,
.lesson-card .card-header h5 a:hover,
.card-header a:hover,
.card .card-header a:hover {
    color: var(--accent-yellow) !important;
    text-decoration: none !important;
}

.capacity-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 12px;
    background: var(--light-color);
    margin-bottom: 1rem;
}

.capacity-indicator.high-capacity {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.capacity-indicator.medium-capacity {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.capacity-indicator.low-capacity {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Wizard form styles */
.wizard-step {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.wizard-step.active {
    display: block;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.step-indicator.active {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed {
    background: var(--success-color);
    color: white;
}

.quick-select-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.quick-select-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-select-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-select-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Dashboard improvements */
.stat-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(79, 99, 210, 0.3);
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-card.bg-warning {
    background: var(--gradient-orange);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.quick-action-card {
    border: none;
    border-radius: 16px;
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.recent-activity-item {
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: var(--light-color);
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.2s ease;
}

.recent-activity-item:hover {
    background: white;
    transform: translateX(5px);
}

.priority-high { border-left-color: var(--danger-color); }
.priority-medium { border-left-color: var(--warning-color); }
.priority-low { border-left-color: var(--success-color); }

/* Pokročilé UX vylepšení */
.enhanced-lesson-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.enhanced-lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.enhanced-lesson-card:hover::before {
    transform: scaleX(1);
}

.enhanced-lesson-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(79, 99, 210, 0.2);
}

.lesson-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.lesson-status-badge.available {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.lesson-status-badge.full {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.enhanced-lesson-price {
    background: var(--gradient-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
    transition: all 0.3s ease;
}

.enhanced-lesson-price:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

/* Toast notifikace s vylepšeným designem */
.enhanced-toast {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.enhanced-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Loading states s vylepšeným designem */
.enhanced-loading {
    position: relative;
    pointer-events: none;
}

.enhanced-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

/* Pokročilé animace */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.pulse-animation {
    animation: pulse 2s infinite;
}

.shimmer-effect {
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 800px 104px;
    animation: shimmer 1s linear infinite;
}

/* Glassmorphism efekty */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Vylepšené scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Utility třídy pro rychlé použití */
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-orange {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-orange {
    background: var(--gradient-orange);
}

.bg-gradient-yellow {
    background: var(--gradient-yellow);
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(79, 99, 210, 0.08);
}

.shadow-hover {
    box-shadow: 0 8px 40px rgba(79, 99, 210, 0.15);
}

.border-radius-lg {
    border-radius: 16px;
}

.border-radius-xl {
    border-radius: 24px;
}

.text-shadow {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Advanced Responsive Components */

/* Mobile-first form layouts */
@media (max-width: 767.98px) {
    .enhanced-lesson-card {
        margin-bottom: 1rem;
    }

    .enhanced-lesson-price {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    .lesson-status-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .glass-effect {
        backdrop-filter: blur(5px); /* Reduced for mobile performance */
    }

    /* Mobile form wizard improvements */
    .wizard-step .row .col-md-6 {
        margin-bottom: 1rem;
    }

    .step-indicator {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .wizard-navigation {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 1rem;
        border-top: 1px solid var(--gray-200);
        margin: 0 -1rem -1rem;
    }

    /* Mobile filter forms */
    .filter-form .row .col-md-3,
    .filter-form .row .col-md-4,
    .filter-form .row .col-md-6 {
        margin-bottom: 0.75rem;
    }

    .filter-form .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Mobile dashboard improvements */
    .stat-card {
        text-align: center;
        padding: 1.25rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .quick-action-card {
        margin-bottom: 1rem;
    }

    .quick-action-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Mobile navigation improvements */
    .navbar-collapse {
        background: rgba(79, 99, 210, 0.95);
        margin: 0.5rem -1rem 0;
        padding: 1rem;
        border-radius: 8px;
        backdrop-filter: blur(10px);
    }

    .navbar-nav {
        gap: 0.25rem;
    }

    .navbar-nav .nav-link {
        color: white !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        margin: 0.125rem 0;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Mobile table improvements */
    .table-responsive {
        font-size: 0.875rem;
    }

    .table th {
        white-space: nowrap;
        font-size: 0.8rem;
    }

    .table td {
        word-break: break-word;
    }

    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none !important;
    }

    /* Mobile pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination .page-item {
        margin: 0.125rem;
    }

    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Tablet-specific improvements */
@media (min-width: 768px) and (max-width: 991.98px) {
    .wizard-step .row .col-md-6 {
        margin-bottom: 1rem;
    }

    .filter-form .row .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0.75rem;
    }

    .lesson-cards-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .lesson-cards-container .col-md-6,
    .lesson-cards-container .col-lg-4 {
        flex: none;
        max-width: none;
    }
}

/* Desktop enhancements */
@media (min-width: 992px) {
    .lesson-cards-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .lesson-cards-container .col-md-6,
    .lesson-cards-container .col-lg-4 {
        flex: none;
        max-width: none;
    }

    /* Desktop hover effects */
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 40px rgba(79, 99, 210, 0.15);
    }

    .lesson-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 40px rgba(79, 99, 210, 0.15);
    }

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(79, 99, 210, 0.3);
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .filter-form,
    #toast-container {
        display: none !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .hero-section {
        background: none !important;
        border: 1px solid #ddd;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3, h4, h5, h6 {
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .navbar-nav .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

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

    .hero-section::before {
        animation: none;
    }

    .skeleton {
        animation: none;
        background: #f0f0f0;
    }
}

/* ========================================
   ENHANCED MOBILE RESPONSIVENESS FIXES
   ======================================== */

/* Cookie Banner Mobile Improvements */
@media (max-width: 575.98px) {
    .cookie-banner {
        padding: 1rem !important;
        border-radius: 12px 12px 0 0;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
    }

    .cookie-banner .container {
        padding: 0;
    }

    .cookie-banner .row {
        flex-direction: column;
        margin: 0;
    }

    .cookie-banner .col-lg-8,
    .cookie-banner .col-lg-4,
    .cookie-banner .col-md-7,
    .cookie-banner .col-md-5 {
        width: 100%;
        margin-bottom: 1rem;
        padding: 0;
    }

    .cookie-banner .btn {
        margin-bottom: 0.5rem;
        width: 100%;
        min-height: 44px;
        font-size: 0.9rem;
    }

    .cookie-banner .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .cookie-banner h6 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .cookie-banner p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
}

/* Enhanced Touch Targets */
@media (hover: none) and (pointer: coarse) {
    /* All interactive elements should be at least 44px */
    .btn, .form-control, .form-select, .nav-link,
    .dropdown-item, .pagination .page-link,
    .close, .btn-close, .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
    }

    /* Form elements specific improvements */
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.125rem;
    }

    .form-check-label {
        padding-left: 0.5rem;
        line-height: 1.5;
    }

    /* Button spacing for touch */
    .btn + .btn {
        margin-left: 0.75rem;
    }

    .btn-group .btn + .btn {
        margin-left: 0;
    }
}

/* Enhanced Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        border-radius: 8px;
        min-height: 44px;
        min-width: 44px;
        background: rgba(255, 255, 255, 0.1);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    }

    .navbar-collapse {
        background: rgba(79, 99, 210, 0.95);
        margin: 0.5rem -1rem 0;
        padding: 1rem;
        border-radius: 8px;
        backdrop-filter: blur(10px);
    }

    .navbar-nav .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 48px;
        display: flex;
        align-items: center;
        border-radius: 4px;
        margin-bottom: 0.25rem;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Enhanced Mobile Forms */
@media (max-width: 575.98px) {
    .form-floating {
        margin-bottom: 1.5rem;
    }

    .form-floating .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
        border-radius: 8px;
    }

    .form-floating > label {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Stack form columns vertically */
    .row.g-3 > .col,
    .row > .col-md-6,
    .row > .col-lg-6 {
        margin-bottom: 1rem;
    }

    /* Full-width buttons on mobile */
    .btn:not(.btn-sm):not(.btn-xs) {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }
}

/* Enhanced Mobile Modals */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        height: calc(100vh - 1rem);
    }

    .modal-content {
        border-radius: 12px;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
        flex-shrink: 0;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #dee2e6;
        flex-shrink: 0;
    }

    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Mobile Tables */
@media (max-width: 767.98px) {
    .table-responsive {
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .table {
        font-size: 0.875rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
        vertical-align: middle;
    }

    .table th {
        background-color: #f8f9fa;
        font-weight: 600;
        border-bottom: 2px solid #dee2e6;
    }

    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none !important;
    }
}

/* Enhanced Mobile Cards */
@media (max-width: 575.98px) {
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: none;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
        background: var(--gradient-primary) !important;
        color: white !important;
        border-bottom: 1px solid #dee2e6;
        border-radius: 12px 12px 0 0 !important;
    }

    /* Fix for lesson card headers specifically */
    .lesson-card .card-header {
        background: var(--gradient-primary) !important;
        color: white !important;
    }

    /* Ensure all text in card headers is white */
    .card-header,
    .card-header h1,
    .card-header h2,
    .card-header h3,
    .card-header h4,
    .card-header h5,
    .card-header h6,
    .card-header p,
    .card-header span,
    .card-header a {
        color: white !important;
    }

    /* Hover state for links in card headers */
    .card-header a:hover {
        color: var(--accent-yellow) !important;
    }

    .card-footer {
        padding: 0.75rem 1rem;
        background-color: #f8f9fa;
        border-top: 1px solid #dee2e6;
        border-radius: 0 0 12px 12px !important;
    }

    /* Lesson cards specific */
    .lesson-card .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .lesson-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .lesson-card .card-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* ========================================
   CONTRAST AND ACCESSIBILITY FIXES
   ======================================== */

/* Ensure proper contrast for all text elements */
.text-white {
    color: white !important;
}

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

/* Fix any potential white-on-white issues */
.bg-white .text-white,
.bg-light .text-white {
    color: var(--dark-color) !important;
}

/* Ensure card headers always have proper contrast */
.card-header {
    background: var(--gradient-primary) !important;
    color: white !important;
}

.card-header * {
    color: white !important;
}

.card-header a {
    color: white !important;
    text-decoration: none;
}

.card-header a:hover,
.card-header a:focus {
    color: var(--accent-yellow) !important;
    text-decoration: underline;
}

/* Lesson card specific fixes */
.lesson-card .card-header,
.lesson-card .card-header h1,
.lesson-card .card-header h2,
.lesson-card .card-header h3,
.lesson-card .card-header h4,
.lesson-card .card-header h5,
.lesson-card .card-header h6 {
    background: var(--gradient-primary) !important;
    color: white !important;
}

/* Navigation text contrast */
.navbar-nav .nav-link {
    color: white !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--accent-yellow) !important;
}

/* Button text contrast */
.btn-primary {
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
    color: white !important;
}

/* Badge contrast */
.badge {
    color: white;
}

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

/* Alert contrast improvements */
.alert {
    border: 1px solid;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-color: #b8daff;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .card-header {
        background: var(--dark-color) !important;
        color: white !important;
        border: 2px solid white;
    }

    .btn {
        border: 2px solid currentColor !important;
    }

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

    .navbar-nav .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
    }

    .card {
        border: 2px solid var(--dark-color) !important;
    }

    .form-control {
        border: 2px solid var(--dark-color) !important;
    }
}

/* Accessibility class for high contrast */
.high-contrast {
    filter: contrast(150%);
}

.high-contrast .card-header {
    background: #000000 !important;
    color: #ffffff !important;
}

.high-contrast .btn-primary {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

.high-contrast .navbar {
    background: #000000 !important;
}

.high-contrast .navbar-nav .nav-link {
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

/* Force readable text in all scenarios */
.force-readable-text {
    color: var(--dark-color) !important;
    background: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Ensure form labels are always readable */
.form-label,
label {
    color: var(--dark-color) !important;
    font-weight: 600;
}

/* Ensure table text is readable */
.table th,
.table td {
    color: var(--dark-color);
}

.table thead th {
    background-color: var(--gray-100);
    color: var(--dark-color);
    border-bottom: 2px solid var(--gray-300);
}

/* Mobile Performance Optimizations */
@media (max-width: 767.98px) {
    /* Reduce animations for better performance */
    .mobile-performance-optimized * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }

    /* Simplify shadows for better performance */
    .card,
    .btn,
    .modal-content {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    /* Optimize backdrop filters */
    .glass-effect {
        backdrop-filter: blur(5px) !important;
    }
}

/* Mobile Accessibility Improvements */
@media (max-width: 575.98px) {
    /* Larger text for better readability */
    body {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Better focus indicators */
    .btn:focus,
    .form-control:focus,
    .form-select:focus,
    .nav-link:focus {
        outline: 2px solid #4F63D2;
        outline-offset: 2px;
        box-shadow: 0 0 0 0.2rem rgba(79, 99, 210, 0.25);
    }

    /* Skip to content link for mobile */
    .skip-to-content {
        position: absolute;
        top: -40px;
        left: 6px;
        background: #4F63D2;
        color: white;
        padding: 8px;
        text-decoration: none;
        border-radius: 4px;
        z-index: 10000;
    }

    .skip-to-content:focus {
        top: 6px;
    }
}
