/**
 * Simple Blog Writer - Structured Frontend Styles
 * Replicates the modern, 3-column card grid and structured article reading view
 */

/* Global Reset for Structured Pages */
.sbw-body-structured {
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.sbw-body-structured * {
    box-sizing: border-box;
}

/* Site Header (Titanium Smiles style) */
.sbw-site-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sbw-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sbw-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.sbw-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.sbw-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sbw-brand-text {
    display: flex;
    flex-direction: column;
}

.sbw-brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.sbw-brand-tagline {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

/* Button Appointment */
.sbw-btn-appointment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.sbw-btn-appointment:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.sbw-btn-appointment-lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* Main Content Container */
.sbw-main-content {
    padding: 48px 0 80px;
}

.sbw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Archive / Category Titles */
.sbw-archive-header {
    margin-bottom: 36px;
    text-align: center;
}

.sbw-archive-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.sbw-archive-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
}

/* 3-Column Structured Blog Grid */
.sbw-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) {
    .sbw-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 680px) {
    .sbw-cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Blog Card */
.sbw-blog-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sbw-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Card Image Area */
.sbw-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

.sbw-card-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.sbw-blog-card:hover .sbw-card-img {
    transform: scale(1.04);
}

.sbw-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
}

.sbw-card-img-placeholder svg {
    width: 48px;
    height: 48px;
}

/* Floating Share Button */
.sbw-card-share-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s ease;
    z-index: 10;
}

.sbw-card-share-btn:hover {
    background: #2563eb;
    color: #ffffff;
    transform: scale(1.08);
}

.sbw-card-share-btn svg {
    width: 18px;
    height: 18px;
}

/* Card Body */
.sbw-card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sbw-card-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.sbw-meta-dot {
    color: #94a3b8;
}

.sbw-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    color: #0f172a;
}

.sbw-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sbw-card-title a:hover {
    color: #2563eb;
}

.sbw-card-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sbw-card-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.sbw-card-link:hover {
    color: #1d4ed8;
    gap: 10px;
}

/* Pagination */
.sbw-pagination-nav,
.sbw-pagination {
    margin-top: 56px;
    display: flex;
    justify-content: center;
}

.sbw-pagination-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sbw-pagination-item a,
.sbw-pagination-item span,
.sbw-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sbw-pagination-item a:hover,
.sbw-pagination .page-numbers:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.sbw-pagination-item .current,
.sbw-pagination .page-numbers.current {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.sbw-pagination-item .dots {
    border: none;
    background: transparent;
    color: #94a3b8;
}

/* ==========================================================================
   Single Post Structured View
   ========================================================================== */
.sbw-article-main {
    padding: 36px 0 80px;
}

.sbw-article-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

.sbw-back-nav {
    margin-bottom: 24px;
}

.sbw-back-link {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.sbw-back-link:hover {
    color: #2563eb;
}

.sbw-article-header {
    margin-bottom: 28px;
}

.sbw-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.sbw-cat-pill {
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.sbw-article-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .sbw-article-title {
        font-size: 28px;
    }
}

.sbw-article-banner {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sbw-banner-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Article Body Typography */
.sbw-article-body {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
}

.sbw-article-body p {
    margin-top: 0;
    margin-bottom: 24px;
}

.sbw-article-body h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 48px;
    margin-bottom: 18px;
    line-height: 1.3;
    border-left: 4px solid #2563eb;
    padding-left: 14px;
}

.sbw-article-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 32px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.sbw-article-body ul,
.sbw-article-body ol {
    margin-top: 0;
    margin-bottom: 24px;
    padding-left: 24px;
}

.sbw-article-body li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.sbw-article-body strong {
    color: #0f172a;
}

/* Structured Blocks */
.structured-callout {
    background-color: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 18px 22px;
    margin: 32px 0;
    border-radius: 0 10px 10px 0;
    color: #166534;
    font-size: 16px;
    line-height: 1.7;
}

.structured-callout strong {
    color: #14532d;
}

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

.structured-takeaways {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-top: 4px solid #2563eb;
    border-radius: 10px;
    padding: 22px 26px;
    margin: 36px 0;
}

.structured-takeaways h4 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 18px;
    color: #1e40af;
    font-weight: 700;
}

.structured-takeaways ul {
    margin: 0;
    padding-left: 20px;
}

.structured-takeaways li {
    margin-bottom: 8px;
    color: #1e3a8a;
    line-height: 1.6;
}

/* Share Bar */
.sbw-article-share-bar {
    margin: 48px 0;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.sbw-share-label {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.sbw-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sbw-share-icon-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sbw-share-whatsapp {
    background: #25d366;
    color: #ffffff;
}

.sbw-share-whatsapp:hover {
    background: #1eb956;
}

.sbw-share-twitter {
    background: #0f172a;
    color: #ffffff;
}

.sbw-share-twitter:hover {
    background: #334155;
}

.sbw-share-linkedin {
    background: #0a66c2;
    color: #ffffff;
}

.sbw-share-linkedin:hover {
    background: #084e96;
}

.sbw-share-copy {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.sbw-share-copy:hover {
    background: #e2e8f0;
}

/* Consultation Box */
.sbw-consultation-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 36px;
    margin-top: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

@media (max-width: 680px) {
    .sbw-consultation-box {
        flex-direction: column;
        text-align: center;
    }
}

.sbw-consultation-text h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #1e3a8a;
}

.sbw-consultation-text p {
    margin: 0;
    font-size: 14px;
    color: #3b82f6;
    line-height: 1.5;
}

/* Related Section */
.sbw-related-section {
    margin-top: 60px;
    padding-top: 48px;
    border-top: 1px solid #e2e8f0;
}

.sbw-related-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 28px;
    text-align: center;
}

/* Footer */
.sbw-site-footer {
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

/* Toast */
.sbw-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sbw-toast.sbw-toast-show {
    opacity: 1;
}
