/* VBA Learning Web Project Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #2c5e2e;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
}

header .subtitle {
    text-align: center;
    opacity: 0.9;
    margin-top: 5px;
    font-size: 0.95rem;
}

/* Navigation Breadcrumb */
.breadcrumb {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.breadcrumb a {
    color: #2c5e2e;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
    margin: 0 8px;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

/* Home Page Full Width Layout */
.main-content.full-width {
    display: block;
    grid-template-columns: none;
}

.main-content.full-width .content {
    max-width: 100%;
    padding: 40px;
}

/* Sidebar Navigation */
.sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: #2c5e2e;
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.phase-nav {
    list-style: none;
}

.phase-nav li {
    margin-bottom: 5px;
}

.phase-nav a {
    display: block;
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.phase-nav a:hover {
    background-color: #e8f5e9;
    color: #2c5e2e;
}

.phase-nav a.active {
    background-color: #2c5e2e;
    color: white;
}

.day-list {
    list-style: none;
    margin-left: 15px;
    margin-top: 5px;
}

.day-list li {
    margin-bottom: 2px;
}

.day-list a {
    display: block;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.day-list a:hover {
    background-color: #f5f5f5;
    color: #2c5e2e;
}

.day-list a.active {
    background-color: #e8f5e9;
    color: #2c5e2e;
    font-weight: 500;
}

/* Content Area */
.content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.content h2 {
    color: #2c5e2e;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.content h3 {
    color: #444;
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

.content h4 {
    color: #555;
    font-size: 1rem;
    margin: 15px 0 10px;
}

.content p {
    margin-bottom: 12px;
    color: #444;
}

.content ul, .content ol {
    margin: 10px 0 15px 25px;
}

.content li {
    margin-bottom: 8px;
}

/* Learning Objectives */
.objectives {
    background: #f0f7f0;
    border-left: 4px solid #2c5e2e;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.objectives h4 {
    color: #2c5e2e;
    margin-bottom: 10px;
}

.objectives ul {
    margin: 0;
    list-style: none;
}

.objectives li {
    padding: 5px 0;
    color: #444;
}

/* Code Blocks */
pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

pre code {
    color: inherit;
    background: none;
}

/* Inline Code */
:not(pre) > code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #c7254e;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px 15px;
    text-align: left;
}

th {
    background-color: #2c5e2e;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0f7f0;
}

/* Practice Exercises */
.exercises {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.exercises h4 {
    color: #f57c00;
    margin-bottom: 10px;
}

.exercises ol {
    margin: 0;
    padding-left: 20px;
}

.exercises li {
    margin-bottom: 8px;
}

/* Problem Solving */
.problems {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.problems h4 {
    color: #1976d2;
    margin-bottom: 10px;
}

/* Summary */
.summary {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.summary h4 {
    color: #7b1fa2;
    margin-bottom: 10px;
}

/* Home Page Grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.phase-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.phase-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.phase-card h3 {
    color: #2c5e2e;
    margin-bottom: 10px;
}

.phase-card .phase-num {
    display: inline-block;
    background: #2c5e2e;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.phase-card p {
    color: #666;
    font-size: 0.95rem;
}

.phase-card a {
    display: inline-block;
    margin-top: 15px;
    color: #2c5e2e;
    text-decoration: none;
    font-weight: 500;
}

.phase-card a:hover {
    text-decoration: underline;
}

/* Features Grid - Side by Side */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.feature-section h2 {
    color: #2c5e2e;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.feature-section ul, .feature-section ol {
    margin: 0;
    padding-left: 20px;
}

.feature-section li {
    margin-bottom: 10px;
    color: #444;
}

/* Code Block with Copy Button */
.code-block {
    position: relative;
    margin: 15px 0;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.copy-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* Exercise Answers Toggle */
.exercise-answers {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.answer-toggle {
    background: #2c5e2e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.answer-toggle:hover {
    background: #3d7a3f;
}

.answer-content {
    margin-top: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
}

.answer-content h3 {
    color: #2c5e2e;
    font-size: 1rem;
    margin-bottom: 15px;
}

.answer-content ol {
    margin: 0;
    padding-left: 20px;
}

.answer-content li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

/* Code Syntax Highlighting */
.vba-keyword { color: #569cd6; }
.vba-string { color: #ce9178; }
.vba-comment { color: #6a9955; font-style: italic; }
.vba-number { color: #b5cea8; }
.vba-function { color: #dcdcaa; }
.vba-operator { color: #d4d4d4; }
.vba-constant { color: #4ec9b0; }

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
    margin-top: 30px;
}

footer .copyright {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* FAQ List */
.faq-list {
    margin-top: 20px;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #2c5e2e;
}

.faq-item h3 {
    color: #2c5e2e;
    font-size: 1rem;
    margin-bottom: 10px;
}

.faq-item p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Phase List */
.phase-list {
    margin-top: 20px;
}

.phase-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #2c5e2e;
}

.phase-item h3 {
    color: #2c5e2e;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.phase-item h3 a {
    color: inherit;
    text-decoration: none;
}

.phase-item h3 a:hover {
    text-decoration: underline;
}

.phase-item p {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .container {
        padding: 15px;
    }

    .content {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
