/* =====================================================
   Blog post page — layout fixes + modern polish
   Loaded only on /blog/<slug> pages
   ===================================================== */

/* Smooth scroll for TOC anchor clicks; offset for sticky header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

/* Headings need scroll-margin so the sticky header doesn't cover them */
.post-content h1[id],
.post-content h2[id],
.post-content h3[id] {
    scroll-margin-top: 90px;
}

/* Container utilises full width to allow proper centering */
.post-container {
    padding: 32px 0;
}

/* New layout: share | content | sidebar, with reasonable proportions */
.post-layout {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 320px;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Share sidebar — make vertical bar clearly visible */
.share-sidebar {
    position: sticky;
    top: 100px;
}

.share-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 14px 8px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.06));
    border-radius: 14px;
    box-shadow: var(--shadow-card, 0 2px 8px rgba(0,0,0,.06));
}

.share-label {
    font-size: 10px;
    color: var(--text-tertiary, #94a3b8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s;
}

/* Content area — wider, centered */
.post-main {
    max-width: 760px;
    width: 100%;
    min-width: 0;
}

/* Content typography */
.post-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary, #475569);
}

.post-content > p:first-child::first-letter {
    font-size: 3.5em;
    font-weight: 800;
    float: left;
    line-height: 0.9;
    margin: 4px 12px 0 0;
    color: var(--primary, #6366f1);
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 48px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    letter-spacing: -0.5px;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 32px 0 12px;
}

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

/* Blog images — full width within content */
.post-content .blog-image,
.post-content figure {
    margin: 32px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.post-content .blog-image img,
.post-content figure img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content .blog-image figcaption,
.post-content figure figcaption {
    background: var(--bg-base, #fafafa);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-tertiary, #94a3b8);
    text-align: center;
    font-style: italic;
}

.post-content .image-credit {
    color: var(--text-tertiary, #94a3b8);
    font-style: normal;
    font-size: 11px;
    opacity: 0.7;
}

/* Hotel widget inside content */
.post-content .blog-hotel-widget {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
}

.post-content .blog-hotel-widget h3 {
    font-size: 1.35rem;
    margin: 0 0 20px;
    border: none;
    padding: 0;
}

.post-content .hotel-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.post-content .hotel-rec-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-content .hotel-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.post-content .hotel-rec-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.post-content .hotel-rec-info {
    padding: 14px 16px;
}

.post-content .hotel-rec-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 0 0 8px;
    line-height: 1.35;
}

.post-content .hotel-rec-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.post-content .hotel-rec-meta .stars {
    color: #fbbf24;
    letter-spacing: -1px;
}

.post-content .hotel-rec-meta .rating {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
}

/* Tags row */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 40px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
}

.tags-label {
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-right: 4px;
}

.tag {
    padding: 6px 14px;
    background: var(--bg-base, #fafafa);
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    color: #fff;
}

/* Author box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-base, #fafafa);
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
    border-radius: 18px;
    margin: 32px 0;
    align-items: center;
}

.author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 0 0 4px;
}

.author-box-bio {
    font-size: 14px;
    color: var(--text-secondary, #475569);
    line-height: 1.5;
    margin: 0;
}

/* Bottom share section */
.share-section {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(236, 72, 153, 0.04));
    border-radius: 18px;
    margin-top: 32px;
}

.share-section h4 {
    margin: 0 0 16px;
    color: var(--text-primary, #0f172a);
    font-size: 1.1rem;
}

.share-buttons-horizontal {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s;
}

.share-btn-large:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* Right sidebar */
.post-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.06));
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.newsletter-widget {
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    border: none !important;
    color: #fff;
}

.newsletter-widget .widget-title,
.newsletter-widget p {
    color: #fff !important;
}

.newsletter-widget .newsletter-form input {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    width: 100%;
    margin-bottom: 10px;
    font-size: 14px;
}

.newsletter-widget .newsletter-form button {
    background: #fff;
    color: #6366f1;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
}

/* Table of contents */
.table-of-contents {
    background: var(--bg-base, #fafafa);
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.06));
    border-left: 4px solid var(--primary, #6366f1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-list {
    margin: 0;
    padding-left: 22px;
}

.toc-list li {
    margin-bottom: 6px;
    color: var(--text-tertiary, #94a3b8);
}

.toc-list a {
    color: var(--text-secondary, #475569);
    font-size: 14px;
    text-decoration: none;
}

.toc-list a:hover {
    color: var(--primary, #6366f1);
}

/* Related posts */
.related-posts {
    max-width: 1200px;
    margin: 64px auto 0;
    padding: 48px 24px 0;
    border-top: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
}

.related-posts .section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--text-primary, #0f172a);
}

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

.related-posts .post-card {
    background: var(--bg-card, #fff);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.06));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-posts .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.15);
}

.related-posts .post-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-posts .post-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    position: relative;
    overflow: hidden;
}

.related-posts .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts .post-image::after {
    content: '✈';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
    z-index: 0;
}

.related-posts .post-image img {
    position: relative;
    z-index: 1;
}

.related-posts .post-content {
    padding: 18px;
    font-size: 14px;
}

.related-posts .post-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin: 0 0 8px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.related-posts .post-excerpt {
    font-size: 13px;
    color: var(--text-secondary, #475569);
    line-height: 1.5;
    margin: 0 0 10px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.related-posts .reading-time {
    font-size: 12px;
    color: var(--text-tertiary, #94a3b8);
}

/* Hero section */
.post-hero {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.post-hero-overlay {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.85) 100%);
    padding: 80px 0 32px;
}

.post-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    margin: 16px 0 12px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 0.95;
    flex-wrap: wrap;
}

.breadcrumbs-light a {
    color: rgba(255, 255, 255, 0.8);
}
.breadcrumbs-light a:hover {
    color: #fff;
}
.breadcrumbs-light .breadcrumbs-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .share-sidebar {
        display: none;
    }
    .post-sidebar {
        position: static;
        max-width: 100%;
    }
    .posts-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 280px;
    }
    .post-hero-overlay {
        padding: 60px 0 24px;
    }
    .post-content {
        font-size: 16px;
    }
    .post-content > p:first-child::first-letter {
        font-size: 3em;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .posts-grid-3 {
        grid-template-columns: 1fr;
    }
    .share-buttons-horizontal {
        flex-direction: column;
    }
    .share-btn-large {
        justify-content: center;
    }
}

/* Dark mode */
[data-theme="dark"] .post-content h2 {
    border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .table-of-contents,
[data-theme="dark"] .author-box,
[data-theme="dark"] .share-section,
[data-theme="dark"] .sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
