/* ====== GLOBAL STYLES & VARIABLE THEME ====== */
:root {
    --lp: #2A2A2A;      /* Primary dark text */
    --dp: #556B4D;      /* Sage green borders & accents */
    --gp: #F4F3EC;      /* Clean cream card base */
    --bg: #B8C59C;      /* Soft sage page background */
}

* {
    box-sizing: border-box;
}

body {
    text-align: center;
    background-color: var(--bg);
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--lp);
    margin: 0;
    padding: 0;
    position: relative;
}

/* Subtle floral wallpaper effect overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("images/floralbackground.webp");
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

/* ====== TYPOGRAPHY & INTERACTION ====== */
h1, h2, h3 {
    color: var(--lp);
    margin-top: 0;
}

h1 {
    font-size: 3rem;
    letter-spacing: 4px;
    margin-bottom: 60px;
}

a {
    color: var(--dp);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style-type: disc;
    padding-left: 25px;
}

img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* ====== BUTTONS ====== */
button {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--dp);
    background: var(--gp);
    color: var(--lp);
    cursor: pointer;
    transition: all 0.25s ease;
}

button:hover {
    transform: translateY(-2px);
    background: white;
}

/* ====== HEADER & BANNER BAR ====== */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    background: #394233;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 10;
}

.header-bar img {
    width: 80px;
    height: auto;
}

.header-bar .banner {
    flex-grow: 1;               
    max-height: 120px;          
    object-fit: contain;        
    margin: 0 15px;             
}

.nav-buttons button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    margin: 0 5px;
    padding: 6px 14px;
    border-radius: 10px;
}

