/* Reset and base styles */
:root{
    --primary-blue:#4a6cf7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 a {
    color: #4a6cf7;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

nav ul li a:hover {
    color: #4a6cf7;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #4a6cf7;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5cd8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #4a6cf7 0%, #6a11cb 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Course grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
}

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.course-category, .course-duration, .course-price {
    margin-bottom: 0.5rem;
    color: #666;
}

.course-price {
    font-weight: bold;
    color: #4a6cf7;
    font-size: 1.2rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group select[multiple] {
    height: 120px;
}

.lead-capture {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

.lead-capture h2 {
    margin-bottom: 1rem;
}

.lead-capture p {
    margin-bottom: 2rem;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
}

/* Add these styles to the existing style.css */

/* Alert messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Auth forms */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-container h2 {
    margin-top: 0;
    text-align: center;
}

/* Course detail page */
.course-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.course-header img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.course-info h1 {
    margin-top: 0;
}

.course-category, .course-duration {
    color: #666;
    margin: 0.5rem 0;
}

.course-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a6cf7;
    margin: 1rem 0;
}

.purchased-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-weight: 600;
}

/* Modules and topics */
.module {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.module h3 {
    margin-top: 0;
}

.topic {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.topic.accessible {
    background-color: #f8f9fa;
}

.topic.locked {
    background-color: #fff;
    opacity: 0.7;
}

.topic-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.topic-info {
    flex: 1;
}

.topic-info h4 {
    margin: 0 0 0.25rem 0;
}

.topic-duration {
    font-size: 0.875rem;
    color: #666;
}

.preview-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #cce5ff;
    color: #004085;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.locked-badge {
    padding: 0.5rem 1rem;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 0.875rem;
}

.topic-action {
    margin-left: 1rem;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions {
    text-align: right;
}

/* Buttons */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .course-header {
        grid-template-columns: 1fr;
    }
    
    .topic {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .topic-action {
        margin-left: 0;
        margin-top: 1rem;
        align-self: flex-end;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
}


.admin-menu {
    position: relative;
}

.admin-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.admin-menu:hover .admin-dropdown {
    display: block;
}

.admin-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-dropdown a:hover {
    background: #f8f9fa;
}