/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
    color: #2c3e50;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: #e74c3c;
}

.logo p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Social Media Links - Header */
.social-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #7f8c8d;
    background: transparent;
    border: 1px solid #e9ecef;
}

.social-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-link.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.social-link svg {
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

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

/* Main Content */
main {
    margin-top: 100px;
}

section {
    padding: 4rem 0;
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-author {
    flex: 0 0 auto;
}

.author-display-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-display-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.author-display-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-book {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    flex: 1;
    max-width: 500px;
}

.hero-book h3 {
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.hero-book h4 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.cta-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Books Section */
.books-section {
    background: #f8f9fa;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
    align-items: start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    /* height: 580px; */
    margin: 0 auto;
    cursor: pointer;
    user-select: none;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}





.book-cover {
    background: #f8f9fa;
    color: #495057;
    text-align: center;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.book-cover img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.book-cover img:not([src]), 
.book-cover img[src=""],
.book-cover img[src*="undefined"],
.book-cover img[src*="null"] {
    display: none;
}



.book-cover h3,
.book-cover .book-subtitle {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
    border-radius: 5px;
    margin: 0.5rem;
    color: #495057;
}

.book-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.book-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 600;
}

.book-info p {
    margin: 0 0 0.8rem 0;
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* .book-subtitle {
    font-size: 0.8rem !important;
    color: #7f8c8d !important;
    font-style: italic;
    margin: 0 0 0.3rem 0 !important;
    line-height: 1.2;
} */

.book-price {
    margin-bottom: 0.8rem;
    text-align: start;
    padding: 0.3rem 0;
}

.book-price .price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e74c3c;
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

.book-actions .btn-purchase {
    width: 100%;
    text-align: center;
    background: #e74c3c;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
    display: block;
    border: none;
    cursor: pointer;
}

.book-actions .btn-purchase:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}




/* Blog Section */
.blog-section {
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-post {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    user-select: none;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    z-index: 10;
    user-select: text;
}

.read-more:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.author-profile-image {
    width: 100%;
    /* height: 300px; */
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid white;
}

.author-profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Contact Section */
.contact-section {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.submit-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background: #229954;
    transform: translateY(-2px);
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.contact-info p {
    margin-bottom: 1rem;
    color: #7f8c8d;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Footer Social Links */
.footer-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #bdc3c7;
    background: #34495e;
    border: 1px solid #34495e;
}

.footer-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.footer-social-link.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.footer-social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
}

.footer-social-link svg {
    transition: transform 0.3s ease;
}

.footer-social-link:hover svg {
    transform: scale(1.1);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-content, .error {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.error {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list li {
        margin: 0.5rem 0;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-main {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .author-display-image {
        width: 150px;
        height: 150px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .author-profile-image {
        /* height: 250px; */
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .author-display-image {
        width: 120px;
        height: 120px;
    }
    
    .hero-book {
        padding: 1.5rem;
    }
    
    .book-card,
    .blog-post {
        padding: 1.5rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
    
    .book-card {
        max-width: 100%;
        margin: 0;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .book-price .price-amount {
        font-size: 1rem;
    }
    
    .book-actions .btn-purchase {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 100px;
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.8s ease-out;
}

/* Hover effects for interactive elements */
.nav-link,
.read-more,
.cta-button,
.submit-button {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.nav-link:focus,
.read-more:focus,
.cta-button:focus,
.submit-button:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
