/* Additional styling for enhanced user experience */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Improved card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Navigation buttons styling */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    opacity: 1;
    color: white;
}

/* Highlight current page in navigation */
.current-page {
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
}

/* Image styling */
.figure {
    margin: 2rem 0;
    text-align: center;
}

.figure img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.figure figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #666;
}

/* Blockquote styling enhancement */
blockquote {
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 5px 5px 0;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table, th, td {
    border: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: left;
}

td {
    padding: 0.75rem;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Print styles */
@media print {
    header, footer, .navigation-buttons, .back-to-top, .toc {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    article {
        box-shadow: none;
        padding: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f4f4f4;
        --light-color: #222;
    }
    
    body {
        background-color: #222;
        color: #f4f4f4;
    }
    
    article, .card, .toc {
        background-color: #333;
        color: #f4f4f4;
    }
    
    blockquote {
        background-color: #444;
    }
    
    tr:nth-child(even) {
        background-color: #444;
    }
}
