/* ============================================================
   1. VARIABLES & FOUNDATION
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');

:root {
    --typewriter-font: 'Special Elite', Courier, serif;
    --vintage-charcoal: #2c2a27;
    --brick-stamp: #8b3a2b;
    --ledger-line: rgba(44, 42, 39, 0.4);
    --story-spacing: 1.5em; 
}

body {
    background: url(https://sidneystreetstories.com/wp-content/uploads/2026/01/91513.jpg) fixed repeat;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   2. GLOBAL TYPOGRAPHY & LINKS
   ============================================================ */
body, h1, h2, h3, p, a, li, span, .wp-block-navigation-item__content {
    font-family: var(--typewriter-font);
    color: var(--vintage-charcoal);
    text-decoration: none;
}

a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-block;
}

a:hover {
    color: var(--brick-stamp);
    transform: translateX(8px);
}

.entry-content {
    line-height: var(--story-spacing);
}

/* ============================================================
   3. LAYOUT STRUCTURE
   ============================================================ */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1800px; 
    margin: 0 auto; 
    padding: 40px;
}

/* Readability limits for the main content column */
.wp-block-column:last-child p, 
.entry-content p {
    max-width: 750px; 
    margin-right: auto;
}

.wp-block-column:last-child h1,
.wp-block-column:last-child h2 {
    max-width: 800px;
}

/* --- THE STICKY SIDEBAR LOGIC --- */
/* Targets the first column and ensures internal WP containers don't block sticky behavior */
body .wp-block-column:first-child {
    position: -webkit-sticky; 
    position: sticky;
    top: 40px;               
    height: fit-content;      
    align-self: flex-start;   
    z-index: 10;
}

/* Ensures the WordPress 'Template Part' wrapper allows the menu to slide */
body .wp-block-column:first-child .wp-block-template-part {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Forces the Navigation block itself to stick if inside a wrapper */
body .wp-block-column:first-child .wp-block-navigation {
    position: -webkit-sticky;
    position: sticky;
    top: 40px;
}

/* ============================================================
   4. NAVIGATION (SIDEBAR & CHAPTER MENUS)
   ============================================================ */
.wp-block-navigation ul {
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    list-style: none;
    padding: 0;
    gap: 10px;
}

/* --- Main Sidebar (Column 1) Decorative Lines --- */
.main-vintage-sidebar .wp-block-navigation-item:first-child,
body .wp-block-column:first-child .wp-block-navigation-item:first-child { 
    border-bottom: 3px double var(--ledger-line); 
    padding-bottom: 10px; 
    width: 200px; 
}

.main-vintage-sidebar .wp-block-navigation-item:first-child .wp-block-navigation-item__content,
body .wp-block-column:first-child .wp-block-navigation-item:first-child .wp-block-navigation-item__content { 
    font-size: 20px; 
    font-weight: bold; 
    text-transform: uppercase; 
    white-space: nowrap; 
}

/* Border Logic for Sidebar Items */
body .wp-block-column:first-child .wp-block-navigation-item:nth-child(4) {
    border-bottom: none;
}

body .wp-block-column:first-child .wp-block-navigation-item:nth-child(5) { 
    border-bottom: 3px double var(--ledger-line); 
    padding-bottom: 25px;
    margin-bottom: 15px;
    width: 200px; 
}

.sidebar-anchor,
body .wp-block-column:first-child .wp-block-navigation-item:nth-child(6),
body .wp-block-column:first-child .wp-block-navigation-item:nth-child(7) { 
    border-top: none; 
    border-bottom: none;
    padding-top: 5px; 
    width: 200px; 
}

.sidebar-anchor {
    border-top: 3px double var(--ledger-line);
    padding-top: 25px;
    min-width: 200px;
}

/* --- Active States: Sidebar Stamp --- */
body .wp-block-column:first-child .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
body .wp-block-column:first-child .wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__content,
body.parent-pageid-181 .wp-block-column:first-child .wp-block-navigation ul li:nth-child(3) .wp-block-navigation-item__content {
    color: var(--brick-stamp);
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    -webkit-text-stroke: 0.5px var(--brick-stamp); 
    transform: rotate(-2deg) skewX(-3deg);
    letter-spacing: 0.5px;
}

/* --- Active States: Chapter Tape Flag (Column 2) --- */
body .wp-block-column:last-child .wp-block-navigation-item.current-menu-item {
    position: relative;
    padding-left: 35px; 
}

body .wp-block-column:last-child .wp-block-navigation-item.current-menu-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-2deg);
    width: 25px; 
    height: 18px; 
    background-color: var(--brick-stamp);
    opacity: 0.8;
    clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

body .wp-block-column:last-child .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
    font-weight: bold;
    text-transform: uppercase;
    color: var(--vintage-charcoal);
    transform: none;
    -webkit-text-stroke: 0;
}

/* WordPress Core Responsive Menu Reset */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { display: none; }

