* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background: linear-gradient(to right, #4a90e2, #50c9c3);
    color: white;
    text-align: center;
    padding: 2rem;
}

header h1 {
    font-family: 'Lora', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    position: relative;
    display: inline-block;
}

header p::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #fff, transparent);
}

nav {
    background: #333;
    padding: 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s;
}

nav a:hover {
    color: #4a90e2;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

.content {
    flex: 1;
}

.filmstrip {
    max-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filmstrip img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid #fff;
}

.filmstrip img:nth-child(odd) {
    transform: rotate(-2deg);
}

.filmstrip img:nth-child(even) {
    transform: rotate(2deg);
}

.sidebar {
    width: 250px;
    position: sticky;
    top: 2rem;
}

.sidebar img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 2rem;
    color: #4a90e2;
    margin-bottom: 1rem;
    text-align: center;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.featured-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    text-align: center;
    position: relative;

    overflow: visible;
}

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

.book-summary {
    display: none;
    position: absolute;
    top: 20px;
    left: 10px;
    right: 0;
    background:lightblue; 
    padding: 1rem;
    font-size: 0.9rem;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.book:hover .book-summary {
    display: block;
    opacity: .9;
    transition: opacity 0.3s ease;
}

.book.featured {
    border: 2px solid #4a90e2;
    background: #e6f0fa;
    padding: 1.5rem;
}

.book.featured::after {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    right: -10px;
    background: #4a90e2;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.book img {
    max-width: 80%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.book:hover img {
    transform: scale(1.3);
}

.book h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    background: darkblue;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.learn-more:hover {
    background: #4a90e2;
}

.social-media {
    text-align: center;
    margin-bottom: 2rem;
}

.social-media a {
    margin: 0 1rem;
    color: #4a90e2;
    font-size: 2rem;
    text-decoration: none;
}

.social-media a:hover {
    color: #50c9c3;
}

.contact-button {
    text-align: center;
}

.contact-button a {
    display: inline-block;
    background: #4a90e2;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.contact-button a:hover {
    background: #50c9c3;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .hamburger {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background: #333;
        padding: 1rem 0;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        text-align: center;
    }
    
    .sidebar img {
        max-width: 300px;
    }
    
    .featured-books-grid {
        grid-template-columns: 1fr;
    }
    .main-container {
        flex-direction: column-reverse;
    }
    
    .filmstrip {
        width: 100%;
        align-items: center;
    }
    
    .filmstrip img {
        max-width: 300px;
    }

    .book img {
	transform: none !important;
    }

    .book-summary h3 {
	display: none;
    }
    
    .book-summary {
        display: block;
        position: static;
        background: none;
        padding: 0;
        opacity: 1;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
    
    .learn-more {
        margin-top: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}
