/* 
 * Blog Archive Page Styles
 * Oliwa Hockey Advisors
 * 
 * Custom styles for the blog archive page
 * Complements Tailwind CSS and design system
 */

/* ==========================================
   SMOOTH SCROLL & BASE STYLES
   ========================================== */
.blog-archive-main {
    scroll-behavior: smooth;
}

/* ==========================================
   BLOG CARD ENHANCEMENTS
   ========================================== */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

/* Featured Image Zoom Effect */
.blog-card .aspect-video img {
    transition: transform 0.5s ease;
}

.blog-card:hover .aspect-video img {
    transform: scale(1.1);
}

/* ==========================================
   PAGINATION STYLING
   ========================================== */
.blog-archive-main .pagination {
    display: flex;
    align-items: center;
    justify-center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-archive-main .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    background-color: #FFFFFF;
    border: 2px solid #184973;
    border-radius: 0.5rem;
    color: #04192C;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-archive-main .pagination .page-numbers:hover {
    background-color: #184973;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 73, 115, 0.2);
}

.blog-archive-main .pagination .page-numbers.current {
    background-color: #B8030D;
    border-color: #B8030D;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(184, 3, 13, 0.3);
}

.blog-archive-main .pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.blog-archive-main .pagination .page-numbers.dots:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.blog-archive-main .pagination .prev,
.blog-archive-main .pagination .next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.blog-archive-main .animate-on-scroll {
    opacity: 0;
    animation-fill-mode: forwards;
}

.blog-archive-main .animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.blog-archive-main .animate-scale {
    animation: scale 0.6s ease-out forwards;
}

/* Animation Delays */
.blog-archive-main .animate-delay-200 {
    animation-delay: 0.2s;
}

.blog-archive-main .animate-delay-400 {
    animation-delay: 0.4s;
}

/* ==========================================
   CATEGORY BADGE STYLING
   ========================================== */
.blog-card a[href*="category"] {
    position: relative;
}

.blog-card a[href*="category"]::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #B8030D;
    transition: width 0.3s ease;
}

.blog-card a[href*="category"]:hover::before {
    width: 100%;
}

/* ==========================================
   RESPONSIVE IMPROVEMENTS
   ========================================== */
@media (max-width: 640px) {
    .blog-archive-main h1 {
        font-size: 2rem;
    }
    
    .blog-card h2 {
        font-size: 1.25rem;
    }
    
    .blog-archive-main .pagination .page-numbers {
        min-width: 2rem;
        height: 2rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .blog-card h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   HOVER EFFECTS FOR LINKS
   ========================================== */
.blog-card a svg {
    transition: transform 0.3s ease;
}

.blog-card a:hover svg {
    transform: translateX(4px);
}

/* ==========================================
   ASPECT RATIO FALLBACK
   ========================================== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
    .aspect-video {
        padding-bottom: 56.25%;
        position: relative;
    }
    
    .aspect-video > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

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

/* Focus visible for keyboard navigation */
.blog-archive-main *:focus-visible {
    outline: 2px solid #184973;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.blog-archive-main .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #04192C;
    color: #FFFFFF;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.blog-archive-main .skip-link:focus {
    top: 0;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .blog-archive-main *,
    .blog-archive-main *::before,
    .blog-archive-main *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .blog-archive-main .animate-on-scroll {
        opacity: 1 !important;
    }
    
    .blog-archive-main .pagination {
        display: none;
    }
    
    .blog-card {
        page-break-inside: avoid;
    }
}

/* ==========================================
   LOADING STATES (Optional Enhancement)
   ========================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.blog-card.loading {
    background: linear-gradient(
        to right,
        #EDEFF0 0%,
        #F8F9FA 20%,
        #EDEFF0 40%,
        #EDEFF0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ==========================================
   ENHANCED HOVER STATES
   ========================================== */
.blog-card {
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 20px 25px -5px rgba(24, 73, 115, 0.1), 
                0 10px 10px -5px rgba(24, 73, 115, 0.04);
}

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

/* ==========================================
   GRADIENT OVERLAYS
   ========================================== */
.blog-card .aspect-video::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(4, 25, 44, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.blog-card:hover .aspect-video::after {
    opacity: 1;
}

