/* ===============================
   Klientsure Current Affairs Table
================================ */

/* Wrapper */
.kcs-ca-table-wrapper{
    width:100%;
    overflow-x:auto;
    margin-top:20px;
}

/* Table */
.kcs-ca-table{
    width:100%;
    border-collapse:collapse;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.06);
}

/* Header */
.kcs-ca-table th{
    background:linear-gradient(135deg,#1f2937,#111827);
    color:#ffffff;
    padding:14px 18px;
    text-align:center;
    font-size:14px;
    font-weight:600;
    letter-spacing:0.4px;
    text-transform:uppercase;
    border-right:1px solid rgba(255,255,255,0.15);
}

.kcs-ca-table th:last-child{
    border-right:none;
}

/* Cells */
.kcs-ca-table td{
    padding:14px 18px;
    text-align:center;
    font-size:15px;
    color:#111827;
    border:1px solid #e5e7eb;
    vertical-align:middle;
}

/* Zebra rows */
.kcs-ca-table tbody tr:nth-child(even){
    background:#fafafa;
}

/* Hover */
.kcs-ca-table tbody tr:hover{
    background:#f1f5f9;
}

/* Title link */
.kcs-ca-table td a{
    color:#0f172a;
    font-weight:500;
    text-decoration:none!important;
}

.kcs-ca-table td a:hover{
    color:#2563eb;
    text-decoration:underline;
}

/* Action button */
.kcs-ca-btn{
    display:inline-block;
    padding:8px 18px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#ffffff!important;
    border-radius:999px;
    font-size:13px;
    font-weight:500;
    text-decoration:none;
    transition:all 0.3s ease;
}

.kcs-ca-btn:hover{
    background:linear-gradient(135deg,#1d4ed8,#1e40af);
    box-shadow:0 6px 16px rgba(37,99,235,0.35);
    transform:translateY(-1px);
}

/* ===============================
   Mobile Card View
================================ */
/* ===============================
   Mobile Table View (No Scroll)
================================ */
@media (max-width:768px){

    .kcs-ca-table-wrapper{
        overflow-x:hidden;
    }

    .kcs-ca-table{
        table-layout:fixed;
        width:100%;
        font-size:13px;
    }

    .kcs-ca-table th,
    .kcs-ca-table td{
        padding:8px 6px;
        word-wrap:break-word;
        white-space:normal;
        text-align:center;
    }

    /* Column width control */
    .kcs-ca-table th:nth-child(1),
    .kcs-ca-table td:nth-child(1){
        width:25%;
    }

    .kcs-ca-table th:nth-child(2),
    .kcs-ca-table td:nth-child(2){
        width:50%;
    }

    .kcs-ca-table th:nth-child(3),
    .kcs-ca-table td:nth-child(3){
        width:25%;
    }

    /* Button compact */
    .kcs-ca-btn{
        padding:6px 10px;
        font-size:12px;
    }
}

/* =========================================
   FORCE PROPER TABLE LAYOUT ON MOBILE
   (HEADER + ROWS PERFECTLY ALIGNED)
========================================= */
@media (max-width: 768px){

    /* Restore full table model */
    .kcs-ca-table{
        display: table !important;
        width: 100% !important;
        table-layout: fixed;
        border-collapse: collapse;
    }

    .kcs-ca-table thead{
        display: table-header-group !important;
    }

    .kcs-ca-table tbody{
        display: table-row-group !important;
    }

    .kcs-ca-table tr{
        display: table-row !important;
        width: 100% !important;
    }

    .kcs-ca-table th,
    .kcs-ca-table td{
        display: table-cell !important;
        vertical-align: middle;
        text-align: center;
        padding: 8px 6px;
        font-size: 13px;
        word-break: break-word;
        white-space: normal;
    }

    /* Let browser auto-sync column widths */
    .kcs-ca-table th,
    .kcs-ca-table td{
        width: auto !important;
    }

    /* Remove any scroll */
    .kcs-ca-table-wrapper{
        overflow-x: hidden !important;
    }

    /* Compact button */
    .kcs-ca-btn{
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* ===============================
   Current Affairs Sidebar
================================ */

.kcs-ca-sidebar-widget{
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:16px;
    margin-bottom:20px;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
}

.kcs-ca-widget-title{
    font-size:12px;
    font-weight:600;
    margin-bottom:12px;
    color:#111827;
    border-bottom:1px solid #e5e7eb;
    padding-bottom:8px;
}

.kcs-ca-list{
    list-style:none;
    padding:0;
    margin:0;
}

.kcs-ca-list li{
    margin-bottom:8px;
}

.kcs-ca-list li a{
    text-decoration:none;
    color:#2563eb;
    font-size:12px;
}

.kcs-ca-list li a:hover{
    text-decoration:underline;
}
