/* AWS CLF-C02 Learning - Lessons Specific Styles */

/* Variables */
:root {
    --aws-orange: #FF9900;
    --aws-blue: #232F3E;
    --aws-light-blue: #0073BB;
    --aws-dark: #161E2D;
    --aws-light-orange: #FFF4E6;
    --aws-green: #1A9332;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-white: #fff;
    --bg-primary: #f7f8fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--aws-blue);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.logo-aws {
    background: var(--aws-orange);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
}

.logo-text {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.header-nav {
    display: flex;
    gap: 8px;
    margin-left: 32px;
}

.nav-link {
    padding: 8px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.nav-link.active {
    background: var(--aws-orange);
    color: #fff;
}

.nav-link-external {
    border: 1px solid var(--aws-orange);
    color: var(--aws-orange) !important;
}

.nav-link-external:hover {
    background: var(--aws-orange) !important;
    color: #fff !important;
}

.header-right {
    display: flex;
    align-items: center;
}

.lesson-progress {
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #fff;
}

/* Main Container */
.main-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.course-list {
    padding: 0 12px;
}

.course-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.course-item:hover {
    background: var(--aws-light-orange);
}

.course-item.active {
    background: var(--aws-orange);
    color: white;
}

.course-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.course-item-meta {
    font-size: 12px;
    opacity: 0.8;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 32px;
    max-width: 1000px;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--aws-orange), var(--aws-light-blue));
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.welcome-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-card p {
    font-size: 15px;
    opacity: 0.9;
}

/* Course Cards */
.course-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.course-card-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.course-icon {
    width: 56px;
    height: 56px;
    background: var(--aws-light-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aws-orange);
}

.course-icon svg {
    width: 28px;
    height: 28px;
}

.course-card-title {
    flex: 1;
}

.course-card-title h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.course-card-title span {
    font-size: 13px;
    color: var(--text-secondary);
}

.course-card-body {
    padding: 24px;
}

.course-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.course-meta-item svg {
    color: var(--aws-orange);
}

.course-card-progress {
    margin-bottom: 20px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--aws-orange);
    border-radius: 3px;
    transition: width 0.3s;
}

.course-card-btn {
    width: 100%;
    padding: 12px;
    background: var(--aws-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.course-card-btn:hover {
    background: #e68a00;
}

/* Back Button */
.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Course Detail View */
.course-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.course-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.course-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Lesson List */
.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.lesson-item.completed {
    border-left: 4px solid var(--aws-green);
}

.lesson-number {
    width: 40px;
    height: 40px;
    background: var(--aws-light-orange);
    color: var(--aws-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.lesson-item.completed .lesson-number {
    background: var(--aws-green);
    color: white;
}

.lesson-item.completed .lesson-number::after {
    content: '\2713';
}

.lesson-item.completed .lesson-number span {
    display: none;
}

.lesson-item-info {
    flex: 1;
}

.lesson-item-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.lesson-item-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.lesson-item-arrow {
    color: var(--text-secondary);
}

/* Lesson View */
.lesson-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lesson-info {
    flex: 1;
}

.lesson-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--aws-orange);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lesson-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.lesson-duration {
    font-size: 14px;
    color: var(--text-secondary);
}

.lesson-nav {
    display: flex;
    gap: 8px;
}

.btn-lesson-nav {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-lesson-nav:hover:not(:disabled) {
    background: var(--aws-light-orange);
    border-color: var(--aws-orange);
}

.btn-lesson-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lesson Content */
.lesson-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-bottom: 24px;
}

.lesson-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--aws-blue);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--aws-orange);
}

.lesson-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 16px 0;
}

.lesson-content p {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Keypoints Box */
.keypoints-box {
    background: var(--aws-light-orange);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 24px 0;
}

.keypoints-box h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--aws-orange);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keypoints-box h4::before {
    content: '\1F4CC';
}

.keypoints-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keypoints-box li {
    padding: 10px 0 10px 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.7;
    border-bottom: 1px solid rgba(255,153,0,0.2);
}

.keypoints-box li:last-child {
    border-bottom: none;
}

.keypoints-box li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--aws-green);
    font-weight: bold;
}

/* Comparison Box */
.comparison-box {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 24px 0;
}

.comparison-box h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comparison-box h4::before {
    content: '\2696\FE0F';
}

.comparison-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparison-item {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 4px solid var(--aws-orange);
}

.comparison-item h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--aws-orange);
    margin-bottom: 8px;
}

.comparison-item p {
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    border-left: 4px solid var(--aws-orange);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 24px 0;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 600;
    color: #e68a00;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box h4::before {
    content: '\1F4A1';
}

.info-box p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* Content Table */
.table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.content-table th {
    background: var(--aws-blue);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
}

.content-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.content-table tr:nth-child(even) {
    background: var(--bg-primary);
}

.content-table tr:hover {
    background: var(--aws-light-orange);
}

/* Content Cards */
.content-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.content-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.2s;
}

.content-card:hover {
    border-color: var(--aws-orange);
    box-shadow: var(--shadow-sm);
}

.content-card-icon {
    width: 44px;
    height: 44px;
    background: var(--aws-light-orange);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 20px;
}

.content-card h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--aws-blue);
}

.content-card p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* Code Block */
.code-block {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    margin: 24px 0;
    overflow: hidden;
}

.code-block-header {
    background: #333;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-block-title {
    font-size: 13px;
    color: #999;
}

.code-block-lang {
    font-size: 12px;
    color: var(--aws-orange);
    text-transform: uppercase;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
}

/* Lesson Footer */
.lesson-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.btn-complete {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--aws-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-complete:hover {
    background: #158528;
}

.btn-complete.completed {
    background: var(--bg-primary);
    color: var(--aws-green);
    border: 2px solid var(--aws-green);
}

.btn-next-lesson {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--aws-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-next-lesson:hover {
    background: #e68a00;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .course-cards {
        grid-template-columns: 1fr;
    }

    .lesson-content {
        padding: 24px;
    }

    .lesson-header {
        flex-wrap: wrap;
    }

    .lesson-info {
        order: -1;
        width: 100%;
        margin-bottom: 12px;
    }

    .lesson-footer {
        flex-direction: column;
    }

    .btn-complete,
    .btn-next-lesson {
        width: 100%;
        justify-content: center;
    }

    .content-cards {
        grid-template-columns: 1fr;
    }

    .header-nav {
        display: none;
    }

    .content-area {
        padding: 16px;
    }
}
