/* =========================================================================
   Shagun Enterprise - Redesigned Blog Page Style Sheet
   ========================================================================= */

:root {
    --transition-premium: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================================
   Hero Section & Background
   ========================================================================= */
.blog-hero-wrap {
    position: relative;
    background: linear-gradient(160deg, #f0f6ff 0%, #e8f0fe 40%, #f5f8ff 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px; /* Offset for header height */
}

/* Floating colored ambient glow orbs (Light Mode) */
.blog-hero-wrap::before {
    content: '';
    position: absolute;
    top: -20%; left: -10%;
    width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
    animation: blogOrbFloat1 30s infinite alternate ease-in-out;
}

.blog-hero-wrap::after {
    content: '';
    position: absolute;
    bottom: -10%; right: -10%;
    width: 55%; height: 55%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
    animation: blogOrbFloat2 25s infinite alternate ease-in-out;
}

@keyframes blogOrbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 60px) scale(1.1); }
}

@keyframes blogOrbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, -60px) scale(0.9); }
}

/* Giant background watermark (Light Mode) */
.blog-hero-watermark {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.75);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 12vw, 15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.09em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #0f172a 30%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 2s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, letter-spacing;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.blog-hero-wrap.is-active .blog-hero-watermark {
    opacity: 0.04;
    letter-spacing: 0.05em;
    transform: translate(-50%, -50%) scale(1);
}

.blog-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 80px;
    align-items: center;
}

.blog-hero-content {
    position: relative;
}

.blog-hero-subtitle {
    display: block;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
}

.blog-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.3rem, 4.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0f172a 40%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero-desc {
    color: #475569;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.6;
    max-width: 680px;
    margin-bottom: 36px;
    font-weight: 500;
}

/* =========================================================================
   Mosaic Showcase Layout (Copied from Gallery/Events)
   ========================================================================= */
.blog-hero-mosaic {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    height: 460px;
    width: 100%;
    z-index: 2;
}

.blog-mosaic-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
    border: 3px solid #ffffff;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s ease;
}

.blog-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-mosaic-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.12);
    z-index: 10 !important;
}

.blog-mosaic-item.item-1 {
    grid-column: 1 / 10;
    grid-row: 1 / 9;
    z-index: 3;
}

.blog-mosaic-item.item-2 {
    grid-column: 4 / 13;
    grid-row: 5 / 13;
    z-index: 2;
}

.blog-mosaic-item.item-3 {
    grid-column: 1 / 6;
    grid-row: 8 / 13;
    z-index: 4;
}

/* =========================================================================
   Metrics Grid (Light Mode Frosted Glass)
   ========================================================================= */
.blog-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin-top: 48px;
}

.blog-metric-card {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: var(--transition-premium);
}

.blog-metric-card:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.blog-metric-val {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
    margin-bottom: 8px;
}

.blog-metric-lbl {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Scroll hint */
.blog-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    user-select: none;
}

.blog-scroll-dot {
    width: 2px;
    height: 18px;
    background: rgba(100, 116, 139, 0.3);
    position: relative;
    border-radius: 1px;
    overflow: hidden;
}

.blog-scroll-dot::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 60%;
    background: #3b82f6;
    animation: scrollDotAnim 1.8s infinite ease-in-out;
}

@keyframes scrollDotAnim {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(180%); }
}

/* =========================================================================
   Filter Section
   ========================================================================= */
.blog-body-sec {
    padding: 80px 0 100px;
    background: #f8fafc;
    min-height: 60vh;
}

.blog-filter-wrap {
    position: sticky;
    top: 80px;
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    padding: 16px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.blog-filter-bar::-webkit-scrollbar {
    display: none;
}

.blog-filter-btn {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #64748b;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-premium);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
}

.blog-filter-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

.blog-filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.blog-results-txt {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
}

/* =========================================================================
   Editorial Grid
   ========================================================================= */
.blog-editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
}

