/**
* Nyalife HMS - Main CSS Theme
* Custom theme for Nyalife Hospital Management System
*/


/*--------------------------------------------------------------
    # Core Styles & Utilities
--------------------------------------------------------------*/

/* Performance optimizations */
* {
    box-sizing: border-box;
}

/* Optimize animations and transitions - Reduced GPU usage */
.hero-slide,
.nav-link,
.btn,
.service-tab-img,
.tooltip-content {
    /* Only apply GPU acceleration when actually animating */
    will-change: auto;
    /* Removed translateZ(0) to prevent unnecessary GPU layers */
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Appointment Form Progress Indicators */
.appointment-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 0.5rem;
    border-left: 4px solid #007bff;
}

.appointment-progress .progress {
    height: 8px;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.appointment-progress .progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.appointment-progress .progress-text {
    color: #495057;
    font-weight: 500;
    margin-top: 0.5rem;
    display: block;
}

/* Form validation improvements */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Loading states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Better alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Smooth transitions for form elements */
.form-control,
.form-select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Appointment Loading Overlay Styles */
#appointment-loading-overlay {
    font-family: var(--default-font, "Roboto", sans-serif);
    animation: fadeIn 0.3s ease-in-out;
}

#appointment-loading-overlay .spinner-border {
    animation: spin 1s linear infinite;
}

/* Fade in animation for overlay */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ensure overlay is always on top */
#appointment-loading-overlay {
    z-index: 10000 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

/* Prevent interaction with background elements */
body.appointment-processing {
    overflow: hidden;
    pointer-events: none;
}

body.appointment-processing #appointment-loading-overlay {
    pointer-events: auto;
}


/* Optimized scrolling and layout */

html {
    scroll-behavior: smooth;

    /* Improve scroll performance */
    -webkit-overflow-scrolling: touch;
}

body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    /* Prevent layout shifts during scroll */
}

.dashboard-content {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Dashboard main area padding (not applied to landing hero)
   We expect server-side to add body.app-page on authenticated pages */
/* Do not apply padding on landing (isLanding=true) - only on app pages */
body.app-page #main-content,
body.app-page .container-fluid.page-wrapper,
body.app-page .dashboard-content {
    padding: 2rem 2.75rem; /* increase padding y x */
}

@media (min-width: 992px) {
    body.app-page #main-content,
    body.app-page .container-fluid.page-wrapper,
    body.app-page .dashboard-content {
        padding: 2.25rem 3rem;
    }
}

/* Thin scrollbars for better performance */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

/*--------------------------------------------------------------
    # Variables
    --------------------------------------------------------------*/


/* Fonts */

:root {
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --heading-font: "Poppins", sans-serif;
    --nav-font: "Raleway", sans-serif;
}


/* Global Colors - Nyalife HMS Theme with Teal/Magenta */

:root {
    --background-color: #ffffff;
    --default-color: #444444;
    --heading-color: #2c2c2c;
    --primary-color: #058b7c;
    /* Teal primary color */
    --primary-color-light: #06a594;
    --primary-color-dark: #03726a;
    --secondary-color: #d41559;
    /* Magenta secondary color */
    --secondary-color-light: #e01a63;
    --secondary-color-dark: #b01246;
    --surface-color: #ffffff;
    --contrast-color: #ffffff;
    --light-bg-color: #f8f9fa;
    --border-color: #e9ecef;
}


/* Nav Menu Colors */

:root {
    --nav-color: #333333;
    --nav-hover-color: #058b7c;
    --nav-mobile-background-color: #ffffff;
    --nav-dropdown-background-color: #ffffff;
    --nav-dropdown-color: #333333;
    --nav-dropdown-hover-color: #058b7c;
}


/* Color Presets */

.light-background {
    --background-color: #f8f9fa;
    --surface-color: #ffffff;
}

.dark-background {
    --background-color: #2c2c2c;
    --default-color: #ffffff;
    --heading-color: #ffffff;
    --surface-color: #3a3a3a;
    --contrast-color: #ffffff;
}


/*--------------------------------------------------------------
# General Styling 
--------------------------------------------------------------*/

body {
    color: var(--default-color);
    background-color: rgba(239, 239, 239, 0.85);
    /* Removed backdrop-filter to prevent scroll distortions */
    font-family: var(--default-font);
    font-size: 1rem;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: var(--z-content);
}

a:hover {
    color: var(--primary-color-light);
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    font-family: var(--heading-font);
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: var(--z-content);
}

p {
    margin-bottom: 1rem;
    position: relative;
    z-index: var(--z-content);
}

/* Ensure all interactive elements are clickable */
button, 
input, 
select, 
textarea,
.btn,
.nav-link,
.clickable {
    position: relative;
    z-index: var(--z-content);
}

/* Ensure all content is above any background elements */
.content-area {
    position: relative;
    z-index: var(--z-content);
}

/* Fix for any invisible overlays blocking clicks */
.modal-backdrop.fade:not(.show),
.modal.fade:not(.show) {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* Ensure modals don't block when not visible */
.modal:not(.show) {
    display: none !important;
}

/* Ensure all positioned elements don't block interaction when hidden */
[class*="modal"]:not(.show),
[id*="modal"]:not(.show),
.fade:not(.show) {
    z-index: -1 !important;
    pointer-events: none !important;
}


/*--------------------------------------------------------------
    # Color Utility Classes
    --------------------------------------------------------------*/

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-secondary {
    border-color: var(--secondary-color) !important;
}


/*--------------------------------------------------------------
    # Section Styles
    --------------------------------------------------------------*/

.section {
    padding: 60px 0;
    position: relative;
}


/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/

.header {
    transition: all 0.5s;
    z-index: var(--z-navbar);
    background-color: var(--background-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1.25rem 1rem;
    /* Increased navbar height */
}

.navbar-brand {
    font-size: 26px;
    font-weight: 700;
    color: var(--heading-color);
    font-family: var(--heading-font);
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-dark .navbar-brand {
    color: var(--contrast-color);
}

.navbar-nav .nav-link {
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 500;
    color: var(--nav-color);
    transition: 0.3s;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-toggler {
    border: none;
    padding: 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}


/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/

.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 220px;
    height: calc(100vh - 80px);
    background-color: #f8f9fa;
    padding: 20px 0;
    z-index: var(--z-sidebar);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
}

.sidebar .nav-link {
    padding: 10px 20px;
    color: var(--default-color);
    display: flex;
    align-items: center;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link i {
    margin-right: 10px;
    font-size: 18px;
}

.sidebar .nav-link:hover {
    background-color: rgba(5, 139, 124, 0.1);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Sidebar responsive styles are now in Global Mobile Responsive Styles section */


/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/

.btn {
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 10px 24px;
    border-radius: 50px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--contrast-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-color-light);
    border-color: var(--primary-color-light);
}

.btn-secondary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--contrast-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--secondary-color-light);
    border-color: var(--secondary-color-light);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--contrast-color);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
}

.btn-hero {
    margin-right: 10px;
    margin-bottom: 8px;
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
}


/*--------------------------------------------------------------
    # Cards & Features
--------------------------------------------------------------*/

.card {
    border: .4px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
    background-color: rgba(244, 244, 244, 0.9);
    /* Removed backdrop-filter to prevent scroll distortions */
}

.card:hover {
    box-shadow: 0 0 2px rgba(212, 21, 89, 0.3)
}

.card-header {
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color-dark), var(--secondary-color));
    color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2.5rem;
    opacity: 0.7;
}

