/* Cozy Mystery Autumn Theme */
:root {
    --autumn-gold: #D4A574;
    --deep-green: #2F5233;
    --autumn-maroon: #8B1538;
    --deep-blue: #1B365D;
    --warm-cream: #F5F1E8;
    --soft-gold: #E8D5B7;
    --dark-text: #2C2C2C;
    --light-text: #F5F1E8;
}

/* Base styles */
body {
    background-color: var(--warm-cream);
    color: var(--dark-text);
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sidebar Layout */
body {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed {
    margin-left: 60px;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #000;
    border-right: 4px solid var(--deep-green);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #333;
}

.sidebar-header img {
    width: 100%;
    max-width: 200px;
    height: auto;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header img {
    opacity: 0;
    max-height: 0;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: -10px;
    background-color: var(--deep-green);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    visibility: hidden;
}

.sidebar-toggle:hover {
    background-color: var(--autumn-gold);
    color: var(--dark-text);
}

.sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-menu li {
    border-bottom: 1px solid #333;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--deep-green);
    color: var(--autumn-gold);
    border-right: 3px solid var(--autumn-gold);
}

.sidebar.collapsed .sidebar-menu a {
    padding: 1rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu .text {
    display: none;
}

/* Mobile toggle (hidden by default, shown only on mobile) */
.mobile-toggle {
    display: none;
}

/* Mobile responsive sidebar */
@media screen and (max-width: 768px) {
    body {
        margin-left: 0;
    }

    body.sidebar-open {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }

    .mobile-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        background-color: var(--deep-green);
        color: var(--light-text);
        border: none;
        border-radius: 4px;
        width: 40px;
        height: 40px;
        cursor: pointer;
        z-index: 1002;
        transition: all 0.3s ease;
        font-size: 16px;
    }

    .mobile-toggle:hover {
        background-color: var(--autumn-gold);
        color: var(--dark-text);
    }
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--soft-gold) 0%, var(--autumn-gold) 100%);
    color: var(--dark-text);
}

.hero.is-primary {
    background: linear-gradient(135deg, var(--deep-green) 0%, var(--deep-blue) 100%);
    color: var(--light-text);
}

/* Content sections */
.section {
    padding: 3rem 1.5rem;
}

.content h1,
.content h2,
.content h3 {
    color: var(--deep-green);
}

.content h1 {
    border-bottom: 3px solid var(--autumn-gold);
    padding-bottom: 0.5rem;
}

/* Cards */
.card {
    background-color: white;
    border: 1px solid var(--soft-gold);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--deep-green);
    color: var(--light-text);
}

/* Buttons */
.button.is-primary {
    background-color: var(--autumn-maroon);
    border-color: var(--autumn-maroon);
}

.button.is-primary:hover {
    background-color: #6B0F2A;
    border-color: #6B0F2A;
}

.button.is-info {
    background-color: var(--deep-blue);
    border-color: var(--deep-blue);
}

.button.is-warning {
    background-color: var(--autumn-gold);
    border-color: var(--autumn-gold);
    color: var(--dark-text);
}

/* Main content wrapper to push footer down */
.main-content {
    flex: 1;
}

/* Footer */
.footer {
    background-color: var(--deep-green);
    color: var(--light-text);
    padding: 2rem 1.5rem 1rem;
    margin-top: auto;
}

.footer a {
    color: var(--autumn-gold);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--soft-gold);
}

.footer .icon {
    color: var(--autumn-gold);
}

.footer .icon:hover {
    color: var(--soft-gold);
}

/* Social media icons */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Responsive typography */
@media screen and (max-width: 768px) {
    .hero-body h1.title {
        font-size: 2rem;
    }

    .hero-body h2.subtitle {
        font-size: 1.25rem;
    }
}

/* Custom utilities */
.has-text-autumn-gold {
    color: var(--autumn-gold) !important;
}

.has-text-deep-green {
    color: var(--deep-green) !important;
}

.has-text-autumn-maroon {
    color: var(--autumn-maroon) !important;
}

.has-background-warm-cream {
    background-color: var(--warm-cream) !important;
}

.has-background-soft-gold {
    background-color: var(--soft-gold) !important;
}

/* Loading animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.subtitle.is-6 {
    font-size: 1.25rem;
    margin-top: 10px !important;
}

.subtitle {
    color: #4a4a4a;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.25;
    margin-top: 10px !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-text);
}

.rowtitle {
    border-bottom: 4px double #dddddd;
    display: block;
    padding-bottom: 12px;
}

/* Sidebar separator */
.sidebar-menu li.separator {
    margin: 0.5rem 0;
}

.sidebar-menu li.separator hr {
    background-color: #555;
    height: 1px;
    border: none;
    margin: 0 1rem;
}

.tag:not(body).is-info {
    background-color: #055394;
    color: #fff;
}

.tag:not(body).is-primary {
    background-color: #11564c;
    color: #fff;
}

.tag:not(body).is-warning {
    background-color: #a37a09;
    color: #fff;
}

/* Book Layout - Responsive Design */
.book-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.book-cover {
    flex-shrink: 0;
}

.book-content {
    flex: 1;
    min-width: 0;
    /* Prevents text overflow */
}

/* Mobile: Stack vertically */
@media screen and (max-width: 1024px) {
    .book-layout {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 0 !important;
    }

    .book-cover {
        margin-bottom: 2rem !important;
        width: auto !important;
        display: block !important;
        position: relative !important;
        z-index: 1 !important;
    }

    .book-cover figure {
        margin: 0 auto !important;
    }

    .book-content {
        text-align: left !important;
        width: 100% !important;
        margin-top: 0 !important;
        position: relative !important;
        z-index: 2 !important;
        clear: both !important;
    }

    .book-content .title {
        text-align: center !important;
        margin-top: 0 !important;
        padding-top: 50px !important;
    }
}