/* General Body Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Lato', sans-serif;
    overflow: hidden; /* Prevents scrolling on the main page */
}

/* Main Two-Column Container */
.main-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Left Column Styling */
.left-column {
    flex-basis: 45%; /* Takes 45% of the width */
    position: relative;
    
    /* IMPORTANT: 
      Replace 'left-background.jpg' with your background image.
    */
    background-image: url('left-background.jpg');
    background-size: cover;
    background-position: center;
    color: white;
}

.content-overlay {
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay for readability */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    box-sizing: border-box; /* Ensures padding is included in the element's total width and height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes content to top and bottom */
}

.left-column h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    margin-top: 0;
}

.left-column ul {
    list-style-type: circle;
    padding-left: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between buttons */
}

.action-button {
    padding: 15px 50px;
    font-size: 1rem;
    font-weight: 700;
    color: #3b2f2f;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fde49b, #e9c156);
    border: 1px solid #c7a245;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.5);
    transition: all 0.2s ease-in-out;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.5);
}

.action-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.5);
}


/* Right Column Styling */
.right-column {
    flex-basis: 55%; /* Takes 55% of the width */
    padding: 40px;
    background-color: #ffffff;
    overflow-y: auto; /* Allows this column to scroll if content is long */
    box-sizing: border-box;
}

.right-column h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    color: #004085; /* A strong blue color */
    margin-top: 0;
    margin-bottom: 30px;
}

/* Book Grid Layout */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.book-item {
    text-align: center;
}

.book-item img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.book-item h3 {
    margin-top: 10px;
    font-size: 1rem;
    color: #333;
    font-weight: 700;
}

/* Responsive for screens 768px wide or smaller */
@media (max-width: 768px) {

    /* Allow the whole page to scroll */
    body, html {
        overflow: auto; 
    }

    /* Change the main container to a vertical layout */
    .main-container {
        flex-direction: column;
        height: auto; /* Allow container to grow with content */
    }

    /* Make each column take up the full width */
    .left-column, .right-column {
        flex-basis: 100%;
    }

    /* Give the top (left) column a specific height */
    .left-column {
        height: 80vh; /* 80% of the viewport height */
        min-height: 500px; /* Ensures it's not too short */
    }

    /* Ensure the right column content is fully visible */
    .right-column {
        height: auto;
        overflow-y: visible; /* Let the body handle scrolling */
    }

    /* Adjust font sizes for smaller screens */
    .left-column h2, .right-column h2 {
        font-size: 2rem;
    }

    .left-column ul {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Make buttons slightly smaller on mobile */
    .action-button {
        padding: 12px 35px;
        font-size: 0.9rem;
    }
}