:root {
    --primary: #2A5C8B;
    --secondary: #10A2DC;
    --accent: #E63946;
    --light: #F1FAEE;
    --dark: #1D3557;
    --success: #2A9D8F;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent);
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--light);
}

.auth-buttons .btn-primary,
.auth-buttons .btn-secondary {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 10px;
    display: inline-block;
}

.auth-buttons .btn-primary {
    background: var(--accent);
    color: white;
    border: none;
}

.auth-buttons .btn-primary:hover {
    background: #c1121f;
    transform: translateY(-2px);
}

.auth-buttons .btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.auth-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    background: url('../img/hero-medical.jpg') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #c1121f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Courses Section */
.section-title {
    text-align: center;
    margin: 3rem 0;
    color: var(--dark);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.course-image {
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.course-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.course-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

.course-button {
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.course-button:hover {
    background: var(--primary);
}

/* Payment Methods */
.payment-methods {
    background: var(--light);
    padding: 4rem 0;
    text-align: center;
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.payment-logo {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-logo img {
    max-width: 100%;
    max-height: 100%;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin: 1rem 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .auth-buttons {
        margin-top: 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(16, 162, 220, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray);
    font-size: 0.8rem;
}

.full-width {
    width: 100%;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
}

.auth-link a {
    color: var(--secondary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Flash Messages */
.flash-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.flash-message.error {
    background: #ffe6e6;
    color: #d93030;
    border: 1px solid #ffb3b3;
}

.flash-message.success {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #b6e3c1;
}

/* Courses Page */
.page-header {
    text-align: center;
    margin: 2rem 0 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.filters-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filters-form {
        grid-template-columns: 2fr 1fr 1fr;
        align-items: end;
    }
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-actions {
    display: flex;
    gap: 1rem;
}

.results-info {
    margin-bottom: 1.5rem;
    color: var(--gray);
}

.course-category {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.course-details {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.course-details div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-results {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
    color: var(--gray);
}

.no-results i {
    margin-bottom: 1rem;
    color: #ddd;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.no-results a {
    color: var(--secondary);
    text-decoration: none;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--light);
    border-color: var(--secondary);
}

.page-link.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Error Messages */
.error-message {
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Dashboard */
.dashboard-container {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-grid .dashboard-card:first-child {
        grid-column: 1 / -1;
    }
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    color: var(--dark);
    font-size: 1.3rem;
}

.btn-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Profile Summary */
.profile-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .profile-summary {
        grid-template-columns: auto 1fr;
    }
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    font-size: 3rem;
    color: var(--secondary);
}

.profile-details h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.profile-details p {
    color: var(--gray);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .profile-stats {
        grid-column: 1 / -1;
    }
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Courses List */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.course-item:hover {
    border-color: var(--secondary);
    box-shadow: 0 2px 8px rgba(16, 162, 220, 0.1);
}

.course-info h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.next-lesson {
    font-size: 0.8rem;
    color: var(--gray);
    margin: 0;
}

.course-completed {
    font-size: 0.8rem;
    color: var(--success);
    margin: 0;
    font-weight: 500;
}

.course-actions .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notification-item.unread {
    background: var(--light);
    border-left: 3px solid var(--secondary);
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-icon {
    color: var(--secondary);
    font-size: 1.2rem;
}

.notification-content h4 {
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.notification-content p {
    color: var(--gray);
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--gray);
}

/* Activity */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    color: var(--secondary);
}

.activity-content p {
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--gray);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}