/* ============================================
   SISOBAT V5 - Global Responsive & UI Enhancement
   Applies to all site/* pages via layouts.front.app
   ============================================ */

/* --- Base Typography & Smoothing --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Global Content Wrapper --- */
.content-wrapper {
    min-height: calc(100vh - 200px);
}

.content-wrapper .container {
    max-width: 1300px;
}

/* Override bpom.css .content margin-top: 60px to reduce gap between menu and slider */
/* .content {
    margin-top: 0px !important;
    padding: 0 !important;
} */

/* --- Page Header / Title --- */
.bg-blue-soft h2,
.bg-blue-soft h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
}

/* --- Card-like Content Sections --- */
.bg-blue-soft {
    padding: 25px 20px;
}

.bg-blue-soft>.col-sm-12,
.bg-blue-soft>.col-md-12 {
    padding-left: 15px;
    padding-right: 15px;
}

/* --- Forms Enhancement --- */
.form-control {
    border-radius: 8px;
    border: 1px solid #dce1e6;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: #4364F7;
    box-shadow: 0 0 0 3px rgba(67, 100, 247, 0.15);
    outline: none;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

/* --- Buttons Enhancement --- */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-block {
    padding: 12px 20px;
    font-size: 15px;
}

.bg-blue-bpom.btn-block,
.btn.bg-blue-bpom {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: #fff;
}

.bg-blue-bpom.btn-block:hover,
.btn.bg-blue-bpom:hover {
    background: linear-gradient(135deg, #2a5298 0%, #4364F7 100%);
}

/* --- Alerts Enhancement --- */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    border-left: 4px solid #004282;
}

/* --- Tables Enhancement --- */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table>thead>tr>th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 12px 15px;
}

.table>tbody>tr>td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid #f0f0f0;
}

.table>tbody>tr:hover {
    background-color: #f8f9fa;
}

/* --- Box/Panel Enhancement --- */
/* Override bpom.css .box { border-radius: 0 } */
.box {
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border: none;
    overflow: hidden;
}

.box .box-header {
    border-bottom: 1px solid #f0f0f0;
}

.box .box-body {
    padding: 20px;
}

/* --- Images Enhancement --- */
.content-container img {
    border-radius: 8px;
    max-width: 100%;
    height: auto !important;
}

.img-rounded {
    border-radius: 12px;
}

/* --- Pagination Enhancement --- */
.pagination>li>a,
.pagination>li>span {
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 14px;
}

.pagination>.active>a {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-color: transparent;
}

/* --- Captcha Section --- */
.captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha img {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}



