/* Shared styles for blog pages (index and article view) */

/* Parallax Hero Section - Shared */
.blog-hero-parallax,
.article-hero-parallax {
    position: relative;
    min-height: 50vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-hero-bg-parallax,
.article-hero-bg-parallax {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center bottom;
    background-attachment: local;
    background-repeat: no-repeat;
    will-change: transform;
    z-index: 0;
    height: 120%;
    width: 100%;
    top: -10%;
    transform-origin: center top;
}

.blog-hero-overlay,
.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6));
    z-index: 1;
}

.blog-hero-content,
.article-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 4rem 1rem;
    max-width: 900px;
}

.blog-hero-title,
.article-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-hero-description,
.article-hero-description {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Article metadata in hero */
.article-hero-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.article-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.article-hero-meta-item i {
    font-size: 1.1rem;
}

.article-category-badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(40, 167, 69, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Blog Article Cards - Shared component */
.blog-article-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.blog-article-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-article-card-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    margin: 0;
    overflow: hidden;
}

.blog-article-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
    transition: opacity 0.3s ease;
}

.blog-article-card:hover .blog-article-card-image::after {
    opacity: 0.7;
}

.blog-article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.blog-article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-article-card:hover .blog-article-title {
    color: #28a745;
}

.blog-article-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.blog-article-date {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-article-date i {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .blog-hero-title,
    .article-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-description,
    .article-hero-description {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .blog-hero-parallax,
    .article-hero-parallax {
        min-height: 40vh;
    }
    
    .blog-hero-content,
    .article-hero-content {
        padding: 2rem 1rem;
    }
    
    .blog-hero-title,
    .article-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-description,
    .article-hero-description {
        font-size: 1rem;
    }
    
    .article-hero-meta {
        gap: 1rem;
    }
    
    .blog-article-title {
        font-size: 1.1rem;
    }
    
    .blog-article-card-content {
        padding: 1.25rem;
    }
    
    .blog-article-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {
    .blog-hero-title,
    .article-hero-title {
        font-size: 1.75rem;
    }
    
    .blog-hero-description,
    .article-hero-description {
        font-size: 0.95rem;
    }
}
