/*
 * MahaExcise Modern UI Stylesheet
 * Version: 1.0
 * Description: Modern, clean UI improvements for MahaExcise website
 */

/* ========================================
   CSS VARIABLES (Design Tokens)
   ======================================== */
:root {
    /* Primary Colors */
    --primary-color: #0066FB;
    --primary-dark: #0052cc;
    --primary-light: #4d94ff;
    --primary-gradient: linear-gradient(135deg, #0066FB 0%, #0052cc 100%);

    /* Secondary Colors */
    --secondary-color: #28a745;
    --secondary-dark: #1e7e34;
    --secondary-light: #48c764;

    /* Accent Colors */
    --accent-color: #FF6B35;
    --accent-dark: #e55a2b;
    --accent-light: #ff8c5a;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --black: #000000;

    /* Reading-optimized text color (deeper than gray-800, softer than black) */
    --text-reading: #1d2939;

    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;

    /* Typography */
    --font-family-base: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-heading: 'Inter', 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;   /* 12px */
    --font-size-sm: 0.875rem;  /* 14px */
    --font-size-base: 1rem;    /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    --font-size-2xl: 1.5rem;   /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem;  /* 36px */
    --line-height-tight: 1.25;
    --line-height-base: 1.6;
    --line-height-relaxed: 1.75;
    --line-height-reading: 1.85;

    /* Spacing */
    --spacing-xs: 0.25rem;  /* 4px */
    --spacing-sm: 0.5rem;   /* 8px */
    --spacing-md: 1rem;     /* 16px */
    --spacing-lg: 1.5rem;   /* 24px */
    --spacing-xl: 2rem;     /* 32px */
    --spacing-2xl: 3rem;    /* 48px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
}

/* ========================================
   BASE STYLES & TYPOGRAPHY
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-reading);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-reading);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   NAVBAR IMPROVEMENTS
   ======================================== */
.navbar {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-gradient) !important;
    box-shadow: var(--shadow-md);
    min-height: 60px;
}

.navbar-brand {
    padding: var(--spacing-xs);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: transform var(--transition-base);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand img {
    height: 45px;
    border-radius: var(--radius-md);
}

/* Search Button */
.search-btn-group {
    background: var(--white);
    border-radius: var(--radius-full);
    padding: var(--spacing-xs) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.search-btn-group:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.search-btn-group .btn {
    border: none;
    background: transparent;
    padding: var(--spacing-xs) var(--spacing-sm);
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: 2px solid var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Offcanvas Menu */
.offcanvas {
    max-width: 320px !important;
}

.offcanvas-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
}

.offcanvas-title h5 {
    color: var(--primary-color);
    font-weight: 700;
}

.offcanvas-body {
    padding: var(--spacing-md);
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 251, 0.25);
}

/* Primary Button */
.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 102, 251, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003d99 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 251, 0.35);
    color: var(--white);
}

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

/* Secondary Button */
.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #c82333 100%);
    color: var(--white);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #e0a800 100%);
    color: var(--gray-900);
}

/* Light Button */
.btn-light {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-light:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

/* Button Sizes */
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

/* Digital Manual Button - Refined */
.btn-digital-manual {
    background: linear-gradient(135deg, var(--accent-color) 0%, #FF8C42 50%, var(--accent-color) 100%);
    background-size: 200% 200%;
    animation: gentleGradient 4s ease infinite;
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: none;
}

.btn-digital-manual:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: var(--white);
}

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

/* ========================================
   CARD COMPONENTS
   ======================================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--gray-300);
}

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: var(--spacing-md) var(--spacing-lg);
}

/* Feature Cards (Homepage Icons) */
.feature-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-slow);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-light);
}

.feature-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    background: var(--gray-100);
    transition: all var(--transition-base);
}

.feature-card:hover .icon-wrapper {
    background: var(--primary-light);
    transform: scale(1.1);
}

.feature-card .icon-wrapper img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-card .card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.feature-card .card-text {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Icon Image Styling */
.img-icon {
    width: 100%;
    max-height: 56px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base);
}

.card:hover .img-icon {
    transform: scale(1.05);
}

.icon-title {
    font-size: var(--font-size-xs) !important;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: var(--spacing-sm);
    text-align: center;
    line-height: 1.3;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    color: var(--gray-800);
    background-color: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    min-height: 48px;
}