/* Override bpom.css .bg-blue-bpom { background-color: #004282 !important } */
.bg-blue-bpom {
    background: linear-gradient(135deg, #001a3e 0%, #003366 100%) !important;
}

.footer-col {
    padding: 35px 30px !important;
}

.bg-blue-bpom h5 {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 18px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitorcounter p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.visitor-count {
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 10px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 13px;
}

/* Poll Styles */
.poll-question {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    opacity: 0.9;
}

.poll-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.poll-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.2s;
    color: #fff;
    font-size: 13px;
    margin: 0;
}

.poll-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

.poll-option input[type="radio"] {
    margin: 0;
}

.poll-stars {
    color: #ffc107;
}

.poll-actions {
    display: flex;
    gap: 8px;
}

.btn-poll-submit {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-poll-submit:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.btn-poll-result {
    background: transparent;
    color: #4fc3f7;
    border: 1px solid #4fc3f7;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-poll-result:hover {
    background: #4fc3f7;
    color: #001a3e;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-3px);
    text-decoration: none;
}

/* Contact */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
    line-height: 1.6;
    align-items: flex-start;
}

.contact-item i {
    margin-top: 4px;
    color: #4fc3f7;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px !important;
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    opacity: 0.7;
}

.mod-sppoll {
    font-size: 14px;
    line-height: 1.6;
}

.mod-sppoll .radio label {
    color: #fff;
    font-size: 14px;
    padding: 4px 0;
}

/* --- Header / Navigation Enhancement --- */

/* Language Switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.lang-switch:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e3c72;
    text-decoration: none;
}

/* Logo Row */
.header-logo-row {
    padding: 25px 15px !important;
    min-height: 120px;
    background-color: #fff !important;
}

.header-logo {
    max-width: 100%;
    height: 90px !important;
    object-fit: contain;
}

/* Override bpom.css .btn-app { padding: 12px 5px; margin: 10px 0 10px 10px; } */
.header-social-desktop .btn-app {
    margin: 5px !important;
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    border: 1px solid #e0e5f0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.header-social-desktop .btn-app>i {
    font-size: 18px !important;
    display: inline !important;
    margin: 0 !important;
    line-height: 1 !important;
    color: #444;
}

.header-social-desktop .btn-app:hover {
    background-color: #004282 !important;
    border-color: #004282 !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 66, 130, 0.2) !important;
}

.header-social-desktop .btn-app:hover>i {
    color: #fff !important;
}

/* Mobile Header Bar */
.mobile-header-bar {
    background: linear-gradient(135deg, #001a3e, #003366);
    padding: 8px 15px;
}

.mobile-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.mobile-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.mobile-lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}

.mobile-header-bar .sidebar-toggle {
    color: #fff;
    font-size: 20px;
    padding: 5px 10px;
}

.mobile-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    background: #27ae60;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.mobile-login-btn:hover {
    background: #2ecc71;
    color: #fff;
    text-decoration: none;
}

/* Sidebar mobile icons */
.sidebar-menu>li>a i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

#submenu {
    border-radius: 0;
    margin-bottom: 0;
}

/* Keep bpom.css font-size: 15px, but enhance with weight & spacing */
#submenu ul li a {
    font-size: 15px !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    color: #cfd7e5;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    border-bottom: 4px solid transparent !important;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

#submenu ul li a:hover {
    color: #fff !important;
    border-bottom-color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

#submenu ul li.active a {
    color: #fff !important;
    border-bottom-color: #fff !important;
}

.dropdown-menu {
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    padding: 8px 0;
    margin-top: 0;
    background: #fff !important;
}

/* Override bpom.css dropdown link styles */
#submenu ul li.dropdown ul li a {
    background-color: #fff !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 10px 22px !important;
    border-bottom: none !important;
    text-transform: none !important;
    transition: all 0.2s ease;
}

#submenu ul li.dropdown ul li a:hover {
    background-color: #f0f4ff !important;
    color: #004282 !important;
    padding-left: 28px !important;
}

/* --- Modal Enhancement --- */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px 25px;
}

