/*
 * ElectricChoice Blog Styles
 * ==========================
 * Styles for blog index and individual post pages.
 * Uses the same design tokens as ec-standalone.css.
 */

/* ============================================
   BLOG INDEX — Header
   ============================================ */
.blog-header {
    margin-bottom: 48px;
}
.blog-header h1 {
    font-size: 40px;
    font-weight: 800;
    color: #0A2540;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.blog-header p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    max-width: 100%;
}

/* ============================================
   BLOG INDEX — Category Filter
   ============================================ */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
}
.blog-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: var(--body-font);
    line-height: 1;
}
.blog-filter:hover {
    color: #0E9F6E;
    border-color: #D1FAE5;
    background: #ECFDF5;
}
.blog-filter.is-active {
    color: #fff;
    background: #0E9F6E;
    border-color: #0E9F6E;
}

/* ============================================
   BLOG INDEX — Featured Post
   ============================================ */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
    transition: box-shadow 0.2s ease;
}
.blog-featured:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}
.blog-featured-img {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 48px;
}
.blog-featured-img i {
    font-size: 80px;
    color: #0E9F6E;
    opacity: 0.3;
}
.blog-featured-body {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0E9F6E;
    margin-bottom: 16px;
}
.blog-featured-tag i {
    font-size: 14px;
}
.blog-featured-body h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0A2540;
    margin: 0 0 12px;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
.blog-featured-body h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.blog-featured-body h2 a:hover {
    color: #0E9F6E;
}
.blog-featured-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 20px;
}
.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}
.blog-featured-meta i {
    font-size: 14px;
    margin-right: 4px;
}

/* ============================================
   BLOG INDEX — Post Grid
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    border-color: #D1FAE5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.blog-card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card-img i {
    font-size: 48px;
    opacity: 0.25;
}
.blog-card-img--green { background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 50%); color: #0E9F6E; }
.blog-card-img--blue { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%); color: #3B82F6; }
.blog-card-img--amber { background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%); color: #F59E0B; }
.blog-card-img--red { background: linear-gradient(135deg, #FEF2F2 0%, #FECACA 50%); color: #EF4444; }
.blog-card-img--purple { background: linear-gradient(135deg, #FAF5FF 0%, #E9D5FF 50%); color: #8B5CF6; }
.blog-card-img--slate { background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 50%); color: #64748B; }
.blog-card-img--teal { background: linear-gradient(135deg, #F0FDFA 0%, #CCFBF1 50%); color: #14B8A6; }

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0E9F6E;
    margin-bottom: 10px;
}
.blog-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0A2540;
    margin: 0 0 10px;
    padding: 0;
    line-height: 1.4;
}
.blog-card-body h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.blog-card-body h3 a:hover {
    color: #0E9F6E;
}
.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.blog-card-meta i {
    font-size: 13px;
    margin-right: 3px;
}

/* ============================================
   BLOG POST — Article Layout
   ============================================ */
.blog-article-wrap {
    max-width: 100%;
}

/* Post Header */
.blog-post-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0E9F6E;
    background: #ECFDF5;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}
.blog-post-header {
    margin-bottom: 40px;
}
.blog-post-header h1 {
    font-size: 38px;
    font-weight: 800;
    color: #0A2540;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
}
.blog-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #6b7280;
}
.blog-post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-post-meta-item i {
    font-size: 16px;
    color: #9ca3af;
}
.blog-post-divider {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    margin: 0;
    border: none;
}

