/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-image: url('/assets/images/bgs/placeholder8.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #FFFFFF;
}

/* Header Styles */
/* Header Layout */
header {
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
}

header .logo {
    height: 50px;
}

header .site-title {
    flex: 1; /* Use remaining space */
    text-align: center; /* Center the text */
    font-size: 1.8rem; /* Adjust the size */
    font-weight: bold;
    color: #FFD700; /* Gold color for the title */
    line-height: 1.2; /* Reduce line spacing */
}

header .site-title span {
    display: block; /* Separate lines */
    font-size: 1.2rem; /* Smaller font for subtitle */
}

/* Navbar Buttons */
header nav {
    display: flex;
    gap: 15px;
    position: relative; /* Positioning for dropdowns */
    align-items: center; /* Align buttons vertically */
}

header nav > div,
header nav > a {
    position: relative; /* Ensure dropdowns position relative to their parent */
}

header nav a {
    text-decoration: none;
    background-color: #6a5acd; /* Blue-purple color */
    color: yellow; /* Yellow text */
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    text-align: center;
    display: flex;
    align-items: center; /* Center text within the button */
    justify-content: center;
}

header nav a:hover {
    color: #fff000; /* Bright yellow glow on hover */
    box-shadow: 0 0 10px 2px yellow, 0 0 20px 4px yellow; /* Glow effect */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Dropdown Menu */
.nav-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Place directly below the parent button */
    left: 0; /* Align with the parent button */
    background-color: #6a5acd; /* Blue-purple background */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    z-index: 100;
    white-space: nowrap; /* Prevent wrapping of dropdown items */
    padding: 0;
}

/* Dropdown Items */
.nav-dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: yellow;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}

.nav-dropdown a:hover {
    color: #fff000; /* Brighter glow on hover */
    background-color: rgba(255, 255, 255, 0.1); /* Slight background change */
    box-shadow: 0 0 10px 2px yellow, 0 0 20px 4px yellow; /* Glow effect */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Show Dropdown on Hover */
nav > div:hover .nav-dropdown {
    display: block;
}

/* Ensuring Hover Styles Apply Consistently */
nav > div,
nav > a {
    position: relative; /* Ensure dropdowns position correctly */
    z-index: 10; /* Ensure buttons and dropdown are properly layered */
}

/* Adjust alignment for all buttons */
nav > a {
    line-height: 1.5; /* Match height of dropdown buttons */
}


/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Two columns: left for content, right for sidebar */
    grid-template-rows: auto auto; /* Rows for Featured Fiction and Nonfiction */
    gap: 20px;
    padding: 20px;
}

/* Featured Sections */
.featured {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: #FFFFFF;
    text-align: center;
    overflow: hidden; /* Ensure contents don't overflow */
}

.featured img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 300px; /* Limit image height */
    border-radius: 10px;
    margin: 15px 0;
}

.featured-fiction {
    grid-row: 1; /* Top row */
    grid-column: 1; /* Left column */
}

.featured-nonfiction {
    grid-row: 2; /* Bottom row */
    grid-column: 1; /* Left column */
}

.featured-container {
  display: flex;
  flex-direction: column; /* Stack content vertically */
  align-items: flex-start; /* Align items to the left */
  padding: 20px;
}

.featured-container img {
  margin-bottom: 10px; /* Add spacing below the image */
}

/* Align buttons below images to the left */
.featured {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: flex-start; /* Align items to the left */
    text-align: left; /* Ensure text aligns properly */
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    color: #FFFFFF;
    overflow: hidden; /* Prevent overflow issues */
}

.featured img {
    margin-bottom: 15px; /* Add spacing below the image */
    align-self: center; /* Keep image centered horizontally */
}

.featured a.button {
    align-self: flex-start; /* Align button to the left */
    margin-top: 10px; /* Add spacing above the button */
}


/* Sidebar */
.sidebar {
    grid-row: 1 / span 2; /* Stretch from top to bottom */
    grid-column: 2; /* Right column */
    background-color: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 300px; /* Limit image height */
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Buttons */
button {
  display: inline-block;
  background-color: #6a5acd; /* Blue-purple color */
  color: yellow; /* Yellow text */
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 0;
  border-radius: 5px;
  text-align: left; /* Align button with left margin */
  transition: all 0.3s ease-in-out;
}

button:hover {
  color: #fff000; /* Glow effect on hover */
  box-shadow: 0 0 10px 2px yellow, 0 0 20px 4px yellow; /* Yellow glowing effect */
  transform: scale(1.05); /* Slightly enlarge on hover */
}

a.button {
  display: inline-block;
  background-color: #6a5acd; /* Blue-purple color */
  color: yellow; /* Yellow text */
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 0;
  border-radius: 5px;
  text-decoration: none; /* Remove underline */
  text-align: center;
  transition: all 0.3s ease-in-out;
}

a.button:hover {
  color: #fff000; /* Glow effect on hover */
  box-shadow: 0 0 10px 2px yellow, 0 0 20px 4px yellow; /* Yellow glowing effect */
  transform: scale(1.05); /* Slightly enlarge on hover */
}


/* Footer */
footer {
    background: linear-gradient(to top, #000000, rgba(0, 0, 0, 0.8));
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
}

footer a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        grid-template-rows: auto auto auto; /* Stack all sections */
    }

    .sidebar {
        grid-row: 3; /* Move sidebar below the content */
    }
}
