/* Blog-specific styles */

/* Line Clamp Utility */
.line-clamp-4 {
    display: -webkit-box;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Card Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Article Card Hover Effect */
.article-card:hover {
    transform: translateY(-4px);
}

/* Tab Indicator Animation */
.tab-indicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search Input Focus */
input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Badge Styles */
.badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Link Underline Animation */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.link-underline:hover::after {
    transform: scaleX(1);
}

/* Card Shadow */
.shadow-card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-card-hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
button {
    transition: all 0.2s ease;
}

button:hover {
    filter: brightness(1.05);
}

button:active {
    filter: brightness(0.95);
}

/* Pagination Button */
.pagination-btn {
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #f1f5f9;
}

.pagination-btn.active {
    background-color: #0066FF;
    color: white;
}

/* Grid Layout */
.articles-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Sidebar Sticky */
@media (min-width: 1024px) {
    aside {
        position: sticky;
        top: 6rem;
        align-self: flex-start;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0066FF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    header,
    footer,
    aside,
    .no-print {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Card Border Glow on Hover */
.article-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 102, 255, 0.1);
}

/* Tab Active State */
.category-tab.active {
    color: #0066FF;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}