/* 
* E-Learning Platform Custom Styles
* Main stylesheet for the E-Learning platform
*/

/* Global Styles */
:root {
    --primary-color: #4e73df;
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    color: #333;
}

/* Utility Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
}

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

/* Header & Navigation */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand img {
    max-height: 40px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(78, 115, 223, 0.9) 0%, rgba(34, 74, 190, 0.9) 100%), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Course Cards */
.course-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.course-card .card-img-top {
    object-fit: cover;
}

.course-card .card-body {
    padding: 1.5rem;
}

.course-card .card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.course-card .card-text {
    color: #6c757d;
    margin-bottom: 1rem;
}

.course-card .course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e3e6f0;
}

.course-card .course-rating {
    color: #f6c23e;
}

.course-card .course-price {
    font-weight: 700;
    color: var(--primary-color);
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: var(--light-color);
    color: var(--dark-color);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Instructor Card */
.instructor-card {
    text-align: center;
    margin-bottom: 30px;
}

.instructor-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.instructor-card h5 {
    margin-bottom: 0.5rem;
}

.instructor-card p {
    color: #6c757d;
}

/* Testimonials */
.testimonial-card {
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 30px;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 5rem;
    position: absolute;
    top: 10px;
    left: 20px;
    color: rgba(78, 115, 223, 0.1);
    font-family: Georgia, serif;
}

.testimonial-card .testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-card .testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-card .testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

/* Footer */
footer {
    background-color: #212529;
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

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

footer a.text-muted:hover {
    color: white !important;
    text-decoration: none;
}

footer .social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease;
}

footer .social-icons a:hover {
    background-color: var(--primary-color);
}

/* Course Detail Page */
.course-header {
    background-color: #212529;
    color: white;
    padding: 60px 0;
}

.course-content {
    padding: 50px 0;
}

.course-sidebar {
    position: sticky;
    top: 20px;
}

.course-sidebar .card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

/* Cart & Checkout */
.cart-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e3e6f0;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Authentication Pages */
.auth-card {
    max-width: 500px;
    margin: 100px auto;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.auth-card .card-header {
    background-color: white;
    border-bottom: 1px solid #e3e6f0;
    padding: 1.5rem;
    text-align: center;
}

.auth-card .card-body {
    padding: 2rem;
}

/* Mini Basket */
.mini-basket {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    z-index: 1000;
    display: none;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mini-basket.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mini-basket .card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.mini-basket-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    align-items: center;
}

.mini-basket-item:last-child {
    border-bottom: none;
}

.mini-basket-item img {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 10px;
}

.mini-basket-item-details {
    flex: 1;
}

.mini-basket-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mini-basket-item-price {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.mini-basket-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 0.8rem;
    padding: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    margin-left: 5px;
}

.mini-basket-remove:hover {
    opacity: 1;
}

.mini-basket-item {
    position: relative;
}

.mini-basket-empty {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.mini-basket-total {
    padding: 10px 15px;
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .course-header {
        padding: 40px 0;
    }

    .mini-basket {
        width: 280px;
    }
    
    /* Mobile course image styles */
    .mobile-course-image {
        margin-bottom: 1.5rem;
    }
    
    .mobile-course-image img {
        width: 100%;
        border-radius: 0.5rem;
        box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    }
}
