/* ========================================
   Blog Detail Page Styles
   ======================================== */

/* Grid Layout */
.blog-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-detail-grid {
        grid-template-columns: 1fr 380px;
        gap: 3rem;
    }
}

/* Content Section */
.blog-detail-section {
    padding: 4rem 0;
    background: white;
}

.blog-sidebar-sticky {
    position: sticky;
    top: 7rem;
}

/* Featured Image */
.blog-featured-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Blog Content Typography */
.blog-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #475569;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.blog-content h2 {
    font-size: 1.5rem;
}

.blog-content h3 {
    font-size: 1.3rem;
}

.blog-content h4 {
    font-size: 1.1rem;
}

.blog-content p {
    margin-bottom: 1.25em;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5em 0;
}

.blog-content a {
    color: #0369a1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-content a:hover {
    color: #075985;
}

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

.blog-content li {
    margin-bottom: 0.4em;
}

.blog-content blockquote {
    border-left: 4px solid #0369a1;
    padding: 1rem 1.5rem;
    margin: 1.5em 0;
    background: #f8fafc;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #334155;
    font-style: italic;
}

.blog-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9rem;
}

.blog-content code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.blog-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}

.blog-content th,
.blog-content td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    text-align: left;
}

.blog-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

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

/* Post Footer */
.blog-post-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-share-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-share-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.blog-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    color: white;
}

.share-btn.fb:hover {
    background: #1877f2;
}

.share-btn.tw:hover {
    background: #1da1f2;
}

.share-btn.li:hover {
    background: #0a66c2;
}

.share-btn.cp:hover {
    background: #0369a1;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0369a1;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-back-link:hover {
    color: #075985;
}

/* Sidebar Card */
.sidebar-card {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Detail Items */
.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
}

.detail-item + .detail-item {
    border-top: 1px solid #f1f5f9;
}

.detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.625rem;
    background: rgba(3, 105, 161, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0369a1;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 1px;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

/* Search Form */
.sidebar-search-form {
    position: relative;
}

.sidebar-search {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-search:focus {
    border-color: #0369a1;
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.08);
}

.sidebar-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.sidebar-search-btn:hover {
    color: #0369a1;
}

/* Recent Posts */
.recent-post-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.6rem 0;
    text-decoration: none !important;
    transition: all 0.2s;
}

.recent-post-item + .recent-post-item {
    border-top: 1px solid #f1f5f9;
}

.recent-post-item:hover .recent-post-title {
    color: #0369a1;
}

.recent-post-item:hover .recent-post-img img {
    transform: scale(1.05);
}

.recent-post-img {
    width: 72px;
    height: 54px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.recent-post-date {
    font-size: 0.65rem;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.recent-post-title {
    font-size: 0.825rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

/* Hero Meta (no margin on p) */
.blog-hero-meta p {
    margin: 0;
}

/* Breadcrumb Reset */
.blog-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .blog-content {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .blog-content h2 {
        font-size: 1.25rem;
    }

    .blog-content h3 {
        font-size: 1.1rem;
    }

    .blog-detail-section {
        padding: 2.5rem 0;
    }
}

/* CTA Section */
.blog-cta-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.blog-cta-card {
    background: #0369a1; /* Primary Blue */
    border-radius: 2rem;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

@media (min-width: 768px) {
    .blog-cta-card {
        padding: 4rem 3rem;
    }
}

.blog-cta-mask {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    pointer-events: none;
}

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

.blog-cta-content {
    position: relative;
    z-index: 10;
    max-width: 42rem;
    margin: 0 auto;
}

.blog-cta-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .blog-cta-title {
        font-size: 2.5rem;
    }
}

.blog-cta-text {
    font-size: 1rem;
    color: #e0f2fe; /* Light blue for readability */
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .blog-cta-text {
        font-size: 1.125rem;
    }
}

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

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.btn-cta-primary {
    background: white;
    color: #0369a1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-cta-primary:hover {
    background: #f0f9ff;
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-cta-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-3px);
    color: white;
}
