/* Document Drafting Module Styles */

/* CSS Variables for consistent theming - MATCHING REACT REFERENCE */
:root {
    /* Base colors matching React reference */
    --background: 0 0% 100%;        /* White background */
    --foreground: 215 25% 27%;      /* Slate-700 equivalent */
    --card: 0 0% 100%;              /* White cards */
    --card-foreground: 215 25% 27%; /* Slate-700 text */

    /* Primary colors - Blue theme from reference */
    --primary: 217 91% 60%;         /* Blue-600 equivalent */
    --primary-foreground: 0 0% 100%; /* White text */

    /* Secondary colors */
    --secondary: 210 40% 98%;       /* Blue-50 equivalent */
    --secondary-foreground: 215 25% 27%;

    /* Muted colors */
    --muted: 210 40% 96%;           /* Slate-100 equivalent */
    --muted-foreground: 215 16% 47%; /* Slate-600 equivalent */

    /* Accent colors */
    --accent: 210 40% 96%;
    --accent-foreground: 215 25% 27%;

    /* Destructive colors */
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    /* Border and input colors */
    --border: 214 32% 91%;          /* Slate-200 equivalent */
    --input: 214 32% 91%;
    --ring: 217 91% 60%;            /* Primary color for focus rings */
    --radius: 0.5rem;

    /* Green colors for addon sections */
    --green-50: 138 76% 97%;        /* Green-50 */
    --green-600: 142 71% 45%;       /* Green-600 */
    --green-700: 142 72% 29%;       /* Green-700 */
    --green-800: 142 83% 20%;       /* Green-800 */
}

/* Base styles - Clean white background like React reference */
body {
    background: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
    font-family: 'Noto Sans Gujarati', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.drafting-container {
    background: hsl(var(--background));
    min-height: 100vh;
    padding: 2rem 0;
}

.drafting-card {
    background: hsl(var(--card));
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(var(--border));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.drafting-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: hsl(var(--primary) / 0.3);
    /* Remove transform to prevent position changes */
}

/* Category and Service Cards */
.category-card, .service-card {
    background: hsl(var(--card));
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(var(--border));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}

.category-card:hover, .service-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: hsl(var(--primary));
    background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--primary) / 0.02) 100%);
    transform: translateY(-2px);
}

.service-card-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Enhanced Service Card Header */
.service-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-card-header .card-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.service-card-header .flex-grow-1 {
    flex: 1;
    min-width: 0;
}

/* Service Card Title and Description */
.service-card-content .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.service-card-content .card-text {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Service Badges */
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
}

.service-badge.badge-info {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary) / 0.05) 100%);
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--primary) / 0.2);
}

.service-badge.badge-warning {
    background: linear-gradient(135deg, hsl(45 93% 47% / 0.1) 0%, hsl(45 93% 47% / 0.05) 100%);
    color: hsl(45 93% 47%);
    border: 1px solid hsl(45 93% 47% / 0.2);
}

.service-badge i {
    font-size: 0.75rem;
}

/* Service Card Footer */
.service-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.5rem;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

/* Enhanced Button Styles */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.9) 100%);
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.9) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

