/*
Theme Name: Viral Daily
Theme URI: https://sweary.com
Description: A modern viral content theme for daily trending posts, memes, videos, and digest roundups
Version: 2.6.0
Author: Sweary.com
Text Domain: viral-daily
*/

/* Base */
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; }

/* ==========================================================================
   MASONRY GRID - 4 Column Fluid Layout
   ========================================================================== */

.masonry-grid {
    column-count: 4;
    column-gap: 1rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
}

/* Responsive Masonry Breakpoints */
@media (max-width: 1280px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* ==========================================================================
   Video Embeds
   ========================================================================== */

.video-embed { 
    position: relative; 
}

.video-embed iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}

/* ==========================================================================
   Prose Styling for Post Content
   ========================================================================== */

.prose { 
    line-height: 1.75; 
}

.prose p { 
    margin-bottom: 1.25em; 
}

.prose img { 
    border-radius: 12px; 
    margin: 1.5em 0; 
}

.prose a { 
    color: #ff9900; 
    text-decoration: underline; 
}

.prose a:hover { 
    color: #e68a00; 
}

.prose figure { 
    margin: 1.5em 0; 
}

.prose video { 
    border-radius: 12px; 
    max-width: 100%; 
}

/* ==========================================================================
   Digest Post Styling
   ========================================================================== */

.digest-content { 
    line-height: 1.6; 
}

.digest-content > div { 
    transition: transform 0.2s; 
}

.digest-content > div:hover { 
    transform: translateX(4px); 
}

/* Digest card special styling */
.digest-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.digest-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ==========================================================================
   Line Clamp Utilities
   ========================================================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.card-hover { 
    transition: transform 0.2s, box-shadow 0.2s; 
}

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

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

.nav-links { 
    display: flex; 
    gap: 0.5rem; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.nav-links a, 
.nav-links span { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    min-width: 40px; 
    height: 40px; 
    padding: 0 12px;
    border-radius: 8px; 
    font-weight: 600;
    transition: all 0.2s;
}

.nav-links a { 
    background: #f3f4f6; 
    color: #374151; 
}

.nav-links a:hover { 
    background: #ff9900; 
    color: white; 
}

.nav-links .current { 
    background: #ff9900; 
    color: white; 
}

/* ==========================================================================
   Image Aspect Ratios
   ========================================================================== */

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ==========================================================================
   Smooth Loading
   ========================================================================== */

.masonry-item {
    animation: fadeInUp 0.4s ease-out both;
}

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

/* Stagger animation for items */
.masonry-item:nth-child(1) { animation-delay: 0.05s; }
.masonry-item:nth-child(2) { animation-delay: 0.1s; }
.masonry-item:nth-child(3) { animation-delay: 0.15s; }
.masonry-item:nth-child(4) { animation-delay: 0.2s; }
.masonry-item:nth-child(5) { animation-delay: 0.25s; }
.masonry-item:nth-child(6) { animation-delay: 0.3s; }
.masonry-item:nth-child(7) { animation-delay: 0.35s; }
.masonry-item:nth-child(8) { animation-delay: 0.4s; }