.nav-buttons button:hover {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

/* ====== MAIN GRID LAYOUT ====== */
main {
    gap: 12px;
    margin-top: 40px;
    padding: 0 10px;
}

/* Three-column grid explicitly for the homepage */
main.homepage-layout {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 1fr minmax(120px, 200px);
}

/* Single clean column for all other content pages */
main.full-width-layout {
    display: block; 
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== SIDEBAR CARDS ====== */
.sidebar-section {
    border: 2px solid var(--dp);
    border-radius: 16px;
    background: rgba(244, 243, 236, 0.92);
    padding: 0; 
    margin-bottom: 1em;
    text-align: left;
    overflow: hidden; 
    backdrop-filter: blur(2px);
}

/* Remove the aggressive browser margins causing the big gaps */
.sidebar-section h3,
.sidebar-section nav {
    margin-top: 2px;
    margin-bottom: 2px;
}

/* Ensure any centered containers inside the sidebar don't leak extra margin */
.sidebar-section center {
    display: block;
    margin: 0;
    padding: 0;
}

.sidebar-section h2 {
    margin: 0;
    padding: 12px;
    background-color: rgba(85, 107, 77, 0.08);
    border-bottom: 2px solid var(--dp);
    font-size: 1.2rem;
    text-align: center;
}
/* Reduce the vertical space around buttons inside the sidebars */
.sidebar-section button {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Tighten the spacing of the list container items holding them */
.sidebar-section li {
    margin-bottom: 2px; 
}

.sidebar-section ul {
  padding-left: 20px; /* Cuts the default browser 40px list-indent in half */
  margin-top: 5px;
  margin-bottom: 5px;
} 
.sidebar-section p,
.sidebar-section .scroll-box {
    padding: 15px;
}

/* ====== MAIN CONTENT AREA ====== */
.main-content {
    text-align: center;
    border-radius: 20px;
    padding: 25px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto; /* Centers the content area smoothly within its grid column zone */
}

.outter {
    text-align: left;
    display: flex;          
    flex-direction: column;
}

/* ====== HOMEPAGE CONTENT BOXES ====== */
.contentbox {
    display: flex;
    gap: 40px;
    background: rgba(244, 243, 236, 0.92);
    border: 2px solid var(--dp);
    border-radius: 20px;
    position: relative;   
    overflow: visible;    
    padding: 25px 210px 25px 25px; 
    min-height: 160px; 
    box-sizing: border-box;
    text-decoration: none;
    margin-bottom: 25px; 
    transition: transform 0.25s ease;
}

.contentbox:hover {
    transform: translateY(-2px);
}

.contentbox img {
    position: absolute;
    right: -10px;         
    top: -15px;           
    width: 170px;         
    height: 150px;
    object-fit: cover; 
    border-radius: 4px;   
    border: 4px solid white; 
    transform: rotate(3deg); 
    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contentbox:hover img {
    transform: rotate(1deg) scale(1.03);
    box-shadow: 5px 8px 20px rgba(0, 0, 0, 0.25);
}

/* Add this right below your .contentbox styles */
.contentbox.text-only {
    padding: 25px; /* Evens out the padding on all sides to 25px */
}

.contentbox .text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ====== UTILITY SCROLL BOX ====== */
.scroll-box {
    overflow-y: scroll;
    max-height: 150px;
    padding-bottom: 20px;
    scrollbar-color: var(--dp) transparent;
    text-align: left;
}

/* ====== LIBRARY PAGES ====== */
.library-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch; 
    padding: 20px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    background: rgba(244, 243, 236, 0.92);
    border: 2px solid var(--dp);
    gap: 30px;
    width: 100%;
    max-width: 1000px; 
}

.library-item {
    padding: 60px 30px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 
        0 12px 30px rgba(0,0,0,0.15),
        0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.library-item:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow:
        0 30px 70px rgba(0,0,0,0.25),
        0 10px 20px rgba(0,0,0,0.2);
}

.library-item h2 {
    font-size: 24px;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.library-item p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* ====== SIGNAL/MEDIA & BOOK SHELF PAGES ====== */
.media-grid {
    background: rgba(244, 243, 236, 0.92);
    border: 2px solid var(--dp);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px;
    min-width: 0;
}

.media-grid,
.main-content,
.element {
    min-width: 0;
}

.element {
    display: flex;
    flex-direction: column;
    text-align: center;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

.element img {
    width: 100%;
    border-radius: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.element img:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.info {
    margin-top: 10px;
    color: var(--lp);
}

.info strong {
    display: block;
    font-weight: 600;
}

.info span {
    font-size: 0.85rem;
}

.no-cover {
    background: #e2dfd2;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #666;
    border: 1px dashed var(--dp);
}

/* ====== ALBUM / MEDIA SINGLE VIEW PAGE ====== */
.media-page {
    display: flex;
    gap: 60px;
    padding: 60px;
    max-width: 1200px;
    margin: auto;
    align-items: flex-start;
}

.element-cover-large {
    width: 400px;
    border-radius: 18px;
    height: auto;
    max-width: 350px;
}

.element-details h1 {
    margin: 0;
}

.element-details h2 {
    margin-top: 5px;
    font-weight: 400;
    color: #555;
}

.shelf-section {
    margin-bottom: 60px;
}

.currently-reading {
    border: 2px solid var(--dp);
    background: rgba(244, 243, 236, 0.92);
    padding: 20px;
    border-radius: 14px;
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--dp);
    color: white;
    font-size: 11px;
    padding: 4px 6px;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.tracklist {
    margin-top: 30px;
    padding-left: 20px;
}

.tracklist li {
    margin-bottom: 8px;
}

.back-link {
    display: block;
    padding: 20px 40px;
    text-decoration: none;
    color: var(--dp);
}

.back-link:hover {
    color: var(--lp);
    text-decoration: underline;
}

/* ====== FORUM & CONTACT STYLES ====== */
#contact_box {
    max-width: 600px;
    margin: 0 auto;
}

#contact_box,
#contact_box input[type=text],
#contact_box input[type=email],
#contact_box textarea {
    width: 70%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--lp);
    border: 1px solid var(--dp);
    border-radius: 14px;
    font-family: 'Times New Roman', Times, serif;
}

.contact_box .fname, .contact_box .lname, .contact_box .email, .contact_box .message {
    border-radius: 20px;
    border-color: var(--dp);
    background-color: var(--gp);
}

/* ====== FOOTER ====== */
footer {
    background: #394233;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

/* ====== RESPONSIVE LAYOUT (MOBILE) ====== */
@media (max-width: 900px) {
    .nav-buttons button {
        margin: 5px;                 
    }

    .header-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        width: 100%;
        align-items: center;      
        padding-left: 0;          
        padding-right: 0;         
    }

    .header-bar .banner {
        width: 80%;
        max-width: 80%;
    }

    main {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main-content { order: 1; }      
    .sidebar { order: 2; }     

    .main-content, .sidebar {
        width: 100%;
        max-width: 700px;
        margin-top: 20px;
        padding: 15px;
        display: block;
    }
}