.wp-block-navigation__responsive-container {
    display: block;
    position: static;
    visibility: visible;
    opacity: 1;
}

/* ============================================================
   5. BLOG & ARCHIVE STYLES (Dossier Layout)
   ============================================================ */
.blog .wp-block-column:last-child, 
.archive .wp-block-column:last-child,
.wp-block-column:last-child .wp-block-query {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.wp-block-post, .post-entry {
    border-bottom: 2px double var(--ledger-line);
    padding-bottom: 50px;
    margin-bottom: 20px;
    list-style: none;
}

.wp-block-post-featured-image img {
    border: 8px solid #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
    filter: sepia(0.2) contrast(1.1); 
    margin-bottom: 30px;
    display: block;
}

.wp-block-post-title, .post-entry h2 {
    font-size: 32px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wp-block-post-date, .post-meta {
    font-size: 0.9em;
    opacity: 0.7;
    margin-bottom: 20px;
    font-style: italic;
    display: block;
}

.wp-block-post-excerpt, .post-excerpt {
    line-height: var(--story-spacing);
    margin-bottom: 30px;
    max-width: 700px;
    font-size: 1.1em;
}

.wp-block-read-more, .read-more {
    color: var(--brick-stamp);
    font-family: var(--typewriter-font);
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid var(--brick-stamp);
    padding: 8px 20px;
    display: inline-block;
    transform: rotate(-2deg);
    transition: all 0.2s ease;
    background: transparent;
    cursor: pointer;
}

.wp-block-read-more:hover, .read-more:hover {
    background-color: var(--brick-stamp);
    color: white;
    transform: rotate(0deg) scale(1.05);
}

.wp-block-query-pagination {
    margin-top: 60px;
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--ledger-line);
    padding-top: 30px;
}

.wp-block-query-pagination a {
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9em;
}

/* ============================================================
   6. MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 782px) {
    body .wp-block-columns { flex-wrap: wrap; }

    body .wp-block-columns > .wp-block-column:first-child {
        flex: 1 1 100%;
        position: relative; 
        top: 0;
        margin-bottom: 40px;
    }

    body .wp-block-columns > .wp-block-column:last-child {
        flex: 1 1 100%;
        padding: 0 15px 0 45px;
        margin: 0;
        position: relative;
    }

    /* Red Margin Spine */
    body .wp-block-columns > .wp-block-column:last-child::before {
        content: "";
        position: absolute;
        left: 20px;
        top: 0;
        bottom: 0;
        width: 1px;
        background-color: var(--brick-stamp);
        box-shadow: 3px 0 0 0 var(--brick-stamp);
        opacity: 0.3;
        z-index: 1;
    }

    body .wp-block-column:last-child .current-menu-item::before {
        left: -32px;
        z-index: 2;
    }

    body .wp-block-navigation-item:first-child,
    body .wp-block-navigation-item:nth-child(6),
    body .wp-block-navigation-item:nth-child(7) {
        max-width: 250px;
    }
}
/* Container layout */
.wp-block-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 50px 0;
    padding: 20px 0;
    border-top: 1px double #5d4d33; /* Double line for a vintage touch */
}

/* 1. Style the Navigation Container */
.wp-block-post-navigation {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #5d4d33; /* Darker vintage brown */
    border-bottom: 2px solid #5d4d33;
    padding: 25px 0;
    margin: 40px 0;
    font-family: "Courier New", Courier, monospace; /* Optional: typewriter feel */
}

/* 2. Style the Link Text */
.wp-block-post-navigation-link a {
    text-decoration: none;
    color: #5d4d33;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.2s ease-in-out;
}

/* 3. Hover Effect */
.wp-block-post-navigation-link a:hover {
    color: #962020; /* A brick-red for a 'wax seal' look on hover */
    text-decoration: underline;
}

/* 4. Add Decorative Arrows */
.post-navigation-link-previous a::before {
    content: "« ";
}

.post-navigation-link-next a::after {
    content: " »";
}

/* 5. Add Space Above the Jetpack Sharing Block */
.wp-block-jetpack-sharing-buttons {
    margin-top: 50px !important;
    border-top: 1px dotted #ccc;
    padding-top: 20px;
}
/* ============================================================
   7. CUSTOM VINTAGE PHOTO FRAME (Benton Park Style)
   ============================================================ */

/* This targets the image inside any block you've labeled 'old-photo-frame' */
.wp-block-image.old-photo-frame img,
.old-photo-frame img {
    border: 15px solid #ffffff !important; /* Thick white 'Polaroid' border */
    outline: 1px solid var(--ledger-line) !important; /* Thin vintage edge */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2) !important; /* Physical depth */
    background: #ffffff !important;
    padding: 0 !important;
    transform: rotate(-1deg); /* Slight tilt to match your 'Read More' buttons */
    transition: transform 0.3s ease;
}

/* Subtle hover effect to match your link animations */
.wp-block-image.old-photo-frame img:hover {
    transform: rotate(0deg) scale(1.02);
}