/* ===== WEBTONE TECH BLOG STYLESHEET ===== */
:root {
    --blog-primary: #267BFF;
    --blog-dark: #111827;
    --blog-gray: #4B5563;
    --blog-light: #F9FAFB;
    --blog-border: #E5E7EB;
    --blog-blue-soft: rgba(38, 123, 255, 0.08);
}

/* ===== Glass Background Navbar ===== */
.glass-bg {
    background: rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    width: 100%;
    height: 84px;
    padding: 0 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-logo {
    width: 177px;
    height: 37px;
}

.nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-links {
    width: 486px;
    height: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #000;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    padding: 8px 16px;
    line-height: 1.5;
    border: 2px solid transparent;
}

.nav-links a:hover {
    border-color: white;
}

/* Reset 4th child (Portfolio) which is highlighted in portfolio.css */
.nav-links a:nth-child(4) {
    background: none;
    color: #000;
    border: 2px solid transparent;
}

.nav-links a:nth-child(4):hover {
    border-color: white;
}

/* 5th Link Special (Blog Active State) */
.nav-links a:nth-child(5) {
    background: #267BFF;
    color: white;
    border: none;
}

/* ===== Hamburger Icon ===== */
.nav-icon {
    width: 24px;
    height: 24px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    cursor: pointer;
}

.nav-icon span {
    display: flex;
    width: 100%;
    height: 3px;
    background-color: #111827;
    border-radius: 3px;
    transition: 0.4s ease;
    margin-bottom: 5px;
    position: relative;
    z-index: 1001;
}

/* ==== Cross animation ==== */
.nav-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-icon.active span:nth-child(2) {
    opacity: 0;
}

.nav-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    top: 46px;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.5s ease, transform 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    max-height: 300px;
    transform: translateY(0);
}

.mobile-menu a {
    padding: 14px;
    color: #000;
    border-radius: 8px;
}

/* Highlight the 5th child (Blog) in mobile menu */
.mobile-menu a:nth-child(5) {
    background: #267BFF;
    color: white;
}

/* ===== Responsive navbar ===== */
@media (max-width: 1024px) {
    .navbar {
        height: 56px;
        padding: 0 30px;
    }

    .nav-logo {
        width: 115px;
        height: 24px;
    }

    .nav-links {
        display: none;
    }

    .nav-icon {
        display: block;
    }
}

/* Base resets & layouts */
.blog-section {
    padding: 0 100px 80px 100px;
    position: relative;
    z-index: 10;
}

@media (max-width: 720px) {
    .blog-section {
        padding: 100px 20px 40px 20px;
    }
}

/* Search Bar */
.blog-search-container {
    max-width: 600px;
    margin: 40px auto 20px auto;
    position: relative;
}

.blog-search-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    padding: 16px 24px 16px 54px;
    font-size: 1.05rem;
    color: var(--blog-dark);
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.blog-search-bar:focus {
    border-color: var(--blog-primary);
    box-shadow: 0 8px 25px rgba(38, 123, 255, 0.12);
    background: #FFFFFF;
}

.blog-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
    color: var(--blog-gray);
    pointer-events: none;
    transition: color 0.3s;
}

.blog-search-bar:focus + .blog-search-icon {
    color: var(--blog-primary);
}

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Blog Cards */
.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card {
    background: #FFFFFF;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(38, 123, 255, 0.25);
}

.blog-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #F3F4F6;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.blog-card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--blog-dark);
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
    color: var(--blog-primary);
}

.blog-card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--blog-gray);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination Control */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 60px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blog-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
    background: #FFFFFF;
    transform: translateY(-2px);
}

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

.pagination-info {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blog-dark);
}

/* Loading Skeleton Shimmer Animation */
.shimmer-card {
    background: #FFFFFF;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.shimmer-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

.shimmer-body {
    padding: 28px;
}

.shimmer-line {
    height: 18px;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.shimmer-line.title {
    width: 85%;
    height: 24px;
    margin-bottom: 20px;
}

.shimmer-line.desc-1 { width: 100%; }
.shimmer-line.desc-2 { width: 95%; }
.shimmer-line.desc-3 { width: 75%; }

@keyframes loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* No Results State */
.no-results-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    border: 2px dashed var(--blog-border);
    backdrop-filter: blur(8px);
}

.no-results-box i {
    font-size: 3rem;
    color: var(--blog-gray);
    margin-bottom: 16px;
    display: block;
}

.no-results-box h3 {
    font-size: 1.5rem;
    color: var(--blog-dark);
    margin-bottom: 8px;
}

.no-results-box p {
    color: var(--blog-gray);
    margin-bottom: 0;
}


/* ======================================================== */
/* ===== SINGLE POST DETAIL PAGES ===== */
/* ======================================================== */
.post-detail-section {
    padding: 20px 100px 100px 100px;
    color: var(--blog-dark);
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .post-detail-section {
        padding: 20px 20px 60px 20px;
    }
}

.post-meta-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0 32px 0;
    color: var(--blog-gray);
    font-size: 1rem;
    font-weight: 500;
}

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

.post-meta-divider {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blog-border);
}

.post-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Featured Cover */
.post-hero-wrap {
    max-width: 1000px;
    margin: 0 auto 48px auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    aspect-ratio: 21 / 9;
    background: #F3F4F6;
}

@media (max-width: 768px) {
    .post-hero-wrap {
        aspect-ratio: 16 / 9;
        margin-bottom: 32px;
    }
}

.post-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Container Layout */
.post-layout-container {
    max-width: 800px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 56px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
    .post-layout-container {
        padding: 24px;
    }
}

/* Rich text container elements */
.post-rich-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

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

.post-rich-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-top: 48px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-rich-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-rich-content ul,
.post-rich-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-rich-content li {
    margin-bottom: 8px;
}

.post-rich-content blockquote {
    border-left: 4px solid var(--blog-primary);
    padding: 12px 24px;
    background: var(--blog-blue-soft);
    font-style: italic;
    color: var(--blog-dark);
    border-radius: 0 8px 8px 0;
    margin: 32px 0;
}

.post-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 32px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.post-rich-content pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 24px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 32px 0;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.95rem;
}

/* Related Posts Section */
.related-posts-section {
    max-width: 1200px;
    margin: 80px auto 0 auto;
    border-top: 2px solid var(--blog-border);
    padding-top: 60px;
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blog-dark);
    text-align: center;
    margin-bottom: 40px;
}
