/* ============================================
   BLOG PAGE STYLING (blog.html)
   ============================================ */

/* Color Variables (matching main site theme) */
:root {
    --accent-color: #d2b356;
    --text-color: #111;
    --bg-color: #fff;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Blog Page Header */
#blog-header {
    padding: 60px 20px;
    background: var(--bg-color);
    text-align: center;
}

.blog-header-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo Styling */
.blog-logo {
    display: inline-block;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

.blog-logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 60px;
    width: auto;
}

/* Quote Section */
.blog-quote-wrapper {
    margin: 40px 0 30px 0;
}

.blog-quote {
    font-size: 28px;
    font-weight: 300;
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Divider */
.blog-divider {
    height: 2px;
    width: 60px;
    background: var(--accent-color);
    margin: 30px auto 0;
}

/* Main Blog Container */
.blog-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============================================
   FILTER NAVIGATION
   ============================================ */

.filter-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 50px;
    padding: 0;
    list-style: none;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 18px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.filter-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.filter-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* ============================================
   ARTICLE CARDS GRID
   ============================================ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 50px;
    min-height: 400px;
}

/* Individual Post Card */
.blog-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

/* Card Image Wrapper */
.blog-card-image-wrapper {
    width: 100%;
    height: 220px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

/* Card Image */
.blog-card img {
    width: auto;
    height: auto;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transform: rotate(-90deg);
    transform-origin: center;
    display: block;
}

/* Card Content */
.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Post Date on Card */
.post-date-card {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px 0;
    line-height: 1.4;
    font-family: 'Open Sans', sans-serif;
}

.blog-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
    font-family: 'Open Sans', sans-serif;
}

/* Category Tag */
.category {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-color);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    border-radius: 3px;
    text-transform: capitalize;
    font-family: 'Open Sans', sans-serif;
}

/* Read More Link */
.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.read-more:hover {
    color: var(--text-color);
}

/* No Posts Message */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 16px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Page Numbers Container */
.page-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.page-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.page-btn.active {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

/* ============================================
   FOOTER STYLING
   ============================================ */

#site-footer {
    background: var(--bg-color);
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.social-icons {
    display: flex;
    gap: 20px;
    list-style: none;
    justify-content: flex-end;
}

.social-icons li {
    display: inline-block;
}

.social-icons a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-size: 16px;
}

.social-icons a:hover {
    opacity: 0.8;
}

#copyright {
    color: var(--text-color);
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
}

/* ============================================
   BLOG POST PAGE STYLING (articles/postN.html)
   ============================================ */

/* Post Page Header */
#post-header {
    background: var(--bg-color);
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-logo {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.post-logo:hover {
    opacity: 0.8;
}

/* Main Post Container */
.post-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 20px;
}

.post-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 40px;
}

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

.post-header {
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 24px;
}

.post-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.post-logo-top {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.post-logo-top:hover {
    opacity: 0.7;
}

.logo-img-top {
    height: 42px;
    width: auto;
}

.back-to-blog-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    letter-spacing: 0.3px;
}

.back-to-blog-top:hover {
    color: var(--text-color);
}

.post-category {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-color);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    border-radius: 3px;
    text-transform: capitalize;
    font-family: 'Open Sans', sans-serif;
    letter-spacing: 0.5px;
}

/* Category color variations */
.post-category.code {
    background: #e3f2fd;
    color: #1976d2;
}

.post-category.book {
    background: #f3e5f5;
    color: #7b1fa2;
}

.post-category.life {
    background: #e8f5e9;
    color: #388e3c;
}

.post-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-color);
    margin: 12px 0;
    line-height: 1.3;
    font-family: 'Open Sans', sans-serif;
}

.post-date {
    font-size: 14px;
    color: #999;
    font-family: 'Open Sans', sans-serif;
    margin: 12px 0 0 0;
}

.opening-quote {
    margin: 24px auto 16px auto;
    max-width: 760px;
    text-align: center;
    font-size: 19px;
    line-height: 1.7;
    color: #1d1d1d;
    font-style: italic;
    font-weight: 600;
}

.quote-image-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 10px 0;
}

.quote-image {
    max-width: 420px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ============================================
   FEATURED IMAGE
   ============================================ */

.post-hero {
    width: 100%;
    height: auto;
    background: var(--light-bg);
    margin: 32px 0;
    border-radius: 6px;
    overflow: visible;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.hero-image.rotate-left {
    width: auto;
    max-width: none;
    height: 210px;
    max-height: 210px;
    transform: rotate(-90deg) scale(1.45);
    transform-origin: center;
}

.post-hero.compact-hero {
    max-width: 520px;
    height: 260px;
    margin: 32px auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.post-hero:not(.compact-hero):not(:has(img[src*="placeholder"])) {
    border: none;
}

/* ============================================
   POST BODY CONTENT
   ============================================ */

.post-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
}

.post-body p {
    margin: 20px 0;
    line-height: 1.8;
    text-align: justify;
}

/* Headings */
.post-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 36px 0 16px 0;
    line-height: 1.3;
}

.post-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin: 28px 0 12px 0;
    line-height: 1.3;
}

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

