.event-booking-grid .eb-slot-short {
    display: none;
}

@media (max-width: 575.98px) {
    .event-booking-grid .eb-slot-full {
        display: none;
    }

    .event-booking-grid .eb-slot-short {
        display: inline;
    }
}
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Novallis', 'Rubik', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
::after,
::before {
    box-sizing: border-box;
}

/* Professional Background */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, rgb(230, 237, 243) 0%, rgb(240, 244, 248) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    color: #333;
    font-weight: 400;
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6,
.article-title,
.card-header,
.navbar-brand,
.modal-title {
    font-family: var(--font-heading);
}

/* Optional: Add subtle overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
    z-index: -2;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, rgb(230, 237, 243) 0%, rgb(240, 244, 248) 100%);
    z-index: -3;
    opacity: 0.5;
}

/* Ensure content sits above background */
.container, .container-fluid, nav, main {
    position: relative;
}

h1 {
    font-size: 28px;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    color: #6c757d;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

h3 {
    font-size: 18px;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0;
}

h4 {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

li {
    list-style: none;
    color: #333;
}

/* Professional Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    padding: 1.25rem;
}

/* Professional Buttons */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6fa8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: none;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    color: #333;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #229954;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    color: white;
}

.btn-info {
    background-color: var(--secondary-color);
    color: white;
}

.btn-info:hover {
    background-color: #2980b9;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Table Styling */
.table {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
}

.table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856405;
}

/* Badge Styling */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Modal Styling */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    position: relative;
    z-index: 1056;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    background-color: white;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
}

.btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 1rem 1.5rem;
    background-color: white;
}

/* Navbar Styling */
.navbar {
    background: linear-gradient(90deg, #0b3d2e 0%, #f1c40f 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0.8rem 0;
}

/* Public site navbar: dark green → yellow gradient */
.navbar.navbar-public {
    background: linear-gradient(90deg, #0b3d2e 0%, #f1c40f 100%) !important;
}

#bdNavbar {
    opacity: 0.95;
    background: linear-gradient(90deg, #0b3d2e 0%, #f1c40f 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Public site mobile offcanvas background */
#bdNavbar.offcanvas-public {
    background: linear-gradient(90deg, #0b3d2e 0%, #f1c40f 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: white !important;
}

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.9) !important;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white !important;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Secondary Background */
.bg-secondary {
    opacity: 0.92;
    width: 100%;
    max-width: 450px;
    margin: 40px auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Page specific styling */
.text-bg-secondary {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding: 1rem;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .bg-secondary {
        width: auto;
        margin: 20px 0;
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }

    body::before {
        display: none;
    }
    
    /* Mobile-friendly cards */
    .card {
        margin-bottom: 1rem;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Better spacing on mobile */
    .col-md-3, .col-md-4, .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Improve button touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
    }
    
    /* Better navbar spacing */
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
    }
    
    /* Mobile tables - make horizontally scrollable */
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        margin-bottom: 1rem;
    }
    
    /* Adjust modal for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .card {
        margin-bottom: 1rem;
        padding: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Full width forms on mobile */
    .card[style*="width: 25rem"],
    .card[style*="width: auto"] {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
    }
    
    /* Stack form elements */
    .form-control {
        font-size: 14px;
    }
    
    /* Better search bar on mobile */
    .row.g-3 > div {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile table improvements */
    .table {
        font-size: 0.85rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* Hide less important columns on mobile */
    .table .hide-mobile {
        display: none;
    }
    
    /* Better badge sizing */
    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }
    
    /* Adjust container padding */
    .container, .container-lg, .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Better alert spacing */
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Accessibility Improvements */
:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

button:focus, a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Mobile-specific table improvements */
@media (max-width: 992px) {
    /* Hide less critical columns on tablets */
    /* Only apply to tables that opt-in (e.g., books lists). */
    .table.table-hide-columns th:nth-child(4), /* ISBN */
    .table.table-hide-columns td:nth-child(4),
    .table.table-hide-columns th:nth-child(6), /* Language */
    .table.table-hide-columns td:nth-child(6),
    .table.table-hide-columns th:nth-child(7), /* Level */
    .table.table-hide-columns td:nth-child(7),
    .table.table-hide-columns th:nth-child(8), /* Genre */
    .table.table-hide-columns td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 768px) {
    /* On mobile, show only essential columns */
    .table.table-hide-columns th:nth-child(5), /* Category */
    .table.table-hide-columns td:nth-child(5) {
        display: none;
    }
    
    /* Make action buttons stack vertically */
    .table td form, .table td button {
        display: block;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    /* Ultra-compact mobile view */
    .table {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 0.4rem;
    }
    
    /* Make title column wrap */
    .table.table-hide-columns td:nth-child(2) {
        max-width: 150px;
        white-space: normal;
        word-wrap: break-word;
    }
}

/* Mobile Navigation Improvements */
.navbar {
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.offcanvas {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d5a80 50%, var(--secondary-color) 100%);
}

.offcanvas-title {
    color: white;
    font-weight: 600;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    /* This is a touch device */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem !important;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Improve input fields for mobile */
@media (max-width: 576px) {
    input,
    textarea,
    select,
    .form-control,
    .form-select {
        font-size: 14px !important;
        padding: 0.75rem;
    }
}

/* iOS Safari zoom fix: iOS will auto-zoom inputs < 16px */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 576px) {
        input,
        textarea,
        select,
        .form-control,
        .form-select {
            font-size: 16px !important;
        }
    }
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
    }
}

/* Better spacing for mobile content */
@media (max-width: 768px) {
    .mt-5 {
        margin-top: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Improve modal backdrop on mobile */
@media (max-width: 576px) {
    .modal-backdrop {
        background-color: rgba(0, 0, 0, 0.7);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ========================================
   PAGINATION STYLES
   ======================================== */

/* Pagination container */
.pagination {
    gap: 0.25rem;
}

/* Pagination links */
.pagination .page-link {
    color: #667eea;
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: #667eea;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    z-index: 3;
}

/* Active page */
.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Disabled state */
.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
}

/* Icons in pagination */
.pagination .page-link i {
    font-size: 0.875rem;
}

/* Mobile responsive pagination */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.875rem;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
    }
    
    /* Hide page numbers on very small screens, keep only nav buttons */
    .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
    
    .pagination .page-item.active {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* Pagination info text */
.pagination + .text-muted,
.text-muted {
    font-size: 0.9rem;
    font-weight: 400;
}

@media (max-width: 576px) {
    nav[aria-label="Books pagination"] .text-muted {
        font-size: 0.8rem;
        text-align: center;
        display: block;
    }
}
