/* ============================================================
   BLOG — REVAMP STYLES
   Animated hero + topics strip + reading-progress + reveal
   AI Aurora palette
   ============================================================ */

/* Reading progress bar */
.blog-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 9999;
    background: linear-gradient(90deg, #6cf, #a78bff, #ff8ad4);
    box-shadow: 0 0 14px rgba(167, 139, 255, 0.7);
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ============================================================
   ANIMATED HERO
   ============================================================ */
body.blog-page-body .service-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 18% 30%, rgba(80, 150, 255, 0.32) 0%, transparent 55%),
        radial-gradient(ellipse at 82% 70%, rgba(167, 139, 255, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 138, 212, 0.16) 0%, transparent 60%),
        linear-gradient(180deg, #050a20 0%, #0a1530 50%, #060d24 100%);
}
body.blog-page-body .service-hero .service-hero-bg img { display: none !important; }
body.blog-page-body .service-hero .service-hero-overlay { background: transparent !important; }

.blog-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.blog-hero-orbit {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.blog-hero-orbit__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(120, 200, 255, 0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: blogRingSpin 60s linear infinite;
}
.blog-hero-orbit__ring--1 { width: 700px; height: 700px; }
.blog-hero-orbit__ring--2 { width: 1000px; height: 1000px; animation-duration: 90s; animation-direction: reverse; opacity: 0.6; }
.blog-hero-orbit__ring--3 { width: 1300px; height: 1300px; animation-duration: 120s; opacity: 0.4; }
@keyframes blogRingSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.blog-hero-chips {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}
.blog-hero-chip {
    position: absolute;
    padding: 8px 14px;
    background: linear-gradient(165deg, rgba(80, 150, 255, 0.18), rgba(20, 40, 90, 0.5));
    border: 1px solid rgba(120, 200, 255, 0.4);
    color: #cfe6ff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(80, 150, 255, 0.25);
    animation: blogChipFloat 8s ease-in-out infinite;
    white-space: nowrap;
}
.blog-hero-chip::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #6cf;
    margin-right: 8px;
    box-shadow: 0 0 8px #6cf;
    vertical-align: middle;
}
.blog-hero-chip:nth-child(1) { top: 14%; left: 5%; animation-delay: 0s; }
.blog-hero-chip:nth-child(2) { top: 22%; right: 7%; animation-delay: -1.5s; }
.blog-hero-chip:nth-child(3) { top: 64%; left: 8%; animation-delay: -3s; }
.blog-hero-chip:nth-child(4) { top: 75%; right: 10%; animation-delay: -4.5s; }
.blog-hero-chip:nth-child(5) { top: 38%; left: 3%; animation-delay: -6s; }
.blog-hero-chip:nth-child(6) { top: 50%; right: 4%; animation-delay: -7.5s; }
.blog-hero-chip:nth-child(2n)::before { background: #a78bff; box-shadow: 0 0 8px #a78bff; }
.blog-hero-chip:nth-child(3n)::before { background: #ff8ad4; box-shadow: 0 0 8px #ff8ad4; }
.blog-hero-chip:nth-child(5n)::before { background: #4fffb0; box-shadow: 0 0 8px #4fffb0; }
@keyframes blogChipFloat {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-14px); }
}

body.blog-page-body .service-hero-content { position: relative; z-index: 5; }
body.blog-page-body .service-hero-content h1 {
    background: linear-gradient(135deg, #ffffff 0%, #6cf 35%, #a78bff 65%, #ff8ad4 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: blogTitleShimmer 7s ease-in-out infinite;
}
@keyframes blogTitleShimmer {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(108, 204, 255, 0.15);
    border: 1px solid rgba(108, 204, 255, 0.4);
    color: #cfe6ff;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.blog-hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4fffb0;
    box-shadow: 0 0 10px #4fffb0;
    animation: blogPulse 1.4s ease-in-out infinite;
}
@keyframes blogPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%     { opacity: 0.4; transform: scale(0.7); }
}

/* ============================================================
   TOPICS STRIP
   ============================================================ */
.blog-topics {
    padding: 50px 0 20px;
    background: linear-gradient(180deg, #060d24 0%, #08122a 100%);
    position: relative;
    overflow: hidden;
}
.blog-topics::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 200, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 200, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
    pointer-events: none;
}
.blog-topics__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    position: relative;
    z-index: 1;
}
.blog-topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: linear-gradient(165deg, rgba(80, 150, 255, 0.08), rgba(20, 40, 90, 0.3));
    border: 1px solid rgba(120, 200, 255, 0.18);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    color: #cfe6ff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}
