/* Blog list page — hero header */

body.page-blog .scroll-progress,
body.page-blog-detail .scroll-progress {
    top: 0;
    background: transparent;
}

body.page-blog .scroll-progress span,
body.page-blog-detail .scroll-progress span {
    box-shadow: none;
}

body.page-blog .navbar,
body.page-blog-detail .navbar {
    top: 0;
}

body.page-blog .whatsapp-float,
body.page-blog-detail .whatsapp-float {
    position: fixed !important;
    left: auto !important;
    top: auto !important;
    width: 52px !important;
    height: 52px !important;
    bottom: calc(22px + 52px + 12px + env(safe-area-inset-bottom, 0px)) !important;
    right: calc(22px + env(safe-area-inset-right, 0px)) !important;
    z-index: 1310 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
}

body.page-blog .whatsapp-float .icons,
body.page-blog-detail .whatsapp-float .icons {
    width: 24px !important;
    height: 24px !important;
}

body.page-blog .back-to-top,
body.page-blog-detail .back-to-top {
    position: fixed !important;
    left: auto !important;
    top: auto !important;
    width: 52px !important;
    height: 52px !important;
    right: calc(22px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1311 !important;
    display: flex !important;
}

body.page-blog .back-to-top.visible,
body.page-blog-detail .back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    body.page-blog .whatsapp-float,
    body.page-blog-detail .whatsapp-float {
        width: 46px !important;
        height: 46px !important;
        bottom: calc(12px + 46px + 10px + env(safe-area-inset-bottom, 0px)) !important;
        right: calc(12px + env(safe-area-inset-right, 0px)) !important;
    }

    body.page-blog .whatsapp-float .icons,
    body.page-blog-detail .whatsapp-float .icons {
        width: 22px !important;
        height: 22px !important;
    }

    body.page-blog .back-to-top,
    body.page-blog-detail .back-to-top {
        width: 46px !important;
        height: 46px !important;
        right: calc(12px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.blog-page-hero {
    padding: 152px 24px 64px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-page-hero .section-container {
    max-width: 820px;
    margin: 0 auto;
}

.blog-page-hero .section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(51, 184, 184, 0.1);
    border: 1px solid rgba(51, 184, 184, 0.22);
    font-size: 11px;
    letter-spacing: 1.4px;
    max-width: 100%;
}

.blog-page-hero .section-title {
    margin-bottom: 20px;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.blog-page-hero .section-desc {
    margin: 0 auto;
    max-width: 680px;
    margin-bottom: 0;
    line-height: 1.75;
    color: var(--muted);
}

.blog-section.section {
    padding-top: 64px;
}

@media (max-width: 768px) {
    .blog-page-hero {
        padding: calc(var(--navbar-height, 64px) + env(safe-area-inset-top, 0px) + 24px) 20px 44px;
        text-align: center;
    }

    .blog-page-hero .section-label {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 18px;
        font-size: 10px;
        letter-spacing: 1.1px;
        padding: 5px 12px;
        line-height: 1.35;
    }

    .blog-page-hero .section-label .icons {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0;
    }

    .blog-page-hero .section-title {
        font-size: clamp(26px, 7.2vw, 34px);
        margin-bottom: 16px;
    }

    .blog-page-hero .section-desc {
        font-size: 15px;
        line-height: 1.7;
        max-width: 100%;
    }

    .blog-section.section {
        padding-top: 48px;
        padding-bottom: 72px;
    }
}

/* Homepage Blog & News — three equal cards */

.blog-section .section-desc {
    max-width: 720px;
}

.blog-grid--home {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
    align-items: stretch;
}

.blog-grid--home .blog-card {
    min-height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.blog-img-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.blog-grid--home .blog-img,
.blog-grid .blog-img {
    position: relative;
    height: 200px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: var(--bg-3, #102034);
    overflow: hidden;
    display: block;
}

.blog-grid--home .blog-img::before,
.blog-grid .blog-img::before {
    display: none;
}

.blog-grid--home .blog-img img,
.blog-grid .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease;
}

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

.blog-meta .blog-category {
    margin-bottom: 0;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted, #97aec2);
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-meta time {
    color: var(--muted-2, #7f95a9);
}

.blog-meta-sep {
    opacity: 0.55;
    user-select: none;
}

.blog-content h3 {
    margin-bottom: 10px;
}

.blog-content h3 a {
    color: var(--white, #fff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-content h3 a:hover {
    color: var(--primary-light, #33b8b8);
}

.blog-grid--home .blog-content h3 {
    font-size: 17px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-grid--home .blog-content p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.blog-section-cta {
    margin-top: 32px;
    text-align: center;
}

.blog-section-cta .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: var(--text, #f4fbff);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.blog-section-cta .btn-secondary:hover {
    background: rgba(0, 153, 153, 0.14);
    border-color: rgba(51, 184, 184, 0.35);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .blog-grid--home {
        gap: 18px;
    }

    .blog-grid--home .blog-img {
        height: 180px;
    }

    .blog-grid--home .blog-content {
        padding: 20px;
    }
}

@media (max-width: 900px) {
    .blog-grid--home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-grid--home .blog-card:last-child {
        grid-column: 1 / -1;
        max-width: 520px;
        justify-self: center;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .blog-grid--home {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 4px 4px 12px;
        margin-top: 28px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .blog-grid--home .blog-card {
        flex: 0 0 min(88vw, 300px);
        scroll-snap-align: start;
        max-width: none;
        grid-column: auto;
    }

    .blog-grid--home .blog-card:last-child {
        max-width: none;
    }

    .blog-grid--home .blog-img {
        height: 160px;
    }
}
