/* Blog Page CSS */

/* Hero Section */
.hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -70px; /* Compensate for the fixed header */
    padding-top: 70px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.8);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 0 2rem;
    max-width: 900px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ffffff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 8s ease infinite;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Section Heading */
.section-heading {
    text-align: center;
    margin: 3rem 0 2rem;
    position: relative;
}

.section-heading h2 {
    display: inline-block;
    position: relative;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a1a;
    padding: 0 1rem;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
    perspective: 1000px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-10px) rotateX(3deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    cursor: pointer;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2563eb;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card:hover .card-image {
    transform: scale(1.1);
}

.card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: white;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.blog-card:hover .card-title {
    color: #2563eb;
}

.card-excerpt {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-item i {
    color: #2563eb;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    margin-top: auto;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

.read-more-icon {
    transition: transform 0.3s ease;
}

.read-more:hover .read-more-icon {
    transform: translateX(5px);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 4rem 0;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    padding: 0;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #555;
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-item.nav-link .page-link {
    width: auto;
    padding: 0 15px;
}

.page-item.active .page-link {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.page-item.disabled .page-link {
    color: #bbb;
    pointer-events: none;
    background-color: #f8f8f8;
    border-color: #eaeaea;
}

.page-link:hover:not(.page-item.disabled .page-link, .page-item.active .page-link) {
    background-color: #f5f7ff;
    border-color: #d1d9ff;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.page-item.active .page-link:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* No Posts Message */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.no-posts p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.no-posts-icon {
    font-size: 3rem;
    color: #d1d9ff;
    margin-bottom: 1.5rem;
}

/* Custom Container Width */
.container.blog-container {
    max-width: 1300px;
    padding: 0 2rem;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-heading h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image-container {
        height: 200px;
    }
    
    .section-heading h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 40vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .card-content {
        padding: 1.25rem;
    }
}