.blog-topic:hover {
    transform: translateY(-4px);
    border-color: rgba(120, 200, 255, 0.55);
    box-shadow: 0 14px 36px rgba(80, 150, 255, 0.3);
}
.blog-topic.is-active {
    background: linear-gradient(165deg, rgba(108, 204, 255, 0.18), rgba(167, 139, 255, 0.12));
    border-color: rgba(108, 204, 255, 0.55);
    box-shadow: 0 14px 36px rgba(108, 204, 255, 0.32);
}
.blog-topic__icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(108, 204, 255, 0.4));
}
.blog-topic__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}
.blog-topic__count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(200, 220, 255, 0.6);
    padding: 2px 9px;
    border-radius: 100px;
    background: rgba(108, 204, 255, 0.12);
    border: 1px solid rgba(108, 204, 255, 0.25);
}
.blog-topic.is-active .blog-topic__count {
    background: rgba(108, 204, 255, 0.25);
    color: #6cf;
}
.blog-topic:nth-child(2) .blog-topic__icon { filter: drop-shadow(0 4px 12px rgba(167, 139, 255, 0.5)); }
.blog-topic:nth-child(3) .blog-topic__icon { filter: drop-shadow(0 4px 12px rgba(255, 138, 212, 0.5)); }
.blog-topic:nth-child(4) .blog-topic__icon { filter: drop-shadow(0 4px 12px rgba(79, 255, 176, 0.5)); }
.blog-topic:nth-child(5) .blog-topic__icon { filter: drop-shadow(0 4px 12px rgba(255, 200, 87, 0.5)); }
.blog-topic:nth-child(6) .blog-topic__icon { filter: drop-shadow(0 4px 12px rgba(167, 139, 255, 0.5)); }

/* ============================================================
   ENHANCED CARD ENTRANCE / HOVER
   ============================================================ */
body.blog-page-body .insights-section {
    background: linear-gradient(180deg, #08122a 0%, #060d24 50%, #08122a 100%);
}

body.blog-page-body .glass-card {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s, border-color 0.4s;
}
body.blog-page-body .glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 64px rgba(80, 150, 255, 0.28);
    border-color: rgba(120, 200, 255, 0.5);
}
body.blog-page-body .glass-card .blog-card-img img,
body.blog-page-body .glass-card .blog-featured-img img {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.blog-page-body .glass-card:hover .blog-card-img img,
body.blog-page-body .glass-card:hover .blog-featured-img img {
    transform: scale(1.06);
}
body.blog-page-body .blog-read-more {
    position: relative;
    transition: color 0.2s, gap 0.2s;
}
body.blog-page-body .blog-read-more:hover {
    color: #6cf;
    letter-spacing: 0.4px;
}

/* Reveal */
body.blog-page-body .blog-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.blog-page-body .blog-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   NEWSLETTER (aurora upgrade)
   ============================================================ */
body.blog-page-body .blog-newsletter {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(80, 150, 255, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 50%, rgba(167, 139, 255, 0.24) 0%, transparent 55%),
        linear-gradient(180deg, #060d24 0%, #08122a 100%);
}
body.blog-page-body .blog-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 200, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 200, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
    pointer-events: none;
}
body.blog-page-body .blog-newsletter .container { position: relative; z-index: 1; }
body.blog-page-body .blog-newsletter h2 {
    background: linear-gradient(135deg, #ffffff, #6cf, #a78bff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: blogTitleShimmer 7s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .blog-topics__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .blog-topics__grid { grid-template-columns: repeat(2, 1fr); }
    .blog-hero-chip { display: none; }
    .blog-hero-chip:nth-child(1), .blog-hero-chip:nth-child(4) { display: block; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-hero-orbit__ring,
    .blog-hero-chip,
    body.blog-page-body .service-hero-content h1,
    body.blog-page-body .blog-newsletter h2,
    .blog-hero-eyebrow::before {
        animation: none !important;
    }
    body.blog-page-body .blog-reveal {
        opacity: 1;
        transform: none;
    }
}
