/* ============================================
   VICKING VENTURES - BLOG SYSTEM STYLES
   Phase 2: Professional Blog Management
   ============================================ */

/* Blog Container */
.vv-blog-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--g1) 0%, var(--w) 100%);
}

.vv-blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.vv-blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.vv-blog-title {
    font-family: var(--fd);
    font-size: clamp(36px, 5vw, 56px);
    color: var(--fo);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.vv-blog-subtitle {
    font-size: 18px;
    color: var(--g5);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Filters */
.vv-blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.vv-blog-search {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid var(--g3);
    border-radius: 25px;
    font-family: var(--f);
    font-size: 15px;
    transition: all 0.3s ease;
}

.vv-blog-search:focus {
    outline: none;
    border-color: var(--fo);
    box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.1);
}

.vv-filter-btn {
    padding: 10px 24px;
    background: var(--w);
    border: 2px solid var(--g3);
    border-radius: 25px;
    font-family: var(--f);
    font-weight: 500;
    color: var(--g6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.vv-filter-btn:hover {
    border-color: var(--fo);
    color: var(--fo);
    transform: translateY(-2px);
}

.vv-filter-btn.active {
    background: var(--fo);
    border-color: var(--fo);
    color: var(--w);
}

/* Blog Grid */
.vv-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Blog Card */
.vv-blog-card {
    background: var(--w);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.vv-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shh);
}

.vv-blog-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--fo) 0%, var(--fm) 100%);
    position: relative;
}

.vv-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vv-blog-card:hover .vv-blog-image img {
    transform: scale(1.05);
}

.vv-blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--fo);
    color: var(--w);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vv-blog-content {
    padding: 25px;
}

.vv-blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--g5);
}

.vv-blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vv-blog-card-title {
    font-family: var(--fd);
    font-size: 24px;
    color: var(--g7);
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vv-blog-excerpt {
    font-size: 15px;
    color: var(--g6);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vv-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--g2);
}

.vv-blog-tag {
    font-size: 11px;
    color: var(--g5);
    background: var(--g1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Blog Modal */
.vv-blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.vv-blog-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vv-blog-modal-content {
    background: var(--w);
    max-width: 900px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.vv-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--w);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: var(--g6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vv-modal-close:hover {
    background: var(--fo);
    color: var(--w);
    transform: rotate(90deg);
}

.vv-modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, var(--fo) 0%, var(--fm) 100%);
}

.vv-modal-body {
    padding: 40px;
}

.vv-modal-category {
    display: inline-block;
    background: var(--fo);
    color: var(--w);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.vv-modal-title {
    font-family: var(--fd);
    font-size: clamp(32px, 4vw, 48px);
    color: var(--g7);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 1px;
}

.vv-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--g2);
    font-size: 14px;
    color: var(--g5);
}

.vv-modal-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.vv-modal-content-text {
    font-size: 17px;
    line-height: 1.8;
    color: var(--g6);
    margin-bottom: 30px;
}

.vv-modal-content-text p {
    margin-bottom: 20px;
}

.vv-modal-content-text h2,
.vv-modal-content-text h3 {
    font-family: var(--fd);
    color: var(--fo);
    margin-top: 30px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.vv-modal-content-text ul,
.vv-modal-content-text ol {
    margin: 20px 0;
    padding-left: 25px;
}

.vv-modal-content-text li {
    margin-bottom: 10px;
}

.vv-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--g2);
}

.vv-modal-tag {
    font-size: 13px;
    color: var(--g6);
    background: var(--g1);
    padding: 8px 16px;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.vv-modal-tag:hover {
    background: var(--fo);
    color: var(--w);
    transform: translateY(-2px);
}

/* Loading State */
.vv-blog-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: var(--g5);
}

.vv-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--g2);
    border-top-color: var(--fo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.vv-blog-empty {
    text-align: center;
    padding: 80px 20px;
}

.vv-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.vv-empty-text {
    font-size: 20px;
    color: var(--g5);
    margin-bottom: 10px;
}

.vv-empty-subtext {
    font-size: 15px;
    color: var(--g4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .vv-blog-section {
        padding: 60px 15px;
    }
    
    .vv-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vv-blog-filters {
        flex-direction: column;
    }
    
    .vv-blog-search {
        max-width: none;
    }
    
    .vv-modal-body {
        padding: 30px 20px;
    }
    
    .vv-modal-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .vv-blog-card-title {
        font-size: 20px;
    }
    
    .vv-modal-title {
        font-size: 28px;
    }
    
    .vv-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}

/* Accessibility */
.vv-blog-card:focus,
.vv-filter-btn:focus,
.vv-modal-close:focus {
    outline: 3px solid var(--fo);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .vv-blog-filters,
    .vv-modal-close {
        display: none;
    }
    
    .vv-blog-modal {
        background: var(--w);
    }
    
    .vv-blog-modal-content {
        box-shadow: none;
    }
}
