/**
 * NitaiGaur.org - Journal/Blog Styles
 */

/* Journal Header */
.journal-header {
    background: var(--peacock-gradient);
    padding: 150px 0 80px;
    text-align: center;
    position: relative;
}

.journal-header .section-subtitle {
    color: var(--golden-yellow);
}

.journal-header .section-title {
    color: #fff;
    margin-bottom: 20px;
}

.search-info {
    color: rgba(255,255,255,0.8);
    margin-top: 20px;
}

/* Main Layout */
.journal-main {
    padding: 60px 0;
    background: var(--ivory);
}

.journal-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
    align-items: start;
}

/* Post Cards */
.journal-posts {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== Thumbnail Grid Layout ===== */
.posts-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* First post is larger */
.posts-thumbnail-grid .post-thumb.large {
    grid-column: span 2;
}

.post-thumb {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
}

.post-thumb:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.post-thumb-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-thumb-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-thumb.large .post-thumb-image {
    aspect-ratio: 21/9;
}

.post-thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-thumb:hover .post-thumb-image img {
    transform: scale(1.08);
}

.post-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a5f7a 0%, #0a2647 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumb-placeholder span {
    font-size: 4rem;
    opacity: 0.5;
}

.post-thumb.large .post-thumb-placeholder span {
    font-size: 6rem;
}

.post-thumb-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.post-thumb-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    color: #fff;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.post-thumb.large .post-thumb-content {
    padding: 35px;
}

.post-thumb-category {
    display: inline-block;
    background: linear-gradient(135deg, #f4c430 0%, #ffd700 100%);
    color: #1a1a1a;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.post-thumb.large .post-thumb-category {
    font-size: 0.8rem;
    padding: 6px 18px;
}

.post-thumb-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.5);
    color: #ffffff;
}

.post-thumb.large .post-thumb-title {
    font-size: 2.2rem;
    text-shadow: 0 3px 6px rgba(0,0,0,0.9), 0 6px 20px rgba(0,0,0,0.6);
}

.post-thumb-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.post-thumb.large .post-thumb-meta {
    font-size: 0.9rem;
}

.post-thumb-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-thumb-featured {
    color: var(--golden-yellow, #f4c430);
    font-weight: 600;
}

/* Featured post special styling */
.post-thumb.featured {
    box-shadow: 0 4px 20px rgba(244, 196, 48, 0.2);
}

.post-thumb.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f4c430, #ffd700);
    z-index: 3;
}

/* Responsive */
@media (max-width: 768px) {
    .posts-thumbnail-grid {
        grid-template-columns: 1fr;
    }

    .posts-thumbnail-grid .post-thumb.large {
        grid-column: span 1;
    }

    .post-thumb.large .post-thumb-image {
        aspect-ratio: 16/10;
    }

    .post-thumb-title {
        font-size: 1.1rem;
    }

    .post-thumb.large .post-thumb-title {
        font-size: 1.4rem;
    }

    .post-thumb-content {
        padding: 20px;
    }

    .post-thumb.large .post-thumb-content {
        padding: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .posts-thumbnail-grid {
        gap: 20px;
    }

    .post-thumb-title {
        font-size: 1.1rem;
    }

    .post-thumb.large .post-thumb-title {
        font-size: 1.6rem;
    }
}

.post-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: all 0.4s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--divine-shadow);
}

.post-card.featured {
    border: 2px solid var(--golden-yellow);
}

.post-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

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

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--golden-gradient);
    color: var(--deep-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-card-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta svg {
    color: var(--divine-gold);
}

.post-categories a {
    color: var(--krishna-blue);
    font-weight: 500;
}

.post-categories a:hover {
    color: var(--divine-gold);
}

.post-card .post-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-card .post-title a {
    color: var(--deep-blue);
}

.post-card .post-title a:hover {
    color: var(--krishna-blue);
}

.post-excerpt {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--krishna-blue);
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--divine-gold);
    gap: 12px;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-posts h2 {
    color: var(--deep-blue);
    margin-bottom: 15px;
}

.no-posts p {
    color: #666;
    margin-bottom: 30px;
}

/* Pagination */
.pagination {
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-list li a {
    background: #fff;
    color: var(--deep-blue);
    border: 1px solid #e0e0e0;
}

.pagination-list li a:hover {
    background: var(--krishna-blue);
    color: #fff;
    border-color: var(--krishna-blue);
}

.pagination-current {
    background: var(--krishna-blue) !important;
    color: #fff !important;
}

.pagination-prev,
.pagination-next {
    padding: 0 20px !important;
}

/* Sidebar */
.journal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 100px;
}

.widget {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--soft-shadow);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--deep-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--golden-yellow);
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--krishna-blue);
}

.search-form button {
    padding: 12px;
    background: var(--krishna-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--deep-blue);
}

/* Featured Posts Widget */
.featured-posts-list {
    list-style: none;
}

.featured-posts-list li {
    margin-bottom: 15px;
}

.featured-posts-list li:last-child {
    margin-bottom: 0;
}

