/* ============================================
   Blog & Resource Pages — Tangible Learning
   ============================================ */

/* ---- Breadcrumb ---- */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    padding: 1rem 0 0;
    margin-bottom: 1.5rem;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.4rem;
    color: #aaa;
}

/* ---- Blog / Resource main layout ---- */
.blog-main {
    background: #f8f9fa;
    min-height: 60vh;
    padding-bottom: 4rem;
}

.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Blog index grid ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    padding: 2.5rem 0;
}

.blog-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tag {
    display: inline-block;
    background: rgba(0, 74, 153, 0.1);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    font-size: 1.1rem;
    color: var(--dark);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.5;
    flex: 1;
}

.blog-card-meta {
    font-size: 0.82rem;
    color: #999;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.blog-card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.blog-card-link:hover {
    text-decoration: underline;
}

/* ---- Category filter tabs ---- */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 0 0.5rem;
}

.category-tab {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    color: #555;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

/* ---- Article page layout ---- */
.article-layout {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header .article-tag {
    display: inline-block;
    background: rgba(0, 74, 153, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: #777;
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.article-meta .author {
    font-weight: 600;
    color: var(--primary);
}

/* ---- Article body content ---- */
.article-body {
    color: #333;
    line-height: 1.75;
    font-size: 1rem;
}

.article-body h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e8eef7;
}

.article-body h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin: 1.75rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.1rem;
}

.article-body ul,
.article-body ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.4rem;
}

.article-body strong {
    color: var(--dark);
}

.article-body a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: var(--primary);
}

/* ---- Callout / tip boxes ---- */
.callout {
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.callout-tip {
    background: #e8f4fd;
    border-left: 4px solid var(--secondary);
}

.callout-warning {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
}

.callout-success {
    background: #e8f5e9;
    border-left: 4px solid var(--success);
}

.callout-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

/* ---- Comparison table ---- */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.compare-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
}

.compare-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #eee;
}

.compare-table tr:nth-child(even) td {
    background: #f7f9fc;
}

/* ---- Article CTA box ---- */
.article-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem 2rem;
    margin: 3rem 0 2rem;
    text-align: center;
}

.article-cta h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: white;
}

.article-cta p {
    opacity: 0.9;
    margin-bottom: 1.25rem;
    font-size: 0.98rem;
}

.article-cta .btn {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 0.75rem 2rem;
}

.article-cta .btn:hover {
    background: #f0f0f0;
}

/* ---- Related articles ---- */
.related-articles {
    margin: 3rem 0 0;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.related-articles h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.related-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.related-list li a {
    display: block;
    background: white;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    padding: 1rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
}

.related-list li a:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ---- Resource page ---- */
.resource-header {
    background: linear-gradient(135deg, #003d82 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 0 2.5rem;
}

.resource-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.resource-header p {
    opacity: 0.9;
    font-size: 1.05rem;
    max-width: 600px;
}

.resource-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.resource-body {
    max-width: 820px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.resource-download-box {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.resource-download-box h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.resource-download-box p {
    color: #666;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.resource-content-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.resource-content-section h2 {
    color: var(--primary);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8eef7;
}

.resource-content-section h3 {
    color: var(--dark);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
}

.resource-content-section p,
.resource-content-section li {
    color: #444;
    line-height: 1.7;
}

.resource-content-section ul,
.resource-content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.resource-content-section li {
    margin-bottom: 0.35rem;
}

/* Resource index grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.resource-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.resource-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    font-size: 1.05rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

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

.resource-card-tag {
    display: inline-block;
    background: rgba(0, 74, 153, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}

/* ---- Service page: Related Articles section ---- */
.service-related-articles {
    background: #f4f7ff;
    border-radius: 10px;
    padding: 1.75rem;
    margin: 2rem 0;
}

.service-related-articles h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.service-related-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.service-related-list li a {
    display: block;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.93rem;
    padding: 0.4rem 0;
}

.service-related-list li a:hover {
    text-decoration: underline;
    color: var(--primary);
}

.service-related-list li a::before {
    content: "→ ";
    color: var(--accent);
    font-weight: bold;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .compare-table {
        font-size: 0.85rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.5rem 0.65rem;
    }
}
