/* ============================================
   BLOG POST STYLES — Somnathyatra Theme
   All classes namespaced with .blog- prefix
   Green accent: #16a34a / #22c55e
   Layout: Full-width with sidebar
   ============================================ */

/* ---------- Reading Progress Bar ---------- */
.blog-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    z-index: 9999;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

/* ---------- Breadcrumbs ---------- */
.blog-breadcrumbs {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 0;
    font-size: 0.82rem;
    color: #6b7280;
}
.blog-breadcrumbs a {
    color: #16a34a;
    text-decoration: none;
    transition: color 0.2s;
}
.blog-breadcrumbs a:hover {
    color: #15803d;
    text-decoration: underline;
}
.blog-breadcrumbs .blog-bc-sep {
    margin: 0 6px;
    color: #d1d5db;
}

/* ---------- Hero Section ---------- */
.blog-hero {
    position: relative;
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 24px;
}
.blog-hero-inner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}
.blog-hero-img {
    width: 100%;
    height: 70%;
    aspect-ratio: 21 / 9; /* Or adjust to match your exact image dimensions */
    object-fit: initial;
    display: block;
    transition: transform 0.5s ease;
}
.blog-hero-inner:hover .blog-hero-img {
    transform: scale(1.02);
}
.blog-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 36px 32px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.2) 80%, transparent 100%);
    z-index: 2;
}
.blog-hero-cat {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.blog-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.blog-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
}
.blog-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-hero-meta-item svg {
    opacity: 0.8;
}
.blog-hero-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

/* ---------- Main Layout: Content + Sidebar ---------- */
.blog-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* ---------- Post Content Area ---------- */
.blog-content-area {
    min-width: 0;
}

/* ---------- Post Meta Bar ---------- */
.blog-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}
.blog-meta-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.blog-meta-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dcfce7;
}
.blog-meta-author {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
}
.blog-meta-date {
    color: #6b7280;
    font-size: 0.82rem;
}
.blog-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
}

/* ---------- Table of Contents ---------- */
.blog-toc {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #16a34a;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 36px;
}
.blog-toc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-toc-title svg {
    color: #16a34a;
    flex-shrink: 0;
}
.blog-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
}
.blog-toc-list li {
    counter-increment: toc;
    margin-bottom: 8px;
}
.blog-toc-list li::before {
    content: counter(toc) ".";
    font-weight: 700;
    color: #16a34a;
    margin-right: 8px;
    font-size: 0.85rem;
}
.blog-toc-list a {
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}
.blog-toc-list a:hover {
    color: #16a34a;
    padding-left: 4px;
}

/* ---------- Entry Content Typography ---------- */
.blog-entry-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #374151;
}
.blog-entry-content > * + * {
    margin-top: 1.6em;
}
.blog-entry-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-top: 2.4em;
    margin-bottom: 0.6em;
    letter-spacing: -0.02em;
}
.blog-entry-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-top: 2.2em;
    margin-bottom: 0.5em;
    padding-bottom: 10px;
    border-bottom: 2px solid #dcfce7;
    letter-spacing: -0.01em;
}
.blog-entry-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    margin-top: 1.8em;
    margin-bottom: 0.4em;
}
.blog-entry-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
}
.blog-entry-content h5,
.blog-entry-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 1.4em;
    margin-bottom: 0.3em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.blog-entry-content p {
    margin: 0;
}
.blog-entry-content a {
    color: #16a34a;
    text-decoration: underline;
    text-decoration-color: #bbf7d0;
    text-underline-offset: 3px;
    transition: all 0.2s;
}
.blog-entry-content a:hover {
    color: #15803d;
    text-decoration-color: #16a34a;
}
.blog-entry-content strong {
    color: #111827;
    font-weight: 700;
}
.blog-entry-content em {
    color: #4b5563;
}
.blog-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.6em 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.blog-entry-content figure {
    margin: 1.8em 0;
}
.blog-entry-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 8px;
    font-style: italic;
}
.blog-entry-content blockquote {
    margin: 1.8em 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-left: 4px solid #16a34a;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1f2937;
    position: relative;
}
.blog-entry-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 3rem;
    color: #16a34a;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}
.blog-entry-content blockquote p {
    margin: 0;
    padding-left: 8px;
}
.blog-entry-content ul,
.blog-entry-content ol {
    padding-left: 1.6em;
    margin: 1.2em 0;
}
.blog-entry-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}
.blog-entry-content li::marker {
    color: #16a34a;
}
.blog-entry-content code {
    background: #f0fdf4;
    color: #15803d;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    border: 1px solid #dcfce7;
}
.blog-entry-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 1.6em 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.blog-entry-content pre code {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.blog-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.blog-entry-content thead {
    background: #16a34a;
    color: #fff;
}
.blog-entry-content th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.blog-entry-content td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.92rem;
}
.blog-entry-content tbody tr:nth-child(even) {
    background: #f9fafb;
}
.blog-entry-content tbody tr:hover {
    background: #f0fdf4;
}
.blog-entry-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
    margin: 2.4em 0;
}
.blog-entry-content .wp-block-image {
    margin: 1.8em 0;
}
.blog-entry-content .wp-block-image img {
    margin: 0;
}
.blog-entry-content .wp-element-button {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.blog-entry-content .wp-element-button:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* ---------- Tags ---------- */
.blog-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}
.blog-tags-label {
    font-weight: 700;
    color: #374151;
    font-size: 0.9rem;
}
.blog-tag {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid #dcfce7;
    transition: all 0.2s;
}
.blog-tag:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