.form-control:hover {
    border-color: var(--gray-400);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 251, 0.1);
    background-color: var(--white);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Success State */
.form-control.is-valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2328a745'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.form-control.is-valid:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

/* Error State */
.form-control.is-invalid {
    border-color: var(--danger);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc3545'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.form-control.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Validation Feedback */
.valid-feedback {
    display: none;
    font-size: var(--font-size-sm);
    color: var(--success);
    margin-top: var(--spacing-xs);
}

.invalid-feedback {
    display: none;
    font-size: var(--font-size-sm);
    color: var(--danger);
    margin-top: var(--spacing-xs);
}

.is-valid ~ .valid-feedback,
.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xs);
}

/* Required field indicator */
.form-label.required::after {
    content: " *";
    color: var(--danger);
}

/* Form Groups */
.mb-3 {
    margin-bottom: var(--spacing-md) !important;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

/* Select */
.form-select {
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: var(--white);
    transition: all var(--transition-base);
    min-height: 48px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
}

.form-select:hover {
    border-color: var(--gray-400);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 251, 0.1);
}

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

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--gray-700);
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
}

.input-group-text:first-child {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text:last-child {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-left: 0;
    margin-bottom: var(--spacing-sm);
    min-height: 24px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    border: 2px solid var(--gray-400);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    appearance: none;
    background-color: var(--white);
}

.form-check-input:hover {
    border-color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 251, 0.2);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input[type="radio"]:checked {
    background-image: none;
    background-color: var(--white);
    border-width: 6px;
}

.form-check-label {
    font-size: var(--font-size-base);
    color: var(--gray-700);
    cursor: pointer;
}

/* Switch */
.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: var(--radius-full);
    background-image: none;
    position: relative;
}

.form-switch .form-check-input::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--white);
    top: 1px;
    left: 1px;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-switch .form-check-input:checked::before {
    transform: translateX(20px);
}

/* Form Helper Text */
.form-text {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-top: var(--spacing-xs);
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
    padding: var(--spacing-lg);
    background-color: var(--white);
    border: none !important;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

/* Page Background */
.page-wrapper {
    background: var(--gray-50);
    min-height: 100vh;
}

/* Section Spacing */
.section {
    padding: var(--spacing-2xl) 0;
}

/* ========================================
   NAVIGATION TABS (Button Bar)
   ======================================== */
.nav-button-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.nav-button-bar .btn {
    flex: 0 1 auto;
    min-width: 100px;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

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

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

.badge.bg-warning {
    background: var(--warning) !important;
    color: var(--gray-900);
}

/* ========================================
   MODAL IMPROVEMENTS
   ======================================== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
}

.modal-title {
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: var(--spacing-md) var(--spacing-lg);
}

/* Search Modal */
#searchModal .modal-content {
    border-radius: var(--radius-xl);
}

#searchModal .form-control {
    border-radius: var(--radius-full);
    padding-left: var(--spacing-lg);
}

/* ========================================
   LOADING STATES & ANIMATIONS
   ======================================== */

/* Basic Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dots Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-xl);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button Loading State */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-primary.is-loading::after,
.btn-success.is-loading::after,
.btn-danger.is-loading::after {
    border-color: var(--white);
    border-right-color: transparent;
}

/* Page Loading Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 16px;
}

.page-loader.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Progress Bar */
.progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-bar.animated {
    background-size: 30px 30px;
    background-image: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 30px 0; }
    100% { background-position: 0 0; }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animation */
.slide-in-left {
    animation: slideInLeft 0.3s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

.slide-in-up {
    animation: slideInUp 0.3s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale Animation */
.scale-in {
    animation: scaleIn 0.2s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Shake Animation (for errors) */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideInRight 0.3s ease forwards;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

.toast.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast.toast-info {
    border-left: 4px solid var(--info);
}

.toast .toast-icon {
    font-size: 20px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast .toast-content {
    flex: 1;
}

.toast .toast-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast .toast-message {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
}

.toast .toast-close:hover {
    color: var(--gray-700);
}

/* Ripple Effect for Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   FLOATING ACTION BUTTON
   ======================================== */
.floating-home-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 251, 0.4);
    cursor: pointer;
    z-index: var(--z-fixed);
    transition: all var(--transition-slow);
    text-decoration: none;
    animation: gentleBounce 3s ease-in-out infinite;
}

.floating-home-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 102, 251, 0.5);
}

