:root {
    /* --- REVISED VALENTINE'S PINK COLOR PALETTE --- */
    --color-text-base: #600030;          /* Rich Plum/Maroon */
    --color-primary-accent: #E75480;     /* Deep Rose Pink (New Header Color) */
    --color-secondary-accent: #FF88AA;   /* Soft Hot Pink (Hover/Link Color) */
    --color-background-fill: #FFF9F9;    /* Near-White/Cream for Boxes */
    --color-box-border: #D1A5A5;         /* Soft Rose Border */
    --color-light-bg: #FFDDEE;           /* Very Light Pink Background for Header/Nav Hover */
    --color-light-border: #FFC0D9;       /* Lighter Pink for borders */
    --color-darker-bg: #FAE8E8;          /* Light Pink/Beige Background for body/blockquote */
    --color-dropdown-separator: #FFC0CB; /* Light Pink Separator */

    --spacing-xs: 5px;
    --spacing-s: 10px;
    --spacing-m: 15px;
    --spacing-l: 20px;
}

/* Start https://www.cursors-4u.com */ 
* {
    cursor: url(https://cur.cursors-4u.net/food/foo-6/foo512.cur), auto !important;
}
/* End https://www.cursors-4u.com */

/* --- Basic Styles --- */
body {
    background-color: var(--color-darker-bg);
    
    /* === BACKGROUND IMAGE FIX === */
    background-image: url('/pixels/valbg.gif');
    background-repeat: repeat;
    /* ============================ */

    color: var(--color-text-base);
    font-family: 'Ubuntu', 'Courier New', Courier, monospace;
    margin: 0;
    /* FIX: Body padding removed to allow the header to be positioned correctly */
    padding: 0; 
}

/* --- Link Styling and Hover Effects --- */
a {
    color: var(--color-primary-accent);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease-out, color 0.1s ease;
}

a:hover {
    color: var(--color-secondary-accent);
    text-decoration: underline;
    transform: rotate(2deg) translateY(-1px);
}

/* -------------------------------------------------------------------------- */
/* LAYOUT: Global and Site Header */
/* -------------------------------------------------------------------------- */

/* FIX: Add the page padding here instead of the body */
#site-header, #container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-l); 
}

#site-header {
    margin-bottom: var(--spacing-l);
    background-color: var(--color-light-bg);
    text-align: center;
    border: 3px solid var(--color-primary-accent);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
}

.header-content-line {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.header-content-line img {
    margin: 0 10px;
    height: 50px;
    width: auto;
}

#site-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
    color: var(--color-primary-accent); 
    text-transform: uppercase;
    white-space: nowrap;
}

#site-header p {
    font-size: 1em;
    margin: 0;
    color: var(--color-text-base);
}


/* -------------------------------------------------------------------------- */
/* LAYOUT: Container and Columns (Flexbox Grid) */
/* -------------------------------------------------------------------------- */

#container {
    display: flex;
    gap: var(--spacing-l);
    align-items: flex-start;
    /* Apply bottom padding to contain content */
    padding: 0 var(--spacing-l) var(--spacing-l) var(--spacing-l);
}

#left-sidebar {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
}

#main-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* --- The Boxed Aesthetic --- */
.box {
    background-color: var(--color-background-fill);
    border: 1px solid var(--color-box-border);
    padding: var(--spacing-m);
    margin-bottom: var(--spacing-l);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

/* Reset for boxes that shouldn't be scrollable */
.info-box.box {
    display: block;
    max-height: none;
}

.box-header {
    background-color: var(--color-primary-accent); 
    color: var(--color-background-fill);
    padding: var(--spacing-xs) var(--spacing-s);
    margin: calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) 0 calc(0px - var(--spacing-m));

    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1em;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Restore bottom margin for non-scrolling box headers */
.info-box .box-header {
    margin-bottom: var(--spacing-m);
}

.box-header .header-decor {
    width: 25px;
    height: 25px;
    margin-left: var(--spacing-xs);
    flex-shrink: 0;
}

/* --- Scrollable Content Wrapper --- */
.scroll-content {
    overflow-y: scroll;
    flex-grow: 1;
    padding: var(--spacing-m) var(--spacing-l) var(--spacing-m) var(--spacing-m);
    margin: 0 calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m));
}


/* --- Navigation Styling (Left Sidebar) --- */
#main-nav {
    margin-bottom: 0;
}

#main-nav ul {
    list-style: none;
    padding: 0 0 var(--spacing-m) 0;
    margin: 0;
}

#main-nav li a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: var(--spacing-xs) var(--spacing-m);
    border-bottom: 1px dashed var(--color-light-border);
}

#main-nav li:last-child a {
    border-bottom: none;
}

#main-nav li a:hover {
    background-color: var(--color-light-bg);
    text-decoration: none;
}

/* --- PUSHDOWN DROPDOWN (ACCORDION) STYLES --- */
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, visibility 0s 0.3s;
    visibility: hidden;
}

.dropdown-content ul, .dropdown-content li {
    margin: 0;
    padding: 0;
    list-style: none;
    border: none !important;
}