/* ---------- Social Sharing ---------- */
.blog-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.blog-share-label {
    font-weight: 700;
    color: #374151;
    font-size: 0.9rem;
}
.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.blog-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.blog-share-btn svg {
    width: 18px;
    height: 18px;
}
.blog-share-fb { background: #1877f2; color: #fff; }
.blog-share-tw { background: #1da1f2; color: #fff; }
.blog-share-wa { background: #25d366; color: #fff; }
.blog-share-tg { background: #0088cc; color: #fff; }
.blog-share-copy {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.blog-share-copy:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

/* ---------- Author Bio ---------- */
.blog-author-box {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 28px;
    margin-top: 48px;
}
.blog-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #16a34a;
    flex-shrink: 0;
}
.blog-author-info {
    flex: 1;
}
.blog-author-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #16a34a;
    margin-bottom: 4px;
}
.blog-author-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}
.blog-author-desc {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Related Posts ---------- */
.blog-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}
.blog-related-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 28px;
    text-align: center;
}
.blog-related-title span {
    color: #16a34a;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.blog-related-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.blog-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: #dcfce7;
}
.blog-related-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.blog-related-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-related-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #16a34a;
    margin-bottom: 6px;
}
.blog-related-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-related-card-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
}

/* ---------- Post Navigation ---------- */
.blog-post-nav {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}
.blog-post-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.blog-post-nav-link:hover {
    background: #f0fdf4;
    border-color: #dcfce7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.blog-post-nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #16a34a;
    margin-bottom: 6px;
}
.blog-post-nav-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}
.blog-post-nav-link.blog-nav-next {
    text-align: right;
}

/* ============================================
   SIDEBAR
   ============================================ */
.blog-sidebar {
    position: sticky;
    top: 24px;
}

/* Sidebar Widget */
.blog-sidebar-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.blog-sidebar-widget:last-child {
    margin-bottom: 0;
}
.blog-sidebar-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dcfce7;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-sidebar-title svg {
    color: #16a34a;
    flex-shrink: 0;
}

/* Popular Posts Widget */
.blog-popular-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    transition: all 0.2s;
}
.blog-popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.blog-popular-post:first-child {
    padding-top: 0;
}
.blog-popular-post:hover .blog-popular-post-title {
    color: #16a34a;
}
.blog-popular-post-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.blog-popular-post-info {
    flex: 1;
    min-width: 0;
}
.blog-popular-post-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.blog-popular-post-date {
    font-size: 0.72rem;
    color: #9ca3af;
}

/* Route Links Widget */
.blog-route-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.blog-route-list li {
    margin-bottom: 0;
}
.blog-route-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    font-size: 0.85rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
}
.blog-route-list li:last-child a {
    border-bottom: none;
}
.blog-route-list a:hover {
    color: #16a34a;
    padding-left: 4px;
}
.blog-route-list a svg {
    color: #16a34a;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Booking Box Widget */
.blog-booking-widget {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: none;
    color: #fff;
}
.blog-booking-widget .blog-sidebar-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.15);
}
.blog-booking-widget .blog-sidebar-title svg {
    color: #22c55e;
}
.blog-booking-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.blog-booking-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.blog-booking-input::placeholder {
    color: rgba(255,255,255,0.5);
}
.blog-booking-input:focus {
    border-color: #22c55e;
}
.blog-booking-input option {
    background: #1e293b;
    color: #fff;
}
.blog-booking-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.blog-booking-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
}

/* No Featured Image Fallback */
.blog-hero-noimg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 48px 36px 32px;
}
.blog-hero-noimg .blog-hero-overlay {
    position: static;
    background: none;
    padding: 0;
    margin: 0;
}
.blog-hero-noimg .blog-hero-title {
    text-shadow: none;
    color: #fff;
}
.blog-hero-noimg .blog-hero-meta {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr 280px;
        gap: 28px;
    }
    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 28px 16px 48px;
    }
    .blog-hero-img {
        aspect-ratio: 3/2;
    }
    .blog-hero-overlay {
        padding: 40px 24px 24px;
    }
    .blog-hero-title {
        font-size: 1.6rem;
    }
    .blog-hero-meta {
        font-size: 0.78rem;
        gap: 10px;
    }
    .blog-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .blog-entry-content {
        font-size: 1rem;
    }
    .blog-entry-content h2 {
        font-size: 1.35rem;
    }
    .blog-entry-content h3 {
        font-size: 1.15rem;
    }
    .blog-toc {
        padding: 18px 20px;
    }
    .blog-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
    }
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
    .blog-post-nav {
        flex-direction: column;
    }
    .blog-post-nav-link.blog-nav-next {
        text-align: left;
    }
    .blog-share {
        justify-content: center;
    }
    /* Sidebar goes below content on mobile */
    .blog-sidebar {
        position: static;
        margin-top: 40px;
        padding-top: 40px;
        border-top: 2px solid #e5e7eb;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 0 12px;
    }
    .blog-hero-inner {
        border-radius: 14px;
    }
    .blog-hero-img {
        aspect-ratio: 16/10;
    }
    .blog-hero-overlay {
        padding: 32px 18px 18px;
    }
    .blog-hero-title {
        font-size: 1.35rem;
    }
    .blog-breadcrumbs {
        padding: 14px 12px 0;
        font-size: 0.75rem;
    }
    .blog-layout {
        padding: 20px 12px 40px;
    }
    .blog-entry-content {
        font-size: 0.95rem;
    }
    .blog-entry-content pre {
        padding: 16px;
        font-size: 0.82rem;
        border-radius: 8px;
    }
    .blog-share-btn {
        width: 38px;
        height: 38px;
    }
}