/* Global fix: Ensure all card headers with pink/magenta backgrounds have white text */
.card-header,
.card-header *,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header p,
.card-header span,
.card-header i,
.card-header .text-muted,
.card-header .text-gray,
.card-header[style*="pink"],
.card-header[style*="magenta"],
.card-header[style*="gradient"],
.card-header.bg-primary,
.card-header.bg-secondary,
.card-header.bg-secondary-light,
.card-header[class*="bg-"] {
    color: white !important;
}

.card-header h6 {
    color: white !important;
    font-weight: 700;
    font-size: 1.2rem;
}

.card-header.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.card-header.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: white !important;
}

.card-body {
    padding: 1.75rem;
}

.card-body p {
    font-size: .8rem;
    color: var(--text-color);
    margin-bottom: .5rem;
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.card-footer {
    padding: 1.25rem 1.5rem;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
}

.border-left-primary {
    border-left: 4px solid var(--primary-color);
}

.border-left-success {
    border-left: 4px solid #28a745;
}

.border-left-info {
    border-left: 4px solid #17a2b8;
}

.border-left-warning {
    border-left: 4px solid #ffc107;
}

.feature-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-img {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}


/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/

.form-control {
    border-radius: 20px;
    padding: 15px 20px;
    border: 1px solid #dee2e6;
    font-size: .8rem;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.128);
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.form-label {
    font-size: .6rem;
    color: var(--secondary-color-light);
    background-color: rgba(255, 255, 255, 0.813);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 4px 6px;
    line-height: 1.2;
    letter-spacing: -.35px;
    font-weight: 550;
    text-shadow: 0 0 .4px rgba(170, 170, 170, 0.221);
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 3px;
    margin-left: 0;
    border: 1px solid rgba(255, 6, 93, 0.354);
    border-radius: 35px;
}

.form-label::before {
    content: "*";
    color: var(--secondary-color-light);
    margin-right: 5px;
}

.form input[type="text"] {
    font-size: .8rem;
    color: var(--contrast-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.form input[type="password"] {
    font-size: 1.1rem;
    color: var(--secondary-color-light);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.form input[type="number"] {
    font-size: .8rem;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.form input[type="date"] {
    font-size: .8rem;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.form input[type="datetime"] {
    font-size: .8rem;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.form input[type="select"] {
    font-size: .8rem;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -.5px;
    font-weight: 500;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
    border-radius: 30px;
}


/*--------------------------------------------------------------
# Modals
--------------------------------------------------------------*/

.modal-header {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header.bg-primary {
    background-color: var(--primary-color) !important;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
}


/*--------------------------------------------------------------
# Tables
--------------------------------------------------------------*/

.table {
    margin-bottom: 0;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.5px;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}

.table th {
    font-weight: 700;
    border-top: none;
    background-color: var(--secondary-color-light);
    opacity: 0.7;
    color: white;
}

.table-bordered th,
.table-bordered td {
    border-color: #e9ecef;
}

.table-bordered td {
    background-color: rgba(255, 255, 255, 0.054);
}


/*--------------------------------------------------------------
# Badges & Alerts
--------------------------------------------------------------*/

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Semantic badge variants used by AJAX formatted responses */
.badge-status-pending {
    background-color: #ffc107 !important; /* warning */
    color: #212529 !important;
}
.badge-status-dispensed {
    background-color: #28a745 !important; /* success */
    color: #fff !important;
}
.badge-status-partial {
    background-color: #17a2b8 !important; /* info */
    color: #fff !important;
}
.badge-status-cancelled {
    background-color: #dc3545 !important; /* danger */
    color: #fff !important;
}
.badge-status-default {
    background-color: #6c757d !important; /* secondary */
    color: #fff !important;
}

/* Units helper: place unit text after an element using data-unit attribute */
.unit-after[data-unit]::after {
    content: attr(data-unit);
    margin-left: 0.25rem;
    font-weight: 500;
    color: var(--default-color);
}


/* Enhanced alerts styling */

#alertsContainer {
    max-width: 350px;
}

#alertsContainer .alert {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 12px 16px;
    border-left: 4px solid transparent;
    background-color: var(--secondary-color-dark);
    color: var(--contrast-color);
    /* Reduced backdrop-filter for better scroll performance */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#alertsContainer .alert-success {
    border-left-color: #198754;
}

#alertsContainer .alert-danger {
    border-left-color: var(--secondary-color);
}

#alertsContainer .alert-info {
    border-left-color: var(--primary-color);
}

#alertsContainer .alert-warning {
    border-left-color: #ffc107;
}


/* Regular alert styles */

.alert-primary {
    color: #058b7c;
    background-color: rgba(5, 139, 124, 0.15);
    border-color: rgba(5, 139, 124, 0.3);
}

.alert-danger {
    color: #d41559;
    background-color: rgba(212, 21, 89, 0.15);
    border-color: rgba(212, 21, 89, 0.3);
}

.alert-success {
    color: #198754;
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
}


/* Dashboard button hover effect */

.dashboard-btn.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transition: all 0.3s ease;
}

.dashboard-btn.btn-secondary:hover,
.dashboard-btn.btn-secondary:focus {
    background-color: white;
    border-color: var(--secondary-color);
    color: #333;
}


/*--------------------------------------------------------------
    # Loading Spinners
    --------------------------------------------------------------*/

.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.spinner-border.text-primary {
    color: var(--primary-color) !important;
}


/*--------------------------------------------------------------
    # Hero Section
--------------------------------------------------------------*/


/* Hero container and base styles */

.hero {
    background: none;
    background-color: #333;
    /* Fallback color */
    color: white;
    position: relative;
    width: 100vw;
    /* Subtract navbar height for precise sizing */
    max-height: 80vh;
    height: auto;
    /* Minimum height to ensure content fits */
    margin-top: 0;
    overflow-x: hidden;
    /* Prevent image overflow */
}

.hero.hero-image {
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.hero .container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-content);
    /* Ensure content is properly layered */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 2.5rem;
}


/* Hero slides */

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    /* Only transition opacity for smooth fades */
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    /* Start all slides slightly scaled for consistency */
    z-index: var(--z-background);
    /* Slides are the bottom layer */
}

