/* Amika Blog - Specific Styles */

/* ==========================================
   BLOG SPECIFIC COMPONENTS
   ========================================== */

/* Category Navigation Buttons */
.category-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    background: white;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-btn:hover {
    border-color: #ff6b9d;
    color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
}

.category-btn.active {
    border-color: #ff6b9d;
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

/* Blog Cards */
.blog-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.blog-card:hover {
    border-color: rgba(255, 107, 157, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    transition: transform 0.3s ease;
}

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

/* Line Clamp Utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Resource Cards */
.resource-card {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.2), 
        rgba(78, 205, 196, 0.2), 
        rgba(255, 217, 61, 0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover::before {
    opacity: 1;
}

/* Search Bar Enhancements */
#searchInput {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

#searchInput:focus {
    background: rgba(255, 255, 255, 1);
}

/* Newsletter Section Styling */
#newsletterForm {
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Article Styling */
.featured-article {
    position: relative;
    overflow: hidden;
}

.featured-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.05), 
        rgba(78, 205, 196, 0.05));
    pointer-events: none;
}

/* Statistics Cards */
.stats-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Responsive Blog Grid */
@media (min-width: 768px) {
    #articlesGrid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .category-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .blog-card {
        margin-bottom: 1.5rem;
    }
    
    .resource-card {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================
   BLOG ANIMATIONS
   ========================================== */

/* Fade In Animation for Articles */
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resource Cards Animation */
.resource-card {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.5s ease forwards;
}

.resource-card:nth-child(1) { animation-delay: 0.1s; }
.resource-card:nth-child(2) { animation-delay: 0.2s; }
.resource-card:nth-child(3) { animation-delay: 0.3s; }
.resource-card:nth-child(4) { animation-delay: 0.4s; }
.resource-card:nth-child(5) { animation-delay: 0.5s; }
.resource-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================
   INTERACTIVE ELEMENTS
   ========================================== */

/* Loading State for Articles */
.article-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Search Results Highlighting */
.search-highlight {
    background: linear-gradient(120deg, #ffd93d 0%, #ff6b9d 100%);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

/* Filter Active State */
.filter-active {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus States */
.category-btn:focus,
.blog-card:focus,
.resource-card:focus {
    outline: 2px solid #ff6b9d;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .category-btn {
        border-width: 3px;
    }
    
    .category-btn.active {
        background: #000;
        color: #fff;
    }
    
    .blog-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .resource-card,
    .category-btn {
        animation: none;
        transition: none;
    }
    
    .blog-card:hover,
    .resource-card:hover {
        transform: none;
    }
}

/* ==========================================
   TYPOGRAPHY ENHANCEMENTS
   ========================================== */

/* Blog Content Typography */
.blog-content h1, .blog-content h2, .blog-content h3 {
    color: #1f2937;
    line-height: 1.3;
}

.blog-content p {
    color: #4b5563;
    line-height: 1.7;
}

.blog-meta {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Reading Time Indicator */
.reading-time {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================
   MOBILE OPTIMIZATIONS
   ========================================== */

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        padding: 1rem;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .chat-widget,
    .newsletter-section,
    .category-nav {
        display: none !important;
    }
    
    .blog-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

.blog-content::-webkit-scrollbar {
    width: 6px;
}

.blog-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.blog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-radius: 3px;
}

.blog-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e55a8a, #45b7aa);
}

/* ==========================================
   SPECIAL EFFECTS
   ========================================== */

/* Gradient Border Animation */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4, #ffd93d, #ff6b9d);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    animation: gradientRotate 3s linear infinite;
}

@keyframes gradientRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Particle Effect Background */
.particles-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 217, 61, 0.1) 0%, transparent 50%);
    pointer-events: none;
}
