/* Common styles for practical pages */
:root {
    --primary-color: #3DDA24;
    --secondary-color: #91CE76;
    --text-color: #333;
    --white: #fff;
}

/* Main content layout */
.practical-content {
    max-width: 1440px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    color: var(--primary-color);
    margin: 2rem 0;
    padding: 1rem;
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Navigation and content layout */
.aim-box {
    display: grid;
    grid-template-columns: minmax(200px, 250px) 1fr;
    gap: 2rem;
    margin: 2rem auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Side navigation */
.topic{
    background-color: var(--primary-color);
    padding: 1rem;
    border-radius: 8px 0 0 8px;
    height: 100%;
}

.topic a{
    text-decoration: none;
    color: var(--white);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    transition: all 0.3s ease;
}

.topic > div {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.topic > div:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Content area */
.aim-contentbox{
    padding: 2rem;
    background-color: var(--white);
    border-radius: 0 8px 8px 0;
    min-height: 350px;
}

.aim-content{
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--text-color);
    line-height: 1.6;
}

/* Simulation specific styles */
.simulation-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.gate-container {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gate-container:hover {
    transform: translateY(-5px);
}

.gate-title {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Theory page specific styles */
.theory-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.8;
}

.theory-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
}

/* Procedure page specific styles */
.procedure-steps {
    counter-reset: step;
    list-style-type: none;
    padding: 0;
}

.procedure-steps li {
    position: relative;
    padding: 1rem 1rem 1rem 3rem;
    margin: 1rem 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.procedure-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .aim-box {
        grid-template-columns: 1fr;
    }

    .topic {
        border-radius: 8px 8px 0 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .topic > div {
        padding: 0.75rem 1rem;
        margin: 0;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .aim-contentbox {
        border-radius: 0 0 8px 8px;
    }
}

@media screen and (max-width: 480px) {
    .topic {
        flex-direction: column;
    }

    .topic > div {
        width: 100%;
        text-align: center;
    }

    .aim-content {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}
