/* --- BUFFER FISH: FIXED HEADER & TWO-WINDOW SIDEBAR --- */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

body, html {
    margin: 0;
    padding: 0;
    background-color: #efeadf;
    background-image: url("https://www.transparenttextures.com/patterns/gplay.png");
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    font-family: 'Lora', serif;
    font-size: 1.1rem; 
    line-height: 1.6;
    color: #23517e;
}

/* --- FIXED BRANDING HEADER --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: #efeadf; 
    background-image: url("https://www.transparenttextures.com/patterns/gplay.png");
    box-shadow: 0 0px 0 #efeadf, 0 2px 0 #1F314D; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 50px;
    gap: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 90vw;
    max-width: 1100px;
}

.header-icon {
    width: 80px !important;
    height: 80px !important;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-style: italic;
    color: #A22633;
    margin: 0;
}

/* --- THE GRID SYSTEM --- */
#container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    width: 90vw;
    max-width: 1100px;
    padding-top: 60px; 
    align-items: start;
    
}

/* --- SIDEBAR (Two Window Setup) --- */
#header {
    display: flex;
    flex-direction: column;
    gap: 40px; 
    position: sticky;
    top: 220px; 
    /*margin-top: 20px;*/
}

.window {
    background: #6F88A3;
    background-image: url("https://www.transparenttextures.com/patterns/nice-snow.png");
    border: 3px solid #1F314D;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.window-header {
    background: #A22633;
    color: #DFB593;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 3px solid #1F314D;
    font-size: 0.9rem;
}

.window-content {
    padding: 20px;
}

/* POSTS WINDOW SPECIFIC: SCROLLING logic */
.posts-window .window-content {
    max-height: 450px; 
    overflow-y: auto;
    /*padding: 15px 20px; */
}

/* --- CUSTOM SCROLLBAR --- */
.posts-window .window-content::-webkit-scrollbar {
    width: 8px;
}
.posts-window .window-content::-webkit-scrollbar-track {
    background: rgba(31, 49, 77, 0.1);
}
.posts-window .window-content::-webkit-scrollbar-thumb {
    background: #A22633;
    border: 2px solid #6F88A3;
}

/* --- SIDEBAR LIST & DROPDOWN STYLING --- */
nav ul, .category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

nav li, .post-item {
    /*margin-bottom: 3px;*/
}

/* Style for Nav Links & Dropdown Buttons */
nav a, .category-dropdown-btn {
    color: #1F314D;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    width: 100%;
}

nav a:hover, .category-dropdown-btn:hover {
    /*text-decoration: underline;*/
    color: #A22633;
}

/* Dropdown specific logic */
.category-dropdown-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* The Arrow */
.category-dropdown-btn::after {
    content: '‹';
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    /*opacity: 0.6;*/
}

.category-dropdown-btn.active::after {
    transform: rotate(-90deg);
    /*color: #A22633;*/
}

/* The Hidden List */
.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin 0.3s ease;
    padding-left: 10px; /* Indent the posts */
    /*border-left: 2px solid rgba(31, 49, 77, 0.2);*/
}

.category-content.active {
    max-height: 1000px; /* Large enough to hold content */
    margin-bottom: 5px;
    margin-top: 5px;
}

/* Actual Post Links inside dropdown */
.post-item a {
    font-size: 0.95rem;
    color: #23517e;
    opacity: 0.85;
}


/* --- MAIN COLUMN FEED --- */
#content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#blog-feed .window {
    margin-bottom: 40px;
}

.window-content em, .window-content i {
    color: #A22633; 
    font-weight: 500;
}

.window-content strong, .window-content b {
    color: #1F314D;
    border-bottom: 1px solid rgba(31, 49, 77, 0.3);
}

/* --- TYPOGRAPHY: BLOCKQUOTES --- */
blockquote {
    margin: 20px 10px;
    padding: 15px 25px;
    border-left: 5px solid #A22633; 
    background-color: rgba(162, 38, 51, 0.05); 
    font-style: italic;
    color: #1F314D;
    line-height: 1.7;
    position: relative;
}

blockquote::before {
    content: "“";
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: rgba(162, 38, 51, 0.1);
    position: absolute;
    top: -10px;
    left: 5px;
}

/* --- FOOTER & NAVIGATION --- */
.feed-navigation {
    margin-top: 30px;
    text-align: center;
    padding-bottom: 50px;
}

.back-link {
    font-family: "Courier New", Courier, monospace;
    color: #8a8474;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ff0000;
    text-decoration: underline;
}

#footer {
    padding: 20px 0;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
    width: 100%;
}