.shlok-block {
    margin: 26px auto;
    max-width: 680px;
    padding: 18px 20px;
    background: #f9f5e8;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
}

.shlok-block p {
    margin: 6px 0;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.7;
}

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

.post-body li {
    margin: 8px 0;
    line-height: 1.8;
}

.post-body ul li {
    list-style-type: disc;
}

.post-body ol li {
    list-style-type: decimal;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

.post-body pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 18px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
}

.post-body code {
    font-family: 'Courier New', monospace;
}

.post-body .code-block {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Inline code (not in pre tags) */
.post-body p code,
.post-body li code {
    background: var(--light-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
    color: var(--text-color);
}

/* ============================================
   POST NAVIGATION
   ============================================ */

.post-navigation {
    display: none;
}

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

/* Tablet (992px and below) */
@media (max-width: 991px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .blog-card-image-wrapper {
        height: 200px;
    }

    .blog-quote {
        font-size: 24px;
    }

    .filter-nav {
        justify-content: flex-start;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .post-page {
        padding: 32px 16px;
    }

    .post-container {
        padding: 28px;
    }

    .post-title {
        font-size: 28px;
    }

    .post-body h2 {
        font-size: 24px;
    }

    .opening-quote {
        font-size: 17px;
    }

    .quote-image {
        max-width: 320px;
    }

    .shlok-block p {
        font-size: 20px;
    }

    .post-body h3 {
        font-size: 20px;
    }

    .post-hero {
        height: auto;
    }

    .post-hero.compact-hero {
        max-width: 460px;
        height: 240px;
    }

    .hero-image.rotate-left {
        height: 190px;
        max-height: 190px;
        transform: rotate(-90deg) scale(1.4);
    }

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

    .back-to-blog-top {
        font-size: 12px;
        margin-top: 8px;
    }

    .post-body pre {
        padding: 12px;
        font-size: 12px;
    }

    .social-icons {
        justify-content: center;
        margin-top: 20px;
    }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .blog-card-image-wrapper {
        height: 180px;
    }

    #blog-header {
        padding: 40px 16px;
    }

    .blog-quote {
        font-size: 20px;
    }

    .logo-img {
        height: 50px;
    }

    .blog-page {
        padding: 24px 16px;
    }

    .blog-card h3 {
        font-size: 18px;
    }

    .filter-nav {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .pagination {
        flex-direction: column;
        gap: 12px;
    }

    .page-numbers {
        width: 100%;
    }

    .social-icons {
        justify-content: center;
        margin-top: 20px;
    }

    #post-header {
        padding: 20px 16px;
    }

    .post-page {
        padding: 24px 12px;
    }

    .post-container {
        padding: 20px;
        border: none;
        box-shadow: none;
    }

    .post-title {
        font-size: 24px;
    }

    .post-body {
        font-size: 15px;
    }

    .post-body h2 {
        font-size: 22px;
        margin: 28px 0 12px 0;
    }

    .post-body h3 {
        font-size: 18px;
        margin: 20px 0 10px 0;
    }

    .opening-quote {
        font-size: 16px;
        margin-top: 18px;
    }

    .quote-image {
        max-width: 260px;
    }

    .shlok-block {
        padding: 14px 14px;
    }

    .shlok-block p {
        font-size: 18px;
    }

    .post-hero {
        height: auto;
        margin: 20px 0;
    }

    .post-hero.compact-hero {
        max-width: 100%;
        height: 210px;
        margin: 20px auto;
        padding: 14px;
        border-radius: 10px;
    }

    .hero-image.rotate-left {
        height: 165px;
        max-height: 165px;
        transform: rotate(-90deg) scale(1.35);
    }

    .post-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .logo-img-top {
        height: 36px;
    }

    .back-to-blog-top {
        font-size: 11px;
    }

    .post-body p {
        margin: 16px 0;
    }

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

    .post-navigation {
        margin-top: 32px;
    }

    #copyright {
        width: 100%;
        text-align: center;
        margin-bottom: 16px;
    }
}

/* Color variables for code blocks */
:root {
    --code-bg: #121212;
    --code-text: #e0e0e0;
}

