/* Custom Theme Styling for AndredsWeald */

/* Sidebar Header - Dark Green with Pentagram Logo */
.sidebar-header {
    background-color: #2d5016;
    background: linear-gradient(to bottom, #3a6b1f 0%, #2d5016 100%);
    color: #f5f5dc;
    padding: 5px 1rem;
    border-bottom: 3px solid #1a3d0d;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0 -1rem 1.5rem -1rem; /* Only extend left/right, not top to prevent truncation */
    display: flex;
    align-items: center; /* Vertically center content */
    justify-content: flex-start; /* Align items to start */
    gap: 1.5rem; /* Modest spacing between pentagram and text */
    min-height: 60px; /* Ensure enough height for vertical centering */
    height: 60px; /* Fixed height for consistent centering */
    overflow: visible; /* Prevent clipping */
}

.sidebar-logo {
    display: flex;
    align-items: center; /* Vertically center pentagram */
    text-decoration: none;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.sidebar-logo-img {
    width: 50px;
    height: 50px;
    display: block;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.sidebar-title {
    display: flex;
    align-items: center; /* Vertically center text */
    justify-content: center; /* Center text horizontally in its container */
    font-size: 1.8rem; /* h1 size or slightly less */
    color: #f5f5dc !important; /* Force text color to be visible */
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap; /* Prevent text wrapping */
    flex: 1; /* Take up remaining space */
}

.sidebar-logo:hover {
    color: #fff;
}

/* Main Content Area */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif; /* Changed to sans-serif */
    background-color: #e8f5e9;
    color: #333;
    line-height: 1.6;
}

.page-container {
    display: flex;
    min-height: calc(100vh - 200px);
}

/* Sidebar - Light Green Background */
.sidebar {
    width: 250px;
    background-color: #c8e6c9;
    padding: 0 1rem 1.5rem 1rem; /* Remove top padding to prevent truncation */
    border-right: 1px solid #a5d6a7;
    flex-shrink: 0;
}

/* Sidebar Sections - White Background Boxes */
.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section h2 {
    background-color: #fff;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
    margin: 0 0 0 0;
    border: none;
    border-radius: 0;
}

.sidebar-section ul {
    background-color: #fff;
    padding: 0.75rem 1rem;
    margin: 0;
    list-style: none;
    border-radius: 0;
}

.sidebar-section ul li {
    margin: 0.5rem 0;
}

.sidebar a {
    color: #2d5016;
    text-decoration: none;
    position: relative;
    z-index: 10;
    display: inline-block;
}

.sidebar a:hover {
    color: #1a3d0d;
    text-decoration: underline;
}

/* Main Content - White Background */
.main-content {
    flex: 1;
    background-color: #fff;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Footer */
.site-footer {
    background-color: #2d5016;
    background: linear-gradient(to bottom, #2d5016 0%, #1a3d0d 100%);
    color: #f5f5dc;
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 3px solid #1a3d0d;
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Content Styling */
.content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Main Content Headings - Sans Serif */
.main-content h1 {
    color: #2d5016;
    font-family: Arial, Helvetica, sans-serif;
    border-bottom: 2px solid #3a6b1f;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.main-content h2 {
    color: #2d5016;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 2rem;
    font-size: 1.3rem;
}

.main-content h3 {
    color: #1a3d0d;
    font-family: Arial, Helvetica, sans-serif;
}

/* Page Footer - Date and Author in Small Type */
.page-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #666;
    font-family: Arial, Helvetica, sans-serif;
}

.page-date,
.page-author {
    display: inline-block;
}

.page-separator {
    color: #999;
    margin: 0 0.5rem;
}

/* Sidebar headings are styled above */

a {
    color: #2d5016;
    text-decoration: none;
}

a:hover {
    color: #1a3d0d;
    text-decoration: underline;
}

/* Quick Links and Recent Blog Posts are now filtered out in templates */

/* Responsive Design */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #a5d6a7;
        order: 1; /* Show sidebar first on mobile (above content) */
        padding-top: 0;
    }
    
    .sidebar-header {
        margin: 0 -1rem 1.5rem -1rem; /* No negative top margin on mobile to prevent truncation */
        padding: 5px 1rem;
    }
    
    .main-content {
        order: 2; /* Show main content after sidebar on mobile */
        padding: 1rem;
    }
    
    .sidebar-section {
        display: inline-block;
        width: 48%;
        vertical-align: top;
        margin-right: 2%;
        margin-bottom: 1rem;
    }
    
    .sidebar-section:last-child {
        margin-right: 0;
    }
}

