/* ========================================= */
/* --- CURRENT AFFAIRS (LIST & DETAILS) ---- */
/* ========================================= */

.ca-section {
    padding: 40px 20px;
    background-color: #f8fafc; /* Soothing background for reading */
    font-family: 'Poppins', sans-serif;
    min-height: 80vh;
}

.ca-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* --- Top Filter Bar (Tabs & Date) --- */
.ca-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 30px;
    gap: 20px;
}

.ca-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ca-tabs::-webkit-scrollbar { display: none; }

.ca-tab {
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ca-tab.active, .ca-tab:hover {
    background: #1b1c4b; /* Disha Navy */
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(27, 28, 75, 0.2);
}

.ca-date-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Main Layout Grid --- */
.ca-grid {
    display: grid;
    grid-template-columns: 1fr 380px; /* Left Content, Right Sidebar */
    gap: 30px;
    align-items: start; /* Important for sticky sidebar */
}

/* ========================================= */
/* 1. LISTING PAGE SPECIFIC CSS              */
/* ========================================= */

.ca-feed-date {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.ca-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ca-news-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ca-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.ca-card-img {
    width: 240px;
    height: 140px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8fafc;
}

.ca-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ca-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ca-news-card:hover .ca-card-title {
    color: #1b1c4b;
}

.ca-card-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ========================================= */
/* 2. DETAILS PAGE SPECIFIC CSS              */
/* ========================================= */

.ca-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.ca-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.ca-back-btn:hover {
    color: #e46a00;
}

.ca-lang-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 30px;
    padding: 4px;
    flex-shrink: 0;
}

.lang-btn {
    padding: 6px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #dbeafe; /* Light blue accent */
    color: #1d4ed8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Summernote Backend Content Styles */
.ca-detail-box {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.ca-editor-content {
    font-size: 15px;
    color: #334155;
    line-height: 1.8;
}

.ca-editor-content h3, 
.ca-editor-content h4, 
.ca-editor-content h5 {
    color: #0f172a;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.ca-editor-content h3 { font-size: 20px; }
.ca-editor-content p { margin-bottom: 15px; }
.ca-editor-content strong { color: #1e293b; }

.ca-editor-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.ca-editor-content li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.ca-editor-content li::marker {
    color: #1b1c4b;
}


/* ========================================= */
/* 3. SIDEBAR CSS (SHARED)                   */
/* ========================================= */

.ca-sidebar-wrapper {
    position: sticky;
    top: 90px; /* Sticks smoothly while scrolling */
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ca-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.ca-widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.ca-trending-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ca-trending-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    align-items: center;
    transition: transform 0.2s ease;
}

.ca-trending-item:hover {
    transform: translateX(5px);
}

.ca-trend-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ca-trend-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ca-trending-item:hover .ca-trend-info h4 {
    color: #e46a00;
}

.ca-trend-info p {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Calendar Pills */
.ca-cal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ca-cal-pill {
    padding: 10px 5px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ca-cal-pill:hover {
    background: #1b1c4b;
    color: #fff;
    border-color: #1b1c4b;
}


/* ========================================= */
/* --- RESPONSIVE DESIGN ------------------- */
/* ========================================= */

@media (max-width: 1024px) {
    .ca-grid {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 850px) {
    .ca-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ca-grid {
        grid-template-columns: 1fr; /* Stack Sidebar below content */
    }

    .ca-sidebar-wrapper {
        position: static; /* Remove sticky on mobile */
    }

    .ca-card-img {
        width: 180px;
    }
}

@media (max-width: 600px) {
    .ca-news-card {
        flex-direction: column; /* Stack image and text on small phones */
        padding: 15px;
    }

    .ca-card-img {
        width: 100%;
        height: 180px;
    }

    .ca-detail-top {
        flex-direction: column;
    }

    .ca-detail-box {
        padding: 20px;
    }

    .ca-back-btn {
        font-size: 18px;
    }
}