/* ==============================
   BLOG — Styles for blog.html & blog-post.html
   Uses CSS variables from kaizora.css
============================== */

/* ==============================
   BLOG HERO
============================== */
.blog-hero {
    padding-top: 180px;
    padding-bottom: 100px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Match the sitewide hero H1 spec: clamp(3.5rem, 7vw, 6rem) */
.blog-hero h1 {
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 600;
    line-height: 1.0;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
    text-align: left;
}

.blog-hero .hero-vision {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--color-text-body);
    max-width: 540px;
    line-height: 1.6;
    margin-top: 1.25rem;
    letter-spacing: -0.01em;
}

/* ==============================
   BLOG GRID
============================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.blog-section {
    padding: 4rem 0 8rem;
}

/* ==============================
   BLOG CARD
============================== */
.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-navy);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.blog-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.blog-card:hover::before {
    transform: scaleY(1);
}

.blog-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ==============================
   BLOG CARD THUMBNAIL — Base
============================== */
.blog-card-thumb {
    height: 220px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(2, 91, 188, 0.7);
    border: 1px solid rgba(2, 91, 188, 0.4);
    padding: 0.25rem 0.65rem;
    border-radius: 3px;
    backdrop-filter: blur(4px);
}

/* ==============================
   THUMB 01 — Data Stream / Instagram DM
   Animated diagonal data-stream lines on dark navy
============================== */
.thumb-01 {
    background: #01091A;
}

.thumb-01::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        60deg,
        transparent,
        transparent 18px,
        rgba(2, 91, 188, 0.18) 18px,
        rgba(2, 91, 188, 0.18) 19px,
        transparent 19px,
        transparent 36px,
        rgba(2, 91, 188, 0.08) 36px,
        rgba(2, 91, 188, 0.08) 37px
    );
    animation: dataStream 6s linear infinite;
}

.thumb-01::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80px 60px at 30% 65%, rgba(2, 91, 188, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 40px 30px at 72% 38%, rgba(2, 91, 188, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 60px 45px at 55% 80%, rgba(2, 91, 188, 0.15) 0%, transparent 70%);
    animation: bubblePulse 4s ease-in-out infinite alternate;
}

.thumb-01-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-01-orb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1.5px solid rgba(2, 91, 188, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: orbBreath 3s ease-in-out infinite;
}

.thumb-01-orb::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(2, 91, 188, 0.2);
    animation: orbBreath 3s ease-in-out infinite reverse;
}

.thumb-01-orb::after {
    content: '';
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    border: 1px solid rgba(2, 91, 188, 0.1);
    animation: orbBreath 3s ease-in-out 0.5s infinite;
}

.thumb-01-orb i {
    font-size: 1.4rem;
    color: rgba(2, 91, 188, 0.9);
    position: relative;
    z-index: 1;
}

@keyframes dataStream {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

@keyframes bubblePulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes orbBreath {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ==============================
   THUMB 02 — Radar Pulse / RAG AI Knowledge
   Sonar rings expanding outward from glowing core
============================== */
.thumb-02 {
    background: radial-gradient(ellipse at 50% 55%, #034388 0%, #061635 55%, #01091A 100%);
}

.thumb-02::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(2, 91, 188, 0.04) 1px, transparent 1px),
        radial-gradient(circle, rgba(2, 91, 188, 0.04) 1px, transparent 1px);
    background-size: 28px 28px, 14px 14px;
    background-position: 0 0, 7px 7px;
    opacity: 0.6;
}

.thumb-02-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-core {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 91, 188, 1) 0%, rgba(2, 91, 188, 0.6) 60%, transparent 100%);
    box-shadow: 0 0 20px rgba(2, 91, 188, 0.8), 0 0 40px rgba(2, 91, 188, 0.4);
    animation: coreGlow 2s ease-in-out infinite alternate;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(2, 91, 188, 0.7);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    animation: radarPulse 3s ease-out infinite;
}

.radar-ring:nth-child(1) { width: 60px; height: 60px; animation-delay: 0s; }
.radar-ring:nth-child(2) { width: 100px; height: 100px; animation-delay: 0.6s; }
.radar-ring:nth-child(3) { width: 150px; height: 150px; animation-delay: 1.2s; }
.radar-ring:nth-child(4) { width: 210px; height: 210px; animation-delay: 1.8s; border-color: rgba(2, 91, 188, 0.3); }

@keyframes radarPulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
    80% { opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

@keyframes coreGlow {
    0% { box-shadow: 0 0 16px rgba(2, 91, 188, 0.7), 0 0 32px rgba(2, 91, 188, 0.3); }
    100% { box-shadow: 0 0 28px rgba(2, 91, 188, 1), 0 0 56px rgba(2, 91, 188, 0.6); }
}

/* ==============================
   THUMB 03 — Circuit Split / n8n vs Make
   PCB trace aesthetic with split halves
============================== */
.thumb-03 {
    background: #061635;
    overflow: hidden;
}

.thumb-03::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            rgba(2, 91, 188, 0.12) 28px,
            rgba(2, 91, 188, 0.12) 29px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 28px,
            rgba(2, 91, 188, 0.12) 28px,
            rgba(2, 91, 188, 0.12) 29px
        );
}

.thumb-03::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, rgba(2, 91, 188, 0.8) 30%, rgba(2, 91, 188, 1) 50%, rgba(2, 91, 188, 0.8) 70%, transparent 100%);
    animation: splitLineSweep 4s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(2, 91, 188, 0.6);
}

.thumb-03-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.thumb-03-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.thumb-03-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

.thumb-03-label.left {
    color: rgba(2, 91, 188, 0.95);
    background: rgba(2, 91, 188, 0.12);
    border: 1px solid rgba(2, 91, 188, 0.3);
}