.floating-home-btn i {
    color: var(--white);
    font-size: 22px;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ========================================
   TABLES
   ======================================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: none;
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-muted { color: var(--gray-600) !important; }
.text-dark { color: var(--gray-900) !important; }

.bg-light { background-color: var(--gray-50) !important; }
.bg-white { background-color: var(--white) !important; }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

/* Tablet Breakpoint */
@media (max-width: 992px) {
    .container {
        padding: var(--spacing-md);
    }

    .navbar-brand img {
        height: 42px;
    }

    /* Better table scrolling */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }

    body {
        font-size: 15px;
        /* Safe area for notched devices */
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .navbar {
        padding: var(--spacing-xs) var(--spacing-sm);
        /* Safe area insets for mobile */
        padding-top: max(var(--spacing-xs), env(safe-area-inset-top));
    }

    .navbar-brand img {
        height: 40px;
    }

    .container {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
        margin-left: 8px;
        margin-right: 8px;
    }

    .card-body {
        padding: var(--spacing-md);
    }

    /* Touch-friendly buttons - minimum 44px touch target */
    .btn {
        padding: 12px 16px;
        font-size: var(--font-size-sm);
        min-height: 44px;
    }

    .btn-sm {
        padding: 8px 12px;
        min-height: 36px;
    }

    .feature-card {
        min-height: 120px;
        padding: var(--spacing-md);
    }

    .feature-card .icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .feature-card .icon-wrapper img {
        width: 36px;
        height: 36px;
    }

    .img-icon {
        max-height: 48px;
    }

    .icon-title {
        font-size: 12px !important;
        word-break: break-word;
    }

    /* Improved button bar for mobile */
    .nav-button-bar {
        gap: 8px;
        padding: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: wrap;
    }

    .nav-button-bar .btn {
        font-size: 12px;
        padding: 10px 14px;
        min-width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Bottom padding for fixed elements */
    .page-content {
        padding-bottom: 80px;
    }

    /* Floating button adjustments */
    .floating-home-btn {
        bottom: max(20px, env(safe-area-inset-bottom));
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .floating-home-btn i {
        font-size: 20px;
    }

    /* Hide search text on mobile */
    .search-text-mobile {
        display: none;
    }

    /* Form improvements for mobile */
    .form-control {
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 44px;
    }

    .form-select {
        font-size: 16px;
        min-height: 44px;
    }

    /* Modal full screen on mobile */
    .modal-dialog {
        margin: 8px;
        max-width: calc(100% - 16px);
    }

    /* Table improvements for mobile */
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: var(--font-size-sm);
    }

    /* Improved touch scrolling */
    .offcanvas-body {
        -webkit-overflow-scrolling: touch;
    }

    /* Card grid on mobile */
    .row > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Section spacing */
    .section-divider {
        padding: 10px 16px;
        margin: 16px 0 12px 0;
    }

    .section-divider p {
        font-size: 1rem;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 576px) {
    .navbar {
        padding: 6px 10px;
    }

    .navbar-brand img {
        height: 36px;
    }

    .container {
        padding: 12px;
        margin-left: 6px;
        margin-right: 6px;
    }

    .feature-card {
        min-height: 100px;
        padding: 10px 8px;
    }

    .icon-title {
        font-size: 12px !important;
        line-height: 1.2;
    }

    .nav-button-bar {
        padding: 10px;
        gap: 6px;
    }

    .nav-button-bar .btn {
        font-size: 11px;
        padding: 8px 12px;
    }

    /* Cards with 3 columns on small phones */
    .col-4 {
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Floating button smaller on very small screens */
    .floating-home-btn {
        width: 46px;
        height: 46px;
        bottom: 16px;
        right: 16px;
    }

    .floating-home-btn i {
        font-size: 18px;
    }

    /* Improved badges on small screens */
    .badge {
        font-size: 9px;
        padding: 3px 6px;
    }

    /* Table scrollable on small screens */
    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
    }
}

/* Extra small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    .navbar-brand img {
        height: 32px;
    }

    .nav-button-bar .btn {
        font-size: 10px;
        padding: 6px 10px;
    }

    .icon-title {
        font-size: 12px !important;
    }

    .section-divider p {
        font-size: 0.875rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 4px 12px;
    }

    .navbar-brand img {
        height: 32px;
    }

    .floating-home-btn {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }

    .modal-dialog-centered {
        min-height: auto;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    z-index: 10000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar,
    .floating-home-btn,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }

    .container {
        box-shadow: none;
        border: none;
    }
}

/* ========================================
   ENHANCED SEARCH STYLES
   ======================================== */
.search-results {
    max-height: 70vh;
    overflow-y: auto;
}

.search-result-count {
    font-size: var(--font-size-sm);
    border-radius: 0;
}

.search-category-header {
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.search-category-header .badge {
    font-size: 10px;
    font-weight: 600;
}

.search-result-item {
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
    padding: 12px 16px;
}

.search-result-item:hover {
    border-left-color: var(--primary-color);
    background-color: var(--gray-50);
}

.search-result-item h6 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.search-result-item .badge {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.search-result-item p {
    line-height: 1.4;
}

/* Search Modal Improvements */
#searchModal .modal-content {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

#searchModal .modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

#searchModal .modal-body {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

#searchModal .input-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#searchModal .input-group .form-control {
    border: none;
    padding: 12px 16px;
    font-size: var(--font-size-base);
}

#searchModal .input-group .form-control:focus {
    box-shadow: none;
}

#searchModal .input-group-text {
    background: transparent;
    border: none;
    padding: 12px 16px;
}

/* Keyboard shortcut hint */
.search-hint {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

/* Mobile search adjustments */
@media (max-width: 768px) {
    .search-results {
        max-height: 60vh;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .search-result-item h6 {
        font-size: 13px;
    }

    .search-category-header {
        font-size: 12px;
        padding: 8px 12px !important;
    }

    #searchModal .modal-dialog {
        margin: 8px;
        max-width: calc(100% - 16px);
    }
}

/* ========================================
   SECTION PAGE STYLES
   ======================================== */

/* Section Block */
.section-block {
    padding: 24px 0 16px;
    /* Offset for fixed navbar + banner when scrolling to anchor */
    scroll-margin-top: 250px;
}

/* Anchor scroll offset - applied to scrollable containers */
html {
    scroll-padding-top: 250px;
}

main.overflow-auto {
    scroll-padding-top: 20px;
}

/* Section Heading */
.section-heading {
    text-align: center;
    margin-bottom: 20px;
}

.section-number {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    line-height: 1.4;
    margin: 8px 0 12px;
    padding: 0 10px;
}

.section-orders-link {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--gray-50);
    padding: 4px 14px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.section-orders-link:hover {
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.section-orders-link i {
    margin-right: 4px;
}

/* Section Body */
.section-body {
    font-size: 16px;
    line-height: var(--line-height-reading);
    color: var(--text-reading);
    margin-bottom: 16px;
    font-weight: 420;
    word-spacing: 0.02em;
}

.section-body p {
    margin-bottom: 16px;
}

/* Sub Rules */
.sub-rules {
    padding-left: 16px;
    margin-top: 12px;
}

.sub-rule-item {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px 0;
}

.sub-rule-number {
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 40px;
    flex-shrink: 0;
    font-size: 15px;
}

.sub-rule-text {
    flex: 1;
    font-size: 15px;
    line-height: var(--line-height-reading);
    color: var(--text-reading);
    font-weight: 420;
    word-spacing: 0.02em;
}

.sub-rule-text p {
    margin-bottom: 12px;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 8px 0;
    opacity: 0.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 17px;
        padding: 0 4px;
    }

    .section-number {
        font-size: 12px;
        padding: 3px 12px;
    }

    .section-body {
        font-size: 15px;
        line-height: 1.85;
    }

    .sub-rule-item {
        gap: 8px;
    }

    .sub-rule-number {
        min-width: 32px;
        font-size: 15px;
    }

    .sub-rule-text {
        font-size: 15px;
        line-height: 1.85;
    }

    .sub-rules {
        padding-left: 8px;
    }
}

@media (max-width: 576px) {
    .section-block {
        padding: 16px 0 12px;
        scroll-margin-top: 220px;
    }

    html {
        scroll-padding-top: 220px;
    }

    .section-title {
        font-size: 15px;
    }

    .section-body {
        font-size: 15px;
        line-height: 1.85;
    }

    .sub-rule-number {
        min-width: 28px;
        font-size: 15px;
    }

    .sub-rule-text {
        font-size: 15px;
        line-height: 1.85;
    }
}

/* ========================================
   NAVBAR & NAVIGATION COMPONENT STYLES
   ======================================== */

/* Main Navbar */
.navbar-main {
    background: var(--primary-gradient);
    padding: 8px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Logo/Brand wrapper */
.navbar-brand-box {
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.navbar-brand-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar-brand-box .home-icon {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0 8px;
}

.navbar-brand-box img {
    border-radius: 8px;
}

/* Search Button */
.search-btn-pill {
    background: white;
    border-radius: 25px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.search-btn-pill:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-btn-pill .search-placeholder {
    color: var(--gray-500);
    font-size: 14px;
}

/* Menu Toggle Button */
.menu-toggle-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 8px 12px;
}

.menu-toggle-btn .navbar-toggler-icon {
    filter: brightness(10);
}

/* Offcanvas Menu */
.offcanvas-gradient-header {
    background: var(--primary-gradient);
    padding: 20px;
}

.offcanvas-gradient-header .offcanvas-brand {
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

/* Language Buttons */
.lang-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lang-btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.lang-btn-hindi {
    background: #ffc107;
    color: #212529;
}

.lang-btn-english {
    background: white;
    color: var(--primary-color);
}

.lang-btn-marathi {
    background: var(--secondary-color);
    color: white;
}

/* Accordion in sidebar */
.sidebar-accordion .btn-link {
    text-decoration: none;
    color: var(--gray-800);
}

.sidebar-accordion .btn-link:hover {
    color: var(--primary-color);
}

/* Offcanvas accordion - full text display (no truncation) */
#ruleNumberOffCanvas .card-header .btn,
#ruleNumberOffCanvas .card-header .btn-link {
    white-space: normal;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    hyphens: auto;
}

#ruleNumberOffCanvas .card-header .h4 {
    font-size: 16px;
    line-height: 1.4;
    display: block;
}

#ruleNumberOffCanvas .dropdown-item {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    padding: 8px 16px;
}

#ruleNumberOffCanvas .card-body {
    padding: 8px 12px;
}

#ruleNumberOffCanvas .nav-item.border-bottom {
    padding: 8px 0;
}

/* Also fix main navigation offcanvas dropdown text */
#offcanvasDarkNavbar .dropdown-item {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* Float Action Button (Section NO / Rules NO) */
.fab-btn {
    padding: 0px 10px;
    height: 44px;
    font-size: 14px;
    background-color: var(--primary-color);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.3);
    margin-bottom: 29px;
    transition: all 0.2s ease;
}

