@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Color Palette derived from logo */
    --primary-navy: #1A2C3E;
    --primary-light: #2C4258;
    --accent-gold: #D4AF37; /* Refined gold */
    --accent-yellow: #FFB800; /* Vibrant yellow from bulb */
    --bg-light: #F9FAFB;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1F2937;
    --text-muted: #6B7280;
    
    /* Layout */
    --max-width: 600px; /* Centered content for mobile-first */
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(26, 44, 62, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 20%);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    padding: 5px;
    background: white;
    box-shadow: 0 10px 25px rgba(26, 44, 62, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 80%;
    margin: 0 auto;
}

/* Catalog Section */
.catalog {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ebook-card {
    background: var(--card-bg);
    border: 1px solid rgba(26, 44, 62, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.6s ease-out backwards;
}

.ebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(26, 44, 62, 0.08);
    border-color: rgba(212, 175, 55, 0.2);
}

.ebook-card:nth-child(2) { animation-delay: 0.1s; }
.ebook-card:nth-child(3) { animation-delay: 0.2s; }

.ebook-image {
    width: 60%; /* Smaller width to keep it centered and visible on mobile */
    margin: 1.5rem auto 0;
    aspect-ratio: 3/4; /* Vertical book aspect ratio */
    background-color: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebook-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure full image is visible */
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

.ebook-card:hover .ebook-image img {
    transform: scale(1.05);
}

.ebook-content {
    padding: 1.5rem;
}

.ebook-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.ebook-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-navy);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: var(--transition);
}

.ebook-card:hover .buy-button {
    background-color: var(--accent-gold);
    color: var(--primary-navy);
}

/* Footer Section */
footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for Desktop */
@media (min-width: 768px) {
    .container {
        max-width: 800px;
        padding-top: 4rem;
    }
    
    .ebook-card {
        flex-direction: row;
        align-items: center;
    }
    
    .ebook-image {
        width: 200px;
        height: 280px;
        margin: 0;
        aspect-ratio: auto;
    }
    
    .ebook-content {
        flex: 1;
        padding: 2rem;
    }
}
