/* Blog-specific styles for SAGACAN */

/* Blog Header */
.blog-header {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
}

.blog-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.blog-subtitle {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
}

.blog-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 2rem auto 3rem;
    line-height: 1.8;
}

.blog-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 20px currentColor;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Blog Filters */
.blog-filters {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-container h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--neon-glow);
}

.search-container {
    display: flex;
    max-width: 400px;
    margin-left: auto;
}

.search-input {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.search-input:focus {
    outline: none;
    box-shadow: var(--neon-glow);
}

.search-btn {
    padding: 1rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    color: var(--bg-dark);
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: transparent;
    color: var(--primary-color);
}

/* Search Results */
.search-results-info {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.search-results-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.results-count {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.search-term {
    color: var(--primary-color);
    font-weight: 600;
}

.clear-search-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.clear-search-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

/* Search Highlighting */
.search-highlight {
    background: rgba(0, 255, 255, 0.3);
    color: var(--primary-color);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Blog Posts */
.blog-posts {
    padding: 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border: 1px solid rgba(0, 255, 255, 0.4) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--neon-glow);
    border-color: var(--primary-color);
}

.post-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color)22, var(--secondary-color)22);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-family: var(--font-code);
}

.post-icon {
    font-size: 4rem;
    color: var(--bg-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.post-content {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.post-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.post-date {
    font-family: var(--font-code);
}

.post-read-time {
    font-family: var(--font-code);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag {
    padding: 0.2rem 0.6rem;
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 0.7rem;
    font-family: var(--font-code);
}

/* Loading Animation */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Enhanced Loading States */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spinnerRotate 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-top-color: var(--secondary-color);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    border-top-color: var(--accent-color);
    animation-duration: 0.9s;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.no-results .btn {
    margin-top: 1rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

/* Featured Research */
.featured-research {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.05) 0%, rgba(0, 255, 0, 0.05) 100%);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-item {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.research-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
    border-color: var(--primary-color);
}

.research-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.research-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.research-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.research-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.research-date {
    color: var(--text-muted);
    font-family: var(--font-code);
}

.research-status {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 0, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    font-size: 0.8rem;
    font-family: var(--font-code);
}

/* Newsletter */
.newsletter {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.newsletter-text h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: var(--neon-glow);
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: var(--neon-glow);
}

/* Enhanced Modal Styles */
.post-excerpt-full {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
}

.content-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px currentColor;
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.post-engagement {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.engagement-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.engagement-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.engagement-stats .stat-icon {
    font-size: 1.5rem;
}

.engagement-stats .stat-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.post-meta span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-author {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.category-badge {
    background: var(--primary-color);
    color: var(--bg-dark) !important;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* AdSense Integration */
.ad-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.ad-banner {
    margin: 3rem 0;
}

.ad-rectangle {
    max-width: 336px;
    margin: 3rem auto;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.newsletter-ad {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container::before {
    content: 'SPONSORED';
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-family: var(--font-code);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2.5rem;
    }
    
    .blog-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .search-container {
        margin: 2rem auto 0;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .ad-rectangle {
        max-width: 100%;
    }

    .newsletter-ad {
        margin-top: 2rem;
        min-height: 200px;
    }
}
