@font-face {
    font-family: 'Lucida Calligraphy';
    src: url('Lucida-Calligraphy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.company-name {
    font-family: 'Lucida Calligraphy', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Books Section */
.books-section {
    padding: 40px 0 80px 0;
    background: white;
    min-height: 200px; /* Ensure section has minimum height */
    display: block; /* Ensure proper display */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #2d3748;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
    width: 100%;
    /* Safari-specific fixes */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Mobile responsiveness fixes */
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        padding: 0 10px;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .book-card {
        max-width: 100%;
        margin: 0 auto;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .books-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-header {
        justify-content: center;
        gap: 10px;
    }
    
    .contact-header h4 {
        font-size: 1.5rem;
    }
    
    .contact-header .contact-logo-img {
        width: 40px;
        height: 40px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .company-name {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0 5px;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .book-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .books-section {
        padding: 20px 0 40px 0;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
    .books-grid {
        display: -webkit-grid !important;
        display: grid !important;
        -webkit-grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    @media (max-width: 768px) {
        .books-grid {
            -webkit-grid-template-columns: 1fr !important;
            grid-template-columns: 1fr !important;
        }
    }
}

.book-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.book-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.view-on-amazon {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.book-info {
    padding: 30px;
}

.book-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    line-height: 1.3;
}

.book-author {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1rem;
}

.book-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.amazon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.amazon-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.external-link-icon {
    width: 16px;
    height: 16px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: white;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-header h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: #2d3748;
}

.contact-header .contact-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.contact-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #764ba2;
}

.email-icon {
    width: 20px;
    height: 20px;
}

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

.contact-logo-img {
    width: 150px;
    height: auto;
    object-fit: contain;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.footer-link {
    margin: 5px 0;
}

.footer-copyright {
    text-align: center;
    margin-top: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-company-name {
    font-family: 'Lucida Calligraphy', cursive;
    font-size: 1.3rem;
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    text-align: center;
}


