/* Blog Page Styles */

/* Blog Hero Section */
.blog-hero {
    position: relative;
    padding: 8rem 0 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.blog-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.blog-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(29, 78, 216, 0.1) 0%, transparent 50%),
               radial-gradient(circle at 70% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

.blog-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.blog-hero-particles .particle {
    position: absolute;
    background: linear-gradient(45deg, rgba(29, 78, 216, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.blog-hero-particles .particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.blog-hero-particles .particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 70%;
    right: 20%;
    animation-delay: 2s;
}

.blog-hero-particles .particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

.blog-hero-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.blog-hero-content {
    text-align: center;
    max-width: 50rem;
    margin: 0 auto;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(29, 78, 216, 0.2);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
}

.blog-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
}

.blog-hero-title .title-highlight {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 2.5rem 0;
}

/* Search Bar */
.blog-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(29, 78, 216, 0.2);
    border-radius: 9999px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: #1d4ed8;
    box-shadow: 0 12px 32px rgba(29, 78, 216, 0.2);
}

.search-icon {
    color: #64748b;
    font-size: 1.125rem;
    margin-right: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-button {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

/* Categories Section */
.categories-section {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    position: sticky;
    top: 80px;
    z-index: 40;
}

.categories-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.categories-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.categories-wrapper::-webkit-scrollbar {
    height: 4px;
}

.categories-wrapper::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 2px;
}

.categories-wrapper::-webkit-scrollbar-thumb {
    background: #1d4ed8;
    border-radius: 2px;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
    background: rgba(29, 78, 216, 0.05);
}

.category-btn.active {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    border-color: #1d4ed8;
    color: white;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

/* Featured Section */
.featured-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, oklch(0.99 0 0), oklch(0.97 0 0));
}

.featured-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

@media (min-width: 1024px) {
    .featured-post {
        grid-template-columns: 1.2fr 1fr;
    }
}

.featured-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(29, 78, 216, 0.15);
}

.featured-image-wrapper {
    position: relative;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post:hover .featured-image {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.featured-category {
    display: inline-block;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

.featured-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-date,
.post-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.post-date i,
.post-read-time i {
    color: #1d4ed8;
}

.featured-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 2rem 0;
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1d4ed8;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
}

.author-role {
    font-size: 0.8125rem;
    color: #64748b;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

/* Posts Section */
.posts-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, oklch(0.98 0 0), oklch(0.96 0 0));
}

.posts-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 640px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-post {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(29, 78, 216, 0.15);
}

.post-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .post-image {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1d4ed8;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content {
    padding: 2rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.post-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-link:hover {
    color: #1e40af;
    gap: 0.75rem;
}

.post-link i {
    transition: transform 0.3s ease;
}

.post-link:hover i {
    transform: translateX(2px);
}

/* Load More */
.load-more-wrapper {
    text-align: center;
    margin-top: 4rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #1d4ed8;
    border-radius: 0.75rem;
    color: #1d4ed8;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}

/* Newsletter Section */
.newsletter-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.newsletter-container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.newsletter-content {
    text-align: center;
}

.newsletter-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    backdrop-filter: blur(10px);
}

.newsletter-icon i {
    font-size: 2rem;
    color: white;
}

.newsletter-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 1rem 0;
}

.newsletter-text p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2.5rem 0;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-submit {
    padding: 1rem 2rem;
    background: white;
    color: #1d4ed8;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.newsletter-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Topics Section */
.topics-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, oklch(0.99 0 0), oklch(0.97 0 0));
}

.topics-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.topics-header {
    text-align: center;
    margin-bottom: 3rem;
}

.topics-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.topics-header p {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(29, 78, 216, 0.15);
    border-color: rgba(29, 78, 216, 0.3);
}

.topic-card i {
    font-size: 2rem;
    color: #1d4ed8;
    transition: all 0.3s ease;
}

.topic-card:hover i {
    transform: scale(1.1);
    color: #1e40af;
}

.topic-card span:first-of-type {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.topic-count {
    font-size: 0.875rem;
    color: #64748b;
}

/* Dark Mode */
.dark .blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dark .blog-badge,
.dark .section-badge {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.dark .section-badge {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.dark .blog-hero-title,
.dark .featured-title,
.dark .post-title,
.dark .topics-header h2 {
    color: #f1f5f9;
}

.dark .blog-hero-description,
.dark .featured-excerpt,
.dark .post-excerpt,
.dark .topics-header p {
    color: #cbd5e1;
}

.dark .search-wrapper,
.dark .category-btn,
.dark .featured-post,
.dark .blog-post,
.dark .topic-card {
    background: rgba(24, 24, 27, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .categories-section {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .search-input {
    color: #f1f5f9;
}

.dark .search-input::placeholder {
    color: #64748b;
}

.dark .category-btn {
    color: #94a3b8;
}

.dark .category-btn:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

.dark .post-category {
    background: rgba(15, 23, 42, 0.95);
    color: #60a5fa;
}

.dark .author-name,
.dark .post-author span,
.dark .topic-card span:first-of-type {
    color: #f1f5f9;
}

.dark .author-role,
.dark .post-date,
.dark .post-read-time,
.dark .topic-count {
    color: #94a3b8;
}

.dark .post-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark .featured-section,
.dark .topics-section {
    background: linear-gradient(135deg, oklch(0.16 0 0), oklch(0.13 0 0));
}

.dark .posts-section {
    background: linear-gradient(135deg, oklch(0.15 0 0), oklch(0.12 0 0));
}

.dark .newsletter-input {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 3rem 0;
    }

    .featured-content {
        padding: 2rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .newsletter-text h2 {
        font-size: 2rem;
    }

    .newsletter-form .form-group {
        flex-direction: column;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
