/* Custom CSS for SamalEnglish IELTS LMS */

/* Base Styles */
:root {
    --primary-color: #26b67c;
    --secondary-color: #1a8c63;
    --accent-color: #3498db;
    --background-color: #f8f9fa;
    --text-color: #333333;
}

/* Custom Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Progress Bars */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.5s ease;
    stroke: var(--primary-color);
}

/* Quiz Timer */
.timer {
    font-variant-numeric: tabular-nums;
}

.timer-warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Speaking Recorder */
.recorder-wave {
    height: 40px;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 50%, 
        var(--accent-color) 100%);
    animation: wave 2s linear infinite;
    background-size: 200% 100%;
}

@keyframes wave {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Course Cards */
.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
}

.course-card:hover .course-thumbnail {
    transform: scale(1.05);
}

.course-thumbnail {
    transition: transform 0.5s ease;
}

/* Certificate Border */
.certificate-border {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Form Focus Styles */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(38, 182, 124, 0.1);
}

/* Badge Animations */
.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(38, 182, 124, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(38, 182, 124, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(38, 182, 124, 0);
    }
}

/* Mobile Menu */
.mobile-menu-enter {
    transform: translateX(-100%);
}

.mobile-menu-enter-active {
    transform: translateX(0);
    transition: transform 300ms ease-in-out;
}

.mobile-menu-exit {
    transform: translateX(0);
}

.mobile-menu-exit-active {
    transform: translateX(-100%);
    transition: transform 300ms ease-in-out;
}

/* Tab Animation */
.tab-content {
    animation: fadeIn 0.3s ease;
}

/* Print Styles for Certificates */
@media print {
    .no-print {
        display: none !important;
    }
    
    .certificate-print {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --text-color: #ffffff;
    }
}

/* Accessibility */
.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;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 182, 124, 0.3);
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}