@media (max-width: 1024px){
	.pdf-table-search-group{
		padding-left:20px;
	}
	#pdf-table-container{
		padding-left:20px;
	}
	#pdf-table-search-keyword{
		width: 98%;
	}
}
.pdf-table-search-group-label {
	color: #212529;
	font-size: 16px;
}

#pdf-table-search-keyword::placeholder {
	color: #C9A76F;
}

.pdf-table {
	margin-top: 40px;
}

.pdf-table th {
	color: #212529;
    font-size: 16px;
    font-weight: 600;
	text-transform: capitalize;
}

.pdf-table th, .pdf-table td {
	border-bottom: none;
}

.pdf-table tr:hover {
	transition: ease-in-out 0.4s;
    background-color: #e6e6e6;
}

.pdf-table tr:hover .pdf-title-in-table {
	color: #000;
}

.pdf-title-in-table {
	color: #C9A76F;
	font-size: 16px;
}

.pdf-download-count-in-table {
	color: #A2A2A2;
}

.pdf-icon-in-table a {
	padding: 4px 10px;
	border: solid 1px #C9A76F;
}

.pdf-icon-in-table a i{
	font-size: 16px;
}

.pdf-icon-in-table a:hover {
	background-color: #000000;
}

.pdf-icon-in-table a:hover i {
	color: white;
}

#commitment-window {
	position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.commitment-form-pop-up-container {
    background-color: #fff;
    margin: 5% auto;
    width: 80%;
    max-width: 1200px;
    position: relative;
    top: 20%;
    padding: 20px;
}

.commitment-form-header {
	margin-bottom: 50px;
	display: flex;
}

.commitment-window-title {
	font-size: 24px;
}

.commitment-window-title span {
	position: absolute;
    display: inline-block;
    bottom: 0;
    top: 55px;
    max-width: 90px;
    background: #C9A76F;
    width: 90px;
    height: 5px;
    left: 22px;	
}

html[lang="ar"] .commitment-window-title span {
	left: 0;
	right: 22px;
}

.commitment-form-close {
    position: absolute;
    border: none;
    background-color: white;
    font-size: 30px;
    color: #212529;
    right: 10px;
    top: 0;
}

html[lang="ar"] .commitment-form-close {
	right: unset;
	left: 10px;
}

.commitment-form-close:hover {
	color: #A2A2A2;
}

#commitment-form label {
	color: #212529;
	margin-bottom: 5px;
}

#commitment-form input {
	margin-bottom: 5px;	
}

#commitment-form input::placeholder {
	color: #C9A76F;
}

html[lang="ar"] #commitment-form input {
	direction: rtl;
}

#commitment-form-submit {
	background-color: #1D1E1F;
}

#commitment-form-date {
	background-color: white;
}

#commitment-form input[type=checkbox] {
	margin-bottom: 0 !important;
}

/* --- Layout Toggle Buttons --- */
.pdf-table-layout-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}
.pdf-table-layout-toggle button {
    border: none;
    background: #f4f6fa;
    color: #1d1e1f;
    padding: 10px 18px;
    font-size: 2rem;
    border-radius: 0;
    margin: 0;
    outline: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdf-table-layout-toggle button.active,
.pdf-table-layout-toggle button:focus {
    background: #1d2a44;
    color: #fff;
}
.pdf-table-layout-toggle button:first-child {
    border-radius: 6px 0 0 6px;
}
.pdf-table-layout-toggle button:last-child {
    border-radius: 0 6px 6px 0;
}

/* --- Table Layout --- */
.pdf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    background: #fff;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pdf-table th, .pdf-table td {
    padding: 18px 18px;
    text-align: left;
    border: none;
}
.pdf-table th {
    background: #f4f6fa;
    color: #1d1e1f;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid #e0e0e0;
}
.pdf-table tr {
    border-radius: 8px;
    transition: background 0.2s;
}
.pdf-table tr:hover {
    background: #f4f6fa;
}
.pdf-table tr.selected,
.pdf-table tr.selected td {
    background: #1d2a44 !important;
    color: #fff !important;
}
.pdf-table td {
    color: #1d1e1f;
    font-size: 1.1rem;
    vertical-align: middle;
}
.pdf-index-in-table {
    font-weight: bold;
    text-align: center;
    border-left: 2px solid #fff;
}
.pdf-title-in-table {
    font-weight: bold;
}
.pdf-table td,
.pdf-table th {
    border-right: 1px solid #e0e0e0;
}
.pdf-table td:last-child,
.pdf-table th:last-child {
    border-right: none;
}
.pdf-icon-in-table a {
    display: inline-block;
    border: none;
    background: none;
    padding: 0;
}
.pdf-icon-in-table img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: filter 0.2s;
}
.pdf-icon-in-table a:hover img {
    filter: brightness(0.8);
}

