/* =============================================
   Category Cards - Rigid Fixed Design
   This CSS forces all cards to be exactly the same size
============================================= */

/* Reset any previous card styles */
.category-card-piku,
.card-style-eight.category-card-piku,
.card-style-eight,
.custom-card-table .category-card-piku {
    all: unset !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 200px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(10, 56, 76, 0.08) !important;
    padding: 24px 16px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.category-card-piku:hover,
.card-style-eight.category-card-piku:hover,
.card-style-eight:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(10, 56, 76, 0.15) !important;
}

/* Icon container - fixed size */
.category-card-piku .icon,
.card-style-eight .icon {
    width: 90px !important;
    height: 90px !important;
    margin: 0 auto 16px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #e8f7f6 0%, #d4f1f0 100%) !important;
    border-radius: 16px !important;
    flex-shrink: 0 !important;
}

.category-card-piku .icon img,
.card-style-eight .icon img {
    width: 55px !important;
    height: 55px !important;
    object-fit: contain !important;
}

/* Title - fixed height with truncation */
.category-card-piku h5,
.card-style-eight h5,
.category-card-piku .title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0a384c !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 38px !important;
    max-height: 38px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
}

/* Hide description completely */
.category-card-piku p,
.card-style-eight p,
.category-card-piku .description {
    display: none !important;
}

/* DataTable Grid Layout */
.custom-card-table {
    width: 100% !important;
}

.custom-card-table thead {
    display: none !important;
}

.custom-card-table tbody {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 10px 0 !important;
}

.custom-card-table tbody tr {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.custom-card-table tbody td {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border: none !important;
}

/* Card link wrapper */
.custom-card-table tbody td > a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

/* Responsive Grid */
@media (max-width: 1199px) {
    .custom-card-table tbody {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 991px) {
    .custom-card-table tbody {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
    
    .category-card-piku,
    .card-style-eight.category-card-piku,
    .card-style-eight {
        height: 190px !important;
        padding: 20px 14px !important;
    }
    
    .category-card-piku .icon,
    .card-style-eight .icon {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 14px !important;
    }
    
    .category-card-piku .icon img,
    .card-style-eight .icon img {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 767px) {
    .custom-card-table tbody {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .category-card-piku,
    .card-style-eight.category-card-piku,
    .card-style-eight {
        height: 175px !important;
        padding: 18px 12px !important;
        border-radius: 12px !important;
    }
    
    .category-card-piku .icon,
    .card-style-eight .icon {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
    }
    
    .category-card-piku .icon img,
    .card-style-eight .icon img {
        width: 42px !important;
        height: 42px !important;
    }
    
    .category-card-piku h5,
    .card-style-eight h5 {
        font-size: 13px !important;
        height: 35px !important;
        max-height: 35px !important;
    }
}

@media (max-width: 480px) {
    .custom-card-table tbody {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .category-card-piku,
    .card-style-eight.category-card-piku,
    .card-style-eight {
        height: 160px !important;
        padding: 16px 10px !important;
    }
    
    .category-card-piku .icon,
    .card-style-eight .icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 10px !important;
    }
    
    .category-card-piku .icon img,
    .card-style-eight .icon img {
        width: 36px !important;
        height: 36px !important;
    }
    
    .category-card-piku h5,
    .card-style-eight h5 {
        font-size: 12px !important;
        height: 32px !important;
        max-height: 32px !important;
    }
}

/* Search bar fix */
.search-form input,
.form-control.search-input,
input[type="search"],
.dataTables_filter input {
    padding-left: 45px !important;
}

.search-form {
    position: relative !important;
}

.search-form .search-icon,
.search-form svg {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
}
