/* 99FX Blog Styles - Apple Clean Style */

/* Clean Apple Style Effects */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Apple-style Animations */
@keyframes apple-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes apple-scale {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.02);
    }
}

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

/* Animation Classes */
.animate-apple-fade {
    animation: apple-fade-in 0.6s ease-out;
}

.animate-apple-scale {
    animation: apple-scale 0.3s ease-out;
}

.animate-apple-float {
    animation: apple-float 4s ease-in-out infinite;
}

/* Blog Card - Apple Style */
.blog-card-apple {
    position: relative;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog-card-apple:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(234, 179, 8, 0.3);
}

/* Image Hover Effects - Apple Style */
.image-hover-apple {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.image-hover-apple img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Text Effects - Apple Style */
.text-apple-title {
    color: #374151;
    font-weight: 500;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.text-apple-body {
    color: #6B7280;
    font-weight: 400;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.text-apple-accent {
    color: #EAB308;
    font-weight: 500;
}

/* Button - Apple Style */
.btn-apple {
    background: #EAB308;
    border: none;
    border-radius: 980px;
    padding: 10px 20px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(234, 179, 8, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.btn-apple:hover {
    background: #D97706;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.btn-apple-secondary {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.btn-apple-secondary:hover {
    background: #E5E7EB;
    color: #1F2937;
    transform: scale(1.02);
}

/* Search Bar - Apple Style */
.search-apple {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.search-apple:focus {
    outline: none;
    border-color: #EAB308;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

/* Tag - Apple Style */
.tag-apple {
    background: #F3F4F6;
    color: #6B7280;
    border-radius: 980px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.tag-apple:hover {
    background: #FEF3C7;
    color: #D97706;
    border-color: #F59E0B;
}

.tag-apple-active {
    background: #EAB308;
    color: white;
    border-color: #EAB308;
}

/* Loading States - Apple Style */
.skeleton-apple {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: apple-loading 1.5s infinite;
}

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

/* Scroll Reveal - Apple Style */
.scroll-reveal-apple {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal-apple.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design - Apple Style */
@media (max-width: 1024px) {
    .blog-card-apple:hover {
        transform: scale(1.01);
    }
}

@media (max-width: 768px) {
    .blog-card-apple {
        border-radius: 20px;
    }
    
    .blog-card-apple:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .btn-apple {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* Dark Mode Support - Apple Style */
@media (prefers-color-scheme: dark) {
    .blog-card-apple {
        background: #1F2937;
        border-color: #374151;
    }
    
    .text-apple-title {
        color: #F9FAFB;
    }
    
    .text-apple-body {
        color: #D1D5DB;
    }
    
    .glass {
        background: rgba(31, 41, 55, 0.9);
        border-color: rgba(75, 85, 99, 0.3);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-apple-fade,
    .animate-apple-scale,
    .animate-apple-float,
    .blog-card-apple,
    .btn-apple,
    .search-apple,
    .tag-apple {
        animation: none;
        transition: none;
    }
}

/* Print Styles */
@media print {
    .blog-card-apple,
    .btn-apple,
    .search-apple,
    .tag-apple {
        box-shadow: none;
        border-radius: 8px;
    }
    
    .text-apple-accent {
        color: #000;
    }
}

/* Focus States - Apple Style */
.focus-visible:focus {
    outline: 2px solid #EAB308;
    outline-offset: 2px;
}

/* Custom Scrollbar - Apple Style */
.custom-scrollbar-apple::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar-apple::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.custom-scrollbar-apple::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.custom-scrollbar-apple::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Article Page Specific Styles */
.hover\:scale-102:hover {
    transform: scale(1.02);
}

.prose p strong {
    color: #111827 !important;
}

/* Enhanced Article Content */
.article-content {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    line-height: 1.7;
    color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 600;
    color: #1F2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.article-content strong {
    font-weight: 600;
    color: #1F2937;
}

.article-content a {
    color: #EAB308;
    text-decoration: none;
    font-weight: 500;
}

.article-content a:hover {
    text-decoration: underline;
}

/* Related Articles Slider Styles */
.slider-container {
    position: relative;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-out;
}

.slider-slide {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .slider-slide {
        width: 50%;
    }
}

@media (min-width: 1024px) {
    .slider-slide {
        width: 33.333%;
    }
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.slider-nav-btn:hover {
    background: #FEF3C7;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider-nav-btn.prev {
    left: 16px;
}

.slider-nav-btn.next {
    right: 16px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.slider-dot.active,
.slider-dot.bg-yellow-500 {
    background: #EAB308;
    transform: scale(1.2);
}

.slider-dot:hover {
    background: #F59E0B;
}

/* Smooth animations */
.slider-track {
    will-change: transform;
}

/* Touch gestures support */
.slider-track {
    touch-action: pan-y;
    user-select: none;
}

/* Loading state */
.slider-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.slider-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #EAB308;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility improvements */
.slider-nav-btn:focus,
.slider-dot:focus {
    outline: 2px solid #EAB308;
    outline-offset: 2px;
}

/* RTL support for Arabic */
[dir="rtl"] .slider-nav-btn.prev {
    right: 16px;
    left: auto;
}

[dir="rtl"] .slider-nav-btn.next {
    left: 16px;
    right: auto;
}