/* ==========================================================================
   1. RESET & BASE STYLE DESIGN
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fcfbf9;
}

/* Structural Container holding the columns */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   2. RIGHT COLUMN: NAVIGATION SIDEBAR (Fixed & Independently Scrollable)
   ========================================================================== */
.sidebar {
    width: 300px;
    background-color: #eef0f1;
    padding: 40px 25px;
    border-left: 1px solid #e0dad0; /* Separator line on the left side */
    position: fixed;
    right: 0;                       /* Anchors fixed box to the right side */
    top: 0;
    height: 100vh;
    
    /* Enables scrolling within the menu frame if lists become very long */
    overflow-y: auto; 
    scrollbar-width: thin; 
}

/* Sidebar Components */
.sidebar-logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.nav-menu h2 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2c2823;
    margin-top: 25px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e0dad0;
    padding-bottom: 3px;
}

.nav-menu ul {
    list-style: none;
    margin-bottom: 15px;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    text-decoration: none;
    color: #2c2823;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-menu a:hover, 
.nav-menu a.active {
    color: #2c2823;
    font-weight: bold;
}

.sidebar-notes {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0dad0;
}

.sidebar-notes h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c2823;
}

.sidebar-notes p {
    font-size: 0.9rem;
    color: #2c2823;
}

.sidebar-footer-notes {
    margin-top: 40px;
    font-size: 0.8rem;
    color: #9c9283;
}

/* ==========================================================================
   3. LEFT COLUMN: MAIN WORKSPACE FRAME
   ========================================================================== */
.main-content {
    margin-right: 300px; /* Pushes text away from the right-hand fixed sidebar */
    flex: 1;
    padding: 60px 40px;
    max-width: 1000px;
}

/* Home Welcome Banner */
.welcome-banner {
    margin-bottom: 40px;
}

.welcome-banner h1 {
    font-size: 2.5rem;
    color: #2b2621;
    margin-bottom: 10px;
}

.welcome-banner p {
    font-size: 1.1rem;
    color: #2c2823;
}

/* ==========================================================================
   4. HOME PAGE VIEW: VISUAL LANDING GRID SYSTEM (index.html)
   ========================================================================== */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.theme-card {
    display: block;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(43, 38, 33, 0.45);
    color: #ffffff;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: background 0.3s ease;
}

.theme-card:hover .card-overlay {
    background: rgba(43, 38, 33, 0.6);
}

.card-overlay h2 { 
    font-size: 1.5rem; 
    margin-bottom: 5px; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.3); 
}

.card-overlay p { 
    font-size: 0.95rem; 
    opacity: 0.9; 
}

/* ==========================================================================
   5. POEM SHOWCASE PRESENTATION INTERIOR
   ========================================================================== */
.poem-showcase {
    background-color: #ffffff;
    border: 1px solid #eae6df;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.poem-hero-header {
    width: 100%;
    height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.poem-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 50px;
}

.poem-category-tag {
    color: #e0dad0;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.poem-main-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Frosted glass Home Button inside the Header */
.back-home-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Typography spacing out verses cleanly */
.poem-display-body {
    padding: 60px 80px;
    max-width: 750px;
}

.poem-stanzas {
    margin-bottom: 60px;
}

.stanza {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #3b352e;
    margin-bottom: 30px;
    letter-spacing: 0.01em;
}

/* Commentary thoughts frame below standard text */
.poem-commentary {
    background-color: #fbfbfa;
    border-top: 1px solid #eae6df;
    border-left: 3px solid #2c2823;
    padding: 30px;
    border-radius: 0 8px 8px 0;
}

.commentary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.commentary-header h2 {
    font-size: 1.2rem;
    color: #2c2823;
    font-style: italic;
    font-weight: 600;
}

.commentary-text p {
    font-size: 1rem;
    color: #2c2823;
    line-height: 1.7;
}

/* ==========================================================================
   6. RESPONSIVE MEDIA BREAKPOINT (Flips for mobile screens)
   ========================================================================== */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column; /* Content displays first, sidebar drops below */
    }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid #e0dad0;
        padding: 30px 20px;
    }
    .main-content {
        margin-right: 0;
        padding: 20px 15px;
    }
    .theme-grid {
        grid-template-columns: 1fr; /* Forms a single column list for cards */
    }
    .poem-hero-header {
        height: 260px;
    }
    .poem-hero-overlay {
        padding: 25px;
    }
    .poem-main-title {
        font-size: 2.2rem;
    }
    .poem-display-body {
        padding: 35px 25px;
    }
    .stanza {
        font-size: 1.15rem;
    }
    .back-home-btn {
        top: 15px;
        left: 15px;
    }
}
