/* ==========================================================================
   BLOG STYLES — Layers on top of faith.css
   ========================================================================== */

/* ---- Blog Hero ---- */
.blog-hero {
    background-color: var(--bg-dark);
    padding: 5rem 1.5rem 3.5rem;
    text-align: center;
    position: relative;
}

.blog-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.blog-breadcrumb a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: #3B82F6;
}

.blog-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.0625rem;
    color: #94A3B8;
    line-height: 1.6;
    font-weight: 400;
    max-width: 540px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .blog-hero { padding: 3.5rem 1.5rem 2.5rem; }
    .blog-hero h1 { font-size: 1.75rem; }
    .blog-hero p { font-size: 0.9375rem; }
}


/* ---- Blog Main / Container ---- */
.blog-main {
    background-color: white;
    padding: 4rem 1.5rem 2rem;
}

.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}


/* ---- Blog Card (Listing) ---- */
.blog-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid #F1F5F9;
}

.blog-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (max-width: 767px) {
    .blog-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

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

.blog-card-image {
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background-color: #F1F5F9;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card-image-link:hover img {
    transform: scale(1.03);
}

.blog-card-body {
    text-align: left;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.blog-tag {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.blog-tag-green { background-color: #ECFDF5; color: #059669; }
.blog-tag-blue { background-color: #EFF6FF; color: #2563EB; }
.blog-tag-purple { background-color: #FAF5FF; color: #7C3AED; }
.blog-tag-red { background-color: #FEF2F2; color: #DC2626; }

.blog-card-meta time {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94A3B8;
}

.blog-card-body h2 {
    font-size: 1.625rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.blog-card-body h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-body h2 a:hover {
    color: #2563EB;
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: #64748B;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.blog-read-more {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #2563EB;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-read-more:hover {
    color: #1D4ED8;
}

@media (max-width: 767px) {
    .blog-card-body h2 { font-size: 1.375rem; }
}


/* ==========================================================================
   INDIVIDUAL POST PAGE
   ========================================================================== */

.blog-post-hero {
    background-color: var(--bg-dark);
    padding: 5rem 1.5rem 3.5rem;
    text-align: center;
}

.blog-post-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.blog-post-meta-top time {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94A3B8;
}

.blog-post-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

@media (max-width: 767px) {
    .blog-post-hero { padding: 3.5rem 1.5rem 2.5rem; }
    .blog-post-hero h1 { font-size: 1.75rem; }
}

/* White background for all post body content */
.blog-post-body-wrap {
    background-color: white;
}

.blog-post-image-wrap {
    max-width: 1000px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.blog-post-image-wrap + .blog-post-body-wrap {
    padding-top: 0;
}

.blog-post-image-wrap img {
    width: 100%;
    height: auto;
    margin-bottom: -200px;
    border-radius: 0.75rem;
    display: block;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 767px) {
    .blog-post-image-wrap img {
        margin-bottom: -80px;
    }
}

@media (max-width: 480px) {
    .blog-post-image-wrap img {
        margin-bottom: -50px;
    }
}

.blog-post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 200px 1.5rem 4rem;
    font-size: 1.0625rem;
    color: #334155;
    line-height: 1.8;
}

@media (max-width: 767px) {
    .blog-post-content {
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    .blog-post-content {
        padding-top: 50px;
    }
}

.blog-post-content p {
    margin-bottom: 0.25rem;
}

.blog-post-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0F172A;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.blog-post-content h3 {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0F172A;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.blog-post-content strong {
    color: #0F172A;
    font-weight: 700;
}

.blog-post-content a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.2s;
}

.blog-post-content a:hover {
    color: #1D4ED8;
}

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

.blog-post-content ul {
    list-style: disc;
}

.blog-post-content ol {
    list-style: decimal;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
    display: list-item;
}

.blog-post-content blockquote {
    border-left: 4px solid #3B82F6;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: #F8FAFC;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #475569;
    font-style: italic;
}


/* ---- More Posts Section ---- */
.blog-more-posts {
    background-color: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    padding: 4rem 1.5rem;
}

.blog-more-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-more-inner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 2rem;
    text-align: center;
}

.blog-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.blog-more-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-more-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.blog-more-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-more-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-more-body {
    padding: 1.25rem;
}

.blog-more-body h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
    margin-top: 0.5rem;
}


/* ---- Blog CTA Section ---- */
.blog-cta {
    background-color: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    padding: 5rem 1.5rem;
    text-align: center;
}

.blog-cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #0F172A;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.blog-cta p {
    font-size: 1rem;
    color: #64748B;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.blog-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.blog-cta .btn-primary {
    width: auto;
}

.blog-cta-demo {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    border: 1px solid #CBD5E1;
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
}

.blog-cta-demo:hover {
    background-color: #F1F5F9;
    color: #0F172A;
}

@media (max-width: 767px) {
    .blog-cta { padding: 3.5rem 1.5rem; }
    .blog-cta h2 { font-size: 1.5rem; }
    .blog-cta .btn-primary,
    .blog-cta-demo { width: 100%; text-align: center; justify-content: center; display: flex; }
}


/* ==========================================================================
   ADMIN INTERFACE
   ========================================================================== */

.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 700;
}

.admin-alert-success {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.admin-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 2rem;
    text-align: left;
}

.admin-card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-card-title i {
    color: #3B82F6;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.admin-field label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-hint {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94A3B8;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: #0F172A;
    background: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: white;
}

.admin-field textarea {
    resize: vertical;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.admin-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .admin-row-2 { grid-template-columns: 1fr; }
}

.admin-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    font-family: var(--font-sans);
}

.admin-btn-save {
    background: #188d6a;
    color: white;
    box-shadow: 0 4px 10px rgba(24, 141, 106, 0.3);
}

.admin-btn-save:hover {
    background: #107a5a;
    transform: translateY(-1px);
}

.admin-btn-cancel {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}

.admin-btn-cancel:hover {
    background: #E2E8F0;
}

.admin-posts-list {
    display: flex;
    flex-direction: column;
}

.admin-post-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #F1F5F9;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-post-row:last-child {
    border-bottom: none;
}

.admin-post-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.admin-post-info strong {
    font-size: 1rem;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-post-meta {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-btn-sm {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    background: white;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-size: 0.8125rem;
}

.admin-btn-sm:hover {
    background: #F1F5F9;
}

.admin-btn-view:hover { color: #3B82F6; border-color: #3B82F6; }
.admin-btn-edit:hover { color: #F59E0B; border-color: #F59E0B; }
.admin-btn-delete:hover { color: #EF4444; border-color: #EF4444; background: #FEF2F2; }

/* Upload row */
.admin-upload-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.admin-upload-row input[type="text"] {
    flex: 1;
}

.admin-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1.25rem;
    background: #3B82F6;
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: var(--font-sans);
}

.admin-btn-upload:hover {
    background: #2563EB;
}

/* Image preview */
.admin-image-preview {
    margin-top: 0.75rem;
    position: relative;
    display: inline-block;
}

.admin-image-preview img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 0.5rem;
    border: 1px solid #E2E8F0;
    display: block;
}

.admin-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #EF4444;
    color: white;
    border: 2px solid white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.admin-preview-remove:hover {
    background: #DC2626;
}

/* Jodit overrides to match admin theme */
.jodit-container {
    border-radius: 0.5rem !important;
    border-color: #CBD5E1 !important;
}

.jodit-container:focus-within {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.jodit-wysiwyg {
    background-color: #fff !important;
    color: #1e293b !important;
}

.jodit-wysiwyg p,
.jodit-wysiwyg h1,
.jodit-wysiwyg h2,
.jodit-wysiwyg h3,
.jodit-wysiwyg h4,
.jodit-wysiwyg li,
.jodit-wysiwyg td,
.jodit-wysiwyg th,
.jodit-wysiwyg blockquote,
.jodit-wysiwyg span {
    color: #1e293b !important;
}

.jodit-placeholder {
    color: #94A3B8 !important;
}

.jodit-wysiwyg ul {
    list-style: disc !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 !important;
}

.jodit-wysiwyg ol {
    list-style: decimal !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 !important;
}

.jodit-wysiwyg li {
    display: list-item !important;
    margin-bottom: 0.25rem !important;
}

/* New Post toggle button */
.admin-btn-new {
    background: #3B82F6;
    color: white;
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-btn-new:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.admin-btn-cancel-toggle {
    background: #64748B !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3) !important;
}

.admin-btn-cancel-toggle:hover {
    background: #475569 !important;
}