.hero-slide.active {
    opacity: 1;
    z-index: calc(var(--z-background) + 1);
    /* Active slide is one layer above background slides */
}

.hero-slide:first-child {
    background-image: url('../img/hero/Obstetrics-care.jpg');
    opacity: 1;
    z-index: 1;
}

.hero-slide:nth-child(2) {
    background-image: url('../img/hero/Gynecology-services.jpg');
}

.hero-slide:nth-child(3) {
    background-image: url('../img/hero/Laboratory-services.JPG');
}

.hero-slide:nth-child(4) {
    background-image: url('../img/hero/Pharmacy.jpg');
}


/* Add specific classes for each slide animation */

.hero-slide.active {
    animation: none;
    /* Reset any animations */
}

.hero-slide.active.slide-1,
.hero-slide.active:nth-child(1) {
    animation: zoomSlow 15s infinite alternate;
}

/* 
   The 'pan' animations below have been temporarily disabled as animating 'background-position'
   can cause performance issues and visual distortions (jittering) on some browsers.
   A more performant solution would involve animating the 'transform' property instead.
*/

/* Background animation keyframes - Optimized for smooth scrolling */

@keyframes zoomSlow {
    from {
        transform: scale3d(1.05, 1.05, 1);
    }
    to {
        transform: scale3d(1.15, 1.15, 1);
    }
}

