/* Blog Section Styles */
.blog-section {
    padding: 120px 0;
    /*background: linear-gradient(135deg, #cbe8ff 0%, #ffffff 100%);*/
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgb(11 86 255 / 8%) 0%, transparent 50%);
    pointer-events: none;
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.blog-title-wrapper {
    position: relative;
    z-index: 2;
}

.blog-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
}

.blog-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

.blog-main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 24px;
    line-height: 1.1;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-description {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Decorative Elements */
.blog-decorative-element {
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%);
    opacity: 0.1;
    pointer-events: none;
}

.floating-shapes {
    position: relative;
    width: 200px;
    height: 200px;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: #000000;
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: #000000;
    top: 50px;
    right: 0;
    animation-delay: 2s;
}

.shape-3 {
    width: 40px;
    height: 40px;
    background: #000000;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1110px;
    margin: 0 auto;
}

/* Blog Cards */
.blog-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.blog-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-image {
    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);
}

.blog-category-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff1a;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card:hover .blog-overlay {
    opacity: 1;
}

.blog-overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-overlay-content {
    transform: translateY(0);
}

.read-more-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.read-more-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.read-more-btn:hover .arrow-icon {
    transform: translate(4px, -4px);
}

/* Blog Content */
.blog-content {
    padding: 32px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #64748b;
}

.blog-date {
    font-weight: 500;
}

.blog-read-time {
    position: relative;
    padding-left: 16px;
}

.blog-read-time::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: #cbd5e1;
}

.blog-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: #6366f1;
}

.blog-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 16px;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.blog-card:hover .tag {
    background: #e2e8f0;
    color: #334155;
}

/* Blog Modal */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    transform: scale(0.8) translateY(40px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.blog-modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.modal-close {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: #64748b;
}

.modal-content {
    overflow-y: auto;
    max-height: 90vh;
}

.modal-image-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-category {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-text-content {
    padding: 40px;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748b;
}

.modal-date {
    font-weight: 500;
}

.modal-read-time {
    position: relative;
    padding-left: 16px;
}

.modal-read-time::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: #cbd5e1;
}

.modal-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 32px;
    line-height: 1.2;
}

.modal-full-content {
    color: #374151;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 32px;
}

.modal-full-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 16px 0;
}

.modal-full-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 24px 0 12px 0;
}

.modal-full-content p {
    margin-bottom: 16px;
}

.modal-full-content ul, .modal-full-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.modal-full-content li {
    margin-bottom: 8px;
}

.modal-full-content code {
    background: #f1f5f9;
    color: #6366f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.modal-full-content blockquote {
    border-left: 4px solid #6366f1;
    background: #f8fafc;
    padding: 16px 24px;
    margin: 24px 0;
    font-style: italic;
    color: #475569;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-tags .tag {
    background: #6366f1;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-section {
        padding: 80px 0;
    }
    
    .blog-container {
        padding: 0 16px;
    }
    
    .blog-header {
        margin-bottom: 60px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }
    
    .blog-card {
        border-radius: 16px;
    }
    
    .blog-image-wrapper {
        height: 200px;
    }
    
    .blog-content {
        padding: 24px;
    }
    
    .blog-title {
        font-size: 20px;
    }
    
    .modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .modal-text-content {
        padding: 24px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .blog-decorative-element {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .read-more-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .modal-container {
        border-radius: 16px;
    }
    
    .modal-image-wrapper {
        height: 200px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    
    .blog-card {
        background: #1e293b;
        border: 1px solid #334155;
    }
    
    .blog-title {
        color: #f1f5f9;
    }
    
    .blog-card:hover .blog-title {
        color: #a5b4fc;
    }
    
    .blog-excerpt {
        color: #94a3b8;
    }
    
    .blog-meta {
        color: #94a3b8;
    }
    
    .tag {
        background: #334155;
        color: #cbd5e1;
    }
    
    .blog-card:hover .tag {
        background: #475569;
        color: #e2e8f0;
    }
    
    .modal-container {
        background: #1e293b;
        border: 1px solid #334155;
    }
    
    .modal-title {
        color: #f1f5f9;
    }
    
    .modal-full-content {
        color: #cbd5e1;
    }
    
    .modal-full-content h3 {
        color: #f1f5f9;
    }
    
    .modal-full-content h4 {
        color: #e2e8f0;
    }
    
    .modal-full-content code {
        background: #334155;
        color: #a5b4fc;
    }
    
    .modal-full-content blockquote {
        background: #334155;
        border-left-color: #a5b4fc;
        color: #cbd5e1;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.blog-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.blog-header {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}