/* Content Cards CSS - Unique Styling System */
/* File: css/content-cards.css */

/* ===================================
   Base Reset & Variables
   =================================== */
:root {
    --nexus-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --nexus-secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --nexus-tertiary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --nexus-shadow-soft: 0 5px 15px rgba(0,0,0,0.08);
    --nexus-shadow-medium: 0 10px 30px rgba(0,0,0,0.12);
    --nexus-shadow-heavy: 0 20px 40px rgba(0,0,0,0.15);
    --nexus-border-radius: 12px;
    --nexus-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   News Content Cards - Nexus Style
   =================================== */
.nexus-content-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.nexus-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Main News Card */
.nexus-news-card {
    background: #ffffff;
    border-radius: var(--nexus-border-radius);
    overflow: hidden;
    box-shadow: var(--nexus-shadow-soft);
    transition: var(--nexus-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nexus-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--nexus-primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nexus-news-card:hover::before {
    transform: scaleX(1);
}

.nexus-news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--nexus-shadow-heavy);
}

/* News Card Image Container */
.nexus-card-media {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--nexus-primary-gradient);
}

.nexus-card-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nexus-news-card:hover .nexus-card-media-img {
    transform: scale(1.1);
}

/* Fallback Icon for Missing Images */
.nexus-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--nexus-primary-gradient);
}

.nexus-media-icon {
    font-size: 4em;
    color: rgba(255, 255, 255, 0.9);
    animation: nexusPulse 2s ease-in-out infinite;
}

/* News Card Content Area */
.nexus-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nexus-card-headline {
    font-size: 1.15em;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.nexus-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #718096;
    margin-bottom: 15px;
}

.nexus-meta-icon {
    color: #667eea;
}

.nexus-card-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: var(--nexus-transition);
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(102, 126, 234, 0.1);
}

.nexus-card-action:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.nexus-action-arrow {
    transition: transform 0.3s ease;
}

.nexus-card-action:hover .nexus-action-arrow {
    transform: translateX(3px);
}

/* ===================================
   Video Content Cards - Flux Style
   =================================== */
.flux-video-section {
    margin-top: 50px;
    margin-bottom: 40px;
}

.flux-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.flux-video-item {
    background: var(--nexus-secondary-gradient);
    border-radius: var(--nexus-border-radius);
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: var(--nexus-transition);
    cursor: pointer;
}

.flux-video-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.flux-video-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.flux-video-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--nexus-shadow-heavy);
}

.flux-video-title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.flux-video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: var(--nexus-transition);
    position: relative;
    z-index: 1;
}

.flux-video-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.flux-play-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.flux-play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid #f5576c;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-left: 2px;
}

/* ===================================
   Section Headers - Quantum Style
   =================================== */
.quantum-section-header {
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.quantum-section-title {
    font-size: 2em;
    font-weight: 700;
    background: var(--nexus-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 15px;
}

.quantum-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--nexus-primary-gradient);
    border-radius: 2px;
    animation: quantumGlow 2s ease-in-out infinite;
}

/* ===================================
   Loading States - Skeleton
   =================================== */
.nexus-skeleton-card {
    background: #ffffff;
    border-radius: var(--nexus-border-radius);
    overflow: hidden;
    box-shadow: var(--nexus-shadow-soft);
}

.nexus-skeleton-media {
    width: 100%;
    height: 220px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: nexusShimmer 1.5s infinite;
}

.nexus-skeleton-content {
    padding: 20px;
}

.nexus-skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: nexusShimmer 1.5s infinite;
    margin-bottom: 10px;
    border-radius: 4px;
}

.nexus-skeleton-line.short {
    width: 60%;
}

/* ===================================
   Animations
   =================================== */
@keyframes nexusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes quantumGlow {
    0%, 100% {
        opacity: 1;
        transform: scaleX(1);
    }
    50% {
        opacity: 0.7;
        transform: scaleX(0.95);
    }
}

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

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .nexus-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .flux-video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nexus-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nexus-card-media {
        height: 180px;
    }
    
    .quantum-section-title {
        font-size: 1.5em;
    }
    
    .flux-video-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nexus-content-wrapper {
        padding: 15px;
    }
    
    .nexus-card-body {
        padding: 15px;
    }
    
    .nexus-card-headline {
        font-size: 1em;
    }
    
    .flux-video-title {
        font-size: 1em;
    }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    .nexus-news-card {
        background: #2d3748;
    }
    
    .nexus-card-headline {
        color: #e2e8f0;
    }
    
    .nexus-card-meta {
        color: #a0aec0;
    }
    
    .nexus-skeleton-media,
    .nexus-skeleton-line {
        background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
        background-size: 200% 100%;
    }
}