/* Apply GPU optimization only during animations */
.hero-slide.active {
    will-change: transform;
    transform: translateZ(0);
}

.hero-slide:not(.active) {
    will-change: auto;
}

/* Pan animations commented out to prevent distortion. */
/*
@keyframes panRight {
    from {
        background-position: left center;
    }
    to {
        background-position: right center;
    }
}

@keyframes panLeft {
    from {
        background-position: right center;
    }
    to {
        background-position: left center;
    }
}

@keyframes panUp {
    from {
        background-position: center bottom;
    }
    to {
        background-position: center top;
    }
}
*/


/* Hero content */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    max-width: 800px;
}

.hero-content h1,
.hero-content h2 {
    text-align: left;
}

.hero h1,
.hero h2 {
    color: #fff !important;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 20px;
    line-height: 1.2;
}

.hero h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.3;
}


/* Hero overlay and gradient animations */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: calc(var(--z-background) + 2);
    /* Overlay is above the active slide */
    opacity: 0.5;
    transition: background 1.5s ease-in-out;
    background: linear-gradient(135deg, var(--secondary-color-light), var(--secondary-color-dark));
    background-size: 200% 200%;
    animation: gradient1 15s ease infinite;
}

@keyframes gradient1 {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradient2 {
    0% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 100% 0%;
    }
}

@keyframes gradient3 {
    0% {
        background-position: 50% 0%;
    }
    50% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}

@keyframes gradient4 {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.hero-overlay.overlay-slide-1 {
    background: linear-gradient(135deg, var(--secondary-color-light), var(--secondary-color), var(--secondary-color-dark));
    background-size: 200% 200%;
    animation: gradient1 15s ease infinite;
}

.hero-overlay.overlay-slide-2 {
    background: linear-gradient(45deg, var(--secondary-color-dark), var(--secondary-color), var(--secondary-color-light));
    background-size: 200% 200%;
    animation: gradient2 15s ease infinite;
}

.hero-overlay.overlay-slide-3 {
    background: linear-gradient(to right, var(--secondary-color-light), var(--secondary-color-dark));
    background-size: 200% 200%;
    animation: gradient3 15s ease infinite;
}

.hero-overlay.overlay-slide-4 {
    background: radial-gradient(circle at top left, var(--secondary-color-light), var(--secondary-color-dark));
    background-size: 200% 200%;
    animation: gradient4 15s ease infinite;
}


/* Hero controls (dots and arrows) */

.hero-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-content);
    /* Controls should be on the same level as other content */
}

.hero-arrow {
    cursor: pointer;
    padding: 10px;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--default-color);
    /* Removed backdrop-filter from small elements to prevent distortions */
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 20px;
}

.hero-arrow:hover {
    background-color: var(--primary-color-light);
}

.hero-dots {
    display: flex;
    margin: 0 15px;
    justify-content: center;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: white;
    transform: scale(1.2);
}

/*--------------------------------------------------------------
    # Hero Responsive Styles
--------------------------------------------------------------*/

