/* ========================================
   MODERN BLOG SECTION STYLES
   Trading Platform Design
   ======================================== */

/* Section Container */
.modern-blog-section {
    position: relative;
    padding: 100px 0;
    background: #112025;
    overflow: hidden;
}

.modern-blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Section Header */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.section-badge svg {
    width: 18px;
    height: 18px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-description {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Card */
.blog-card {
    position: relative;
    background: rgba(17, 32, 37, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0) 0%,
        rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Wrapper */
.blog-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 Aspect Ratio */
    overflow: hidden;
    background: rgba(10, 20, 25, 0.8);
}

.blog-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-image {
    transform: scale(1.1);
}

/* Image Overlay */
.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 0%,
        rgba(10, 20, 25, 0.8) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .blog-overlay {
    opacity: 1;
}

.blog-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transform: translateY(20px);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.blog-card:hover .blog-read-more {
    transform: translateY(0);
    background: #3b82f6;
}

.blog-read-more svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-read-more svg {
    transform: translateX(4px);
}

/* Category Badge */
.blog-category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* Card Content */
.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta Information */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Blog Title */
.blog-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-title {
    color: #3b82f6;
}

/* Blog Excerpt */
.blog-excerpt {
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Blog Footer */
.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.author-name {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.blog-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-arrow {
    background: #3b82f6;
    color: white;
    transform: rotate(-45deg);
}

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

/* View All Button */
.btn-modern-outline-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: transparent;
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    font-weight: 600;
    font-size: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern-outline-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-modern-outline-large:hover::before {
    left: 100%;
}

.btn-modern-outline-large:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.btn-modern-outline-large svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-modern-outline-large:hover svg {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1199px) {
    .modern-blog-section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .section-description {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .modern-blog-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
    }

    .blog-title {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .modern-blog-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .section-description {
        font-size: 15px;
    }

    .blog-card-content {
        padding: 20px;
    }

    .blog-title {
        font-size: 17px;
    }

    .blog-excerpt {
        font-size: 14px;
    }

    .btn-modern-outline-large {
        padding: 14px 32px;
        font-size: 15px;
    }
}

@media (max-width: 575px) {
    .section-title {
        font-size: 24px;
    }

    .blog-meta {
        gap: 12px;
    }

    .meta-item {
        font-size: 12px;
    }

    .blog-card-content {
        padding: 16px;
    }
}

/* Animation Enhancement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos="fade-up"] {
    animation: fadeInUp 0.8s ease-out;
}

/* Loading State */
.blog-card.loading {
    pointer-events: none;
}

.blog-card.loading .blog-image {
    background: linear-gradient(
        90deg,
        rgba(17, 32, 37, 0.6) 0%,
        rgba(17, 32, 37, 0.8) 50%,
        rgba(17, 32, 37, 0.6) 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Accessibility */
.blog-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
}

.blog-card-link:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .modern-blog-section {
        background: white;
        padding: 20px 0;
    }

    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .blog-overlay,
    .btn-modern-outline-large {
        display: none;
    }
}