/* Header styles */
.service-header {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.service-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.service-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Card icon styles */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.05) 100%);
    color: hsl(var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Form styles */
.form-control-custom {
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-control-custom:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-control-custom::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Select styles */
.form-select-custom {
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-select-custom:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* Textarea styles */
.form-textarea-custom {
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-textarea-custom:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* Field group styles */
.field-group {
    margin-bottom: 1.5rem;
}

.field-label {
    display: block;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.field-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Repeater field styles */
.repeater-container {
    border: 2px dashed hsl(var(--border));
    border-radius: 12px;
    padding: 1rem;
    background: hsl(var(--muted) / 0.3);
}

.repeater-item {
    margin-bottom: 0.75rem;
}

.repeater-item:last-child {
    margin-bottom: 0;
}

.add-repeater-item {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-repeater-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
}

.remove-item {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border: none;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
}

.remove-item:hover {
    background: hsl(var(--destructive) / 0.9);
}

/* Addon service styles */
.addon-service-item {
    transition: all 0.2s ease;
}

.addon-service-item:hover {
    background: hsl(var(--muted) / 0.5) !important;
    border-color: hsl(var(--primary)) !important;
}

/* Addon Section Styling - Matching React Green Theme */
.addon-section {
    background: hsl(var(--green-50)) !important;
    border: 1px solid hsl(var(--green-600) / 0.2) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
}

.addon-section-header {
    color: hsl(var(--green-800)) !important;
}

.addon-section-icon {
    background: hsl(var(--green-600) / 0.15) !important;
    color: hsl(var(--green-600)) !important;
}

/* Enhanced Checkbox Styling - React-like */
.addon-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid hsl(var(--border));
    border-radius: 3px;
    background-color: hsl(var(--background));
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
    accent-color: hsl(var(--primary));
}

.addon-checkbox:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.1);
}

.addon-checkbox:checked {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

/* Custom checkbox appearance for better compatibility */
.addon-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
    background-size: 10px 10px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Addon Service Item Styling - React-like white cards */
.addon-service-item {
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
}

.addon-service-item:hover {
    background: hsl(var(--card)) !important;
    border-color: hsl(var(--primary)) !important;
    /* Remove transform to prevent position changes */
    box-shadow: 0 2px 8px hsl(var(--primary) / 0.15);
}

.addon-label {
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.addon-price {
    font-weight: 600;
    color: hsl(var(--green-700));
}

/* Service details styles */
.service-details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-detail-item {
    padding: 1rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: 8px;
    border: 1px solid hsl(var(--border));
}

.detail-label {
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
}

.detail-value {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.service-price {
    font-weight: 700;
    color: hsl(120 60% 30%);
    font-size: 1.125rem;
}

.service-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-warning {
    background: hsl(45 93% 47% / 0.15);
    color: hsl(45 93% 47%);
}

/* Button styles */
.btn-primary-custom {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsl(var(--primary) / 0.4), 0 4px 12px hsl(var(--primary) / 0.3);
    color: hsl(var(--primary-foreground));
    text-decoration: none;
}

.submit-button-enhanced {
    position: relative;
    overflow: hidden;
}

.submit-button-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-button-enhanced:hover::before {
    left: 100%;
}

/* Utility classes */
.text-muted-custom {
    color: hsl(var(--muted-foreground));
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Improved Spacing and Layout */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 992px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Section Spacing */
.page-section {
    padding: 4rem 0;
}

.hero-section {
    padding: 4rem 0 5rem 0;
}

.search-section {
    padding: 2rem 0;
}

/* Card Spacing Improvements */
.drafting-card {
    margin-bottom: 2rem;
    height: 100%;
}

.service-card-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card-header {
    margin-bottom: 1.5rem;
}

.service-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border) / 0.5);
}

/* Typography Spacing */
.hero-title {
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.section-title {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    margin-bottom: 3rem;
    line-height: 1.6;
}

.card-title {
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-text {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Appointment Card Spacing */
.appointment-card {
    margin: 2rem 0;
    padding: 2.5rem;
}

.appointment-card h3 {
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.appointment-card p {
    margin-bottom: 0;
    line-height: 1.5;
}

/* Hero Badges Spacing */
.hero-badges {
    margin-top: 3rem;
    gap: 1.5rem;
}

.hero-badge {
    padding: 1rem 1.5rem;
    margin: 0.5rem;
}

/* Form Spacing */
.search-filter-form {
    margin-bottom: 2rem;
    padding: 2rem;
}

.field-group {
    margin-bottom: 2rem;
}

.field-label {
    margin-bottom: 0.75rem;
}

/* Breadcrumb Spacing */
.breadcrumb-custom {
    margin-bottom: 2rem;
}

.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 0;
}

/* Pagination spacing is now handled in the main pagination styles above */

/* Empty State Spacing */
.empty-state {
    padding: 4rem 2rem;
    margin: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drafting-container {
        padding: 1rem 0;
    }

    .page-section {
        padding: 2rem 0;
    }

    .hero-section {
        padding: 2rem 0 3rem 0;
    }

    .search-section {
        padding: 1.5rem 0;
    }

    .service-card-content {
        padding: 1.5rem;
    }

    .service-header {
        padding: 1.5rem;
    }

    .service-header h1 {
        font-size: 2rem;
    }

    .appointment-card {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .hero-badges {
        margin-top: 2rem;
        gap: 1rem;
    }

    .hero-badge {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        margin-bottom: 2rem;
    }

    .search-filter-form {
        padding: 1.5rem;
    }

    .empty-state {
        padding: 3rem 1rem;
    }

    .sticky-top {
        position: static !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Category Header Mobile Styles */
    .category-header-section {
        padding: 2rem 0 1.5rem 0;
    }

    .category-title {
        font-size: 2rem;
    }

    .category-description {
        font-size: 1rem;
    }

    .category-header-section .breadcrumb {
        padding: 0.5rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    /* Pagination Mobile Styles */
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .pagination-lg .page-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .service-card-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .appointment-card .row {
        text-align: center;
    }

    .appointment-card .col-md-4 {
        margin-top: 1rem;
    }
}

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Focus styles for accessibility */
.form-control-custom:focus,
.form-select-custom:focus,
.form-textarea-custom:focus,
.addon-checkbox:focus {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-badge i {
    font-size: 1rem;
}

/* Appointment Card Styles */
.page-section {
    padding: 3rem 0;
}

.section-bg-pattern-2 {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, hsl(var(--primary) / 0.02) 100%);
    position: relative;
}

.section-bg-pattern-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, hsl(var(--primary) / 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, hsl(var(--primary) / 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.appointment-card {
    background: hsl(var(--card));
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(var(--border));
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.appointment-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: hsl(var(--primary) / 0.3);
}

.appointment-card .card-icon {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.05) 100%);
    color: hsl(var(--primary));
}

/* Section Background Patterns */
.section-bg-pattern-3 {
    background: hsl(var(--background));
    position: relative;
}

.section-bg-pattern-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, hsl(var(--muted)) 25%, transparent 25%),
        linear-gradient(-45deg, hsl(var(--muted)) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, hsl(var(--muted)) 75%),
        linear-gradient(-45deg, transparent 75%, hsl(var(--muted)) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    opacity: 0.03;
    pointer-events: none;
}

/* Category Header Section Styles */
.category-header-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 50%, #81d4fa 100%);
    padding: 3rem 0 2rem 0;
    position: relative;
    overflow: hidden;
}

.category-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.category-header-section .container {
    position: relative;
    z-index: 1;
}

.category-header-section .breadcrumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.category-header-section .breadcrumb-item a {
    color: #0277bd;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.category-header-section .breadcrumb-item a:hover {
    color: #01579b;
    text-decoration: underline;
}

.category-header-section .breadcrumb-item.active {
    color: #01579b;
    font-weight: 600;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #01579b;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.category-description {
    font-size: 1.125rem;
    color: #0277bd;
    margin-bottom: 0;
    line-height: 1.6;
    font-family: 'Noto Sans Gujarati', sans-serif;
    opacity: 0.9;
}

.category-header-section .card-icon {
    background: linear-gradient(135deg, rgba(1, 87, 155, 0.15) 0%, rgba(1, 87, 155, 0.05) 100%);
    color: #01579b;
    border: 2px solid rgba(1, 87, 155, 0.2);
}

/* Search and Filter Styles */
.search-section {
    border-bottom: 1px solid hsl(var(--border));
}

.search-form .input-group {
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-form .form-control:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.search-filter-form {
    background: hsl(var(--muted) / 0.3);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border));
}

.search-filter-form .form-control,
.search-filter-form .form-select {
    transition: all 0.2s ease;
}

.search-filter-form .form-control:focus,
.search-filter-form .form-select:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* Enhanced Pagination Styles */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    margin: 2rem 0;
    justify-content: center;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.pagination .page-item {
    margin: 0 0.125rem;
}

.pagination .page-link {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    margin-left: 0;
    line-height: 1.25;
    color: hsl(var(--foreground));
    text-decoration: none;
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans Gujarati', sans-serif;
    font-weight: 500;
}

.pagination .page-link:hover {
    z-index: 2;
    color: hsl(var(--primary));
    text-decoration: none;
    background-color: hsl(var(--muted));
    border-color: hsl(var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.25rem hsl(var(--primary) / 0.25);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: hsl(var(--primary-foreground));
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination .page-item.disabled .page-link {
    color: hsl(var(--muted-foreground));
    pointer-events: none;
    background-color: hsl(var(--muted));
    border-color: hsl(var(--border));
    opacity: 0.6;
}

.pagination-lg .page-link {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

/* Pagination Icons */
.pagination .page-link i {
    font-size: 0.875rem;
    vertical-align: middle;
}

.pagination-lg .page-link i {
    font-size: 1rem;
}

/* Real-time Search Enhancements */
.search-form input[name="search"]:focus,
.search-filter-form input[name="search"]:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    outline: none;
}

.search-form button[type="submit"]:disabled,
.search-filter-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.search-form button[type="submit"] i,
.search-filter-form button[type="submit"] i {
    transition: all 0.3s ease;
}

/* Search input loading state */
.search-form input[name="search"].searching,
.search-filter-form input[name="search"].searching {
    background-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: searchLoading 1.5s infinite;
}

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

/* Filter button enhancements */
.search-filter-form .btn i.bi-funnel {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* Enhanced search section styling */
.search-section {
    border-bottom: 1px solid hsl(var(--border));
}

.search-filter-form {
    background: hsl(var(--card));
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid hsl(var(--border));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Empty State Styles */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state .card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-state h4 {
    color: hsl(var(--foreground));
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: hsl(var(--muted-foreground));
    max-width: 400px;
    margin: 0 auto;
}

/* Badge Styles for Filters */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
}

.badge a {
    text-decoration: none;
    font-weight: bold;
}

.badge a:hover {
    opacity: 0.8;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: hsl(var(--primary));
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Print styles */
@media print {
    .drafting-container {
        background: white;
        box-shadow: none;
    }

    .drafting-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .submit-button-enhanced,
    .btn-primary-custom {
        display: none;
    }

    .search-section,
    .search-filter-form,
    .pagination {
        display: none;
    }
}

/* Grid and Layout Improvements */
.grid-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    padding: 2rem 0;
}

/* Ensure consistent spacing for Bootstrap grid */
.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col-md-6, .col-lg-4, .col-sm-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Card spacing fixes */
.card, .drafting-card, .category-card, .service-card {
    margin-bottom: 1.5rem;
}

/* Prevent layout shift on hover */
.card:hover, .drafting-card:hover, .category-card:hover, .service-card:hover {
    margin-bottom: 1.5rem; /* Maintain consistent margin */
}