.featured-posts-list a {
    display: flex;
    gap: 12px;
    align-items: center;
}

.featured-posts-list img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.placeholder-thumb {
    width: 70px;
    height: 70px;
    background: var(--divine-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.featured-post-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.featured-post-title {
    font-weight: 500;
    color: var(--deep-blue);
    line-height: 1.4;
    font-size: 0.95rem;
}

.featured-post-date {
    font-size: 0.8rem;
    color: #888;
}

.featured-posts-list a:hover .featured-post-title {
    color: var(--krishna-blue);
}

/* Categories Widget */
.categories-list {
    list-style: none;
}

.categories-list li {
    border-bottom: 1px solid #f0f0f0;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #555;
    transition: all 0.3s ease;
}

.categories-list a:hover,
.categories-list li.active a {
    color: var(--krishna-blue);
    padding-left: 10px;
}

.cat-count {
    background: var(--soft-pink);
    color: var(--krishna-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--soft-pink);
    color: var(--krishna-blue);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tag:hover,
.tag.active {
    background: var(--krishna-blue);
    color: #fff;
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    display: block;
    padding: 12px 0;
}

.recent-post-title {
    display: block;
    color: var(--deep-blue);
    font-weight: 500;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #888;
}

.recent-posts-list a:hover .recent-post-title {
    color: var(--krishna-blue);
}

/* Quote Widget */
.widget-quote {
    background: var(--divine-gradient);
    color: #fff;
}

.quote-content {
    text-align: center;
}

.quote-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 15px;
}

.quote-content p {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.quote-content cite {
    font-size: 0.9rem;
    color: var(--golden-yellow);
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

/* Post Hero */
.post-hero {
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding: 100px 0 60px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 38, 71, 0.9) 0%, rgba(10, 38, 71, 0.3) 50%, transparent 100%);
}

.post-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-badge {
    background: var(--golden-gradient);
    color: var(--deep-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-hero .post-title {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: rgba(255,255,255,0.9);
}

.post-meta-hero span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-hero svg {
    color: var(--golden-yellow);
}

/* Simple Header (no featured image) */
.post-header-simple {
    background: var(--peacock-gradient);
    padding: 150px 0 60px;
}

.post-header-simple .post-categories .category-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.post-header-simple .post-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 20px 0;
    max-width: 800px;
}

.post-header-simple .post-meta {
    color: rgba(255,255,255,0.8);
}

.post-header-simple .post-meta svg {
    color: var(--golden-yellow);
}

/* Post Content */
.single-post-main {
    padding-top: 60px;
}

.post-content-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--soft-shadow);
}

.post-content.prose {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

.prose h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--deep-blue);
}

.prose h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--deep-blue);
}

.prose p {
    margin-bottom: 1.5em;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
}

.prose a {
    color: var(--krishna-blue);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--divine-gold);
}

.prose ul, .prose ol {
    margin: 20px 0;
    padding-left: 30px;
}

.prose li {
    margin-bottom: 10px;
}

.prose blockquote {
    border-left: 4px solid var(--golden-yellow);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--soft-pink);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.prose code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.prose pre {
    background: var(--deep-blue);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 30px 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-weight: 600;
    color: var(--deep-blue);
}

.post-tags .tag {
    font-size: 0.9rem;
}

/* Share Buttons */
.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.share-label {
    font-weight: 600;
    color: var(--deep-blue);
}

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

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn.twitter {
    background: #000;
    color: #fff;
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

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

.share-btn.copy-link {
    background: var(--soft-pink);
    color: var(--krishna-blue);
}

.share-btn:hover {
    transform: scale(1.1);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 40px;
    padding: 30px;
    background: var(--soft-pink);
    border-radius: 15px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--divine-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.author-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--deep-blue);
    margin: 5px 0 10px;
}

.author-bio {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-posts h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--deep-blue);
    margin-bottom: 25px;
}

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

.related-post-card {
    background: var(--soft-pink);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--soft-shadow);
}

.related-post-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-post-placeholder {
    width: 100%;
    height: 120px;
    background: var(--divine-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.related-post-info {
    padding: 15px;
}

.related-post-info h4 {
    font-size: 1rem;
    color: var(--deep-blue);
    margin-bottom: 5px;
    line-height: 1.4;
}

.related-post-date {
    font-size: 0.8rem;
    color: #888;
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--krishna-blue);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-back:hover {
    color: var(--divine-gold);
    gap: 12px;
}

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

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

    .journal-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .widget-search,
    .widget-quote {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .journal-header {
        padding: 120px 0 60px;
    }

    .journal-header .section-title {
        font-size: 2rem;
    }

    .post-card-image {
        height: 200px;
    }

    .post-card .post-title {
        font-size: 1.4rem;
    }

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

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

    .post-hero .post-title {
        font-size: 2rem;
    }

    .post-header-simple .post-title {
        font-size: 1.8rem;
    }

    .post-content-wrapper {
        padding: 25px;
    }

    .post-content.prose {
        font-size: 1rem;
    }

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

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .pagination-list {
        flex-wrap: wrap;
    }

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