/* Article Body */
.blog-article {
    margin-top: 40px;
}
.blog-article h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0A2540;
    margin: 48px 0 16px;
    padding: 0;
    letter-spacing: -0.01em;
}
.blog-article h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0A2540;
    margin: 36px 0 12px;
    padding: 0;
}
.blog-article p {
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 20px;
}
.blog-article ul,
.blog-article ol {
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 20px;
    padding-left: 24px;
}
.blog-article li {
    margin-bottom: 8px;
}
.blog-article blockquote {
    border-left: 4px solid #0E9F6E;
    margin: 32px 0;
    padding: 20px 28px;
    background: #f9fafb;
    border-radius: 0 10px 10px 0;
}
.blog-article blockquote p {
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
    font-style: italic;
    margin: 0;
}
.blog-article img {
    border-radius: 12px;
    margin: 32px 0;
}
.blog-article a {
    color: #0E9F6E;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(14,159,110,0.3);
    transition: text-decoration-color 0.15s ease;
}
.blog-article a:hover {
    text-decoration-color: #0E9F6E;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0 32px;
    font-size: 15px;
    line-height: 1.6;
}
thead th {
    background: #0A2540;
    color: #fff;
    font-weight: 700;
    text-align: left;
    padding: 14px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
thead th:first-child { border-radius: 8px 0 0 0; }
thead th:last-child { border-radius: 0 8px 0 0; }
tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
tbody tr:nth-child(even) { background: #f9fafb; }
tbody tr:hover { background: #ECFDF5; }
tbody td:first-child { font-weight: 600; color: #0A2540; }

/* Key-value highlight box */
.blog-key-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 28px 0 32px;
}
.blog-key-facts > div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.blog-key-facts > div strong {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #0E9F6E;
    line-height: 1.2;
}
.blog-key-facts > div span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Numbered steps */
ol.blog-steps { counter-reset: step-counter; list-style: none; padding-left: 0; }
ol.blog-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 56px;
    margin-bottom: 24px;
    min-height: 40px;
}
ol.blog-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0; top: 0;
    width: 40px; height: 40px;
    background: #0E9F6E;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon-label inline list */
.blog-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0 28px;
}
.blog-icon-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.blog-icon-item i {
    font-size: 24px;
    color: #0E9F6E;
    flex-shrink: 0;
    margin-top: 2px;
}
.blog-icon-item div strong { display: block; color: #0A2540; margin-bottom: 2px; }
.blog-icon-item div span { font-size: 14px; color: #6b7280; line-height: 1.5; }

/* Blog category tag */
.blog-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0E9F6E;
    margin-bottom: 12px;
}

/* Blog date */
.blog-date {
    display: block;
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 16px;
}

/* Blog sources */
.blog-sources {
    font-size: 14px;
    color: #6b7280;
}
.blog-sources li {
    margin-bottom: 6px;
}
.blog-sources a {
    color: #0E9F6E;
}

/* Related Posts */
.blog-related {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid #e5e7eb;
}
.blog-related h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0A2540;
    margin: 0 0 24px;
    padding: 0;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.blog-related-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.15s ease;
    text-decoration: none;
}
.blog-related-card:hover {
    border-color: #D1FAE5;
    background: #fafffe;
}
.blog-related-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #ECFDF5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.blog-related-card-icon i {
    font-size: 22px;
    color: #0E9F6E;
}
.blog-related-card-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0A2540;
    margin: 0 0 4px;
    padding: 0;
    line-height: 1.4;
}
.blog-related-card-body span {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }
    .blog-featured-img {
        min-height: 200px;
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 32px;
    }
    .blog-featured-body {
        padding: 32px;
    }
    .blog-featured-body h2 {
        font-size: 24px;
    }
    .blog-post-header h1 {
        font-size: 30px;
    }
    .blog-article h2 {
        font-size: 24px;
    }
    .blog-article h3 {
        font-size: 20px;
    }
    .blog-article p,
    .blog-article ul,
    .blog-article ol {
        font-size: 16px;
    }
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-header h1 {
        font-size: 28px;
    }
    .blog-featured-body {
        padding: 24px;
    }
    .blog-featured-body h2 {
        font-size: 22px;
    }
    .blog-featured-img {
        min-height: 160px;
        padding: 32px;
    }
    .blog-featured-img i {
        font-size: 56px;
    }
    .blog-post-header h1 {
        font-size: 26px;
    }
    .blog-related-card {
        flex-direction: column;
        gap: 12px;
    }
}
