/* FinLisans Blog Styles - Modern 2025-2026 Design */

/* ============================================
   BLOG HERO SECTION (Oversized Typography)
   ============================================ */

.blog-hero {
    position: relative;
    padding-top: 7rem;
    padding-bottom: 4rem;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(3, 105, 161, 0.1), transparent);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08), transparent);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .blog-hero h1 {
        font-size: clamp(3rem, 10vw, 6rem);
    }
}

/* ============================================
   FEATURED POST HERO CARD
   ============================================ */

.featured-hero {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .featured-hero {
        min-height: 500px;
    }
}

.featured-hero img {
    transition: transform 0.7s ease;
}

.featured-hero:hover img {
    transform: scale(1.05);
}

/* ============================================
   POST CARDS
   ============================================ */

.post-card {
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.dark .post-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.post-card .thumbnail-placeholder {
    position: relative;
    overflow: hidden;
}

.post-card .thumbnail-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.1), rgba(5, 150, 105, 0.1));
}

/* ============================================
   CATEGORY FILTER CHIPS
   ============================================ */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.filter-chip:hover {
    background-color: rgba(3, 105, 161, 0.1);
    border-color: rgba(3, 105, 161, 0.3);
}

.filter-chip.active {
    background: linear-gradient(135deg, #0369A1, #059669);
    color: white;
}

.dark .filter-chip:hover {
    background-color: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.dark #reading-progress {
    background: rgba(255, 255, 255, 0.1);
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0369A1, #059669);
    width: 0%;
    transition: width 0.1s ease;
}

/* ============================================
   POST HERO IMAGE WITH TITLE OVERLAY
   ============================================ */

.post-hero {
    position: relative;
}

.post-hero-image {
    position: relative;
    height: 50vh;
    max-height: 500px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .post-hero-image {
        height: 60vh;
        max-height: 600px;
    }
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, white 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0.3) 60%, transparent 100%);
}

.dark .post-hero-image::after {
    background: linear-gradient(to top, #0F172A 0%, rgba(15, 23, 42, 0.8) 30%, rgba(15, 23, 42, 0.3) 60%, transparent 100%);
}

.post-hero-content {
    position: relative;
    margin-top: -8rem;
    z-index: 10;
}

/* ============================================
   STICKY TABLE OF CONTENTS
   ============================================ */

.toc-sticky {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.toc-sticky::-webkit-scrollbar {
    width: 4px;
}

.toc-sticky::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.dark .toc-sticky::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.toc-link {
    display: block;
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.toc-link:hover {
    color: #0369A1;
}

.toc-link.active {
    color: #0369A1;
    font-weight: 600;
    border-left-color: #0369A1;
}

.dark .toc-link {
    color: #9ca3af;
}

.dark .toc-link:hover,
.dark .toc-link.active {
    color: #38BDF8;
}

.dark .toc-link.active {
    border-left-color: #38BDF8;
}

.toc-link-h3 {
    padding-left: 2rem;
    font-size: 0.8125rem;
}

/* ============================================
   FLOATING SHARE BUTTON (MOBILE)
   ============================================ */

.floating-share {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
}

.floating-share-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0369A1, #059669);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(3, 105, 161, 0.4);
    transition: all 0.3s ease;
}

.floating-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(3, 105, 161, 0.5);
}

.floating-share-menu {
    position: absolute;
    bottom: 4.5rem;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.floating-share.active .floating-share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn-twitter {
    background: #1DA1F2;
}

.share-btn-linkedin {
    background: #0077B5;
}

.share-btn-copy {
    background: #6b7280;
}

/* ============================================
   AUTHOR BIO SECTION
   ============================================ */

.author-bio {
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.05), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(3, 105, 161, 0.1);
}

.dark .author-bio {
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.1), rgba(5, 150, 105, 0.1));
    border-color: rgba(56, 189, 248, 0.1);
}

/* ============================================
   RELATED POSTS WITH IMAGES
   ============================================ */

.related-post-card {
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dark .related-post-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.related-post-card .thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.related-post-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .thumbnail img {
    transform: scale(1.05);
}

/* ============================================
   TWO COLUMN LAYOUT (BLOG POST)
   ============================================ */

.blog-post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-post-layout {
        grid-template-columns: 1fr 280px;
        gap: 3rem;
    }
}

@media (min-width: 1280px) {
    .blog-post-layout {
        grid-template-columns: 1fr 320px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 1023px) {
    .hide-mobile-toc {
        display: none;
    }
}

@media (min-width: 1024px) {
    .show-mobile-only {
        display: none;
    }
}
