/* Blog Page Styles */

/* Container width override to match header and homepage */
.container {
    width: 80%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Hero Section (styled like service pages) */
.service-hero.blog-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    padding: 0;
}

/* Blog post specific hero styling */
.blog-post .service-hero.blog-hero {
    height: 30vh;
    min-height: 250px;
}

.service-hero.blog-hero .container {
    width: 80%;
    margin: 0 auto;
    padding: 0 20px;
}

.service-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.service-hero-background img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform: translateY(0);
    will-change: transform;
}

.service-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: -1;
}

.service-hero-content {
    width: 55%;
    color: var(--white);
    text-align: left;
    margin-left: 0;
}

.service-hero-content h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
}

.service-hero-content p {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.5;
}

.service-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Blog Post Styles */
.blog-post {
    background: var(--white);
}

.post-header {
    padding: 2rem 0;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: var(--gray);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-category {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-round);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
}

.post-date,
.post-reading-time {
    font-size: 0.9rem;
    color: var(--gray);
}

.post-header h1 {
    color: var(--primary-color);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.post-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.post-content {
    padding: 3rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.post-body {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.post-body h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 0.5rem;
}

.post-body h3 {
    color: var(--primary-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.post-body p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.post-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.post-body li {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.tag {
    background: var(--light-blue);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-round);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
}

.post-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.sidebar-widget h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sidebar-widget p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.related-post:hover {
    background: var(--light-blue);
}

.related-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.related-content h5 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.related-content span {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Blog Search */
.blog-search {
    margin-top: 1rem;
}

.blog-search-input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 55, 83, 0.1);
}

.blog-articles {
    padding: 4rem 0;
    background-color: var(--white);
}

/* Featured Article */
.featured-article {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-light);
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.featured-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16/10;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.featured-text h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-excerpt {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Article Cards Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
}

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

.article-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

/* Article Categories */
.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-round);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    z-index: 10;
}

.article-category.featured {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Article Content */
.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 400;
}

.article-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.article-date,
.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-date::before {
    content: "📅";
    font-size: 0.9rem;
}

.article-reading-time::before {
    content: "⏱️";
    font-size: 0.9rem;
}

/* Article Links */
.article-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: var(--transition-normal);
}

.article-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--secondary-color) 100%);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 2rem;
}

.newsletter-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.newsletter-content p {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.newsletter-form button {
    white-space: nowrap;
}

/* Blog Category Filters (if needed) */
.blog-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--gray);
    border-radius: var(--radius-round);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 90vw;
        padding: 0;
        margin: 0 auto;
    }
    
    .service-hero.blog-hero .container {
        width: 90vw;
        padding: 0;
        margin: 0 auto;
    }
    
    .service-hero.blog-hero {
        padding: 0;
        text-align: left;
        align-items: flex-start;
        height: 50vh;
        min-height: 400px;
    }
    
    .service-hero-content {
        width: 100%;
    }
    
    .service-hero-buttons {
        display: none;
    }
    
    .service-hero-content p {
        font-size: 16px;
    }
    
    .blog-post .service-hero.blog-hero {
        height: 15vh !important;
        min-height: 125px !important;
    }
    
    .post-content {
        padding: 0 0 3rem;
    }
    
    .post-image img {
        height: 200px;
    }
    
    .post-header h1 {
        font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
    }
    
    .blog-post h1 {
        font-size: clamp(1.8rem, 5vw, 2.6rem) !important;
    }
    
    .post-excerpt {
        font-size: 16px;
    }
    
    .sidebar-widget {
        padding: 0.75rem;
    }
    
    .featured-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .featured-image {
        order: -1;
    }
    
    .featured-text h2 {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .article-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Blog post mobile layout */
    .content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .post-body {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    
    .post-sidebar {
        position: static;
        order: 2;
    }
}

@media (max-width: 480px) {
    .container {
        width: 90vw;
        padding: 0;
        margin: 0 auto;
    }
    
    .service-hero.blog-hero .container {
        width: 90vw;
        padding: 0;
        margin: 0 auto;
    }
    
    .service-hero.blog-hero {
        padding: 0;
        height: 50vh;
        min-height: 400px;
    }
    
    .blog-post .service-hero.blog-hero {
        height: 12vh !important;
        min-height: 100px !important;
    }
    
    .post-content {
        padding: 0 0 3rem;
    }
    
    .post-image img {
        height: 200px;
    }
    
    .post-header h1 {
        font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
    }
    
    .blog-articles {
        padding: 2rem 0;
    }
    
    .featured-article {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
    
    .featured-text h2 {
        font-size: 1.75rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .newsletter-signup {
        padding: 2rem 1rem;
        margin: 1rem;
        border-radius: var(--radius-lg);
    }
    
    .newsletter-content h3 {
        font-size: 1.25rem;
    }
    
    /* Blog post mobile layout */
    .content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .post-body {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    
    .post-sidebar {
        position: static;
        order: 2;
    }
}