/* Main Page Styles (requires base.css) */

/* Header — main page extras */
header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    background: linear-gradient(135deg, var(--bg-warm) 0%, var(--white) 100%);
    padding: 80px 20px 60px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* Books Section */
.books {
    padding: 80px 20px;
    background: var(--bg-warm);
}

.books h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 3rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.book-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.2);
}

.book-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.book-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: var(--bg-warm);
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.book-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    background: var(--white);
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.contact-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: var(--disabled);
    cursor: not-allowed;
    transform: none;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.form-status.error {
    display: block;
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.contact-alt {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.contact-alt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-alt a:hover {
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 922px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .books h2, .contact h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 50px 20px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .books, .contact {
        padding: 50px 20px;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 0 10px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .submit-btn {
        font-size: 1rem;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .books h2, .contact h2 {
        font-size: 1.8rem;
    }

    .book-info h3 {
        font-size: 1.3rem;
    }
}
