/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ED0C4B;
}

img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background-color: #fafafa;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.07);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem 1.8rem 1.5rem;
    border-bottom: 1px solid #ddd;
}

.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0;
    text-transform: uppercase;
}

.sidebar-header h1 a {
    color: #333;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.6rem 1.8rem;
    color: #444;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ED0C4B;
}

.nav-link.active {
    color: #ED0C4B;
    font-weight: 520;
}

.main-content {
    margin-left: 300px;
    min-height: 100vh;
    padding: 4.4rem 4rem 4rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Author Section */
.author-section {
    margin-bottom: 3rem;
}

.author-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.author-text {
    flex: 1;
    order: 1;
}

.author-text p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.author-image {
    flex: 0 0 170px;
    order: 2;
}

.author-image img {
    width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.books-section {
    margin: 4.5rem 0 4rem 0;
    padding: 1.5rem 1.5rem 2.5rem 1.5rem;
    background-color: #fafafa;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.books-section h3 {
    text-align: center;
    margin: 0.5rem 0 2.5rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.books-covers {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.book-cover-item {
    text-align: center;
}

.book-cover-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.book-cover-item a:hover {
    transform: translateY(-5px);
    color: inherit;
}

.book-cover-item img {
    width: auto;
    height: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.book-cover-item p {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    color: #666;
}

.reading-photos {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.reading-photos img {
    width: calc(50% - 1rem);
}

.photo-caption {
    text-align: center;
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 3rem;
}

/* Book Sections */
.book-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #ddd;
}

.book-section:last-child {
    border-bottom: none;
    margin-bottom: 2rem;
}

.book-header {
    margin-bottom: 2rem;
}

.book-header h1,
.book-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 400;
}

.book-content {
    margin-bottom: 3rem;
}

.book-info-box {
    float: right;
    width: 260px;
    margin: 0 0 1.5rem 2rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border: 1px solid #ddd;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-cover {
    width: 100%;
    margin: 0 0 1.5rem 0;
}

.book-cover img {
    width: 100%;
}

.leseprobe-section {
    margin: 1rem 0 0.5rem 0;
    text-align: center;
}

.book-meta {
    margin-bottom: 0.5rem;
    text-align: center;
}

.book-meta p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.book-meta a {
    color: #333;
    text-decoration: underline;
}

.book-meta a:hover {
    color: #ED0C4B;
}

.book-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.book-section::after {
    content: "";
    display: table;
    clear: both;
}

.book-info-box .button {
    padding: 0.3rem 0.8rem;
    margin-top: 0.5rem;
}

.book-info-box .cta-section {
    text-align: center;
    margin: 0.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Button Sections */
.cta-section {
    text-align: center;
}

.preview-section {
    margin: 2rem 0;
}

.buy-section {
    margin: 3rem 0;
}

/* Base Button Styling */
.button {
    display: inline-block;
    background-color: #333333;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin: 0.5rem;
}

.button:hover {
    background-color: #ED0C4B;
    color: #fff;
}


/* Reader Reviews */
.reviews-section {
    margin-top: 3rem;
}

.reviews-section h3,
.accordion-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.review {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-left: 2px solid #6d6d6d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review p {
    font-style: italic;
    margin-bottom: 1rem;
}

.review-author {
    text-align: right;
    font-weight: 600;
    font-style: normal;
}

/* Accordion for stories */
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accordion-header {
    background-color: #fafafa;
    padding: 1rem;
    cursor: pointer;
    font-weight: 400;
    user-select: none;
    position: relative;
    color: #666;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #ED0C4B;
}

.accordion-item.active .accordion-header {
    color: #ED0C4B;
    font-weight: 520;
    background-color: #f4f4f4;
}

.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    transform: translateY(-50%) rotate(45deg);
}

.accordion-content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 1rem;
    max-height: 2000px;
}

.accordion-content h3,
.accordion-content h4 {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.accordion-content .separator {
    text-align: center;
    font-size: 1.4em;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

.submit-button {
    background-color: #333333;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #ED0C4B;
}

/* Footer */
.footer {
    margin-left: 300px;
    padding: 1.5rem;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    background-color: #fafafa;
}

.footer a {
    color: #666;
    text-decoration: underline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: #333;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.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;
}

/* Media Queries */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 5.5rem 1rem 1rem;
    }
    
    .footer {
        margin-left: 0;
    }
    
    .author-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .author-image {
        order: 1;
        flex: none;
        align-self: center;
    }

    .author-text {
        order: 2;
    }

    .books-covers {
        gap: 2rem;
    }

    .book-cover-item img {
        width: auto;
        height: 200px;
    }
    
    .book-info-box {
        float: none;
        width: auto;
        margin: 0 0 2rem 0;
    }
    
    .book-cover {
        width: 150px;
        margin: 0 auto 1.5rem;
    }
    
    .reading-photos {
        flex-direction: column;
    }
    
    .reading-photos img {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 5.5rem 0.5rem 0.5rem;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .book-header h1 {
        font-size: 2rem;
    }
    
    .sidebar-header h1 {
        font-size: 1rem;
    }
}