/* ========================================
   Blog Index Page Styles
   ======================================== */

/* Hero Section */
.blog-hero {
    position: relative;
    padding: 8rem 0 5rem;
    background: #0f172a; /* Slate 900 */
    overflow: hidden;
}

.blog-hero-mask {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
}

.blog-hero-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Category Filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s;
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.filter-btn:hover {
    border-color: #0369a1;
    color: #0369a1;
}

.filter-btn.active {
    background: #0369a1;
    color: white;
    border-color: #0369a1;
    box-shadow: 0 10px 15px -3px rgba(3, 105, 161, 0.3);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-decoration: none !important;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.blog-card-img-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-img {
    transform: scale(1.1);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: #0369a1;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.blog-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.blog-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.blog-card-meta-item i {
    color: #0369a1;
}

.blog-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .blog-card-title {
        font-size: 1.125rem;
    }
}

.blog-card:hover .blog-card-title {
    color: #0369a1;
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0369a1;
    transition: all 0.3s;
}

.blog-card-link svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-link {
    color: #075985;
}

.blog-card:hover .blog-card-link svg {
    transform: translateX(5px);
}

/* Newsletter Section */
.blog-newsletter-section {
    position: relative;
    padding: 6rem 0;
    background: #0369a1;
    overflow: hidden;
}

.newsletter-pattern {
    position: absolute;
    inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

.newsletter-glow-1 {
    position: absolute;
    top: -6rem;
    left: -6rem;
    width: 24rem;
    height: 24rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    filter: blur(64px);
}

.newsletter-glow-2 {
    position: absolute;
    bottom: -6rem;
    right: -6rem;
    width: 24rem;
    height: 24rem;
    background: rgba(56, 189, 248, 0.2);
    border-radius: 9999px;
    filter: blur(64px);
}

.newsletter-content {
    position: relative;
    z-index: 10;
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .newsletter-title {
        font-size: 3rem;
    }
}

.newsletter-form-wrapper {
    max-width: 40rem;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .newsletter-form {
        flex-direction: row;
        border-radius: 9999px;
    }
}

.newsletter-input-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    padding: 0.75rem 1.5rem;
}

.newsletter-input-group i {
    font-size: 1.25rem;
    color: #0369a1;
    margin-right: 1rem;
}

.newsletter-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #0f172a;
    background: transparent !important;
}

.newsletter-input::placeholder {
    color: #94a3b8;
}

.newsletter-btn {
    background: #0369a1;
    color: white;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .newsletter-btn {
        border-radius: 9999px;
    }
}

.newsletter-btn:hover {
    background: #075985;
    box-shadow: 0 10px 15px -3px rgba(3, 105, 161, 0.4);
}

.newsletter-note {
    margin-top: 1.5rem;
    color: #e0f2fe;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
}
