/* ========================================
   COURSES PAGE STYLES
   ======================================== */

/* Root Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f1f5f9;
    --white: #ffffff;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 20px 80px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 60px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" 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;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent);
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    font-weight: 300;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.decoration-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.header-decoration i {
    font-size: 24px;
    color: var(--white);
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.courses-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ========================================
   COURSE CATEGORY
   ======================================== */
.course-category {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.category-icon i {
    font-size: 36px;
    color: var(--white);
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.category-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* ========================================
   COURSE GRID
   ======================================== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* ========================================
   COURSE CARD
   ======================================== */
.course-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.course-card:hover::before {
    transform: scaleX(1);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.course-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: rotate(10deg) scale(1.1);
}

.icon-wrapper i {
    font-size: 28px;
    color: var(--primary-color);
    transition: var(--transition);
}

.course-card:hover .icon-wrapper i {
    color: var(--white);
}

.course-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.course-badge.degree {
    background: linear-gradient(135deg, #10b981, #059669);
}

.course-badge.master {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Card Content */
.course-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.course-description {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.duration {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.duration i {
    color: var(--primary-color);
}

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.learn-more i {
    transition: var(--transition);
}

.learn-more:hover {
    color: var(--accent-color);
}

.learn-more:hover i {
    transform: translateX(5px);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 100px 20px;
    margin-top: 80px;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary.pulse {
    animation: pulse 2s infinite;
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-color);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--gray-100);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .page-header h1 {
        font-size: 2.75rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2.5rem;
    }
}

/* Mobile Landscape & Small Tablets */
@media (max-width: 768px) {
    .page-header {
        padding: 80px 20px 60px;
    }
    
    .page-header h1 {
        font-size: 2.25rem;
    }
    
    .page-header p {
        font-size: 1.125rem;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 28px;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .course-card {
        padding: 25px;
    }
    
    .course-card h3 {
        font-size: 1.35rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1.125rem;
    }
    
    .cta-stats {
        gap: 30px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .page-header {
        padding: 60px 15px 40px;
    }
    
    .page-header h1 {
        font-size: 1.875rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .courses-container {
        padding: 0 15px 60px;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-subtitle {
        font-size: 1rem;
    }
    
    .course-card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .icon-wrapper i {
        font-size: 24px;
    }
    
    .course-card h3 {
        font-size: 1.25rem;
    }
    
    .course-description {
        font-size: 0.875rem;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .cta-section {
        padding: 60px 15px;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
    
    .cta-stats {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stat-item i {
        font-size: 36px;
    }
    
    .stat-item h3 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.course-card:focus-within,
.btn:focus,
.learn-more:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .page-header,
    .cta-section {
        background: none !important;
        color: #000 !important;
    }
    
    .course-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn {
        display: none;
    }
}