/**
 * Home Page Template Styles
 * 
 * Custom Home Page template styles for CookieBlog theme.
 */

/* ===== Home Template Layout ===== */
.home-template .main-content {
    padding: 0;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f4f8fc 0%, #eef5fb 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    min-height: 60vh;
    margin-bottom: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -120px;
    width: 320px;
    height: 320px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 260px;
    height: 260px;
    background: rgba(14, 165, 233, 0.07);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 auto var(--spacing-lg) auto;
    text-align: center;
    max-width: 600px;
}

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

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff !important;
    padding: 18px 36px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
    text-decoration: none !important;
}

.cta-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* ===== Journey Section ===== */
.journey-section {
    background: #f8fafc;
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* ===== Popular Articles Section ===== */
.popular-articles-section {
    padding: var(--spacing-xl) 0;
}

.popular-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.popular-article-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.popular-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.popular-article-card .post-thumbnail {
    position: relative;
    overflow: hidden;
}

.popular-article-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-article-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.popular-article-card .post-content {
    padding: var(--spacing-md);
}

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

.popular-article-card .post-date {
    color: var(--text-light);
}

.popular-article-card .post-category a {
    text-decoration: none;
    font-weight: 500;
}

.popular-article-card .post-title {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.popular-article-card .post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-article-card .post-title a:hover {
    color: var(--primary-color);
}

.popular-article-card .post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 var(--spacing-md) 0;
    font-size: 0.875rem;
}

.popular-article-card .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.popular-article-card .post-author {
    font-weight: 500;
}

.popular-article-card .reading-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.popular-article-card .reading-time i {
    font-size: 0.75rem;
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.section-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* ===== Featured Posts Section ===== */
.featured-posts-section {
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--border-light);
}

.featured-posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.featured-post-card {
    background: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.featured-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.featured-post-card.featured-large {
    display: flex;
    flex-direction: row;
}

.featured-post-card.featured-large .post-thumbnail {
    flex: 1;
    min-height: 300px;
}

.featured-post-card.featured-large .post-content {
    flex: 1;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-card .post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.featured-post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.featured-post-card .post-content {
    padding: var(--spacing-lg);
}

.featured-post-card .post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.85rem;
}

.featured-badge {
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-post-card .post-category {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-post-card .read-time {
    color: var(--text-light);
}

.featured-post-card .post-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

.featured-post-card.featured-large .post-title {
    font-size: 2rem;
}

.featured-post-card .post-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.featured-post-card .post-title a:hover {
    color: var(--secondary-color);
}

.featured-post-card .post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.featured-post-card .post-author {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-light);
}

.featured-post-card .post-author strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Latest Posts Section ===== */
.latest-posts-section {
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--border-light);
}

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

.latest-post-card {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.latest-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.latest-post-card .post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.latest-post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.latest-post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.latest-post-card .post-content {
    padding: var(--spacing-md);
}

.latest-post-card .post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.8rem;
}

.latest-post-card .post-category {
    background: var(--secondary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.latest-post-card .read-time {
    color: var(--text-light);
}

.latest-post-card .post-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.latest-post-card .post-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.latest-post-card .post-title a:hover {
    color: var(--secondary-color);
}

.latest-post-card .post-author {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--text-light);
}

.latest-post-card .post-author strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== About Section ===== */
.about-section {
    background: #ffffff;
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
    display: none;
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    padding-right: 20px;
}

.about-text h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0 0 40px 0;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-cta {
    margin-top: 40px;
}

.about-image {
    position: relative;
}

.image-placeholder {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.placeholder-content {
    text-align: center;
    color: #64748b;
    z-index: 2;
    position: relative;
}

.placeholder-content i {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
    color: var(--primary-color);
}

.placeholder-content span {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Button styles moved to components/btn.css */

/* ===== Why Section ===== */
.why-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.why-content {
    max-width: 800px;
    margin: 0 auto;
}

.why-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.why-content > p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
}

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

.feature-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.feature-item p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.why-footer {
    margin-top: var(--spacing-xl);
}

/* ===== Responsive Design - Mobile First ===== */

/* Base styles - Mobile (320px+) */
.hero-section {
    min-height: 50vh;
    padding: var(--spacing-lg) 0;
}

.hero-content h1 {
    font-size: 2rem;
}

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

.section-header h2 {
    font-size: 1.75rem;
}

.featured-posts-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.featured-post-card.featured-large {
    flex-direction: column;
}

.featured-post-card.featured-large .post-thumbnail {
    min-height: 200px;
}

.featured-post-card.featured-large .post-content {
    padding: var(--spacing-lg);
}

.featured-post-card.featured-large .post-title {
    font-size: 1.4rem;
}

.latest-posts-grid {
    grid-template-columns: 1fr;
}

.newsletter-content h2 {
    font-size: 1.5rem;
}

.newsletter-form {
    flex-direction: column;
}

.why-content h2 {
    font-size: 1.75rem;
}

.why-features {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.featured-post-card .post-author,
.latest-post-card .post-author {
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: flex-start;
}

.popular-articles-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.popular-article-card .post-thumbnail img {
    height: 180px;
}

.popular-article-card .post-content {
    padding: var(--spacing-sm);
}

.popular-article-card .post-title {
    font-size: 0.95rem;
}

.cta-button {
    padding: 14px 24px;
    font-size: 0.95rem;
}

.about-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
}

.about-text {
    padding-right: 0;
}

.about-text h2 {
    font-size: 2rem;
}

.about-text p {
    font-size: 1rem;
}

.about-stats {
    gap: 25px;
    justify-content: center;
}

.image-placeholder {
    height: 250px;
}

.featured-post-card .post-content,
.latest-post-card .post-content {
    padding: var(--spacing-md);
}

/* Small mobile (576px+) */
@media (min-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.05rem;
    }
    
    .section-header h2 {
        font-size: 1.85rem;
    }
    
    .featured-post-card.featured-large .post-title {
        font-size: 1.45rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.65rem;
    }
    
    .why-content h2 {
        font-size: 1.85rem;
    }
    
    .popular-article-card .post-title {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .about-text h2 {
        font-size: 2.2rem;
    }
    
    .about-text p {
        font-size: 1.05rem;
    }
    
    .about-stats {
        gap: 28px;
    }
    
    .image-placeholder {
        height: 280px;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .featured-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--spacing-xl);
    }
    
    .featured-post-card.featured-large {
        flex-direction: row;
    }
    
    .featured-post-card.featured-large .post-thumbnail {
        min-height: 300px;
    }
    
    .featured-post-card.featured-large .post-content {
        padding: var(--spacing-xl);
    }
    
    .featured-post-card.featured-large .post-title {
        font-size: 1.5rem;
    }
    
    .latest-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .newsletter-content h2 {
        font-size: 1.75rem;
    }
    
    .newsletter-form {
        flex-direction: row;
    }
    
    .why-content h2 {
        font-size: 2rem;
    }
    
    .why-features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-xl);
    }
    
    .featured-post-card .post-author,
    .latest-post-card .post-author {
        flex-direction: row;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    .popular-articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .popular-article-card .post-thumbnail img {
        height: 200px;
    }
    
    .popular-article-card .post-content {
        padding: var(--spacing-md);
    }
    
    .popular-article-card .post-title {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        text-align: left;
    }
    
    .about-text {
        padding-right: var(--spacing-xl);
    }
    
    .about-text h2 {
        font-size: 2.5rem;
    }
    
    .about-text p {
        font-size: 1.125rem;
    }
    
    .about-stats {
        gap: 30px;
        justify-content: flex-start;
    }
    
    .image-placeholder {
        height: 300px;
    }
    
    .featured-post-card .post-content,
    .latest-post-card .post-content {
        padding: var(--spacing-lg);
    }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .featured-posts-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .popular-articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 2.75rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
    
    .why-content h2 {
        font-size: 2.25rem;
    }
    
    .about-text h2 {
        font-size: 2.75rem;
    }
}

/* Extra large (1400px+) */
@media (min-width: 1400px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .why-content h2 {
        font-size: 2.5rem;
    }
    
    .about-text h2 {
        font-size: 3rem;
    }
}