.fab-btn:hover {
    background-color: var(--primary-dark);
    color: #FFF;
}

.fab-btn .my-float {
    margin-top: 16px;
    letter-spacing: 2px;
}

/* Navbar offset for content below fixed navbar */
.navbar-offset {
    padding-top: 65px;
}
/* Extra offset when subscription banner is visible */
body.has-sub-banner .navbar-offset {
    padding-top: 105px;
}

/* Banner image consistent styling */
.banner-img {
    height: 120px;
    width: 100%;
    object-fit: contain;
}

/* ========================================
   TOC (Table of Contents) FIXES
   ======================================== */

/* Fix chevron icon colors to match brand */
.toc-chevron {
    background-color: var(--primary-color);
    color: white;
    font-style: normal;
    font-weight: 400;
    padding: 2px 4px;
    border-radius: 3px;
}

/* TOC list items - use Inter font */
.toc-list-item {
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    border-bottom: 1px solid var(--gray-200);
    border-top: none;
    border-left: none;
    border-right: none;
    transition: all 0.2s ease;
}

.toc-list-item:hover {
    background-color: #e8f4fc;
    color: var(--primary-dark);
    padding-left: 25px;
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
}

/* ========================================
   PHONE LOGIN PAGE FIXES
   ======================================== */

.btn-verify {
    background-color: var(--primary-color);
    color: white;
    margin-top: 28px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.btn-verify:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* ========================================
   LEGAL TEXT READABILITY IMPROVEMENTS
   ======================================== */

/* Rule/Section text - enhanced readability */
.section-body,
.sub-rule-text {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-reading);
    font-weight: 420;
    word-spacing: 0.03em;
    letter-spacing: 0.01em;
    text-align: justify;
    text-justify: inter-word;
    width: 100%;
    box-sizing: border-box;
}

