/* ===================================
   Home Page Styles
   =================================== */

/* Hero Section */
.hero {
    position: relative;
    color: var(--background-white);
    padding: var(--spacing-xxl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Images */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 0;
}

.hero-bg.active {
    opacity: 1;
}

.hero-bg:nth-child(1) {
    background-image: url('../assets/blogbg1.jpg');
}

.hero-bg:nth-child(2) {
    background-image: url('../assets/blogbg2.jpg');
}

.hero-bg:nth-child(3) {
    background-image: url('../assets/blogbg3.jpg');
}

/* Overlay for better text readability */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(41, 98, 255, 0.4) 0%, rgba(76, 175, 80, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--background-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.95;
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

/* Featured Posts Section */
.featured-posts {
    padding: var(--spacing-xxl) 0;
    background-color: var(--background-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xl);
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.featured-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.featured-card:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 4px;
}

.featured-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-card-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
}

.featured-card-category {
    background-color: var(--accent-color);
    color: var(--background-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.featured-card-date {
    color: var(--text-light);
}

.featured-card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    line-height: 1.4;
}

.featured-card-excerpt {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    flex-grow: 1;
}

.featured-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--background-white);
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.newsletter-cta h2 {
    color: var(--background-white);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.newsletter-cta p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

/* Bible Commentary Selector Section */
.bible-selector {
    padding: var(--spacing-xxl) 0;
    background-color: var(--background-white);
}

.bible-selector-grid {
    display: grid;
    gap: var(--spacing-xl);
}

.testament-section {
    background-color: var(--background-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.testament-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-weight: 600;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
}

.book-card {
    background-color: var(--background-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.book-card:hover {
    background-color: var(--primary-color);
    color: var(--background-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: var(--spacing-xl) 0;
    }

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

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

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

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

    .newsletter-cta h2 {
        font-size: 2rem;
    }

    .newsletter-cta p {
        font-size: 1rem;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .testament-section h3 {
        font-size: 1.5rem;
    }
}

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

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

    .section-title {
        font-size: 1.75rem;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: var(--spacing-xs);
    }

    .book-card {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
    }
}