/* ============================================
   Blog CSS - Premium Modern Design v3
   NexaWeb Blog - 2026
============================================ */

/* ---- Blog Hero Section ---- */
.blog-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,215,0,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(0,119,182,0.08) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.blog-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0;
}

/* ---- Category Filter Chips ---- */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.filter-chip {
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-chip:hover, .filter-chip.active {
    background: #FFD700;
    color: #1a1a2e;
    border-color: #FFD700;
}

/* ---- Blog Main ---- */
.blog-main {
    padding: 60px 20px 80px;
    min-height: 60vh;
    background: #f5f7fa;
}

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

.blog-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.blog-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* ---- Featured Post (first post) ---- */
.blog-featured {
    margin-bottom: 50px;
}

.blog-featured .blog-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-radius: 20px;
    overflow: hidden;
    min-height: 380px;
}

.blog-featured .blog-card-visual {
    min-height: 380px;
}

.blog-featured .blog-card-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured .blog-card-title {
    font-size: 1.7rem;
    margin-bottom: 16px;
}

.blog-featured .blog-card-excerpt {
    font-size: 1.05rem;
    -webkit-line-clamp: 4;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    width: fit-content;
}

/* ---- Section Title ---- */
.blog-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #e0e0e0, transparent);
}

/* ---- Blog Grid ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ---- Blog Card ---- */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1), box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* Card Visual - CSS gradient placeholder instead of broken images */
.blog-card-visual {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-visual .card-icon {
    font-size: 3.5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.blog-card-visual .card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.3) 0%, transparent 50%);
}

/* Category-specific gradient backgrounds */
.blog-card-visual.cat-guides {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-visual.cat-deals {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-card-visual.cat-reviews {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-card-visual.cat-tech {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.blog-card-visual.cat-default {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.blog-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}

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

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: #999;
}

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

.blog-date i {
    margin-right: 2px;
    font-size: 0.8rem;
}

.blog-category {
    background: #e8f4f8;
    color: #0077b6;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-category.cat-deals {
    background: #ffeef0;
    color: #e53e3e;
}

.blog-category.cat-reviews {
    background: #e8f8f0;
    color: #38a169;
}

.blog-category.cat-tech {
    background: #edf7ee;
    color: #2d8a3e;
}

.blog-card-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.45;
    font-weight: 700;
}

.blog-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: #0077b6;
}

.blog-card-excerpt {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0077b6;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.3s ease, color 0.2s ease;
    margin-top: auto;
}

.blog-read-more:hover {
    gap: 14px;
    color: #005f8a;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 20px;
    color: #666;
}

.no-posts i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

/* ============================================
   Single Blog Post Page
============================================ */

/* Post Hero Banner */
.post-hero {
    padding: 130px 20px 60px;
    position: relative;
    overflow: hidden;
}

.post-hero.cat-guides {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-hero.cat-deals {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.post-hero.cat-reviews {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.post-hero.cat-tech {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.post-hero.cat-default {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.post-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
}

.post-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.post-hero .post-category {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,0.25);
}

.post-hero .post-title {
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.post-hero .post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.post-hero .post-meta i {
    margin-right: 6px;
}

/* Post Body */
.post-main {
    padding: 0 20px 80px;
    background: #f5f7fa;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 50px 60px 60px;
    margin-top: -40px;
    position: relative;
    z-index: 3;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

.post-header {
    margin-bottom: 40px;
}

.post-category {
    display: inline-block;
    background: #0077b6;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #1a1a2e;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #888;
    font-size: 0.9rem;
}

.post-featured-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 40px;
    display: none; /* Hidden by default - shown only when loaded */
}

.post-featured-image.loaded {
    display: block;
}

/* Post Content Typography */
.post-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #3a3a4a;
}

.post-content h2 {
    font-size: 1.7rem;
    margin: 48px 0 20px;
    color: #1a1a2e;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.post-content h3 {
    font-size: 1.3rem;
    margin: 32px 0 14px;
    color: #1a1a2e;
    font-weight: 600;
}

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

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.post-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
}

.post-content ol {
    counter-reset: list-counter;
    padding-left: 0;
}

.post-content ol li {
    counter-increment: list-counter;
    position: relative;
    padding-left: 36px;
    margin-bottom: 12px;
}

.post-content ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-content a {
    color: #0077b6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,119,182,0.3);
    transition: border-color 0.2s ease;
}

.post-content a:hover {
    border-color: #0077b6;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}

.post-content strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Button styles inside blog content */
.post-content .btn,
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: white !important;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-bottom: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,119,182,0.3);
}

.post-content .btn:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,119,182,0.4);
    border-bottom: none !important;
}

.btn-deal {
    background: linear-gradient(135deg, #e53e3e, #f56565) !important;
    box-shadow: 0 4px 15px rgba(229,62,62,0.3) !important;
}

.btn-deal:hover {
    box-shadow: 0 6px 20px rgba(229,62,62,0.4) !important;
}

/* Deal Card styling in blog content */
.deal-card {
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 20px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #e53e3e;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.deal-card h3 {
    font-size: 1.1rem !important;
    margin: 0 0 10px 0 !important;
    color: #1a1a2e;
}

.deal-card p {
    margin-bottom: 8px !important;
}

/* Product Box in Blog */
.product-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    border: 1px solid #eee;
}

.product-box img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 10px;
}

.product-box-content {
    flex: 1;
}

.product-box-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-box-price {
    font-size: 1.3rem;
    color: #0077b6;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-box-btn {
    display: inline-block;
    background: #0077b6;
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.product-box-btn:hover {
    background: #005f8a;
}

/* Share Sidebar */
.post-share {
    display: flex;
    gap: 12px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    flex-wrap: wrap;
    align-items: center;
}

.post-share span {
    font-weight: 600;
    color: #1a1a2e;
    margin-right: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.back-to-blog:hover {
    color: #fff;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.related-posts h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 700;
    color: #1a1a2e;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.related-card {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eee;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    background: #fff;
}

.related-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.related-card h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1a1a2e;
    font-weight: 600;
}

.related-card .blog-date {
    font-size: 0.8rem;
    color: #999;
}

/* CTA Newsletter Box */
.blog-cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.blog-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,215,0,0.1) 0%, transparent 50%);
}

.blog-cta h3 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.blog-cta p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.blog-cta .btn {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1a1a2e !important;
    font-size: 1rem;
    padding: 14px 36px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 1024px) {
    .blog-featured .blog-card {
        grid-template-columns: 1fr;
    }
    
    .blog-featured .blog-card-visual {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 16px 50px;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-main {
        padding: 40px 16px 60px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-visual {
        height: 180px;
    }
    
    /* Post page */
    .post-hero {
        padding: 100px 16px 40px;
    }
    
    .post-hero .post-title {
        font-size: 1.8rem;
    }
    
    .post-container {
        padding: 30px 20px 40px;
        margin-top: -24px;
        border-radius: 16px;
    }
    
    .post-content h2 {
        font-size: 1.4rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .product-box {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-cta {
        padding: 36px 24px;
    }
    
    .post-share {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.6rem;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .filter-chip {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}
