/* ===== BLOG STYLES - ZENCIA DESIGN SYSTEM ===== */

/* Blog Hero Section */
.blog-hero {
    background: var(--gradient-primary);
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat-x;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--white);
}

/* Floating Elements */
.floating-elements {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.floating-card {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    margin-left: 2rem;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    margin-left: 1rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Blog Posts Section - DARK THEME UPDATE */
.blog-posts {
    padding: 6rem 0;
    background: linear-gradient(135deg, #000000 0%, #0a1a1a 100%);
    position: relative;
    overflow: hidden;
}

/* Add subtle background pattern like footer */
.blog-posts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(0, 217, 213, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 139, 139, 0.05) 0%, transparent 50%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.02"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat;
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }
    50% {
        transform: translate(30px, 20px);
        opacity: 0.8;
    }
}

/* Ensure content is above background */
.blog-posts .container {
    position: relative;
    z-index: 2;
}

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

/* Post Cards - Updated for dark theme with clickable functionality */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
    position: relative;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 217, 213, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 217, 213, 0.2);
}

/* Make the entire card clickable */
.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: all var(--transition-base);
}

.post-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Ensure no underlines on any text within the card link */
.post-card-link * {
    text-decoration: none !important;
}

/* Cursor pointer for the entire card */
.post-card {
    cursor: pointer;
}

/* Remove cursor pointer from the card when hovering over tags */
.post-card:hover .post-tags-overlay {
    cursor: default;
}

/* Tags overlay positioning */
.post-tags-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 5;
    pointer-events: none; /* Allow clicks to pass through to card */
}

.tag-overlay {
    background: rgba(0, 217, 213, 0.9);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    pointer-events: auto; /* Enable clicks on tags */
    cursor: pointer;
}

.tag-overlay:hover {
    background: var(--primary-teal);
    color: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 217, 213, 0.4);
    text-decoration: none;
}

.post-image {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--white);
    opacity: 0.8;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.post-card:hover .post-overlay {
    opacity: 1;
}

/* Post Content - Updated colors for dark theme */
.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

.post-meta span {
    position: relative;
}

.post-meta span:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -0.6rem;
    color: var(--primary-teal);
}

.post-title {
    margin-bottom: 1rem;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    transition: color var(--transition-fast);
}

/* Title color change on card hover */
.post-card-link:hover .post-title {
    color: var(--primary-teal);
}

.post-excerpt {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Post Tags - Updated for dark theme */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(0, 217, 213, 0.15);
    color: var(--primary-teal);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid rgba(0, 217, 213, 0.2);
}

.tag:hover,
.tag.active {
    background: var(--primary-teal);
    color: var(--white);
    transform: translateY(-2px);
    border-color: var(--primary-teal);
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-teal);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.post-card-link:hover .read-more {
    gap: 1rem;
    color: rgba(0, 217, 213, 0.8);
}

.read-more svg {
    transition: transform var(--transition-fast);
}

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

/* Empty State - Updated for dark theme */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: var(--font-size-2xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    font-size: var(--font-size-lg);
}

/* Blog CTA Section */
.blog-cta {
    padding: 6rem 0;
    background: var(--gradient-dark);
    text-align: center;
}

.cta-content h2 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Add floating particles to blog posts section */
.blog-posts .floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.blog-posts .floating-particles .particle {
    position: absolute;
    background: var(--primary-teal);
    border-radius: 50%;
    opacity: 0.2;
    animation: floatParticle 15s infinite ease-in-out;
}

.blog-posts .floating-particles .particle:nth-child(1) {
    width: 3px;
    height: 3px;
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.blog-posts .floating-particles .particle:nth-child(2) {
    width: 4px;
    height: 4px;
    top: 70%;
    left: 85%;
    animation-delay: 5s;
}

.blog-posts .floating-particles .particle:nth-child(3) {
    width: 2px;
    height: 2px;
    top: 40%;
    left: 60%;
    animation-delay: 10s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-80px) translateX(40px);
        opacity: 0.4;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .floating-elements {
        flex-direction: row;
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 4rem;
    }
    
    .hero-text h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-text p {
        font-size: var(--font-size-lg);
    }
    
    .blog-posts {
        padding: 4rem 0;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .blog-cta {
        padding: 4rem 0;
    }
    
    .cta-content h2 {
        font-size: var(--font-size-2xl);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .floating-card {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: var(--font-size-2xl);
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-meta span:not(:last-child)::after {
        display: none;
    }
    
    .cta-content h2 {
        font-size: var(--font-size-xl);
    }
}

/* Animation Enhancements */
.post-card {
    opacity: 0;
    transform: translateY(30px);
}

.post-card[data-aos="fade-up"] {
    opacity: 1;
    transform: translateY(0);
}

/* Print Styles */
@media print {
    .blog-hero,
    .blog-cta,
    .floating-elements {
        display: none;
    }
    
    .post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--medium-gray);
    }
}