.thumb-03-label.right {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.thumb-03-node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(2, 91, 188, 0.7);
    box-shadow: 0 0 6px rgba(2, 91, 188, 0.5);
    animation: nodeFlash 3s ease-in-out infinite;
}

.thumb-03-node:nth-child(2) { top: 25%; left: 22%; animation-delay: 0.4s; }
.thumb-03-node:nth-child(3) { top: 65%; left: 30%; animation-delay: 1.1s; }
.thumb-03-node:nth-child(4) { top: 40%; right: 22%; animation-delay: 0.7s; }
.thumb-03-node:nth-child(5) { top: 75%; right: 30%; animation-delay: 1.6s; }
.thumb-03-node:nth-child(6) { top: 15%; right: 15%; animation-delay: 2s; }

@keyframes splitLineSweep {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 8px rgba(2, 91, 188, 0.5); }
    50% { opacity: 1; box-shadow: 0 0 16px rgba(2, 91, 188, 0.9); }
}

@keyframes nodeFlash {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.6); }
}

/* ==============================
   THUMB 04 — Ocean Depth / Maldives
   Layered horizontal depth bands + wave morph + stars
============================== */
.thumb-04 {
    background: linear-gradient(
        180deg,
        #01091A 0%,
        #011530 25%,
        #011d40 50%,
        #01264f 70%,
        #023770 90%,
        #025BBC 100%
    );
    overflow: hidden;
}

.thumb-04::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 1.5px at 15% 20%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(circle 1px at 28% 12%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(circle 2px at 42% 8%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(circle 1px at 58% 22%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 72% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(circle 1px at 85% 9%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(circle 2px at 8% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(circle 1px at 92% 28%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 50% 5%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(circle 1px at 35% 35%, rgba(255,255,255,0.2) 0%, transparent 100%);
    animation: starTwinkle 5s ease-in-out infinite alternate;
}

.thumb-04::after {
    content: 'MV';
    position: absolute;
    bottom: -0.1em;
    right: -0.05em;
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: rgba(2, 91, 188, 0.08);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.thumb-04-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    overflow: hidden;
}

.thumb-04-wave svg {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    animation: waveDrift 8s linear infinite;
}

.thumb-04-wave svg:nth-child(2) {
    opacity: 0.5;
    animation: waveDrift 12s linear infinite reverse;
    bottom: 8px;
}

@keyframes waveDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes starTwinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* ==============================
   BLOG CARD BODY
============================== */
.blog-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

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

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-body);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(6, 22, 53, 0.35);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-card-meta i {
    font-size: 0.65rem;
}

/* ==============================
   ARTICLE HERO (blog-post.html)
============================== */
.article-hero {
    padding-top: 180px;
    padding-bottom: 100px;
    background: var(--color-navy);
    position: relative;
    overflow: hidden;
}

/* Animated mesh gradient background */
.article-hero::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(2, 91, 188, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(3, 67, 136, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 60% 20%, rgba(2, 91, 188, 0.2) 0%, transparent 60%);
    animation: meshDrift 12s ease-in-out infinite alternate;
}

/* Large decorative ring */
.article-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(2, 91, 188, 0.15);
    top: -120px;
    right: -120px;
    animation: ringRotate 25s linear infinite;
}

@keyframes meshDrift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(3%, 2%) rotate(3deg); }
}

@keyframes ringRotate {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1.05); }
}

.article-hero .container {
    position: relative;
    z-index: 2;
    max-width: 860px;
}

.article-category {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(2, 91, 188, 0.9);
    background: rgba(2, 91, 188, 0.12);
    border: 1px solid rgba(2, 91, 188, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1.5rem;
}

.article-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.article-hero-sub {
    font-size: clamp(1rem, 1.3vw, 1.1rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    max-width: 680px;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.article-meta-item i {
    font-size: 0.7rem;
    color: rgba(2, 91, 188, 0.8);
}

/* ==============================
   ARTICLE BODY
============================== */
.article-body-section {
    background: #fff;
    padding: 6rem 0 8rem;
}

.article-body {
    max-width: 680px;
}

.article-body h2 {
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-top: 3.5rem;
    margin-bottom: 1rem;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body p {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    letter-spacing: -0.005em;
}

.article-body ul, .article-body ol {
    margin: 1rem 0 1.5rem 1.25rem;
}

.article-body li {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.article-body strong {
    color: var(--color-navy);
    font-weight: 600;
}

/* Answer Block — highlighted definition/answer */
.answer-block {
    border-left: 3px solid #025BBC;
    background: rgba(2, 91, 188, 0.05);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 6px 6px 0;
}

.answer-block p {
    margin: 0;
    font-size: 0.975rem;
    color: var(--color-navy);
    line-height: 1.7;
    font-weight: 400;
}

/* ==============================
   ARTICLE CTA
============================== */
.article-cta {
    background: var(--color-navy);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.article-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(2, 91, 188, 0.25) 0%, transparent 60%);
    pointer-events: none;
}

.article-cta .container {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.article-cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.article-cta p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ==============================
   RELATED ARTICLES
============================== */
.related-articles {
    background: var(--color-light-gray);
    padding: 6rem 0;
}

.related-articles h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.025em;
    margin-bottom: 3rem;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@media (max-width: 600px) {
    .blog-hero {
        padding-top: 140px;
        padding-bottom: 60px;
    }

    .blog-card-thumb {
        height: 180px;
    }

    .blog-card-body {
        padding: 1.5rem;
    }

    .article-hero {
        padding-top: 140px;
        padding-bottom: 70px;
    }

    .article-body-section {
        padding: 4rem 0 5rem;
    }

    .article-cta {
        padding: 4rem 0;
    }
}