/* Tablet adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 500px;
        height: 500px;
    }
    
    .hero-content {
        padding: 30px 0;
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 32px;
        margin-top: 15px;
        margin-bottom: 8px;
    }
    
    .hero h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .hero-controls {
        bottom: 15px;
    }
    
    .hero-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
        padding: 8px;
    }
    
    .hero-dots {
        margin: 0 12px;
    }
    
    .hero-dot {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .hero {
        min-height: 500px;
        height: auto;
        padding-bottom: 80px; /* Space for controls and service boxes */
    }
    
    .hero-content {
        padding: 20px 15px;
        text-align: center;
    }
    
    .hero-content h1,
    .hero-content h2 {
        text-align: center;
    }
    
    .hero h1 {
        font-size: 22px;
        margin-top: 10px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .hero h2 {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .hero-controls {
        bottom: 10px;
    }
    
    .hero-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
        padding: 6px;
    }
    
    .hero-dots {
        margin: 0 10px;
    }
    
    .hero-dot {
        width: 7px;
        height: 7px;
        margin: 0 3px;
    }
    
    /* Service boxes responsive */
    .why-join {
        margin-top: 15px;
    }
    
    .why-join h3 {
        font-size: 18px;
        margin-bottom: 12px;
        text-align: center;
    }
    
    .why-join .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .why-join .row > [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .why-join-item {
        min-height: 90px;
        padding: 10px 5px;
        margin-bottom: 0.5rem;
    }
    
    .why-join-item i {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .why-join-item p {
        font-size: 11px;
        margin: 0;
        line-height: 1.2;
    }
    
    /* Reduce animation intensity on mobile for better performance */
    .hero-slide.active.slide-1,
    .hero-slide.active:nth-child(1) {
        animation: zoomSlowMobile 15s infinite alternate;
    }
}

@keyframes zoomSlowMobile {
    from {
        transform: scale3d(1.02, 1.02, 1);
    }
    to {
        transform: scale3d(1.08, 1.08, 1);
    }
}

/* Extra small mobile */
@media (max-width: 400px) {
    .hero {
        min-height: 450px;
        height: auto;
        padding-bottom: 70px;
    }
    
    .hero-content {
        padding: 15px 10px;
    }
    
    .hero h1 {
        font-size: 20px;
        margin-top: 8px;
        margin-bottom: 5px;
    }
    
    .hero h2 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .hero-arrow {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .hero-dot {
        width: 6px;
        height: 6px;
    }
    
    /* Service boxes extra small */
    .why-join {
        margin-top: 12px;
    }
    
    .why-join h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .why-join-item {
        min-height: 75px;
        padding: 8px 4px;
        margin-bottom: 0.5rem;
    }
    
    .why-join-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .why-join-item p {
        font-size: 10px;
        line-height: 1.2;
    }
}


/*--------------------------------------------------------------
    # Service Boxes & Tooltips
--------------------------------------------------------------*/


/* Service boxes in hero */

.why-join {
    text-align: left;
    margin-top: 20px;
}

.why-join h3 {
    margin-bottom: 15px;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.why-join .row {
    margin-left: 0;
    margin-right: 0;
}

.why-join .col-lg-3,
.why-join .col-md-3,
.why-join .col-sm-6,
.why-join .col-6 {
    flex: 0 0 25%;
    max-width: 25%;
    display: flex;
}

.why-join-item {
    width: 100%;
    min-height: 120px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    transition: all 0.3s;
}

.why-join-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.why-join-item i {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: white;
}

.why-join-item p {
    margin-bottom: 0;
    color: white;
    font-size: 13px;
}


/* Column highlight for service boxes in hero section */

.why-join-item.column-highlight {
    transform: scale(1.05) !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
    background-color: var(--secondary-color) !important;
    opacity: 0.9 !important;
    z-index: calc(var(--z-content) + 1) !important;
    /* Ensure highlight is above other content */
    transition: all 0.5s ease !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    border-radius: 12px !important;
}

.why-join-item.column-highlight i,
.why-join-item.column-highlight p {
    color: white !important;
}


/* Tooltip styles */

.why-join-item .join-tooltip {
    display: none;
    position: absolute;
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
}

.tooltip-display-area {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 35px;
    padding: 35px;
    margin-top: 0;
    color: var(--default-color);
    position: relative;
    z-index: var(--z-content);
    /* Tooltip area is standard content */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(5, 139, 124, 0.2);
    max-height: 450px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-border-radius: 35px;
    -moz-border-radius: 35px;
    -ms-border-radius: 35px;
    -o-border-radius: 35px;
}


/* Tooltip content styles */

.tooltip-content {
    display: none;
}

.tooltip-content#tooltip-1 {
    display: block;
}

.tooltip-content h4 {
    color: var(--primary-color-dark);
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 38px;
    line-height: 1.3;
    word-wrap: break-word;
}

.tooltip-content p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    font-weight: 500;
}

.mb-4 {
    margin-bottom: 1rem !important;
}


/*--------------------------------------------------------------
# Responsive Adjustments
--------------------------------------------------------------*/

@media (max-width: 992px) {
    .section {
        padding: 40px 0;
    }
    .hero {
        height: auto;
        min-height: 650px;
    }
    .hero h1 {
        font-size: 36px;
        margin-top: 30px;
    }
    .hero h2 {
        font-size: 18px;
    }
    .tooltip-display-area {
        margin-top: 0;
        padding: 15px;
        max-height: 300px;
    }
    .why-join .col-lg-3,
    .why-join .col-md-3,
    .why-join .col-sm-6,
    .why-join .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }
    .hero-content {
        max-width: 100%;
        padding: 25px 0;
    }
    .tooltip-display-area {
        display: none;
        /* Hide on mobile - focus on main content */
    }
    .why-join .row {
        margin-top: 20px;
    }
    .why-join .col-lg-3,
    .why-join .col-md-3,
    .why-join .col-sm-6,
    .why-join .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .modal-dialog {
        margin: 1rem;
    }
    .modal-footer {
        flex-direction: column;
        gap: 1rem;
    }
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 550px;
    }
    .card {
        border-radius: 8px;
    }
    .card-body {
        padding: 1.25rem;
    }
    .btn {
        padding: 8px 20px;
    }
    .modal-body {
        padding: 15px;
    }
    .hero h1 {
        font-size: 28px;
        margin-top: 20px;
    }
    .hero h2 {
        font-size: 16px;
    }
    .btn-hero {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .why-join .col-lg-3,
    .why-join .col-md-3,
    .why-join .col-sm-6,
    .why-join .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* Global premium blur utility */

.blur-bg {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* Remove direct blur from .why-join-item and .tooltip-display-area, use .blur-bg instead */

.why-join-item {
    /* ...existing styles... */
    background: rgba(255, 255, 255, 0.10);
    /* fallback */
}

.tooltip-display-area {
    /* ...existing styles... */
    background: rgba(255, 255, 255, 0.75);
    /* fallback */
}


/* Service Modal Styles */

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(5, 139, 124, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-dialog {
    z-index: 1055;
}

.modal-header {
    border-bottom: 1px solid rgba(5, 139, 124, 0.2);
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: white;
}

.modal-header .modal-title {
    color: white;
    font-weight: 600;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.service-modal-bg {
    padding: 0;
    position: relative;
    background-image: url('../img/gallery/Obstetrics-care.jpg');
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-modal-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 58, 52, 0.8), rgba(61, 6, 25, 0.6));
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: var(--z-background);
    /* Should be the base layer within the component */
}

.service-modal-content {
    position: relative;
    z-index: var(--z-content);
    /* Content layer */
    padding: 3rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

#modalServiceContent h4 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: left;
    position: relative;
    z-index: calc(var(--z-content) + 1);
    /* Above the content block */
}

#modalServiceContent p {
    color: rgba(255, 255, 255, 1);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 400;
    position: relative;
    z-index: calc(var(--z-content) + 1);
    /* Above the content block */
}

.modal-footer {
    border-top: 1px solid rgba(5, 139, 124, 0.2);
    padding: 1.1rem;
    position: relative;
    z-index: var(--z-content);
    /* Standard content z-index */
}

.modal .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    z-index: var(--z-modal);
    /* Ensure buttons are clickable within modal */
    cursor: pointer;
}

.modal .btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(5, 139, 124, 0.3);
}

