/* Arduino Education Lab Pro - Frontend Styles */

.ael-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.ael-main-title {
    text-align: center;
    color: #005A9C;
    margin-top: 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.ael-main-description {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
}

/* Tab Navigation */
.ael-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    border-bottom: 2px solid #e9ecef;
}

.ael-tabs li {
    margin-right: 5px;
}

.ael-tab-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.ael-tab-link:hover {
    background-color: #dee2e6;
    color: #212529;
}

.ael-tab-link.active {
    background-color: #ffffff;
    color: #005A9C;
    border-color: #dee2e6;
    border-bottom: 1px solid #fff;
    position: relative;
    top: 2px; /* Creates the "connected" effect */
}

/* Tab Content Panes */
.ael-tab-content {
    padding-top: 20px;
}

.ael-tab-pane {
    display: none;
}

.ael-tab-pane.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Individual Project Item */
.ael-project-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.ael-project-title {
    color: #343a40;
    margin-top: 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.ael-project-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ael-project-left,
.ael-project-right {
    flex: 1;
    min-width: 300px;
}

/* SVG Diagram */
.ael-svg-diagram {
    background-color: #fdfdfd;
    border: 1px dashed #ced4da;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.ael-svg-diagram svg {
    max-width: 100%;
    height: auto;
}

/* Explanation and Code Blocks */
.ael-explanation h4,
.ael-code-block h4 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.ael-explanation p {
    line-height: 1.6;
    color: #212529;
}

.ael-code-block {
    margin-top: 20px;
}

.ael-code-block pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ael-project-content {
        flex-direction: column;
    }
    .ael-tabs {
        flex-direction: column;
    }
    .ael-tabs li {
        margin-right: 0;
        margin-bottom: 5px;
    }
    .ael-tab-link.active {
        border-bottom: 1px solid #dee2e6;
        top: 0;
    }
}