/* ============================================
   TECH BLOG - COMPLETE CSS
   ============================================ */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(rgba(10, 25, 47, 0.95), rgba(10, 25, 47, 0.95)), 
                url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixlib=rb-4.0.3&auto=format&fit=crop&w=2072&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--light-text);
    text-align: center;
    padding: clamp(120px, 20vh, 140px) 0 clamp(40px, 10vh, 60px);
    position: relative;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.1) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

.blog-hero h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.blog-hero p {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text);
    animation: fadeInUp 1.2s ease;
}

/* ============================================
   CATEGORIES FILTER - TOP CENTER
   ============================================ */

.categories-filter-section {
    padding: 30px 0;
    background: var(--dark, #0a192f);
}

.categories-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.categories-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.category-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 50px;
    color: var(--text, #ccd6f6);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.category-filter-btn:hover {
    background: rgba(45, 156, 219, 0.2);
    border-color: var(--accent-light, #64ffda);
    transform: translateY(-3px);
}

.category-filter-btn.active {
    background: var(--orange, #ff6b35);
    border-color: var(--orange, #ff6b35);
    color: white;
}

.category-filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Blog Section */
.blog-section {
    padding: clamp(50px, 12vh, 80px) 0;
    position: relative;
    width: 100%;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.blog-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Blog Post Card */
.blog-post {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.4s;
    position: relative;
    border: 1px solid rgba(100, 255, 218, 0.1);
    backdrop-filter: blur(10px);
}

.blog-post.hidden {
    display: none !important;
}

.blog-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(45, 156, 219, 0.3);
    border-color: var(--orange);
}

.blog-post-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-post:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--orange);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-content {
    padding: 25px 30px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text);
    flex-wrap: wrap;
}

.blog-post-meta i {
    color: var(--accent-light);
    margin-right: 5px;
}

.blog-post-title {
    font-size: 1.6rem;
    color: var(--accent-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}

.blog-post-title a:hover {
    color: var(--orange);
}

.blog-post-excerpt {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.blog-post-read-more:hover {
    gap: 12px;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.no-results i {
    font-size: 4rem;
    color: var(--accent-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--accent-light);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results p {
    color: var(--text);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    backdrop-filter: blur(10px);
}

.sidebar-widget h3 {
    font-size: 1.4rem;
    color: var(--accent-light);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--orange);
}

.sidebar-widget p {
    color: var(--text);
    line-height: 1.6;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post {
    display: flex;
    gap: 15px;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.popular-post:hover {
    background: rgba(45, 156, 219, 0.1);
    transform: translateX(5px);
}

.popular-post-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-post:hover .popular-post-image img {
    transform: scale(1.1);
}

.popular-post-content h4 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.popular-post-content h4 a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s;
}

.popular-post:hover .popular-post-content h4 a {
    color: var(--orange);
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--text);
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(45, 156, 219, 0.2);
    color: var(--accent-light);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--orange);
    color: white;
    transform: translateY(-3px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.newsletter-widget h3 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

.newsletter-widget h3::after {
    background: white;
}

.newsletter-widget p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    background: white;
}

.newsletter-form button {
    background: var(--orange);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    background: #ff8c5a;
    transform: translateY(-3px);
}

/* NOVO - Newsletter button disabled */
.newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* NOVO - Newsletter Message */
.newsletter-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    animation: newsletterFadeIn 0.3s ease;
}

.newsletter-message.success {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.4);
}

.newsletter-message.error {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.4);
}

.newsletter-message i {
    margin-right: 8px;
}

@keyframes newsletterFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: rgba(26, 86, 219, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

.pagination-btn.active {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.blog-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.blog-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.blog-modal {
    background: var(--card-bg, #1a1a2e);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.blog-modal-overlay.active .blog-modal {
    transform: scale(1) translateY(0);
}

/* Close Button - Lepi X */
.blog-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.blog-modal-close:hover {
    background: var(--orange, #ff6b35);
    border-color: var(--orange, #ff6b35);
    transform: rotate(90deg) scale(1.1);
}

.blog-modal-close i {
    transition: transform 0.3s ease;
}

/* Modal Image */
.blog-modal-image {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.blog-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-modal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(transparent, var(--card-bg, #1a1a2e));
}

.blog-modal-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--orange, #ff6b35);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Content */
.blog-modal-content {
    padding: 30px 40px 40px;
}

.blog-modal-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text, #a0a0a0);
    flex-wrap: wrap;
}

.blog-modal-meta i {
    color: var(--accent-light, #64ffda);
    margin-right: 5px;
}

.blog-modal-title {
    font-size: 2rem;
    color: var(--accent-light, #64ffda);
    margin-bottom: 25px;
    line-height: 1.3;
}

.blog-modal-body {
    color: var(--text, #ccd6f6);
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-modal-body h3 {
    color: var(--accent-light, #64ffda);
    margin: 30px 0 15px;
    font-size: 1.3rem;
}

.blog-modal-body p {
    margin-bottom: 15px;
}

.blog-modal-body ul,
.blog-modal-body ol {
    margin: 15px 0;
    padding-left: 25px;
}

.blog-modal-body li {
    margin-bottom: 10px;
}

/* Custom Scrollbar for Modal */
.blog-modal::-webkit-scrollbar {
    width: 8px;
}

.blog-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.blog-modal::-webkit-scrollbar-thumb {
    background: var(--accent, #2d9cdb);
    border-radius: 4px;
}

.blog-modal::-webkit-scrollbar-thumb:hover {
    background: var(--orange, #ff6b35);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-sidebar {
        order: 2;
    }
    
    .categories-filter {
        gap: 10px;
    }
    
    .category-filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .blog-post-content {
        padding: 20px;
    }
    
    .blog-post-title {
        font-size: 1.4rem;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .popular-post {
        flex-direction: row;
    }
    
    .popular-post-image {
        width: 60px;
        height: 60px;
    }
    
    /* Modal Responsive */
    .blog-modal-overlay {
        padding: 10px;
    }
    
    .blog-modal {
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .blog-modal-image {
        height: 250px;
    }
    
    .blog-modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .blog-modal-content {
        padding: 20px 25px 30px;
    }
    
    .blog-modal-title {
        font-size: 1.5rem;
    }
    
    .blog-modal-body {
        font-size: 1rem;
    }
    
    .blog-modal-body h3 {
        font-size: 1.15rem;
    }
    
    .blog-modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .categories-filter {
        gap: 8px;
    }
    
    .category-filter-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .category-filter-btn .count {
        padding: 2px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .blog-post-title {
        font-size: 1.3rem;
    }
    
    .blog-modal-image {
        height: 200px;
    }
    
    .blog-modal-content {
        padding: 15px 20px 25px;
    }
    
    .blog-modal-title {
        font-size: 1.3rem;
    }
    
    .blog-modal-category {
        font-size: 0.75rem;
        padding: 6px 15px;
    }
    
    .category-filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .category-filter-btn .count {
        display: none;
    }
}