.modal .btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    z-index: var(--z-modal);
    /* Ensure buttons are clickable within modal */
    cursor: pointer;
}

.modal .btn-secondary:hover {
    background-color: var(--secondary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 21, 89, 0.3);
}

/* Ensure service modal buttons are clickable */
#serviceModal .modal-footer button {
    position: relative;
    z-index: calc(var(--z-modal) + 1);
    /* Buttons must be on top layer within modal */
    pointer-events: auto;
    cursor: pointer;
}


/* Responsive modal styles */

@media (max-width: 576px) {
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .d-flex {
        flex-direction: column;
        width: 100%;
    }
    .modal-footer .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}


/* Modal backdrop styles */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal-backdrop, 200);
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Modal dialog and content z-index fix */
.modal {
    z-index: var(--z-modal, 300);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    overflow-y: auto;
}

.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

.modal-dialog {
    z-index: calc(var(--z-modal, 300) + 1);
    margin: 0 auto;
    transform: none !important;
    max-height: calc(100vh - 60px);
    position: relative;
}

.modal-content {
    position: relative;
    z-index: calc(var(--z-modal, 300) + 2);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

/* Service Details Modal specific fix */
#serviceDetailsModal {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#serviceDetailsModal .modal-dialog {
    margin: 1.75rem auto;
    position: relative;
    top: 0;
    transform: none !important;
}

/* Fix for modal positioning in general */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
}


/* Login Modal Styles */

#loginModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: none;
}

#loginModal .modal-dialog {
    max-width: 450px;
    margin: 1.75rem auto;
}

#loginModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

#loginModal .modal-body {
    padding: 1.75rem;
}

#loginModal .form-control {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
}

#loginModal .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#loginModal .btn-outline-secondary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#loginModal .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#loginModal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border: none;
    font-weight: 500;
}

#loginAlert {
    position: relative;
    z-index: var(--z-alert);
    margin-bottom: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}


/* Ensure all modal alerts are properly displayed */

