/* ============================================
   BLOG STYLES
   Newsletter archive and blog post styling
   ============================================ */

/* Blog Index Hero */
.blog-index-hero {
    background: linear-gradient(135deg, #232943 0%, #3d4a6d 100%);
    padding: 140px 0 60px;
    text-align: center;
    color: #fff;
}

.blog-index-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-index-hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Trade-specific hero colors */
.trade-plumber-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.trade-electrician-hero {
    background: linear-gradient(135deg, #2c5aa0 0%, #1a3d6d 100%);
}

/* Filter Navigation */
.blog-filter-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.filter-btn.active {
    background: #fff;
    color: #232943;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-trade {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.trade-plumber {
    background: #e3f2fd;
    color: #1565c0;
}

.trade-electrician {
    background: #fff3e0;
    color: #e65100;
}

.blog-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.blog-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: #999;
}

/* Blog Post Hero */
.blog-hero {
    padding: 140px 0 60px;
    color: #fff;
}

.blog-hero-content {
    max-width: 800px;
}

.blog-trade-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-trade-badge:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.blog-meta {
    font-size: 1rem;
    opacity: 0.85;
}

.blog-meta time {
    margin-right: 1rem;
}

.blog-newsletter {
    padding-left: 1rem;
    border-left: 2px solid rgba(255,255,255,0.4);
}

/* Blog Content Area */
.blog-post .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 3rem 1rem;
    max-width: 1200px;
}

@media (max-width: 992px) {
    .blog-post .container {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: -1;
    }
}

.blog-content {
    max-width: 720px;
}

/* Article Typography */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.blog-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: #444;
}

.blog-content a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.blog-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Callout Boxes */
.blog-callout {
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.blog-callout h2 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.blog-callout p:last-child {
    margin-bottom: 0;
}

.blog-callout.fun-fact {
    background: #e8f4f8;
    border-left: 4px solid #0066cc;
}

.blog-callout.joke {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1.5rem;
}

.sidebar-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.related-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-posts li {
    margin-bottom: 0.75rem;
}

.related-posts a {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

.related-posts a:hover {
    text-decoration: underline;
}

/* App Badges */
.app-badges {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 1rem;
    text-align: center;
}

.app-badges a {
    display: inline-block;
    margin: 0.5rem;
}

.app-badges img {
    height: 50px;
    transition: transform 0.2s ease;
}

.app-badges img:hover {
    transform: translateY(-2px);
}

/* RSS Subscribe */
.rss-subscribe {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
}

.rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ff6600;
    color: #fff;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.rss-link:hover {
    background: #e55c00;
    color: #fff;
}

/* Newsletter Subscribe CTA */
.blog-subscribe {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #232943 0%, #3d4a6d 100%);
    border-radius: 1rem;
    color: #fff;
    text-align: center;
}

.blog-subscribe h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.blog-subscribe p {
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    opacity: 0.9;
    color: #fff;
}

.blog-subscribe-form {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.blog-subscribe-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.blog-subscribe-form button {
    padding: 0.75rem 1.5rem;
    background: #5367ba;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-subscribe-form button:hover {
    background: #4255a3;
}

@media (max-width: 480px) {
    .blog-subscribe-form {
        flex-direction: column;
    }

    .blog-subscribe-form button {
        width: 100%;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .blog-index-hero {
        padding: 120px 0 40px;
    }

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

    .blog-hero {
        padding: 120px 0 40px;
    }

    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .blog-content {
        max-width: 100%;
    }

    .blog-post .container {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .blog-callout {
        padding: 1rem 1.25rem;
    }
}