/* --- Content Container --- */
.content-container {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.content-container p {
    margin-bottom: 15px;
}

.content-container ul,
.content-container ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.content-container li {
    margin-bottom: 8px;
}

/* --- HR Styling --- */
hr {
    border: none;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* --- Tablet (max 991px) --- */
@media (max-width: 991px) {
    .content-wrapper .container {
        padding: 0 10px;
    }

    .bg-blue-soft {
        padding: 20px 10px;
    }

    .bg-blue-soft h2 {
        font-size: 22px;
    }

    /* Footer columns stack */
    .bg-blue-bpom>.col-lg-3,
    .bg-blue-bpom>.col-lg-4,
    .bg-blue-bpom>.col-lg-5 {
        width: 100%;
        float: none;
        padding: 25px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .bg-blue-bpom>.col-lg-5:last-of-type {
        border-bottom: none;
    }

    /* Header logo */
    .main-header .container>.row>.col-lg-5 {
        width: 100%;
        text-align: center;
    }

    .main-header .container>.row>.col-lg-5 img {
        max-width: 280px;
        margin: 0 auto;
    }

    .main-header .container>.row>.col-lg-7 {
        display: none;
    }

    /* Table responsive */
    .table-responsive {
        border: none;
    }

    .table {
        min-width: 600px;
    }

    /* Form margin fix */
    div[style*='margin:0 10% 0 10%'] {
        margin: 0 3% 0 3% !important;
    }
}

/* --- Mobile Large (max 767px) --- */
@media (max-width: 767px) {
    .content-wrapper .container {
        padding: 0 5px;
    }

    .content-header {
        padding: 5px 0 !important;
    }

    .bg-blue-soft {
        padding: 15px 8px;
    }

    .bg-blue-soft h2 {
        font-size: 20px;
    }

    .bg-blue-soft h3 {
        font-size: 18px;
    }

    /* Two columns on mobile for grid items */
    .col-sm-4,
    .col-sm-8 {
        width: 100%;
        float: none;
    }

    .col-md-3,
    .col-md-9 {
        width: 100%;
        float: none;
    }

    /* Table scrollable wrapper */
    .table-responsive,
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* News list items stack vertically */
    ul.list-article li .col-sm-4 {
        margin-bottom: 10px;
    }

    ul.list-article li .col-sm-4 img {
        width: 100% !important;
        height: 180px !important;
        object-fit: cover;
    }

    ul.list-article li .col-sm-8 h2 a {
        font-size: 17px;
    }

    /* Form margin fix mobile */
    div[style*='margin:0 10% 0 10%'] {
        margin: 0 2% 0 2% !important;
    }

    /* Footer social icons */
    .bg-blue-bpom h2.pad {
        font-size: 24px;
    }

    /* Modal full width on mobile */
    .modal-dialog {
        margin: 10px;
        width: auto;
    }

    /* Buttons full width on mobile */
    .btn-xs {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Marquee bar */
    .bg-gray-light {
        display: none !important;
    }

    /* Content images */
    .content-container img {
        width: 100% !important;
    }

    /* Sidebar mobile improvements */
    .main-sidebar {
        padding-top: 10px;
    }

    .sidebar-menu>li>a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .sidebar-menu .header {
        padding: 12px 15px 8px;
        font-size: 12px;
        font-weight: 700;
    }

    /* Event/registration form columns */
    .col-lg-6 {
        width: 100%;
        float: none;
    }

    /* Fix captcha alignment */
    .captcha {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Fix pagination */
    .pagination {
        flex-wrap: wrap;
    }
}

/* --- Mobile Small (max 480px) --- */
@media (max-width: 480px) {
    .bg-blue-soft h2 {
        font-size: 18px;
    }

    .form-control {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .btn-block {
        padding: 14px 20px;
        font-size: 16px;
    }

    /* Footer text */
    .bg-blue-bpom p.text-center {
        font-size: 11px;
        padding: 10px 15px;
    }

    /* Smaller table font */
    .table>thead>tr>th,
    .table>tbody>tr>td {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ============================================
   COMPONENT-SPECIFIC RESPONSIVE STYLES
   ============================================ */

/* --- FullCalendar Enhancement --- */
.fc {
    border-radius: 12px;
    overflow: hidden;
}

.fc-toolbar {
    padding: 12px 15px;
}

.fc-toolbar h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
}

.fc-button {
    border-radius: 8px !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    text-transform: capitalize !important;
}

.fc-day-header {
    padding: 10px 5px !important;
    font-weight: 600;
    font-size: 13px;
}

.fc-event {
    border-radius: 6px !important;
    padding: 3px 6px !important;
    font-size: 12px !important;
    border: none !important;
}

/* --- DataTables Enhancement --- */
.dataTables_wrapper {
    padding: 10px 0;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #dce1e6;
    padding: 8px 14px;
    font-size: 14px;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    padding: 6px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* --- Siponi / Attendance Page --- */
.attendance-wrapper {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* --- Product Book Cards --- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.book-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.book-card-body {
    padding: 15px;
}

/* --- Composing / Request pages --- */
.composing-wrapper {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

/* --- About / Profile content pages --- */
.about-content {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* --- Fancybox fixes --- */
.fancybox-content {
    border-radius: 12px !important;
}

/* --- CKEditor fixes --- */
.ck-editor__editable {
    min-height: 200px !important;
    border-radius: 0 0 8px 8px !important;
}

/* ============================================
   MOBILE COMPONENT RESPONSIVE
   ============================================ */
@media (max-width: 767px) {

    /* FullCalendar mobile */
    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc-toolbar .fc-left,
    .fc-toolbar .fc-right {
        float: none;
        text-align: center;
        display: flex;
        justify-content: center;
        gap: 5px;
    }

    .fc-toolbar .fc-center {
        order: -1;
    }

    .fc-toolbar h2 {
        font-size: 16px !important;
    }

    .fc-button {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }

    .fc-day-header {
        font-size: 11px;
    }

    /* DataTables mobile */
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
    }

    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: center;
        font-size: 12px;
    }

    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        margin-top: 10px;
    }

    /* Book grid mobile */
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .book-card img {
        height: 180px;
    }

    /* Composing/About mobile */
    .composing-wrapper,
    .about-content,
    .attendance-wrapper {
        padding: 18px 15px;
        border-radius: 10px;
    }

    /* Footer mobile */
    .footer-col {
        padding: 25px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-col:last-of-type {
        border-bottom: none;
    }

    .poll-options {
        gap: 4px;
    }

    .poll-option {
        font-size: 12px;
        padding: 3px 8px;
    }

    .footer-social {
        justify-content: center;
    }

    .contact-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: 1fr;
    }

    .fc-toolbar .fc-right {
        display: none;
    }
}

/* --- Page Specific: Index/Home Popup --- */
.no-scroll {
    overflow: hidden;
}

#boxes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    pointer-events: none;
}

.popup-responsive {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 800px !important;
    z-index: 10001 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3) !important;
    display: block;
    /* Managed by JS show/hide */
    pointer-events: auto !important;
}

#dialog .close-popup {
    position: absolute;
    right: -15px;
    top: -15px;
    z-index: 10002;
    background: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}

#dialog .close-popup:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

#mask {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.75) !important;
    z-index: 9999 !important;
    display: none;
    backdrop-filter: blur(5px);
    pointer-events: auto !important;
}

@media (max-width: 767px) {
    .popup-responsive {
        width: 95% !important;
        max-width: none !important;
    }
}


.banner-container {
    background: #fff;
}

.banner-container .item {
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
    height: 820px;
    /* Fixed height for desktop */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: #f0f2f5;
    position: relative;
}

.banner-container .owl-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.banner-container .owl-dot span {
    background: rgba(255, 255, 255, 0.5) !important;
    width: 10px !important;
    height: 10px !important;
    margin: 5px 7px !important;
}

.banner-container .owl-dot.active span {
    background: #fff !important;
    width: 12px !important;
    height: 12px !important;
}

.banner-container .item img {
    width: 100% !important;
    height: 100% !important;
    /* object-fit: cover !important; */
    object-position: center;
}

@media (max-width: 991px) {
    .banner-container .item {
        height: 320px;
    }
}

@media (max-width: 767px) {
    .banner-container .item {
        height: 220px;
        border-top-left-radius: 0px;
        border-bottom-left-radius: 0px;
    }

    .banner-container {
        padding: 15px 0;
    }

    .banner-container .owl-dots {
        bottom: 10px;
    }
}

.menus-wrapper {
    padding: 40px 0;
    background-color: #f8fbff;
}

/* --- Modern Grid Menu --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.modern-menu-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.modern-menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 66, 130, 0.1);
}

.icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.modern-menu-card:hover .icon-container {
    transform: rotate(10deg) scale(1.1);
}

.card-label {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.modern-menu-card:hover .card-label {
    color: #004282;
}

/* Gradients for icons */
.bg-grad-1 {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.bg-grad-2 {
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
}

.bg-grad-3 {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
}

.bg-grad-4 {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
}

.bg-grad-5 {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
}

.bg-grad-6 {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.bg-grad-7 {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

/* Scroll to Top Button */
#btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #004282;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(47, 49, 139, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-scroll-top:hover {
    background-color: #004282;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(47, 49, 139, 0.5);
}

/* --- Statistics Dashboard --- */
.stats-dashboard-wrapper {
    margin-top: 2px;
    margin-bottom: 5px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stats-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.stats-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-header i {
    color: #004282;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.stats-group {
    flex: 1;
    min-width: 300px;
    background: #f9fbfd;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.stats-group-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 120px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.stats-group-label:hover {
    transform: translateY(-3px);
}

.label-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.stats-group-label span {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-align: center;
}

.stats-items-row {
    flex: 1;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.stats-item-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px 15px;
    border-radius: 12px;
    min-width: 80px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.mini-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 5px;
}

.mini-value {
    font-size: 20px;
    font-weight: 800;
}

.color-blue {
    color: #1e3c72;
}

.color-pink {
    color: #DD2476;
}

/* CMS Content Responsiveness */
.pad-top {
    width: 100%;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #444;
}

/* Images in CMS content should never exceed container width */
.pad-top img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    margin: 15px 0;
}

/* Make iframes (like YouTube) responsive and not break layout */
.pad-top iframe {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    /* Preserves 16:9 for normal video embeds */
    height: auto !important;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Enable scroll for wide tables in CMS content */
.pad-top table {
    width: 100% !important;
    margin-bottom: 20px;
    border-collapse: collapse;
}

@media (max-width: 767px) {
    .pad-top {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
        width: 100%;
        display: block;
    }

    .pad-top table {
        min-width: 600px;
    }

    /* Force iframes to be responsive even if they have fixed width attributes */
    .pad-top iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: block !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }
}

@media (max-width: 767px) {
    .stats-group {
        flex-direction: column;
        padding: 15px;
    }

    .stats-items-row {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .modern-menu-card {
        padding: 20px 10px;
        border-radius: 15px;
        min-height: 200px;
    }

    .stat-card {
        padding: 20px 10px;
        border-radius: 15px;
        min-height: 200px;
    }

    .icon-container {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-bottom: 10px;
    }

    .card-label {
        font-size: 11px;
    }

    .stat-card h4 {
        font-size: 11px;
        min-height: 28px;
        margin-bottom: 10px;
    }

    .stat-row {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* --- Mobile Sidebar Enhancement --- */
@media (max-width: 991px) {
    .main-sidebar {
        background-color: #fff !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1050 !important;
        padding-top: 0 !important;
    }

    .sidebar {
        padding-bottom: 50px;
    }

    .sidebar-menu {
        white-space: nowrap;
        overflow: hidden;
    }

    .sidebar-menu>li {
        border-bottom: 1px solid #f1f4f8;
    }

    .sidebar-menu>li>a {
        padding: 15px 20px !important;
        font-size: 14px;
        font-weight: 600;
        color: #444 !important;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sidebar-menu>li:hover>a,
    .sidebar-menu>li.active>a {
        background: #f8fbff !important;
        color: #004282 !important;
        border-left-color: #004282 !important;
    }

    .sidebar-menu>li>a>.fa {
        width: 20px;
        text-align: center;
        font-size: 16px;
        color: #004282;
    }

    /* Sub-menu (Treeview) */
    .treeview-menu {
        background: #fcfdfe !important;
        padding: 5px 0 5px 15px !important;
        border-left: 4px solid #004282;
    }

    .treeview-menu>li>a {
        padding: 10px 15px !important;
        font-size: 13px;
        color: #666 !important;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .treeview-menu>li>a:hover {
        color: #004282 !important;
    }

    .sidebar-menu .pull-right-container {
        right: 15px !important;
    }
}

/* --- Print Styles --- */
@media print {

    .main-header,
    .main-sidebar,
    .bg-blue-bpom,
    .site-footer,
    .debugbar {
        display: none !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
    }
}