/* Main CSS for Math Exercise Generator */
/* Main CSS for Math Exercise Generator */

/* Reset and base styles */

:root {
    --color-blue: #597bd5;
    --color-light-blue: #3498db;
    --color-dark-blue: blue;

    --color-grey: #7f8c8d;
    --color-light-grey: #95a5a6;

    --color-black: #2c3e50;

    --color-green: #27ae60;
    --color-dark-green: #229954;

    --color-red: #e74c3c;
    --color-dark-red: #c0392b;

    --color-border-light: var(--color-light-grey);
    --color-border-medium: var(--color-grey);
    --color-solution-bg: var(--color-blue);

    --body-font-family: 'Petrona';
    --main-font-size: 18pt;
    --main-font-color: var(--color-black);
    --bs-body-line-height: 2;


}

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

html {
    overflow-x: hidden;
}

body { /* Define standard for the entire docment */
    font-size: var(--main-font-size);
    font-family: var(--body-font-family);
    color: var(--main-font-color);

}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-grey);
}


/* Layout */
.site-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.home-link {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-link:hover {
    color: #3498db;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: white;
}

.breadcrumbs .active {
    color: white;
    font-weight: 500;
}

.separator {
    color: #7f8c8d;
}

.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}



/* Index page styles */
.index-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.index-header h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.navigation-tree {
    display: grid;
    gap: 2rem;
}

.grade-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.grade-title {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.grade-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.8rem;
}

.grade-title a:hover {
    color: #3498db;
}

.topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.topic-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
}

.topic-link {}



/* Buttons and actions */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

/* Footer navigation */
.page-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px solid #ecf0f1;
}

.page-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #3498db;
    color: white;
}

.prev-link {
    margin-right: auto;
}

.next-link {
    margin-left: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .breadcrumbs {
        justify-content: center;
    }

    .main-content {
        padding: 0 1rem;
    }

    .index-header h1 {
        font-size: 2.5rem;
    }

    .topics-list {
        grid-template-columns: 1fr;
    }

    .page-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .grade-section {
        padding: 1rem;
    }

    .index-header h1 {
        font-size: 2rem;
    }
}

/* Print styles for clean printing */
@media print {
    /* Hide header navigation */
    .site-header {
        display: none !important;
    }

    /* Clean up main content area */
    .main-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}