.modal .alert {
    position: relative;
    z-index: var(--z-alert);
}

.sidebar .nav-link,
.card,
.btn,
.dropdown-item,
.nav-tabs .nav-link,
.table a,
.pagination .page-link,
.form-control,
.form-select,
.form-check-input,
input[type="checkbox"],
input[type="radio"],
button[type="submit"],
.accordion-button,
.dropdown-toggle,
.close,
[role="tab"],
[data-bs-toggle] {
    position: relative;
    z-index: var(--z-content);
    /* Removed !important to allow for contextual overrides */
}

/*--------------------------------------------------------------
    # Pagination Styling - Theme Consistent
--------------------------------------------------------------*/

.pagination {
    margin: 1.5rem 0;
    justify-content: center;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    color: var(--secondary-color);
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination .page-link:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 21, 89, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 21, 89, 0.4);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Pagination info text */
.pagination-info {
    text-align: center;
    color: var(--default-color);
    font-size: 0.9rem;
    margin: 1rem 0;
    font-weight: 500;
}

/*--------------------------------------------------------------
    # DataTables Styling - Theme Consistent
--------------------------------------------------------------*/

/* DataTables search input styling */
.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--default-color);
    background-color: white;
    transition: all 0.3s ease;
    min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 21, 89, 0.25);
    background-color: #fff;
}