/* Grid Editorial Spanning Logic */
.blog-editorial-grid > * {
    grid-column: span 6; /* Default half width */
}

/* High impact spans for editorial interest */
.blog-editorial-grid > :nth-child(3n+1) {
    grid-column: span 8;
}
.blog-editorial-grid > :nth-child(3n+2) {
    grid-column: span 4;
}
.blog-editorial-grid > :nth-child(3n) {
    grid-column: span 12; /* Full width banner post */
    display: flex;
    flex-direction: row;
    gap: 40px;
}

/* Card Structure */
.blog-editorial-card {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    padding: clamp(20px, 3vw, 32px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.02);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.blog-editorial-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.blog-editorial-card:hover {
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.08);
}

/* Large Full Width Banner overrides */
.blog-editorial-grid > :nth-child(3n) .blog-editorial-card {
    flex-direction: row;
    gap: 40px;
    align-items: center;
}

.blog-card-img-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 280px;
    margin-bottom: 28px;
}

.blog-editorial-grid > :nth-child(3n) .blog-card-img-wrap {
    width: 55%;
    height: 380px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.blog-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-editorial-card:hover .blog-card-img-wrap img {
    transform: scale(1.05);
}

/* Card label (Category text style, no pill shapes) */
.blog-card-label {
    display: block;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

/* Card Body Content */
.blog-card-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-editorial-grid > :nth-child(3n) .blog-card-details {
    padding-right: 20px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.blog-card-meta-dot {
    width: 4px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 50%;
}

.blog-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 14px;
    transition: color 0.3s ease;
}

.blog-editorial-card:hover .blog-card-title {
    color: #2563eb;
}

.blog-card-excerpt {
    color: #64748b;
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.blog-card-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    transition: color 0.3s ease;
}

.blog-card-link-btn svg {
    transition: transform 0.3s ease;
}

.blog-editorial-card:hover .blog-card-link-btn {
    color: #2563eb;
}

.blog-editorial-card:hover .blog-card-link-btn svg {
    transform: translateX(6px);
}

/* =========================================================================
   Scroll to Top Floating Button
   ========================================================================= */
.blog-top-btn {
    position: fixed;
    bottom: 30px;
    right: -60px;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.blog-top-btn.show {
    right: 30px;
    opacity: 1;
}

.blog-top-btn:hover {
    background: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.blog-top-btn svg {
    width: 20px;
    height: 20px;
}

/* Empty box */
.blog-empty-box {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 40px;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.blog-empty-icon {
    color: #94a3b8;
    margin-bottom: 20px;
}

.blog-empty-box h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.blog-empty-box p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Animations (Reveal slide up on page load) */
.blog-hero-wrap .reveal-slide-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-hero-wrap .reveal-gfx {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-hero-wrap.is-active .reveal-slide-up,
.blog-hero-wrap.is-active .reveal-gfx {
    opacity: 1;
    transform: translate(0) scale(1);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* =========================================================================
   Responsive Overrides
   ========================================================================= */
@media (max-width: 1024px) {
    .blog-editorial-grid > * {
        grid-column: span 6 !important;
    }
    .blog-editorial-grid > :nth-child(3n) .blog-editorial-card {
        flex-direction: column !important;
    }
    .blog-editorial-grid > :nth-child(3n) .blog-card-img-wrap {
        width: 100% !important;
        height: 280px !important;
    }
    .blog-editorial-grid > :nth-child(3n) .blog-card-details {
        padding-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .blog-hero-wrap {
        padding: 140px 0 60px;
    }
    .blog-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .blog-filter-wrap {
        top: 75px;
        margin-bottom: 30px;
        padding: 8px 0;
    }
    .blog-editorial-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .blog-editorial-grid > * {
        grid-column: span 1 !important;
    }
    .blog-card-img-wrap {
        height: 220px !important;
    }
    .blog-body-sec {
        padding: 50px 0 60px;
    }
}
