/* CorpOsorno E-Learning Platform Styles */

/* Custom Tailwind Extensions */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Animations */
@keyframes gentleFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes smoothSlideIn {
    from { 
        transform: translateX(-100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.02); 
        opacity: 0.8; 
    }
}

@keyframes floatUp {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

@keyframes gentleBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.animate-fadeIn {
    animation: gentleFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slideIn {
    animation: smoothSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-pulse-slow {
    animation: gentlePulse 3s infinite;
}

.animate-float {
    animation: floatUp 6s ease-in-out infinite;
}

.animate-bounce-gentle {
    animation: gentleBounce 2s infinite;
}

/* Custom Components */
.corp-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
}

.corp-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.corp-shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Progress Indicators */
.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #1e40af 0deg, #e5e7eb 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.progress-circle span {
    position: relative;
    z-index: 1;
    font-weight: bold;
    color: #1e40af;
}

/* Enhanced Course Cards */
.course-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
    transition: left 0.8s ease;
}

.course-card:hover::before {
    left: 100%;
}

.course-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(30, 64, 175, 0.15);
    border-color: #1e40af;
}

.course-card-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.course-card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-card-image img {
    transform: scale(1.08) rotate(1deg);
}

/* Project Cards Enhancement */
.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.15);
}

/* Chapter Navigation */
.chapter-nav {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.chapter-nav::-webkit-scrollbar {
    width: 4px;
}

.chapter-nav::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.chapter-nav::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 2px;
}

.chapter-nav::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Quiz Styles */
.quiz-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.quiz-option:hover {
    background-color: #f9fafb;
    border-color: #1e40af;
}

.quiz-option.selected {
    background-color: #eff6ff;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.quiz-option.correct {
    background-color: #f0fdf4;
    border-color: #059669;
    color: #047857;
}

.quiz-option.incorrect {
    background-color: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
}

/* Loading States */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

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

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

/* Form Enhancements */
.form-group {
    position: relative;
}

.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    outline: none;
}

.form-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-label {
    transition: all 0.3s ease;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px) scale(0.9);
    color: #1e40af;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

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

.notification.success {
    background-color: #f0fdf4;
    border-left: 4px solid #059669;
    color: #047857;
}

.notification.error {
    background-color: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #b91c1c;
}

.notification.info {
    background-color: #eff6ff;
    border-left: 4px solid #1e40af;
    color: #1e3a8a;
}

.notification.warning {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .course-card {
        margin-bottom: 1rem;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chapter-nav {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }
    
    .quiz-option {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .corp-shadow {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }
    
    .corp-shadow-lg {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .course-card,
    .chapter-nav,
    .quiz-option {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }
}

/* Accessibility Enhancements */
.focus-visible:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .bg-white {
        background-color: #374151;
    }
    
    .dark-mode .text-gray-900 {
        color: #f9fafb;
    }
    
    .dark-mode .text-gray-600 {
        color: #d1d5db;
    }
    
    .dark-mode .border-gray-200 {
        border-color: #4b5563;
    }
}

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

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

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

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

/* Enhanced Interactive Elements */
.interactive-element {
    position: relative;
    overflow: hidden;
}

.interactive-element::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(30, 64, 175, 0.1), rgba(5, 150, 105, 0.1));
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:active::before {
    width: 300px;
    height: 300px;
}

/* Cheerful Button Styles */
.btn-cheerful {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cheerful:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.btn-cheerful::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.btn-cheerful:active::after {
    width: 200px;
    height: 200px;
}

/* Smooth Scroll Enhancements */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Floating Elements - Disabled */
.float-element {
    /* animation: floatUp 4s ease-in-out infinite; */
}

.float-element:nth-child(2n) {
    /* animation-delay: -2s; */
}

.float-element:nth-child(3n) {
    /* animation-delay: -1s; */
}