/* --- Grid Layout --- */
.pdf-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 30px;
    justify-content: center; /* Center grid items */
}
.pdf-grid-item {
    background: #fff;
    border: 2px solid #dbe2ea;
    border-radius: 12px;
    width: calc((100% - 64px) / 3);
    min-width: 220px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: border 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    padding: 24px 16px; /* Added padding */
}

.pdf-grid-item:hover {
    background: #192b45; /* Hover background color */
    border-color: #192b45;
}

.pdf-grid-item:hover .pdf-grid-title,
.pdf-grid-item:hover .pdf-grid-date {
    color: #fff;
}

.pdf-grid-item:hover img {
    filter: brightness(0.95);
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 1024px) {
    .pdf-grid {
        gap: 16px;
        justify-content: center; /* Center grid items */
    }
    .pdf-grid-item {
        width: calc((100% - 16px) / 2);
        min-width: 180px;
        max-width: 100%;
        margin-bottom: 16px;
    }
}

/* Responsive: 1 column on small screens */
@media (max-width: 600px) {
    .pdf-grid {
        gap: 10px;
        justify-content: center; /* Center grid items */
    }
    .pdf-grid-item {
        width: 100%;
        min-width: 120px;
        max-width: 100vw;
        margin-bottom: 10px;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .pdf-grid {
        gap: 16px;
        justify-content: center;
    }
    .pdf-grid-item {
        width: 45vw;
        min-width: 180px;
        max-width: 260px;
    }
    .pdf-table th, .pdf-table td {
        padding: 10px 8px;
        font-size: 1rem;
    }
}
@media (max-width: 600px) {
    .pdf-grid {
        gap: 10px;
    }
    .pdf-grid-item {
        width: 90vw;
        min-width: 120px;
        max-width: 100vw;
    }
    .pdf-table th, .pdf-table td {
        padding: 6px 4px;
        font-size: 0.95rem;
    }
}

/* --- Pagination --- */
#pdf-table-pagination {
    display: flex;
    justify-content: center;
    margin: 24px auto 0 auto;
    gap: 8px;
}
.pdf-table-page-btn {
    font-size: 1.1rem;
    color: #1d2a44;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    margin: 0 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pdf-table-page-btn.active,
.pdf-table-page-btn:hover {
    background: #1d2a44;
    color: #fff;
}
.pdf-table-page-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* --- Search Form --- */
#pdf-table-search-form {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.pdf-table-search-group {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}
#pdf-table-search-keyword {
    padding: 10px 16px;
    border: 1px solid #dbe2ea;
    border-radius: 6px 0 0 6px;
    font-size: 1.1rem;
    width: 250px;
    outline: none;
}
.pdf-table-search-group .pdf-table-search-form-btn {
    background: #1d2a44 !important;
    color: #fff !important;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 10px 18px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0px;
    height: 100%;           /* Make button take full height of its container */
    box-sizing: border-box; /* Ensure padding is included in height */
    display: flex;          /* Center content vertically */
    align-items: center;
}
.pdf-table-search-group .pdf-table-search-form-btn:hover {
    background: #22335c !important;
}

/* --- RTL Support --- */
html[lang="ar"] .pdf-table th,
html[lang="ar"] .pdf-table td,
html[lang="ar"] .pdf-table {
    text-align: right;
}
html[lang="ar"] #pdf-table-search-keyword {
    direction: rtl;
}