/*
Theme Name: Buy Books Read Reviews
Description: A modern, responsive WordPress theme for book reviews and recommendations with WooCommerce support.
Author: BBRR Team
Version: 1.0.2
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: buy-books-read-reviews
Tags: blog, e-commerce, responsive, custom-menu, featured-images, threaded-comments, translation-ready
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Buy Books Read Reviews is a modern theme for book review websites.
*/

/* CRITICAL: Ensure theme styles load */
.site-header { 
    background: #fff !important; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important; 
}

.site-title a { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 4rem 0 !important;
    text-align: center !important;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #667eea;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: #667eea;
}

/* Content Areas */
.content-area {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

/* Book Sections */
.featured-books-section,
.books-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.no-books-message {
    text-align: center;
    padding: 3rem 0;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 2rem 0;
}

.no-books-message p {
    margin-bottom: 1rem;
    color: #666;
}

/* Book Cards */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
}

.book-cover-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.book-cover-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.3"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>') center/50px no-repeat;
}

.book-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.book-card .book-cover-container {
    flex-shrink: 0;
}

.book-card .book-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-card .entry-content {
    flex-grow: 1;
    margin: 0.75rem 0;
}

.book-card .entry-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
}

.book-author {
    font-size: 0.9rem !important;
    margin-bottom: 0.75rem !important;
    color: #666 !important;
}

.book-rating {
    margin-bottom: 0.75rem !important;
}

.book-genre {
    margin-bottom: 0.5rem !important;
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.book-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.book-author {
    color: #666;
    margin-bottom: 1rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffa500;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
}

.book-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.book-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.genre-tag {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
}

.book-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.book-actions .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.stars .star {
    color: #ffa500;
    font-size: 1.2rem;
}

.stars .star.empty {
    color: #ddd;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* WordPress Specific Styles */
.alignleft {
    float: left;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Quiz Modal */
.quiz-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.quiz-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-quiz {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close-quiz:hover {
    color: #667eea;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
}

.quiz-step h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.quiz-options {
    display: grid;
    gap: 0.75rem;
}

.quiz-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.quiz-option:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.quiz-results {
    text-align: center;
}

.quiz-results h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

#recommendations {
    margin: 1.5rem 0;
}

.recommendation {
    background: #f8f9fa;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.quiz-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.quiz-note a {
    color: #667eea;
    text-decoration: none;
}

.quiz-note a:hover {
    text-decoration: underline;
}

/* Accessibility */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}