/* Blog Glass Morphism Styles - Aligned with Site Design */

/* Blog Container - Glass Foundation */
.blog-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        rgba(50, 48, 49, 0.35) 0%,
        rgba(30, 30, 30, 0.25) 50%,
        rgba(45, 45, 45, 0.35) 100%
    );
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.2),
        0 2px 16px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Blog Header - Enhanced Typography */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #EBEBEB;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: rgba(235, 235, 235, 0.8);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Newsletter Signup - Inline Glass Style */
.newsletter-inline {
    background: rgba(123, 68, 193, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 68, 193, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto 3rem;
    max-width: 600px;
    text-align: center;
}

.newsletter-inline h3 {
    color: #EBEBEB;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.newsletter-inline p {
    color: rgba(235, 235, 235, 0.8);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #EBEBEB;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #9AD5CA;
    box-shadow: 0 0 0 0.2rem rgba(154, 213, 202, 0.25);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: #7B44C1;
    border: 1px solid #EBEBEB;
    color: #EBEBEB;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: lowercase;
}

.newsletter-form button:hover {
    background: linear-gradient(to bottom, #1792F7 5%, #6A3DB3 100%);
    transform: scale(1.05);
}

/* Filters - Glass Style */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #EBEBEB;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.filter-select, .filter-input {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    color: #EBEBEB;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #9AD5CA;
    box-shadow: 0 0 0 3px rgba(154, 213, 202, 0.1);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Blog Card - Glass Morphism (No Flip) */
.blog-card {
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Featured card - spans two columns */
.blog-card.featured {
    grid-column: span 2;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Remove flip animation */
.blog-card.flipped .card-inner {
    transform: none;
}

/* Card Front - Glass Style */
.card-front {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px) saturate(1.2);
    -webkit-backdrop-filter: blur(15px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        0 2px 16px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover .card-front {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px 0 rgba(123, 68, 193, 0.25),
        0 4px 20px 0 rgba(0, 0, 0, 0.3);
    border-color: rgba(123, 68, 193, 0.3);
}

/* Featured Card Styling */
.blog-card.featured .card-front {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-color: rgba(123, 68, 193, 0.2);
}

/* Card Image */
.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.blog-card.featured .card-image {
    height: 200px; /* Same as regular cards */
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
}

.card-image.default-image {
    background: linear-gradient(135deg, #7B44C1 0%, #1E96FC 100%);
}

/* Card Content - Enhanced Readability */
.card-content {
    padding: 1.5rem;
    background: rgba(50, 48, 49, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.card-category {
    color: #9AD5CA;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-date {
    color: rgba(235, 235, 235, 0.7);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #EBEBEB;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.blog-card.featured .card-title {
    font-size: 1.25rem; /* Same as regular cards */
}

.card-excerpt {
    font-size: 0.95rem;
    color: rgba(235, 235, 235, 0.8);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-author {
    color: rgba(235, 235, 235, 0.7);
    font-size: 0.875rem;
}

.card-reading-time {
    color: rgba(235, 235, 235, 0.7);
    font-size: 0.875rem;
}

/* CTA Button */
.card-cta {
    background: #7B44C1;
    border: 1px solid #EBEBEB;
    color: #EBEBEB;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-transform: lowercase;
    display: inline-block;
    margin-top: 1rem;
}

.card-cta:hover {
    background: linear-gradient(to bottom, #1792F7 5%, #6A3DB3 100%);
    transform: scale(1.05);
    box-shadow: 0px 3px 15px 7px rgba(30, 150, 252, 0.2);
}

/* Remove hover hint and card back */
.card-hover-hint,
.card-back {
    display: none;
}

/* Pagination - Glass Style */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.page-link {
    padding: 0.75rem 1.5rem;
    background: #7B44C1;
    color: #EBEBEB;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #EBEBEB;
    transition: all 0.3s ease;
    font-weight: 700;
    text-transform: lowercase;
}

.page-link:hover {
    background: linear-gradient(to bottom, #1792F7 5%, #6A3DB3 100%);
    transform: translateY(-2px) scale(1.05);
}

.page-current {
    color: rgba(235, 235, 235, 0.8);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Tag Cloud - Glass Style */
.blog-sidebar {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.blog-sidebar h3 {
    margin-bottom: 1rem;
    color: #EBEBEB;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    text-decoration: none;
    color: rgba(235, 235, 235, 0.8);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tag-link:hover {
    background: rgba(154, 213, 202, 0.2);
    color: #EBEBEB;
    border-color: rgba(154, 213, 202, 0.5);
    transform: translateY(-2px);
}

.tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Loading Spinner - Glass Style */
.blog-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: rgba(50, 48, 49, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #9AD5CA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-container {
        padding: 1rem;
        margin: 1rem;
        backdrop-filter: blur(15px) saturate(1.1);
        -webkit-backdrop-filter: blur(15px) saturate(1.1);
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Mobile - featured same as others */
    .blog-card.featured {
        grid-column: span 1;
    }
    
    .blog-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select, .filter-input {
        width: 100%;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(15px)) {
    .blog-container {
        background: rgba(50, 48, 49, 0.95);
    }
    
    .card-front {
        background: rgba(50, 48, 49, 0.9);
    }
    
    .newsletter-inline {
        background: rgba(123, 68, 193, 0.2);
    }
    
    .blog-sidebar {
        background: rgba(50, 48, 49, 0.9);
    }
}

/* Override dark mode styles to work with glass */
body {
    background-color: #1a1a1a !important;
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(235, 235, 235, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: #EBEBEB;
}

.share-button i {
    margin-right: 0.5rem;
}