.section-body p,
.sub-rule-text p {
    margin-bottom: 1.2em;
    text-align: justify;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Marathi text styling - slightly different for visual distinction */
.section-body p:lang(mr),
.sub-rule-text p:lang(mr),
.section-body p:last-child,
.sub-rule-text p:last-child {
    color: #1a365d; /* Slightly different shade for Marathi */
    font-weight: 430;
    line-height: 2.0; /* Extra line height for Devanagari script */
    margin-top: 0.8em;
    padding-top: 0.5em;
    border-top: 1px dashed var(--gray-300);
}

/* First paragraph (English) styling */
.section-body p:first-child,
.sub-rule-text p:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Preamble text styling */
.container > p {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-reading);
    margin-bottom: 1.2em;
    max-width: 100%;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prevent horizontal scroll - full width content */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100%;
}

* {
    box-sizing: border-box;
}

.container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Mobile specific - prevent all horizontal scroll */
@media (max-width: 768px) {
    html, body, main, .container, .section-block, .section-body, .sub-rule-text {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    img, table, pre, iframe {
        max-width: 100% !important;
        overflow-x: auto;
    }
}

/* Rule title improved spacing */
.section-title {
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Sub-rule improvements */
.sub-rule-item {
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.sub-rule-item:last-child {
    border-bottom: none;
}

.sub-rule-number {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 50px;
}

/* Lists within legal text */
.section-body ol,
.section-body ul,
.sub-rule-text ol,
.sub-rule-text ul {
    padding-left: 24px;
    margin-bottom: 1em;
}

.section-body li,
.sub-rule-text li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

/* Amendments list */
main ol {
    line-height: 1.8;
    margin-bottom: 1.5em;
}

main ol li {
    margin-bottom: 0.6em;
    padding-left: 8px;
}

/* Strikethrough text - deleted provisions */
.section-body s,
.sub-rule-text s {
    color: var(--gray-500);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Amendment highlights */
.section-body span[style*="background"],
.sub-rule-text span[style*="background"] {
    padding: 2px 4px;
    border-radius: 3px;
}

/* Links in legal text */
.section-body a,
.sub-rule-text a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.section-body a:hover,
.sub-rule-text a:hover {
    text-decoration-style: solid;
    color: var(--primary-dark);
}

/* Mobile readability adjustments */
@media (max-width: 768px) {
    .section-body,
    .sub-rule-text {
        font-size: 15px;
        line-height: 1.85;
        word-spacing: 0.02em;
    }

    .section-body p,
    .sub-rule-text p {
        margin-bottom: 1em;
        max-width: 100%;
    }

    .section-body p:last-child,
    .sub-rule-text p:last-child {
        line-height: 1.95;
    }

    .sub-rule-number {
        min-width: 40px;
        font-size: 14px;
    }

    .container > p {
        font-size: 15px;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .section-body,
    .sub-rule-text {
        font-size: 15px;
        line-height: 1.85;
    }

    .sub-rule-item {
        padding: 10px 0;
        margin-bottom: 12px;
    }
}

/* ========================================
   TABLE IMPROVEMENTS
   ======================================== */

/* Table row hover effects */
.dataTable tbody tr {
    transition: background-color 0.15s ease;
}

.dataTable tbody tr:hover {
    background-color: var(--gray-50) !important;
}

/* Table header styling */
.dataTable thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Table cell padding */
.dataTable tbody td {
    padding: 10px 16px;
    vertical-align: middle;
    font-size: 14px;
}

/* Cursor pointer for clickable rows */
.dataTable tbody tr[onclick],
.dataTable tbody tr[style*="cursor"] {
    cursor: pointer;
}
