/* ============================================================================
   SHARED CONTENT LISTING STYLES (Mobile)
   Used by video-blogs, books-pdfs, written-posts, research-papers, educational-courses
   Theme: Red, Black, White, Engineering Grid, Architectural
   ============================================================================ */

/* Container - Horizontal padding for all content sections */
.container {
    padding-left: 16px;
    padding-right: 16px;
}

/* Content Header */
.content-header {
    position: relative;
    padding: 50px 20px 38px;
    background:
        radial-gradient(ellipse 85% 55% at 50% 15%, rgba(130, 0, 0, 0.22) 0%, transparent 68%),
        linear-gradient(165deg, #130000 0%, #1e0000 40%, #090000 70%, #010000 100%);
    border-bottom: 1px solid rgba(139, 0, 0, 0.38);
    overflow: hidden;
    text-align: center;
}

/* White splash separator at top */
.content-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 30%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0.4) 70%, 
        transparent 100%
    );
    box-shadow: 0 2px 15px rgba(204, 0, 0, 0.6);
    z-index: 2;
}

.content-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(139, 0, 0, 0.04) 24px,
            rgba(139, 0, 0, 0.04) 25px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 24px,
            rgba(139, 0, 0, 0.04) 24px,
            rgba(139, 0, 0, 0.04) 25px
        );
    pointer-events: none;
    z-index: 0;
}

.content-page-title {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 1.85rem;
    font-weight: 900;
    margin-bottom: 12px;
    color: #FFFFFF;
    z-index: 1;
    text-align: center;
    letter-spacing: 0.01em;
}

.content-page-title i {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(160, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.75) 100%);
    border: 1px solid rgba(204, 0, 0, 0.45);
    border-radius: 18px;
    color: #E00000;
    font-size: 1.75rem;
    filter: drop-shadow(0 4px 18px rgba(204, 0, 0, 0.65));
    box-shadow:
        0 0 24px rgba(139, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.content-page-subtitle {
    position: relative;
    font-size: 13.5px;
    color: rgba(175, 175, 175, 0.85);
    line-height: 1.6;
    z-index: 1;
    text-align: center;
    max-width: 78%;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    padding: 16px 16px 12px;
}

.search-bar {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #CC0000;
    font-size: 18px;
    filter: drop-shadow(0 2px 6px rgba(204, 0, 0, 0.4));
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 14px 14px 48px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(15, 0, 0, 0.9)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 12px;
    color: #E8E8E8;
    font-size: 15px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(204, 0, 0, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(204, 0, 0, 0.15);
}

.search-input::placeholder {
    color: rgba(140, 140, 140, 0.7);
}

/* Content Items Grid */
.content-items-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Content Item Card */
.content-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, 
        rgba(10, 0, 0, 0.98), 
        rgba(25, 0, 0, 0.92)
    );
    border: 1px solid rgba(139, 0, 0, 0.35);
    border-radius: 16px;
    text-decoration: none;
    color: #FFFFFF;
    overflow: hidden;
    box-shadow: 
        inset 2px 0 0 rgba(139, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* White splash top border */
.content-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 30%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.3) 70%, 
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.content-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(139, 0, 0, 0.02) 10px,
            rgba(139, 0, 0, 0.02) 11px
        );
    pointer-events: none;
}

.content-item:active {
    transform: translateY(-2px);
    border-color: rgba(204, 0, 0, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 12px rgba(204, 0, 0, 0.2),
        0 6px 20px rgba(204, 0, 0, 0.25);
}

.content-item:active::after {
    opacity: 1;
}

/* Content Thumbnail */
.content-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.1), 
        rgba(0, 0, 0, 0.5)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-thumbnail i {
    font-size: 32px;
    color: #BC8F8F;
    opacity: 0.3;
}

.content-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Content Info */
.content-info-wrap {
    flex: 1;
    min-width: 0; /* Prevent flex overflow - allows text truncation to work */
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.content-item-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: rgba(170, 170, 170, 0.8);
}

.content-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.content-item-meta i {
    color: #CC0000;
    font-size: 11px;
    filter: drop-shadow(0 1px 3px rgba(204, 0, 0, 0.3));
}

.content-item-desc {
    font-size: 13px;
    color: rgba(200, 200, 200, 0.9);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Content Tags */
.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.content-tag {
    padding: 3px 8px;
    background: linear-gradient(135deg, 
        rgba(204, 0, 0, 0.15), 
        rgba(0, 0, 0, 0.5)
    );
    border: 1px solid rgba(204, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #CC0000;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Empty State */
.empty-state {
    position: relative;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(20, 0, 0, 0.85)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.empty-state::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.02) 20px,
            rgba(139, 0, 0, 0.02) 21px
        );
    pointer-events: none;
}

.empty-state i {
    position: relative;
    font-size: 64px;
    color: #CC0000;
    margin-bottom: 16px;
    opacity: 0.3;
    filter: drop-shadow(0 2px 4px rgba(204, 0, 0, 0.2));
    z-index: 1;
}

.empty-state h3 {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #FFFFFF;
    z-index: 1;
}

.empty-state p {
    position: relative;
    font-size: 14px;
    color: rgba(180, 180, 180, 0.8);
    z-index: 1;
}

/* Loading Skeleton */
.loading-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(20, 0, 0, 0.85)
    );
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.skeleton-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    background: linear-gradient(
        90deg, 
        rgba(139, 0, 0, 0.1) 25%, 
        rgba(139, 0, 0, 0.2) 50%, 
        rgba(139, 0, 0, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-info {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 14px;
    background: linear-gradient(
        90deg, 
        rgba(139, 0, 0, 0.1) 25%, 
        rgba(139, 0, 0, 0.2) 50%, 
        rgba(139, 0, 0, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

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

/* Footer */
.mobile-footer {
    position: relative;
    text-align: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(15, 0, 0, 0.9)
    );
    border-top: 1px solid rgba(80, 0, 0, 0.3);
    margin-top: 20px;
    overflow: hidden;
}

.mobile-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(139, 0, 0, 0.02) 20px,
            rgba(139, 0, 0, 0.02) 21px
        );
    pointer-events: none;
}

.footer-text {
    position: relative;
    font-size: 14px;
    color: rgba(200, 200, 200, 0.9);
    margin-bottom: 8px;
    z-index: 1;
}

.footer-credit {
    position: relative;
    font-size: 13px;
    color: rgba(170, 170, 170, 0.8);
    z-index: 1;
}

.footer-credit strong {
    color: #CC0000;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.4);
}

/* Small Screens */
@media (max-width: 359px) {
    .content-thumbnail {
        width: 90px;
        height: 68px;
    }
    
    .content-item-title {
        font-size: 14px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-item {
    animation: fadeInUp 0.3s ease backwards;
}

.content-item:nth-child(1) { animation-delay: 0.05s; }
.content-item:nth-child(2) { animation-delay: 0.1s; }
.content-item:nth-child(3) { animation-delay: 0.15s; }
.content-item:nth-child(4) { animation-delay: 0.2s; }
.content-item:nth-child(5) { animation-delay: 0.25s; }
