/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Override any body padding from header when using page-with-header class */
.page-with-header {
    padding-top: 0 !important;
}

/* Add top margin to courses page to account for fixed header */
.courses-page {
    margin-top: 70px; /* Space for fixed header */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Courses Section */
.courses-section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Course Card */
.course-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

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

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 1rem;
}

.course-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.course-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-footer {
    display: flex;
    justify-content: center;
}

.register-btn {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
    max-width: 200px;
    border: none;
    cursor: pointer;
}

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

.register-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.register-btn:hover svg {
    transform: translateX(3px);
}

/* Course Card Badge Variations */
.course-card[data-course="hospital-admin"] .course-badge {
    background: rgba(220, 38, 38, 0.9);
}

.course-card[data-course="ai-accounting"] .course-badge {
    background: rgba(5, 150, 105, 0.9);
}

.course-card[data-course="digital-marketing"] .course-badge {
    background: rgba(124, 58, 237, 0.9);
}

.course-card[data-course="artificial-intelligence"] .course-badge {
    background: rgba(234, 88, 12, 0.9);
}

.course-card[data-course="machine-learning"] .course-badge {
    background: rgba(8, 145, 178, 0.9);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
}

.cta-primary {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
}

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

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

.course-card {
    animation: fadeInUp 0.6s ease forwards;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }
.course-card:nth-child(4) { animation-delay: 0.4s; }
.course-card:nth-child(5) { animation-delay: 0.5s; }

/* Fallback icon styling */
.course-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .courses-page {
        margin-top: 65px; /* Adjust for smaller mobile header */
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .courses-section {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .course-image {
        height: 180px;
    }
    
    .course-content {
        padding: 1.25rem;
    }
    
    .course-title {
        font-size: 1.2rem;
    }
    
    .cta-section {
        padding: 2rem 0;
    }
    
    .cta-title {
        font-size: 1.6rem;
    }
    
    .cta-primary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .courses-page {
        margin-top: 60px; /* Adjust for smaller mobile header */
    }
    
    .container {
        padding: 0 0.8rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .course-content {
        padding: 1rem;
    }
    
    .course-title {
        font-size: 1.1rem;
    }
    
    .course-description {
        font-size: 0.9rem;
    }
    
    .course-image {
        height: 160px;
    }
    
    .register-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .cta-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .courses-grid {
        gap: 1rem;
    }
    
    .course-card {
        border-radius: 12px;
    }
    
    .course-image {
        height: 140px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .register-btn {
        min-height: 48px;
        padding: 0.8rem 2rem;
    }
    
    .course-card:hover {
        transform: none;
    }
    
    .course-card:active {
        transform: scale(0.98);
    }
}

/* Focus styles for accessibility */
.register-btn:focus,
.cta-primary:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.course-card.loading {
    opacity: 0;
    transform: translateY(20px);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .course-card {
        border: 2px solid #000;
    }
    
    .feature-tag {
        border: 1px solid #0369a1;
    }
}