/**
 * CivicOS Timeline Styles
 *
 * Styles for the committee-based timeline homepage.
 */

/* ========================================
   Homepage Layout
   ======================================== */

.civicos-homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    border-radius: 12px;
}

.site-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.site-header .tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   Committee Sections
   ======================================== */

.committee-section {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.committee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.committee-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: #1e3a5f;
}

.meeting-count {
    font-size: 0.9rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========================================
   Timeline Container
   ======================================== */

.timeline-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* ========================================
   Timeline Navigation Arrows
   ======================================== */

.timeline-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    min-width: 80px;
}

.timeline-nav:hover:not(.disabled) {
    background: #e9ecef;
}

.timeline-nav.disabled {
    cursor: default;
    opacity: 0.4;
}

.timeline-prev {
    flex-direction: row;
    gap: 10px;
}

.timeline-next {
    flex-direction: row;
    gap: 10px;
}

.nav-arrow {
    font-size: 1.8rem;
    color: #1e3a5f;
    font-weight: bold;
}

.nav-arrow.disabled {
    color: #adb5bd;
}

.nav-date {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

/* ========================================
   Meeting Card
   ======================================== */

.meeting-card-wrapper {
    flex: 1;
    max-width: 700px;
}

.meeting-card {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.meeting-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.meeting-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Card Date Sidebar */
.card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #1e3a5f;
    color: white;
    min-width: 70px;
}

.date-month {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.date-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin: 5px 0;
}

.date-year {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Card Content */
.card-content {
    flex: 1;
    padding: 20px;
}

.committee-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.card-title a {
    color: #1e3a5f;
    text-decoration: none;
}

.card-title a:hover {
    color: #2d5a87;
    text-decoration: underline;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.vote-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #28a745;
}

.vote-icon {
    font-size: 1rem;
}

.read-more {
    color: #2d5a87;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* ========================================
   Chatbot Promo Section
   ======================================== */

.chatbot-promo {
    text-align: center;
    padding: 40px;
    margin-top: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.chatbot-promo h2 {
    font-size: 1.5rem;
    color: #1e3a5f;
    margin: 0 0 10px 0;
}

.chatbot-promo p {
    color: #6c757d;
    margin: 0;
}

/* ========================================
   Loading State
   ======================================== */

.timeline-container.loading .meeting-card {
    opacity: 0.5;
}

.timeline-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #e9ecef;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.8rem;
    }

    .timeline-container {
        flex-direction: column;
        gap: 15px;
    }

    .timeline-nav {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }

    .timeline-prev {
        order: 2;
    }

    .meeting-card-wrapper {
        order: 1;
        width: 100%;
        max-width: none;
    }

    .timeline-next {
        order: 0;
    }

    .meeting-card {
        flex-direction: column;
    }

    .card-date {
        flex-direction: row;
        gap: 10px;
        padding: 15px;
    }

    .date-day {
        font-size: 1.5rem;
    }

    .committee-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .civicos-homepage {
        padding: 10px;
    }

    .site-header {
        padding: 30px 15px;
    }

    .site-header h1 {
        font-size: 1.5rem;
    }

    .committee-section {
        padding: 15px;
    }

    .card-content {
        padding: 15px;
    }

    .card-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
