/* ==========================================================================
   PNW Constituencies Grid & Card Styles (Replicating States & UTs Structure)
   ========================================================================== */

.constituencies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .constituencies-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .constituencies-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .constituencies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}
@media (max-width: 600px) {
    .constituencies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* Constituency Card */
.constituency-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.constituency-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* Card Header with Badges */
.c-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.c-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.c-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.c-type-badge.badge-ls {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.c-type-badge.badge-assembly {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.c-number-badge {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.c-res-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.c-res-badge.res-general {
    background: #f1f5f9;
    color: #475569;
}

.c-res-badge.res-sc {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.c-res-badge.res-st {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

/* Card Body */
.c-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.c-title {
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.c-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.c-title a:hover {
    color: #2563eb;
}

/* Meta list */
.c-meta-list {
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.c-meta-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}

.c-meta-item i {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.c-meta-item strong {
    color: #0f172a;
}

/* Action button */
.c-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #2563eb;
    font-weight: 600;
    font-size: 13px;
    padding: 9px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto;
}

.c-card-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .constituency-card {
        border-radius: 10px;
    }
    .c-card-header {
        padding: 8px 10px !important;
        gap: 4px !important;
    }
    .c-badges {
        gap: 4px !important;
    }
    .c-type-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
        letter-spacing: 0.2px !important;
    }
    .c-res-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    .c-number-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    .c-card-body {
        padding: 10px 10px 12px !important;
    }
    .c-title {
        font-size: 13.5px !important;
        font-weight: 700 !important;
        margin: 0 0 8px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.3 !important;
    }
    .c-title a {
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .c-meta-list {
        font-size: 11px !important;
        gap: 4px !important;
        margin-bottom: 10px !important;
    }
    .c-meta-item {
        gap: 6px !important;
        line-height: 1.35 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }
    .c-meta-item span {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: block !important;
        min-width: 0 !important;
    }
    .c-meta-item i {
        font-size: 11px !important;
        width: 12px !important;
        margin-top: 1px !important;
    }
    .c-card-btn {
        min-height: 38px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
    }
}