.dataTables_wrapper .dataTables_filter label {
    color: var(--default-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* DataTables length selector styling */
.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label {
    color: var(--default-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    color: var(--default-color);
    background-color: white;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 21, 89, 0.25);
}

/* DataTables info styling */
.dataTables_wrapper .dataTables_info {
    color: var(--default-color);
    font-size: 0.9rem;
    font-weight: 500;
    padding-top: 0.75rem;
}

/* DataTables pagination wrapper */
.dataTables_wrapper .dataTables_paginate {
    float: right;
    text-align: right;
    padding-top: 0.5rem;
}

/* Ensure DataTables controls are properly spaced */
.dataTables_wrapper::after {
    clear: both;
    content: "";
    display: table;
}

/* DataTables processing overlay */
.dataTables_processing {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    padding: 1rem;
    font-weight: 500;
}

/* DataTables empty state */
.dataTables_empty {
    text-align: center;
    padding: 2rem;
    color: var(--default-color);
    font-style: italic;
}

@media (max-width: 1400px) {
    .dashboard-content .row>[class^="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .card {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .dashboard-content {
        margin-left: 0;
    }
}

/*--------------------------------------------------------------
    # Global Mobile Responsive Styles
--------------------------------------------------------------*/

/* Mobile First - Base Styles for Small Screens */
@media (max-width: 576px) {
    /* Dashboard Content Padding - Now handled by layout-system.css */
    /* Keeping for backward compatibility */
    body.app-page #main-content,
    body.app-page .container-fluid.page-wrapper,
    body.app-page .dashboard-content {
        padding: 1rem 0.75rem;
    }
    
    /* Sidebar Mobile Styles */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar .nav-link {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .sidebar .nav-link i {
        font-size: 20px;
        width: 24px;
    }
    
    /* Main Content Adjustment for Sidebar */
    body.app-page.has-sidebar #main-content,
    body.app-page.has-sidebar .dashboard-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Header/Navbar Mobile */
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Cards Mobile */
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
    
        /* Card header buttons - global pill-shaped white outline style */
    .card-header .btn:not(.btn-link):not(.dropdown-toggle),
    .card-header .btn-sm:not(.btn-link):not(.dropdown-toggle),
    .card-header a.btn:not(.btn-link):not(.dropdown-toggle) {
        border-radius: 50px !important; /* Pill shape */
        border: 2px solid white !important;
        background-color: transparent !important;
        color: white !important;
        padding: 6px 16px;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .card-header .btn:hover:not(.btn-link):not(.dropdown-toggle),
    .card-header .btn-sm:hover:not(.btn-link):not(.dropdown-toggle),
    .card-header a.btn:hover:not(.btn-link):not(.dropdown-toggle) {
        background-color: rgba(255, 255, 255, 0.2) !important;
        border-color: white !important;
        color: white !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
    }
    
    .card-header .btn:active:not(.btn-link):not(.dropdown-toggle),
    .card-header .btn-sm:active:not(.btn-link):not(.dropdown-toggle),
    .card-header a.btn:active:not(.btn-link):not(.dropdown-toggle) {
        background-color: rgba(255, 255, 255, 0.3) !important;
        transform: translateY(0);
    }
    
    /* Card header buttons - specific mobile styles */
    .card-header .btn,
    .card-header .btn-sm,
    .card-header a.btn {
        padding: 5px 10px;
        font-size: 11px;
        white-space: nowrap;
        min-width: auto;
        line-height: 1.2;
    }
    
    /* Ensure card headers with buttons wrap properly */
    .card-header.d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-header.d-flex.justify-content-between {
        align-items: center;
    }
    
    .card-header.d-flex.justify-content-between h5,
    .card-header.d-flex.justify-content-between h6 {
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        writing-mode: horizontal-tb; /* Ensure horizontal text */
        text-orientation: mixed;
    }
    
    .card-header.d-flex.justify-content-between .btn {
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Card header button group - hide on mobile, show dropdown */
    .card-header .btn-group-mobile {
        display: none;
    }
    
    .card-header .card-header-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    /* 3-dot menu for mobile */
    .card-header .card-header-menu-toggle {
        display: none;
        background: transparent;
        border: 2px solid white;
        color: white;
        border-radius: 50px;
        width: 32px;
        height: 32px;
        padding: 0;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
        cursor: pointer;
    }
    
    .card-header .card-header-menu-toggle:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
    
    .card-header .card-header-menu-toggle:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
        outline: none;
    }
    
    .card-header .card-header-menu-toggle[aria-expanded="true"] {
        background-color: rgba(255, 255, 255, 0.25);
    }
    
    /* Dropdown menu styling for card headers */
    .card-header .dropdown-menu {
        border: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-radius: 12px;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        min-width: 180px;
        background-color: white;
        z-index: 1050 !important; /* Ensure dropdown is above other elements */
        position: absolute;
        right: 0;
        left: auto;
    }
    
    .card-header .dropdown {
        position: relative;
    }
    
    .card-header .dropdown-menu .dropdown-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: var(--text-color);
    }
    
    .card-header .dropdown-menu .dropdown-item i {
        width: 20px;
        text-align: center;
        color: var(--primary-color);
    }
    
    .card-header .dropdown-menu .dropdown-item:hover {
        background-color: rgba(5, 139, 124, 0.1);
        color: var(--primary-color);
        padding-left: 1.5rem;
    }
    
    /* Mobile: Hide button group, show 3-dot menu */
    @media (max-width: 576px) {
        .card-header .card-header-actions .btn-group-desktop {
            display: none !important;
        }
        
        .card-header .card-header-menu-toggle {
            display: flex;
        }
        
        .card-header h5,
        .card-header h6 {
            writing-mode: horizontal-tb !important;
            text-orientation: mixed !important;
            white-space: normal;
            word-break: break-word;
            flex: 1;
            min-width: 0;
        }
        
        .card-header .dropdown-menu {
            right: 0 !important;
            left: auto !important;
        }
    }
    
    /* Forms Mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    /* Tables Mobile */
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.5rem;
    }
    
    /* Headings Mobile */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    /* Container Fluid Mobile */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* DataTables Mobile */
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: left;
        margin-bottom: 0.75rem;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        margin-top: 0.75rem;
    }
    
    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        min-width: 36px;
    }
    
    /* Badges Mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Alerts Mobile */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Modal Mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Tablet Styles */
@media (min-width: 577px) and (max-width: 768px) {
    /* Dashboard Content Padding */
    body.app-page #main-content,
    body.app-page .container-fluid.page-wrapper,
    body.app-page .dashboard-content {
        padding: 1.5rem 1.25rem;
    }
    
    /* Sidebar Tablet */
    .sidebar {
        position: fixed;
        left: -100%;
        width: 260px;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    /* Cards Tablet */
    .card-body {
        padding: 1.25rem;
    }
    
    /* Forms Tablet */
    .form-control,
    .form-select {
        font-size: 15px;
    }
    
    /* Tables Tablet */
    .table {
        font-size: 0.9rem;
    }
}

/* Small Desktop / Large Tablet */
@media (min-width: 769px) and (max-width: 991px) {
    /* Dashboard Content Padding */
    body.app-page #main-content,
    body.app-page .container-fluid.page-wrapper,
    body.app-page .dashboard-content {
        padding: 1.75rem 2rem;
    }
    
    /* Sidebar Small Desktop */
    .sidebar {
        width: 200px;
    }
    
    /* Main Content Adjustment */
    body.app-page.has-sidebar #main-content,
    body.app-page.has-sidebar .dashboard-content {
        margin-left: 200px;
    }
}

/* Sidebar Overlay for Mobile */
@media (max-width: 991px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
}

@media (max-width: 991px) {
    .sidebar-toggle {
        display: inline-block;
        background: none;
        border: none;
        color: var(--default-color);
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
    }
    
    .sidebar-toggle:hover {
        color: var(--primary-color);
    }
}

/*tabs styles*/
.nav-tabs .nav-link {
    color: white;
    border-radius: 1.75rem;
}

.nav-tabs .nav-link.active {
    color: var(--secondary-color);
}