/**
 * Blog Post Styles
 * Styles for individual blog post pages
 */

/* ========================================
   BREADCRUMB
   ======================================== */

.blog-breadcrumb {
    padding: calc(var(--nav-height) + 24px) 0 0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--text-sm);
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    color: var(--color-gray-400);
}

.breadcrumb-list a {
    color: var(--color-gray-600);
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    color: var(--color-green);
}

.breadcrumb-list li:last-child {
    color: var(--color-gray-400);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ========================================
   POST HEADER
   ======================================== */

.blog-post-header {
    padding: 40px 0 48px;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.post-header-content {
    max-width: 800px;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.post-category {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: var(--color-green);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-read-time {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.blog-post-header h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 24px;
}

.post-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar svg {
    width: 24px;
    height: 24px;
    color: var(--color-green);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #0f172a;
}

.author-info time {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-share span {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.post-share a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    border-radius: var(--radius-md);
    color: var(--color-gray-600);
    transition: all 0.2s ease;
}

.post-share a:hover {
    background: var(--color-green);
    color: white;
}

.post-share svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   POST CONTENT LAYOUT
   ======================================== */

.blog-post-content {
    padding: 48px 0 80px;
    background: white;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.post-main {
    max-width: 100%;
    overflow: hidden;
}

.post-body {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--color-gray-700);
}

.post-body h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: #0f172a;
    margin: 48px 0 20px;
    padding-top: 24px;
    border-top: 1px solid var(--color-gray-100);
}

.post-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.post-body h3 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: #0f172a;
    margin: 32px 0 16px;
}

.post-body h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: #0f172a;
    margin: 24px 0 12px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul,
.post-body ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body li::marker {
    color: var(--color-green);
}

.post-body strong {
    color: #0f172a;
    font-weight: 600;
}

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

.post-body a:hover {
    color: #16a34a;
}

/* Tables */
.post-body .table-responsive {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
}

.post-body table,
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.comparison-table thead {
    background: var(--color-gray-50);
}

.comparison-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 2px solid var(--color-gray-200);
}

.comparison-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-gray-100);
    color: var(--color-gray-700);
}

.comparison-table tbody tr:hover {
    background: var(--color-gray-50);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* FAQ Section */
.faq-section {
    margin: 32px 0;
}

.faq-item {
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.faq-item h4 {
    margin: 0 0 12px;
    color: #0f172a;
}

.faq-item p {
    margin: 0;
    color: var(--color-gray-600);
}

/* ========================================
   POST FOOTER
   ======================================== */

.post-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-gray-200);
}

.post-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.post-tags span {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.post-tags .tag {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: var(--color-green);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
}

.post-tags .tag:hover {
    background: var(--color-green);
    color: white;
}

.post-share-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.post-share-footer span {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

.share-btn.twitter {
    background: #f1f5f9;
    color: #0f172a;
}

.share-btn.twitter:hover {
    background: #0f172a;
    color: white;
}

.share-btn.linkedin {
    background: #e0f2fe;
    color: #0077b5;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
}

.share-btn.whatsapp {
    background: #f0fdf4;
    color: #25d366;
}

.share-btn.whatsapp:hover {
    background: #25d366;
    color: white;
}

/* ========================================
   SIDEBAR
   ======================================== */

.post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
}

.sidebar-cta h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.sidebar-cta p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    line-height: 1.6;
}

.sidebar-cta .btn {
    width: 100%;
    margin-bottom: 12px;
}

.sidebar-cta .btn:last-child {
    margin-bottom: 0;
}

.sidebar-cta .btn-outline {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-cta .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Table of Contents */
.sidebar-toc {
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sidebar-toc h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
}

.sidebar-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-toc li {
    margin-bottom: 8px;
}

.sidebar-toc li.toc-h3 {
    padding-left: 16px;
}

.sidebar-toc a {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    line-height: 1.5;
    transition: color 0.2s ease;
}

.sidebar-toc a:hover {
    color: var(--color-green);
}

/* Contact Card */
.sidebar-contact {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sidebar-contact h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.sidebar-contact p {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    margin-bottom: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.contact-link:last-child {
    margin-bottom: 0;
}

.contact-link:hover {
    background: var(--color-gray-100);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    color: var(--color-gray-500);
}

.contact-link.whatsapp {
    background: #f0fdf4;
    color: #16a34a;
}

.contact-link.whatsapp:hover {
    background: #dcfce7;
}

.contact-link.whatsapp svg {
    color: #25d366;
}

/* ========================================
   RELATED POSTS
   ======================================== */

.related-posts {
    padding: 80px 0;
    background: var(--color-gray-50);
}

.related-posts h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 32px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.related-card-image {
    height: 160px;
    overflow: hidden;
}

.related-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--color-green);
    opacity: 0.5;
}

.related-card-content {
    padding: 20px;
}

.related-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-green);
    margin-bottom: 8px;
    display: block;
}

.related-card-content h3 {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.related-card-content h3 a {
    color: #0f172a;
    transition: color 0.2s ease;
}

.related-card-content h3 a:hover {
    color: var(--color-green);
}

.related-card-content time {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

/* ========================================
   NEWSLETTER CTA
   ======================================== */

.blog-newsletter-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.newsletter-cta-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.newsletter-cta-content p {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.newsletter-form-inline {
    display: flex;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}

.newsletter-form-inline input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: var(--text-base);
}

.newsletter-form-inline input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form-inline input:focus {
    outline: none;
    border-color: var(--color-green);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-top: 48px;
        padding-top: 48px;
        border-top: 1px solid var(--color-gray-200);
    }

    .sidebar-cta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .blog-post-header {
        padding: 32px 0 40px;
    }

    .post-meta-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-sidebar {
        grid-template-columns: 1fr;
    }

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

    .share-buttons {
        flex-wrap: wrap;
    }

    .share-btn span {
        display: none;
    }

    .newsletter-form-inline {
        flex-direction: column;
    }

    .breadcrumb-list li:last-child {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .post-share-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
