/* Custom styles for EduMarket */

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e293b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Course Cards */
.course-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-card .card-img-top {
    border-radius: 0;
    transition: transform 0.3s ease;
}

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

.course-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.course-card .rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-card .rating .fas {
    color: #fbbf24;
}

/* Features Section */
.features {
    background-color: var(--light-bg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

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

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

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Forms */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #ecfdf5;
    color: #047857;
}

.alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
}

.alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Cart */
.cart-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: var(--light-bg);
}

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

/* Order Summary */
.order-summary {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.order-summary .summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.order-summary .summary-line.total {
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--border-color);
    margin-top: 0.75rem;
}

/* Success Page */
.success-icon {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Course Download Items */
.course-download-item {
    transition: all 0.2s ease;
    padding: 1rem;
    border-radius: 8px;
}

.course-download-item:hover {
    background-color: var(--light-bg);
}

/* Payment Method */
.payment-method-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color), #0f172a);
}

footer .social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

footer .social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .course-card {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-notification {
    border-radius: 8px;
    border: none;
    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;
    }
}

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

/* Category Filter */
.category-filter {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.category-filter .list-unstyled li {
    margin-bottom: 0.5rem;
}

.category-filter .list-unstyled a {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: block;
    transition: all 0.2s ease;
}

.category-filter .list-unstyled a:hover {
    background-color: var(--light-bg);
}

.category-filter .list-unstyled a.fw-bold {
    background-color: var(--primary-color);
    color: white;
}

/* Pricing */
.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Trust Badges */
.trust-badge {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--light-bg);
}

.trust-badge i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
}