/* Custom CSS for EduPreps */

/* Line clamp utilities for text truncation */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Mentor card specific styles */
.mentor-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
}

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

.mentor-avatar {
    position: relative;
}

.mentor-avatar img {
    border: 3px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mentor-info h3 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.mentor-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.mentor-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mentor-stats .stat {
    text-align: center;
}

.mentor-stats .stat .fw-bold {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.mentor-stats .stat small {
    font-size: 0.75rem;
    color: #6b7280;
}

.mentor-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    align-items: center;
}

.star-filled {
    color: #fbbf24;
}

.star-empty {
    color: #d1d5db;
}

.marketplace-rating-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.mentor-subjects h6,
.mentor-languages h6 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.badge-subject,
.badge-language {
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.mentor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.edupreps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.edupreps-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.edupreps-btn-primary:hover {
    background-color: #2563eb;
}

.edupreps-btn-outline {
    background-color: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.edupreps-btn-outline:hover {
    background-color: #3b82f6;
    color: white;
}

.flex-fill {
    flex: 1 1 auto;
}

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

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

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

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

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

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

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

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

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animation-delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.animation-delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

.animation-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
}

.animation-delay-500 {
    animation-delay: 0.5s;
    opacity: 0;
}

.animation-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button pulse effect */
.btn-pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

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

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form input focus styles */
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Text gradients */
.text-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadow utilities */
.shadow-primary {
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.shadow-secondary {
    box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39);
}

/* Responsive text utilities */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .text-responsive-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
}

@media (min-width: 641px) {
    .text-responsive-xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .text-responsive-lg {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

@media (min-width: 1024px) {
    .text-responsive-xl {
        font-size: 3rem;
        line-height: 1;
    }
    
    .text-responsive-lg {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, table, blockquote {
        orphans: 3;
        widows: 3;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* Focus visible styles */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3b82f6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-to-content:focus {
    top: 6px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .border-gray-200 {
        border-color: #000 !important;
    }
    
    .text-gray-600 {
        color: #000 !important;
    }
    
    .bg-gray-50 {
        background-color: #fff !important;
    }
}

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

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

/* Custom form elements */
.custom-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-radio {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-radio:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* Utility classes */
.center-flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.between-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-flex {
    display: flex;
    flex-direction: column;
}

.full-bleed {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Course card styles */
.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.course-card .course-image {
    transition: transform 0.3s ease;
}

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

/* Rating star styles */
.rating-star {
    transition: color 0.2s ease;
}

.rating-star:hover {
    color: #fbbf24;
}

/* Progress bar styles */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-decoration: none;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

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

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

/* Video container */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Testimonial card styles */
.testimonial-card {
    transition: all 0.3s ease;
}

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