.modern-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 15px;
    transform: translateY(0);
    color: #6c757d;
    z-index: 1;
}

.search-box input {
    padding-left: 45px;
    padding-right: 50px;
    height: 50px;
    border-radius: 25px;
    border: 1px solid rgba(50, 110, 146, 0.2);
    width: 100%;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: -1px;
    transform: translateY(0);
    border: none;
    background: linear-gradient(23deg, #184554, #2d7d96);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
        transform: translateY(0) scale(1.05);
}

.hearing-card {
    height: 100%;
    transition: transform 0.3s ease;
}

.hearing-card:hover {
    transform: translateY(-5px);
}

.hearing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hearing-date {
    font-weight: 500;
    color: #326e92;
}

.hearing-venue {
    background: rgba(50, 110, 146, 0.1);
    color: #326e92;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.hearing-title {
    color: #1f3745;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.hearing-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    position: relative;
    max-height: 4.5em;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.hearing-description.expanded {
    max-height: none;
}

.hearing-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, white);
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.hearing-description.expanded::after {
    opacity: 0;
}

.read-more-btn {
    display: inline-block;
    color: #326e92;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 2;
    margin-bottom: 20px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more-btn:hover {
    color: #1f3745;
}

.read-more-btn.hidden {
    display: none;
}

.hearing-meta {
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.meta-item i {
    color: #326e92;
}

.hearing-actions {
    display: flex;
    gap: 10px;
}

.btn-view,
.btn-attachment {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-view {
    background: linear-gradient(23deg, #184554, #2d7d96);
    color: white;
}

.btn-attachment {
    border: 2px solid #326e92;
    color: #326e92;
}

.btn-view:hover,
.btn-attachment:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.simple-keyboard {
    display: none;
    width: 100%;
    height: 11vh;
    background: #f8f9fa;
    color: gray;
    margin-top: 15px;
}

.simple-keyboard .hg-row {
    display: flex;
    justify-content: space-between;
}

.simple-keyboard .hg-button {
    flex: 1;
    margin: 3px;
    padding: 6px;
    font-size: 1em;
    text-align: center;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .hearing-actions {
        flex-direction: column;
    }
    
    .btn-view,
    .btn-attachment {
        width: 100%;
    }
}

/* Image Gallery Styles */
.image-gallery {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 10px;
}

.main-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 5px;
}

.main-image:hover {
    transform: scale(1.02);
}

.sub-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.sub-image {
    width: 100%;
    height: 100px;
    object-fit: contain;
    background-color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 5px;
}

.sub-image:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
    .main-image {
        height: 250px;
    }
    
    .sub-image {
        height: 80px;
    }
}

@media (max-width: 576px) {
    .sub-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sub-image {
        height: 120px;
    }
}

/* Pagination Styles */
.pagination {
    margin-top: 30px;
    justify-content: center;
}

.page-link {
    color: #326e92;
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: rgba(50, 110, 146, 0.1);
    color: #326e92;
}

.page-item.active .page-link {
    background: linear-gradient(23deg, #184554, #2d7d96);
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background: none;
}

/* PDF Viewer Modal Styles */
#pdfViewer {
    background-color: #525659;
    text-align: center;
    overflow: auto;
}

#pdfViewer canvas {
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.modal-xl {
    max-width: 90%;
}