.dropdown:hover .dropdown-content {
    max-height: 300px;
    transition: max-height 0.3s ease-in-out, visibility 0s 0s;
    visibility: visible;
}

.dropdown-content li a {
    padding: 8px var(--spacing-m);
    line-height: normal;
    font-size: 1em;
    background-color: var(--color-darker-bg);
    border-bottom: 1px dashed var(--color-dropdown-separator);
    color: var(--color-text-base);
}

.dropdown-content li a:hover {
    background-color: var(--color-light-bg);
    color: var(--color-secondary-accent);
}

/* --- Blockquote Styling --- */
blockquote {
    background-color: var(--color-darker-bg);
    border-left: 5px solid var(--color-secondary-accent);
    padding: var(--spacing-m) var(--spacing-l) var(--spacing-m) 25px;
    margin: var(--spacing-l) 0;
    color: var(--color-text-base);
    font-style: italic;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

blockquote footer {
    display: block;
    margin-top: var(--spacing-s);
    font-style: normal;
    font-weight: bold;
    color: var(--color-primary-accent);
    font-size: 0.9em;
}

/* --- CUSTOM HORIZONTAL DIVIDER (HR) STYLE --- */
hr {
    border: none;

    /* --- VALENTINE'S DIVIDER SWAP --- */
    background-image: url('https://64.media.tumblr.com/cf9b37e7ef02170cc9505494584c2a33/8fd797243ef322a0-9c/s250x400/dcd4074fae19dac9207da15dc462f92aed66f1be.gifv');
    background-repeat: repeat-x;
    background-position: center center;
    background-color: transparent;

    height: 20px;
    margin: var(--spacing-l) 0;

    width: 100%;
    opacity: 1;
}


ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) {
    list-style: none;
    padding-left: var(--spacing-m);
    margin-top: 0;
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li {
    padding-left: var(--spacing-l);
    position: relative;
    margin-bottom: var(--spacing-xs);
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li::before {
    /* --- VALENTINE'S BULLET SWAP --- */
    content: url('/pixels/bounceheart.gif');
    position: absolute;
    left: 0;
    top: 0px;
    width: 16px;
    height: 16px;

    image-rendering: pixelated;
    image-rendering: -webkit-crisp-edges;
}


.info-box ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: var(--spacing-xs) 0 0 0;
    list-style: none;
}

.info-box ul li {
    padding: 0 !important;
    text-align: center;
    margin: var(--spacing-xs);
}


.info-box ul li::before {
    content: none !important;
}

.info-box ul li a {
    transform: none !important;
    transition: none !important;
    margin: 0;
    display: inline-block;
}

.info-box ul li a:hover {
    text-decoration: none;
    color: inherit;
}

.info-box ul li a img {
    display: block;
    image-rendering: pixelated;
    image-rendering: -webkit-crisp-edges;
}


/* --- Two-Column Content Row --- */
.content-row {
    display: flex;
    gap: var(--spacing-l);
    margin-bottom: var(--spacing-l);
}

.content-row .row-box {
    flex: 1;
    margin-bottom: 0;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}


@media (max-width: 700px) {
    #container, .content-row {
        flex-direction: column;
    }
    .content-row .row-box {
        margin-bottom: var(--spacing-l);
        max-height: none;
    }
}


/* -------------------------------------------------------------------------- */
/* COOKBOOK PAGE / IFRAME STYLES (No color changes needed here) */
/* -------------------------------------------------------------------------- */
#recipe-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}


#recipe-viewer iframe {
    flex: 1;
    width: 100%;
    min-height: 800px;
    background-color: var(--color-background-fill);
    border: none;
}


#recipe-index {
    margin-bottom: 0;
}


/* --- IFRAME SIZING FIX (General) --- */
.box iframe {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}


/* -------------------------------------------------------------------------- */
/* LAYOUT: Container and Columns (Flexbox Grid) - UPDATED FOR COOKBOOK */
/* -------------------------------------------------------------------------- */

#container {
    display: flex;
    gap: var(--spacing-l);
    align-items: flex-start; /* Keeps columns from stretching vertically */
}

#left-sidebar {
    /* Set specific Flex properties:
        Grow: 0 (Don't grow beyond the base size)
        Shrink: 0 (Don't shrink below the base size)
        Base Size: 250px (The desired width) */
    flex: 0 0 250px; 
    
    /* CRITICAL UPDATE: Ensures the main nav and recipe index stack vertically */
    display: flex;
    flex-direction: column; 
    /* Ensures spacing between main-nav and recipe-index when stacked */
    gap: var(--spacing-l); 
}

#main-content {
    /* Set specific Flex properties:
        Grow: 1 (Take up all available leftover space)
        Shrink: 1 (Allows content to wrap/shrink if the screen is too small)
        Base Size: auto (Don't rely on content size to start) */
    flex: 1 1 auto;
    
    /* CRITICAL: Prevents content from forcing the column wider */
    min-width: 0; 

    /* NEW/FIXED: Ensure main-content stacks items vertically (for the recipe viewer) */
    display: flex; 
    flex-direction: column;