/* Slide Archive Layout Styles */

/* Main two-column layout */
.slide-archive-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-nav h2 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #003a00;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #003a00;
}

.sidebar-nav h2:first-child {
    margin-top: 0;
}

.sidebar-nav nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-nav nav a:hover {
    background-color: #e8e8e8;
    color: #003a00;
    padding-left: 1rem;
}

/* Content Area */
.content-area {
    min-width: 0; /* Prevents grid blowout */
}

/* Intro Section */
.intro {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #003a00;
}

.intro p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.intro p:last-of-type {
    margin-bottom: 1rem;
}

.intro img {
    display: block;
    margin: 1rem auto 0;
    max-width: 100%;
    height: auto;
}

/* Individual Slide Sections */
.slide-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.slide-section h2 {
    font-size: 1.5rem;
    color: #003a00;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

/* Slide Gallery - Grid Layout for Thumbnails */
.slide-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.slide-gallery a {
    display: block;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.slide-gallery a:hover {
    border-color: #003a00;
    box-shadow: 0 4px 8px rgba(0,58,0,0.2);
    transform: translateY(-2px);
}

.slide-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* Slide Metadata/Download Links */
.slide-meta {
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.slide-meta a {
    color: #003a00;
    font-weight: bold;
    text-decoration: none;
}

.slide-meta a:hover {
    text-decoration: underline;
}

.slide-meta em {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .slide-archive-layout {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .sidebar-nav {
        padding: 1rem;
    }
    
    .slide-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .slide-archive-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar-nav {
        position: static;
        max-height: none;
        margin-bottom: 1.5rem;
    }
    
    .slide-gallery {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.75rem;
    }
    
    .slide-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .slide-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .sidebar-nav h2 {
        font-size: 1rem;
    }
    
    .sidebar-nav nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Smooth Scrolling for Anchor Links */
html {
    scroll-behavior: smooth;
}

/* Add some top padding when jumping to sections (account for sticky header) */
.slide-section {
    scroll-margin-top: 100px;
}

/* Custom Scrollbar for Sidebar (Webkit browsers) */
.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #555;
}
