/* ===== BLOG HERO ===== */
.blog-hero {
    height: 50vh;
    min-height: 300px;
    background-image: url('/static/images/pl.jpg'); /* reuse existing image or add a dedicated one */
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 0; /* navbar is fixed, so hero starts below it */
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-content {
    text-align: center;
    padding: 0 20px;
}

.blog-hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    line-height: 1.2;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== BLOG CONTAINER & GRID ===== */
.blog-container {
    padding: 60px 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ===== BLOG CARD ===== */
.blog-card {
    background: var(--dark-light);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

/* Thumbnail area */
.card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* consistent rectangle */
    overflow: hidden;
    background-color: #1a1a1a;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

/* Overlays */
.thumbnail-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.thumbnail-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(201, 162, 39, 0.9);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 20px;
    border-radius: 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(2px);
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Card text content */
.card-content {
    padding: 25px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-title a {
    color: var(--white);
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary);
}

.card-meta {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.card-readmore {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.card-readmore:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

/* ===== PAGINATION ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #333;
    color: var(--gray);
    font-weight: 600;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.page-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

.page-number:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.next-link {
    color: var(--primary);
    font-weight: 600;
    margin-left: 10px;
    transition: color 0.2s;
    text-decoration: none;
}

.next-link:hover {
    color: var(--primary-light);
}

/* ===== FLOATING CONTACT WIDGET (QR + CHAT) ===== */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1002; /* above the green whatsapp button (z-index 1000) and sticky CTA (1000) */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none; /* allows clicking through container, but children are clickable */
}

.qr-card {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 2px solid var(--primary);
    pointer-events: auto; /* make QR clickable if needed (could wrap in link) */
    transition: transform 0.3s;
}

.qr-card:hover {
    transform: scale(1.05);
}

.qr-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chat-button {
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    pointer-events: auto;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid white;
    font-size: 1rem;
}

.chat-button i {
    font-size: 1.3rem;
}

.chat-button:hover {
    transform: scale(1.05) translateY(-2px);
    background-color: #20b859;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

/* Hide the original green WhatsApp button on this page if desired? 
   We keep both as they serve different purposes, but you can hide the old one by adding: 
   .whatsapp-float { display: none; } 
   However, the prompt didn't specify, so we leave it visible for consistency. */

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .floating-contact {
        bottom: 80px; /* raise above mobile sticky CTA */
        right: 15px;
    }

    .qr-card {
        width: 80px;
        height: 80px;
    }

    .chat-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-pagination {
        gap: 8px;
    }

    .page-number {
        width: 35px;
        height: 35px;
    }
}