/* Blog Page Styles */

.blog-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

body.dark-mode .blog-header {
    background: linear-gradient(135deg, rgba(0, 57, 137, 0.95) 0%, rgba(0, 168, 255, 0.4) 100%);
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.blog-header-content {
    position: relative;
    z-index: 1;
}

.blog-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.blog-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    color: white;
}

/* Create Blog Button */
.create-blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary-color);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(255, 255, 255, 0.3);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.create-blog-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.create-blog-btn:hover::before {
    width: 400px;
    height: 400px;
}

.create-blog-btn:hover {
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: white;
}

.create-blog-btn i {
    transition: transform 0.4s ease;
    font-size: 1.1rem;
}

.create-blog-btn:hover i {
    transform: rotate(90deg) scale(1.2);
}

.create-blog-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Search Section */
.search-section {
    padding: 40px 20px;
    background: var(--bg-color);
}

.search-box {
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 50px;
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.2);
}

.search-box i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

.search-box input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.tag-filter {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.tag-filter::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.tag-filter:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.tag-filter:hover::after {
    left: 100%;
}

.tag-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Blog Grid */
.blogs-section {
    padding: 40px 20px 80px;
    background: var(--bg-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Blog Card */
.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.2);
}

.blog-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 123, 255, 0.95);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

body.dark-mode .blog-category {
    background: rgba(0, 168, 255, 0.95);
}

.blog-content {
    padding: 25px;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-description {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.blog-meta i {
    margin-right: 6px;
    color: var(--primary-color);
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-tags .tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.blog-tags .tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

body.dark-mode .blog-tags .tag {
    background: var(--secondary-color);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .blog-tags .tag:hover {
    box-shadow: 0 4px 12px rgba(0, 168, 255, 0.3);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.read-more::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.2), transparent);
    transition: 0.5s;
}

.read-more:hover {
    gap: 12px;
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.read-more:hover::after {
    left: 100%;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color);
    opacity: 0.6;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results p {
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 100px 15px 40px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .blog-main-title {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .filter-tags {
        justify-content: center;
        gap: 8px;
    }
    
    .tag-filter {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .search-box {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
        border-radius: 20px;
    }
    
    .search-box input {
        width: 100%;
        text-align: center;
    }
    
    .blogs-section {
        padding: 30px 10px 60px;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-content {
        padding: 15px;
    }
    
    .blog-title {
        font-size: 1.2rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .create-blog-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.6rem;
    }
    
    .blog-header p {
        font-size: 0.9rem;
    }
    
    .blog-main-title {
        font-size: 1.6rem;
    }

    .blog-subtitle {
        font-size: 0.9rem;
    }
    
    .tag-filter {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .blog-tags .tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}
