/**
 * Updates Page Styles
 * Path: public_html/css/updates.css
 * Version: 1.0.8
 */

/* =====================================================
   Container
   ===================================================== */
.updates-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* =====================================================
   Page Title and Subtitle - No box, no background
   ===================================================== */
.updates-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
    margin: 0 0 12px 0;
    text-align: center;
}

.updates-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted, #666);
    max-width: 600px;
    margin: 0 auto 32px auto;
    line-height: 1.5;
    text-align: center;
}

/* =====================================================
   Filters Section - White card, NOT sticky
   ===================================================== */
.filters-section {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filters-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted, #555);
    margin-right: 4px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e0e0e0);
    background: var(--card-bg, #fff);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted, #555);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.filter-btn.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.filter-btn .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 6px;
}

.filter-btn.active .count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* =====================================================
   Timeline Slider
   ===================================================== */
.timeline-slider {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.timeline-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}

/* Connecting line behind the year buttons */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 400px;
    height: 2px;
    background: var(--border-color, #e0e0e0);
    z-index: 0;
}

.timeline-year {
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-color, #e0e0e0);
    color: var(--text-muted, #555);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin: 0 16px;
}

.timeline-year:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.timeline-year.active {
    background: linear-gradient(135deg, var(--primary-color, #2563eb), #1d4ed8);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* =====================================================
   Year Sections
   ===================================================== */
.year-section {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}

.year-header {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.year-badge {
    background: linear-gradient(135deg, var(--primary-color, #2563eb), #1d4ed8);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 32px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    margin: 0;
}

/* =====================================================
   Updates List
   ===================================================== */
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =====================================================
   Update Card
   ===================================================== */
.update-card {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    scroll-margin-top: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.update-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.update-card.featured {
    border-color: var(--primary-color, #2563eb);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(37, 99, 235, 0.08));
}

/* Update Icon */
.update-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle, #f5f7fa);
    border-radius: 12px;
    flex-shrink: 0;
}

/* Update Content */
.update-content {
    flex: 1;
    min-width: 0;
}

.update-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
}

.update-type {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Type colors */
.update-type.milestone {
    background: #fef3c7;
    color: #92400e;
}

.update-type.feature {
    background: #dbeafe;
    color: #1e40af;
}

.update-type.language {
    background: #d1fae5;
    color: #065f46;
}

.update-type.category {
    background: #ede9fe;
    color: #5b21b6;
}

.update-type.tag {
    background: #fce7f3;
    color: #9d174d;
}

.update-type.listing_type {
    background: #e0e7ff;
    color: #3730a3;
}

.update-type.general {
    background: #f3f4f6;
    color: #374151;
}

.featured-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color, #2563eb), #1d4ed8);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.update-headline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color, #1a1a2e);
    margin: 0 0 6px 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.update-description {
    font-size: 0.95rem;
    color: var(--text-muted, #666);
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.update-description a {
    color: #1d4ed8;
    text-decoration: underline;
}

.update-description a:hover {
    color: #1e40af;
}

/* =====================================================
   Load More
   ===================================================== */
.load-more {
    text-align: center;
    margin-top: 32px;
}

.load-more-btn {
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-color, #e0e0e0);
    color: var(--text-color, #333);
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.load-more-btn:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   No Results
   ===================================================== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #666);
}

.no-results p {
    font-size: 1.1rem;
}

/* =====================================================
   Dark Mode
   ===================================================== */
body.dark-mode .updates-title {
    color: var(--primary-color);
}

body.dark-mode .filters-section,
body.dark-mode .timeline-slider,
body.dark-mode .update-card {
    background: var(--card-bg);
}

body.dark-mode .filters-label {
    color: var(--text-muted);
}

body.dark-mode .filter-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-muted);
}

body.dark-mode .filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .timeline-track::before {
    background: var(--border-color);
}

body.dark-mode .timeline-year {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-muted);
}

body.dark-mode .update-icon {
    background: var(--bg-subtle);
}

body.dark-mode .update-headline {
    color: var(--text-color);
}

body.dark-mode .update-description a {
    color: #93bbfc;
}

body.dark-mode .update-description a:hover {
    color: #b4d0fd;
}

body.dark-mode .load-more-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* Dark mode type badges */
body.dark-mode .update-type.milestone {
    background: rgba(254, 243, 199, 0.15);
    color: #fbbf24;
}

body.dark-mode .update-type.feature {
    background: rgba(219, 234, 254, 0.15);
    color: #60a5fa;
}

body.dark-mode .update-type.language {
    background: rgba(209, 250, 229, 0.15);
    color: #34d399;
}

body.dark-mode .update-type.category {
    background: rgba(237, 233, 254, 0.15);
    color: #a78bfa;
}

body.dark-mode .update-type.tag {
    background: rgba(252, 231, 243, 0.15);
    color: #f472b6;
}

body.dark-mode .update-type.listing_type {
    background: rgba(224, 231, 255, 0.15);
    color: #818cf8;
}

body.dark-mode .update-type.general {
    background: rgba(243, 244, 246, 0.15);
    color: #9ca3af;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .updates-container {
        padding: 20px 16px;
    }

    .updates-title {
        font-size: 1.8rem;
    }

    .updates-subtitle {
        font-size: 1rem;
    }

    .filters-section {
        padding: 16px;
    }

    .filters-row {
        gap: 8px;
    }

    .filters-label {
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .timeline-slider {
        padding: 12px 16px;
    }

    .timeline-track::before {
        width: calc(100% - 40px);
    }

    .timeline-year {
        padding: 6px 14px;
        font-size: 0.85rem;
        margin: 0 8px;
    }

    .year-section {
        scroll-margin-top: 60px;
    }

    .year-badge {
        font-size: 1rem;
        padding: 8px 24px;
    }

    .update-card {
        padding: 16px;
        gap: 12px;
        scroll-margin-top: 60px;
    }

    .update-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .update-headline {
        font-size: 1rem;
    }

    .update-description {
        font-size: 0.9rem;
    }

    .update-meta {
        gap: 6px;
    }

    .update-date {
        font-size: 0.8rem;
    }

    .update-type {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
}

@media (max-width: 480px) {
    .filter-btn .count {
        display: none;
    }

    .timeline-track {
        gap: 0;
    }

    .timeline-track::before {
        display: none;
    }

    .timeline-year {
        padding: 5px 12px;
        font-size: 0.8rem;
        margin: 0 4px;
    }
}