/* 
 * Resources Category Pages - Mobile First Responsive Design
 * Extends homepage.css for category listings
 */

/* Import base styles from homepage */
@import url('/resources/css/homepage.css');

/* ==========================================================================
   Category Page Specific Styles - Mobile First (320px+)
   ========================================================================== */

/* Category Hero Section */
.category-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 2rem 0;
    margin-top: -1px;
}

.category-hero-content {
    text-align: center;
    padding: 0 1rem;
}

.category-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.1);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.category-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

/* Breadcrumb Section */
.breadcrumb-section {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    margin: 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    border-radius: 0;
}

.breadcrumb-item {
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-item a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    margin: 0 0.5rem;
    font-weight: normal;
}

.breadcrumb .fas.fa-home {
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

/* Tab Navigation (shared with content.css) */
.tab-navigation {
    margin: 1rem 0 0 0;
    padding: 0;
}

.tab-nav-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.tab-nav-container::-webkit-scrollbar {
    height: 4px;
}

.tab-nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.tab-nav-container::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

.tab-nav-item {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: fit-content;
}

.tab-nav-item:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
}

.tab-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-nav-item.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Content Overview Section */
.content-overview {
    padding: 3rem 0;
    background: #f8f9fa;
}

/* Latest Stories Section */
.latest-stories-section {
    margin-bottom: 3rem;
}

.latest-stories-section .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: left;
}

.latest-stories-section .section-description {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    text-align: left;
}

.latest-stories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.latest-story-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.latest-story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.latest-story-card .story-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.latest-story-card .story-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.latest-story-card .story-title a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.latest-story-card .story-title a:hover {
    opacity: 0.9;
}

.latest-story-card .story-description {
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.latest-story-card .story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.latest-story-card .story-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Category Overview - Left Aligned */
.category-overview {
    margin: 2rem 0;
}

.category-overview .overview-content {
    text-align: left;
    max-width: none;
}

.category-overview .overview-content h1,
.category-overview .overview-content h2,
.category-overview .overview-content h3,
.category-overview .overview-content h4,
.category-overview .overview-content h5,
.category-overview .overview-content h6 {
    text-align: left;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.category-overview .overview-content p,
.category-overview .overview-content ul,
.category-overview .overview-content ol {
    text-align: left;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* All Content Section */
.all-content-section .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: left;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin: 2rem 0;
}

.overview-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.overview-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.overview-text {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.6;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Content Items */
.content-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.content-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: height 0.3s ease;
}

.content-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.content-item:hover::before {
    height: 6px;
}

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.item-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.directory-item .item-icon {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.file-item .item-icon {
    background: linear-gradient(135deg, #fd7e14, #f7931e);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.item-title a:hover {
    color: #007bff;
}

.item-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.meta-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.read-time {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin: 2rem 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #6c757d;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: #6c757d;
    margin-bottom: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
}

/* Section Dividers */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6, transparent);
    margin: 3rem 0;
}

/* ==========================================================================
   Tablet Styles (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    /* Category Hero Tablet */
    .category-hero {
        padding: 3rem 0;
    }
    
    .category-icon-large {
        font-size: 5rem;
        width: 140px;
        height: 140px;
    }
    
    .category-title {
        font-size: 2.5rem;
    }
    
    .category-subtitle {
        font-size: 1.25rem;
    }
    
    /* Breadcrumb Tablet */
    .breadcrumb-section {
        padding: 1.25rem 0;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
    }
    
    /* Tab Navigation Tablet */
    .tab-nav-container {
        gap: 0.75rem;
        justify-content: flex-start;
    }
    
    .tab-nav-item {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Latest Stories Tablet */
    .latest-stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .latest-story-card {
        padding: 2rem;
    }
    
    .latest-story-card .story-title {
        font-size: 1.375rem;
    }
    
    .latest-story-card .story-description {
        font-size: 1rem;
    }
    
    /* Content Grid Tablet */
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0 2rem;
    }
    
    .content-item {
        padding: 2rem;
    }
    
    .item-title {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Desktop Styles (992px+)
   ========================================================================== */

@media (min-width: 992px) {
    /* Category Hero Desktop */
    .category-hero {
        padding: 4rem 0;
    }
    
    .category-icon-large {
        font-size: 6rem;
        width: 160px;
        height: 160px;
    }
    
    .category-title {
        font-size: 3rem;
    }
    
    .category-subtitle {
        font-size: 1.375rem;
    }
    
    .category-description {
        font-size: 1.125rem;
    }
    
    /* Breadcrumb Desktop */
    .breadcrumb-section {
        padding: 1.5rem 0;
    }
    
    .breadcrumb {
        font-size: 1rem;
    }
    
    /* Tab Navigation Desktop */
    .tab-nav-container {
        gap: 1rem;
        overflow-x: visible;
    }
    
    .tab-nav-item {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Latest Stories Desktop */
    .latest-stories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .latest-story-card .story-title {
        font-size: 1.5rem;
    }
    
    .latest-story-card .story-description {
        font-size: 1rem;
    }
    
    .latest-story-card .story-meta {
        font-size: 0.875rem;
    }
    
    /* Content Grid Desktop */
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0;
    }
    
    .content-overview {
        padding: 4rem 0;
    }
    
    .overview-title {
        font-size: 2.25rem;
    }
    
    .content-item {
        padding: 2.5rem;
    }
    
    .item-title {
        font-size: 1.375rem;
    }
    
    .item-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   Large Desktop Styles (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1400px;
    }
    
    .category-title {
        font-size: 3.5rem;
    }
    
    .category-icon-large {
        width: 150px;
        height: 150px;
        font-size: 5rem;
    }
}

/* ==========================================================================
   Special Content Types
   ========================================================================== */

/* Halloween specific styling */
.content-item[data-topic="halloween"] .item-icon {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.content-item[data-topic="halloween"]::before {
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

/* Christmas specific styling */
.content-item[data-topic="christmas"] .item-icon {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.content-item[data-topic="christmas"]::before {
    background: linear-gradient(90deg, #dc3545, #bd2130);
}

/* Cultural origins category color */
.category-cultural-origins .category-icon-large {
    background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(247,147,30,0.2));
}

/* Wisdom category color */
.category-timeless-wisdom .category-icon-large {
    background: linear-gradient(135deg, rgba(0,123,255,0.2), rgba(0,86,179,0.2));
}

/* History category color */
.category-hidden-history .category-icon-large {
    background: linear-gradient(135deg, rgba(111,66,193,0.2), rgba(90,45,145,0.2));
}

/* Science category color */
.category-science-wonder .category-icon-large {
    background: linear-gradient(135deg, rgba(40,167,69,0.2), rgba(30,126,52,0.2));
}

/* Future category color */
.category-human-future .category-icon-large {
    background: linear-gradient(135deg, rgba(220,53,69,0.2), rgba(189,33,48,0.2));
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Focus styles */
.content-item:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.item-title a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .content-item,
    .back-button {
        transition: none;
    }
}

/* Print styles */
@media print {
    .category-hero {
        background: none !important;
        color: #000 !important;
    }
    
    .content-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}