/* ==================== Courses Page Styles ==================== */

/* CSS Variables */
:root {
    --courses-bg: #0a1628;
    --courses-bg-light: #152a45;
    --courses-bg-card: rgba(255, 255, 255, 0.05);
    --courses-primary: #3b82f6;
    --courses-primary-light: #60a5fa;
    --courses-accent: #10b981;
    --courses-text: #f1f5f9;
    --courses-text-light: #cbd5e1;
    --courses-text-muted: #94a3b8;
    --courses-border: rgba(255, 255, 255, 0.1);
    --courses-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --courses-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
    --courses-transition: all 0.3s ease;
    --courses-glow: 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--courses-bg);
    color: var(--courses-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background decoration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== Hero Section ==================== */
.courses-hero {
    position: relative;
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--courses-bg) 0%, var(--courses-bg-light) 50%, var(--courses-bg) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--courses-border);
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero-bg.jpg') center/cover;
    opacity: 0.2;
}

.courses-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--courses-bg), transparent);
}

.courses-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 31, 53, 0.9) 0%, rgba(21, 42, 69, 0.85) 100%);
}

.courses-hero-title {
    position: relative;
    z-index: 1;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, var(--courses-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

/* ==================== Main Content ==================== */
.courses-main {
    padding: 80px 0;
    position: relative;
}

.courses-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==================== Section Styles ==================== */
.courses-section {
    margin-bottom: 100px;
    position: relative;
}

.courses-section:last-child {
    margin-bottom: 0;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: var(--courses-bg-card);
    border-radius: 20px;
    border: 1px solid var(--courses-border);
    backdrop-filter: blur(10px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.courses-section:hover::before {
    opacity: 1;
}

.courses-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 20px;
}

.courses-content--reverse {
    direction: rtl;
}

.courses-content--reverse > * {
    direction: ltr;
}

/* ==================== Text Styles ==================== */
.courses-text {
    padding: 20px 0;
}

.courses-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, var(--courses-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.courses-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--courses-primary), var(--courses-accent));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.courses-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--courses-primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.courses-subtitle::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--courses-primary);
}

.courses-highlight {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--courses-accent);
    margin-bottom: 25px;
    font-style: italic;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.courses-desc {
    font-size: 1rem;
    color: var(--courses-text-light);
    line-height: 1.9;
    margin-bottom: 18px;
}

.courses-desc:last-child {
    margin-bottom: 0;
}

/* ==================== Image Styles ==================== */
.courses-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--courses-shadow);
    transition: var(--courses-transition);
    border: 1px solid var(--courses-border);
}

.courses-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.courses-image:hover {
    transform: translateY(-8px);
    box-shadow: var(--courses-shadow-hover), var(--courses-glow);
    border-color: rgba(59, 130, 246, 0.3);
}

.courses-image:hover::before {
    opacity: 1;
}

.courses-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.courses-image:hover img {
    transform: scale(1.05);
}

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

@keyframes courses-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    }
}

.courses-section {
    animation: courses-fadeInUp 0.8s ease forwards;
}

.courses-section:nth-child(2) {
    animation-delay: 0.15s;
}

.courses-section:nth-child(3) {
    animation-delay: 0.3s;
}

.courses-section:nth-child(4) {
    animation-delay: 0.45s;
}

.courses-section:nth-child(5) {
    animation-delay: 0.6s;
}

.courses-section:nth-child(6) {
    animation-delay: 0.75s;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .courses-container {
        padding: 0 30px;
    }

    .courses-content {
        gap: 40px;
    }

    .courses-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 768px) {
    .courses-hero {
        height: 280px;
    }

    .courses-main {
        padding: 50px 0;
    }

    .courses-container {
        padding: 0 20px;
    }

    .courses-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 15px;
    }

    .courses-content--reverse {
        direction: ltr;
    }

    .courses-section {
        margin-bottom: 60px;
    }

    .courses-section::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }

    .courses-title {
        font-size: 1.7rem;
    }

    .courses-title::after {
        width: 60px;
        height: 3px;
    }

    .courses-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .courses-hero {
        height: 220px;
    }

    .courses-hero-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .courses-title {
        font-size: 1.5rem;
    }

    .courses-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .courses-subtitle::before {
        width: 20px;
    }

    .courses-highlight {
        font-size: 1rem;
    }

    .courses-desc {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .courses-image {
        border-radius: 12px;
    }
}
