/* =====================================================
   BLOG INDEX PAGE STYLES
   ===================================================== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #13203B 0%, #1a2a4a 25%, #0f1a2e 50%, #1a2a4a 75%, #13203B 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.08"/><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.04"/><circle cx="75" cy="75" r="0.5" fill="white" opacity="0.04"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.6;
    animation: grain 20s linear infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 10%); }
    80% { transform: translate(-15%, 0%); }
    90% { transform: translate(10%, 5%); }
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    animation: slideInUp 1s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    animation: slideInUp 1s ease-out 0.2s both;
    background: linear-gradient(45deg, #ffffff, #f0f8ff, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInUp 1s ease-out 0.2s both, shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.blog-hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
    animation: fadeIn 1s ease-out 0.4s both;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Search Form */
.blog-search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-btn {
    padding: 15px 25px;
    background: #1CA2FC;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #1471B0;
}

/* Featured Posts Section */
.featured-posts {
    padding: 80px 0;
    background: #FAFAFB;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #13203B;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #798090;
    max-width: 600px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #EBECEF;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.featured-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #1CA2FC;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.featured-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.post-meta .category {
    color: #1CA2FC;
    font-weight: 600;
}

.post-meta .date {
    color: #798090;
}

.featured-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.featured-content h3 a {
    color: #13203B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content h3 a:hover {
    color: #1CA2FC;
}

.featured-content p {
    color: #798090;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-stats {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #888E9C;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Blog Main Layout */
.blog-main {
    padding: 60px 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #EBECEF;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #13203B;
    border-bottom: 2px solid #1CA2FC;
    padding-bottom: 10px;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #798090;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list li.active a {
    background: #1CA2FC;
    color: white;
}

.category-list .count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tag:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, #13203B 0%, #1CA2FC 100%);
    color: white;
}

.newsletter-widget h3 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 12px 20px;
    background: #1CA2FC;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #1471B0;
}

/* Main Content Area */
.blog-content {
    min-height: 500px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #EBECEF;
}

.filter-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #798090;
}

.search-term,
.category-filter,
.tag-filter {
    color: #1CA2FC;
    font-weight: 600;
}

.clear-filters {
    color: #DC3545;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.clear-filters:hover {
    color: #C82333;
}

.clear-filters.hidden {
    display: none;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #EBECEF;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: #13203B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #1CA2FC;
}

.post-excerpt {
    color: #798090;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #EBECEF;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 0.9rem;
    color: #798090;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.page-link {
    padding: 10px 15px;
    border: 1px solid #EBECEF;
    border-radius: 8px;
    color: #798090;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: #1CA2FC;
    color: white;
    border-color: #1CA2FC;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-dots {
    padding: 10px 5px;
    color: #798090;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 20px;
}

.no-posts-content i {
    font-size: 4rem;
    color: #C1C4CC;
    margin-bottom: 20px;
}

.no-posts-content h3 {
    font-size: 1.5rem;
    color: #13203B;
    margin-bottom: 15px;
}

.no-posts-content p {
    color: #798090;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #1CA2FC;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #1471B0;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-sidebar {
        position: static;
        order: 2;
    }
    
    .blog-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .blog-hero p {
        font-size: 1.1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 60px 0;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-input,
    .search-btn {
        border-radius: 0;
    }
    
    .search-input {
        border-radius: 15px 15px 0 0;
    }
    
    .search-btn {
        border-radius: 0 0 15px 15px;
    }
    
    .featured-content,
    .post-content {
        padding: 20px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
