/**
 * Tech Modern Template - Custom Styles
 * Additional styles specific to the Tech Modern template
 */

/* ===========================
   Animations & Transitions
   =========================== */

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideInRight 0.5s ease-out;
}

/* ===========================
   Tech Modern Card Styles
   =========================== */

.tech-card {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--color-primary);
}

.tech-card-gradient {
    position: relative;
    overflow: hidden;
}

.tech-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

/* ===========================
   Navigation Enhancements
   =========================== */

.navbar-scroll {
    transition: all 0.3s ease;
}

.navbar-scroll.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

html.dark .navbar-scroll.scrolled {
    background: rgba(15, 23, 42, 0.95);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===========================
   Article Card Enhancements
   =========================== */

.article-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.article-image {
    transition: transform 0.5s ease;
}

.article-card:hover .article-image {
    transform: scale(1.08);
}

.article-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.article-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Button Styles
   =========================== */

.btn-tech {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-tech::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-tech:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

/* ===========================
   Gradient Text
   =========================== */

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   Loading & Skeleton
   =========================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-surface) 0%,
        rgba(200, 200, 200, 0.2) 50%,
        var(--color-surface) 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ===========================
   Scrollbar Styling
   =========================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ===========================
   Code Blocks
   =========================== */

pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.7;
}

code {
    background: var(--color-surface);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

pre code {
    background: transparent;
    padding: 0;
}

/* ===========================
   Tags & Badges
   =========================== */

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===========================
   Search Enhancement
   =========================== */

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===========================
   Breadcrumb
   =========================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.breadcrumb a {
    transition: color 0.2s ease;
}

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

.breadcrumb-separator {
    opacity: 0.5;
}

/* ===========================
   Pagination
   =========================== */

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-link.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===========================
   Responsive Utilities
   =========================== */

@media (max-width: 768px) {
    .tech-card {
        padding: 1rem;
    }
    
    .btn-tech {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .tech-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===========================
   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;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===========================
   Dark Mode Adjustments
   =========================== */

html.dark .tech-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(51, 65, 85, 0.8);
}

html.dark .tech-card:hover {
    background: rgba(30, 41, 59, 0.8);
}

html.dark code {
    background: rgba(30, 41, 59, 0.5);
}

html.dark pre {
    background: rgba(15, 23, 42, 0.8);
}

html.dark .search-input {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(51, 65, 85, 0.8);
}
